Other Parts Discussed in Thread: TLV320AIC3106
Hi, TI Expert
As title description.
I try to find related setting samples for dummy sound card(MCASP2) on AM62x
Could you share with us?
Many Thanks
Gibbs
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.
Hi, TI Expert
As title description.
I try to find related setting samples for dummy sound card(MCASP2) on AM62x
Could you share with us?
Many Thanks
Gibbs
Hi Gibbs,
Can you share the intent of creating a dummy sound card?
Modifying the existing DTS file with custom codec, please follow the instructions provided in Linux DT documentation.
Best Regards,
Suren
Hi, Suren
Customer use one MCASP2 to create 4 dummy sound cards.
Each dummy card support TDM32, 48KHz, 16-bit.
I think this is SW early debug/development only for driver , real connect device is A2B*4 (AD2437 * 4)
Do we have any reference driver code for AD2437?
Many Thanks
Gibbs
Hi Suren and Gibbs
Here are the current dts settings, can you help check whether it is correct or have any suggestions. thank you.
/ { codec_test: codec_test { compatible = "linux,snd-soc-dummy"; #sound-dai-cells = <0>; status="okay"; }; // am6234 is the clock slave (bit and frame clks, mclk not needed) sound { compatible = "simple-audio-card"; simple-audio-card,name = "AM6234-TDM"; simple-audio-card,format = "dsp_b"; simple-audio-card,frame-master = <&sound_master>; simple-audio-card,bitclock-master = <&sound_master>; status="okay"; simple-audio-card,cpu { sound-dai = <&mcasp2>; system-clock-direction = "in"; // bitclock-inversion; dai-tdm-slot-num = <32>; dai-tdm-slot-width = <16>; }; sound_master: simple-audio-card,codec { sound-dai = <&codec_test>; }; }; }; mcasp2_pins_default: mcasp2-pins-default { pinctrl-single,pins = < // input data lines AM62X_IOPAD(0x005c, PIN_INPUT, 3) /* (R24) GPMC0_AD8.MCASP2_AXR0 */ AM62X_IOPAD(0x0060, PIN_INPUT, 3) /* (R25) GPMC0_AD9.MCASP2_AXR1 */ AM62X_IOPAD(0x0064, PIN_INPUT, 3) /* (T25) GPMC0_AD10.MCASP2_AXR2 */ AM62X_IOPAD(0x0068, PIN_INPUT, 3) /* (R21) GPMC0_AD11.MCASP2_AXR3 */ // clk slave AM62X_IOPAD(0x006C, PIN_INPUT, 3) /* (T22) GPMC0_AD12.MCASP2_AFSX */ AM62X_IOPAD(0x0070, PIN_INPUT, 3) /* (T24) GPMC0_AD13.MCASP2_ACLKX */ // output data lines AM62X_IOPAD(0x0094, PIN_OUTPUT, 3) /* (N20) GPMC0_BE1n.MCASP2_AXR12 */ AM62X_IOPAD(0x0094, PIN_OUTPUT, 3) /* (M22) GPMC0_DIR.MCASP2_AXR13 */ AM62X_IOPAD(0x00A8, PIN_OUTPUT, 3) /* (M21) GPMC0_CSn0.MCASP2_AXR14 */ AM62X_IOPAD(0x00AC, PIN_OUTPUT, 3) /* (L21) GPMC0_CSn1.MCASP2_AXR15 */ >; }; &mcasp2 { status = "okay"; #sound-dai-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&mcasp2_pins_default>; op-mode = <0>; /* MCASP_IIS_MODE */ tdm-slots = <2>; ext-clk-provider; /* external clocks provided, override DAI_FMT to be bclk/fs consumer */ //rx-only-async; /* Only using RX on this MCASP, use ACLKR/AFSR pins */ extended-tdm-fs; /* TDM mode defaults to 1-bit-width frame sync, this flags extends to 1-word-width */ /* 1 : Tx, 2 : Rx */ serial-dir = < 2 2 2 2 0 0 0 0 0 0 0 0 1 1 1 1 >; tx-num-evt = <32>; rx-num-evt = <32>; };
Hi Edward,
For using dummy-codec in dts you will need following patch https://github.com/jailuthra/linux/commit/2d577a938d24f238edb19c8481dbb7136ff43cf6
Best Regards,
Suren
Hi Suren
thanks, we apply this patch, but still can't not arecord data from mcasp2 ,
and I also find a message "platform sound@0: deferred probe pending" , should we need to revise dts or any patch need to apply? thank you
update current dts setting:
/ { codec_test: codec_test { #sound-dai-cells = <0>; compatible = "linux,snd-soc-dummy"; status="okay"; }; sound0: sound@0 { compatible = "simple-audio-card"; simple-audio-card,name = "TYM_SND"; simple-audio-card,format = "dsp_a"; simple-audio-card,mclk-fs = <512>; simple-audio-card,bitclock-master = <&sound_master>; simple-audio-card,frame-master = <&sound_master>; status="okay"; simple-audio-card,cpu { sound-dai = <&mcasp2>; //system-clock-direction = "in"; // bitclock-inversion; //dai-tdm-slot-num = <8>; //dai-tdm-slot-width = <16>; //system-clock-frequency = <24576000>; }; sound_master: simple-audio-card,codec { sound-dai = <&codec_test>; //clock-frequency = <24576000>; }; }; mcasp2_pins_default: mcasp2-pins-default { pinctrl-single,pins = < AM62X_IOPAD(0x005c, PIN_INPUT, 3) /* (R24) GPMC0_AD8.MCASP2_AXR0 */ AM62X_IOPAD(0x0060, PIN_INPUT, 3) /* (R25) GPMC0_AD9.MCASP2_AXR1 */ AM62X_IOPAD(0x0064, PIN_INPUT, 3) /* (T25) GPMC0_AD10.MCASP2_AXR2 */ AM62X_IOPAD(0x0068, PIN_INPUT, 3) /* (R21) GPMC0_AD11.MCASP2_AXR3 */ AM62X_IOPAD(0x006C, PIN_INPUT, 3) /* (T22) GPMC0_AD12.MCASP2_AFSX */ AM62X_IOPAD(0x0070, PIN_INPUT, 3) /* (T24) GPMC0_AD13.MCASP2_ACLKX */ AM62X_IOPAD(0x0094, PIN_OUTPUT, 3) /* (N20) GPMC0_BE1n.MCASP2_AXR12 */ AM62X_IOPAD(0x0094, PIN_OUTPUT, 3) /* (M22) GPMC0_DIR.MCASP2_AXR13 */ AM62X_IOPAD(0x00A8, PIN_OUTPUT, 3) /* (M21) GPMC0_CSn0.MCASP2_AXR14 */ AM62X_IOPAD(0x00AC, PIN_OUTPUT, 3) /* (L21) GPMC0_CSn1.MCASP2_AXR15 */ >; }; &mcasp2 { status = "okay"; #sound-dai-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&mcasp2_pins_default>; op-mode = <0>; /* MCASP_IIS_MODE */ tdm-slots = <2>; ext-clk-provider; /* external clocks provided, override DAI_FMT to be bclk/fs consumer */ rx-only-async; /* Only using RX on this MCASP, use ACLKR/AFSR pins */ extended-tdm-fs; /* TDM mode defaults to 1-bit-width frame sync, this flags extends to 1-word-width */ /* 1 : Tx, 2 : Rx */ serial-dir = < 2 2 2 2 2 2 0 0 0 0 0 0 1 1 1 1 >; tx-num-evt = <32>; rx-num-evt = <32>; };
Hi Edward,
Can you attach the whole boot log and complete DTS file for us to analyze?
Best Regards,
Suren
Hi, Suren
Update, because the dts pin had a conflict before, after modification, the sound card can now be successfully detected.
But I still can't record the wav file successfully, still having problem
I think there are still some dts define that need to be modified, I added a block diagram to illustrate my purpose,
Also please give me some advice. Thank you.dts_log.zip
Edward,
On our platform, we set the amixer controls for record to be functional. Also, can you check if the Mic Bias is correct?
amixer sset ‘Left PGA Mixer Mic3L’ on amixer sset ‘Right PGA Mixer Mic3R’ on amixer sset ‘Left PGA Mixer Mic3R’ on amixer sset ‘Right PGA Mixer Mic3L’ on
See if these help.
Best Regards,
Suren
Hi Suren,
Let me clarify the current goals and issues.
1.Our MICs is connect to AD2437 then convert to TDM32 format , send to TI S6234 via MCASP2
2. Our clock chip will provide SCLK (24.576MHz) and LRCLK (48KHz) to TI 6234, so TI 6234 should be set to Slave mode
So we plan to create a dummy sound card to record TDM32 data via MCASP2,
but I think there are still problems with the DTS setting.
Could you review the current DTS 2620.dts_log.zipsettings based on our request?
Since we still can't record successfully, please help.
Thank you.
Hi Edward,
Our EVM board also uses AM62x as slave and the codec TLV320AIC3106 is the clock master.
With this being said, please refer the below DTS file on how we have been able to have audio functional on both playback and capture.
We have the clock frequency to 12288000, dai-link property as bitclock-inversion and format as dsp_b.
Can you try to use the same configuration as ours and see if it helps.
Best Regards,
Suren