imx6qp, audio codec support

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6qp, audio codec support

Jump to solution
1,397 Views
angelo_d
Senior Contributor I

Dear all,

i have a wm8988 connected to imx6qp, kernel 4.1.15.

Linux has the wm8988 driver, but machine driver was missing and i am setting up a simple one, based on

similar ASoC machine drivers.

I am actually trying to set imx6qp as i2s master, and codec device as slave.

Card is detected properly and registered, if i try some alsa "speaker-test", i am observing (by scope)

- i2c transfers works fine, tested writing and reading from codec rtegisters

- i2s BCLK, LRframe clock and samples, all driven from cpu

- i see also sysclk, that is sent from CPU CKO output as 24000000,

- i see no output at all from any of the 4 codec analogues outputs. Tried do change mixer settings, aplay, paplay, always

nothing in the outputs.

So my questions actually are:

1) what should be the reasons in selecting the codec mode as i2s master or slave ?

2) Is it ok to be interfaced to the codec with imx6qp as the i2s master ?

3) do you have any knowledge of a similar imx machine driver for a similar codec/scenario ?

Many thanks

angelo

Labels (1)
0 Kudos
Reply
1 Solution
963 Views
igorpadykov
NXP Employee
NXP Employee

Hi Angelo

1. preferable option slave mode, as in that case all clock signals,

frame sync, bit clock, are generated by external codec and allows for more

stable and accurate clocks.

2. ok

3. it may be useful to check

No sound captured with SGTL5000 on i.MX6 in I²S master mode

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
5 Replies
963 Views
angelo_d
Senior Contributor I

Hi Igor. Still many thanks.

So if i understand correctly, there are

- mclk (master clock)

and

- ssi bitclk (also called system clock (sysclk in linux drivers) and related ssi frame clock, both linked to sample rate.

0 Kudos
Reply
963 Views
igorpadykov
NXP Employee
NXP Employee

Hi Angelo

yes, right

Best regards

igor

0 Kudos
Reply
963 Views
angelo_d
Senior Contributor I

Hi Igor, thanks for excellent help.

Still a brief question about:

I am assuming sysclk supplied from imx6qp cpu to codec is needed only when codec is the master and it needs to generate bitclock and lrclk from it. Correct ? Or i need to supply still the sysclk (mclk) to the codec even when the codec is just a ssi slave ?

Thanks

angelo

0 Kudos
Reply
963 Views
igorpadykov
NXP Employee
NXP Employee

Hi Angelo

port SRCK is used in master and synchronous mode

as network clock (oversampling clock, integer multiple of frame clock).

In other cases its usage is optional.

Best regards

igor

0 Kudos
Reply
964 Views
igorpadykov
NXP Employee
NXP Employee

Hi Angelo

1. preferable option slave mode, as in that case all clock signals,

frame sync, bit clock, are generated by external codec and allows for more

stable and accurate clocks.

2. ok

3. it may be useful to check

No sound captured with SGTL5000 on i.MX6 in I²S master mode

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply