Hi,
How do I set mcasp2 to use AUD_CLKIN0, what all changes do I need to do ?
Also is the above question valid as my codec is acting as master.
Thanks And Regards,
--Mike
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Mike,
mike A said:I did see it but was a bit confused. I see that in uboot macsp2 clock is set and also in linux-kernel as well.
In my case:
AUXCLK(OSC1) ---> CLKOUT0----> Codec chip (AUD_CLKIN0)-----------> mcasp2
Note that McASP numbering starts from 0 in datasheet/TRM:
McASP2 base address is 0x4680_0000 (data port) and 0x4805_0000 (config port).
While in Linux kernel, the mcasp clocks starts from 1:
McASP2 module clocks are mcasp3_ick, mcasp3_fck (aux_clk) and mcasp3_ahx_ck (ahclkx)
AUD_CLKIN0 is xref0_ck.
For selecting AUD_CLKIN0 for input on McASP2 ahclkx (Transmit High-Frequency master Clock) pin:
McASP_AHCLK_CLKSRC[18:16] McASP2_AHCLKX_SOURCE = 0x0 = 000 : Source is AUD_CLKIN0 - Select the source clock of the MCASP2 AH clock transmit
So, do you need to provide AUD_CLKIN0/xref0_ck to the McASP2 ahclkx (mcasp3_ahx_ck) input?
See also the below e2e thread, which discuss AUD_CLKIN2/xref2_ck:
Regards,
Pavel
Mike,
mike A said:How much clock frequency is needed for mcasp2 to driver ?
I am not sure I understand your last question. Regarding clock frequency values, refer to the DM814x datasheet.
Regards,
Pavel
Mike,
mike A said:I want to set my codec as master and mcasp2 as slave,
The TI81xx audio ALSA driver sets audio codec (AIC3x) as master and McASP2 as slave by default:
McASP is configured as slave and AIC31 Codec is configured as master.
By default, codec is configured in master mode and McASP is used as slave.
McASP2 on the TI81xx EVMs operates in a slave mode (codec driving the bit clock and the frame sync)
Regards,
Pavel
Mike,
mike A said:Do I need to change the static u8 ti8148_iis_serializer_direction[] to work it in i2s mode ?
See the below e2e thread:
Regards,
Pavel