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.

PROCESSOR-SDK-AM62X: Audio is not working

Part Number: PROCESSOR-SDK-AM62X
Other Parts Discussed in Thread: TLV320AIC3106

Hello TI

trying to test audio (TLVAIC33 codec) with AM62x  (MCASP0) and the configurations  are done as expected, aplay detects the sound card and able to play the sound using aplay command , but no sound in headphones

found that , the Frame sync is not 50%  duty cycle (its 10% duty cycle) , even the frequency is correct (44.1khz) ,looks like the  configuration is like TDM not I2S?

is it correct to use tdm-slots and op-mode together ?

also got the error : ti-bcdma 485c0100.dma-controller: chan0 teardown timeout

signals captured 

BCLK : ||||||||||||||||||||||||||||||||||||||||||||||||||||

FR      : |_________|________|_____ (like TDM not like I2S, freq is correct and equal to sampling freq) 

below is my config : 

please check and help me what is wrong with it ?

sound {
compatible = "simple-audio-card";
simple-audio-card,name = "AM62x-SKEVM";
simple-audio-card,widgets =
"Headphone", "Headphone Jack";
simple-audio-card,routing =
"Headphone Jack", "HPLOUT",
"Headphone Jack", "HPROUT";
simple-audio-card,format = "dsp_b";
simple-audio-card,bitclock-master = <&sound_master>;
simple-audio-card,frame-master = <&sound_master>;
simple-audio-card,bitclock-inversion;

simple-audio-card,cpu {
sound-dai = <&mcasp0>; 
};

sound_master: simple-audio-card,codec {
sound-dai = <&tlv320aic3106>;
clocks = <&tlv320_mclk>;
};
};

&mcasp0 {
status = "okay";
//added below properties
#sound-dai-cells = <0>;

pinctrl-names = "default";
pinctrl-0 = <&main_mcasp0_pins_default>;

op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;

serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
0 1 2 0
0 0 0 0
0 0 0 0
0 0 0 0
>;
tx-num-evt = <32>;
rx-num-evt = <32>;
};

Thanks,

Naresh

  • Hello,

    is it correct to use tdm-slots and op-mode together ?

    -> Yes, that's the correctr config. On our EVM, we do the same and here is a reference: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi?h=ti-linux-5.10.y#n710

    also got the error : ti-bcdma 485c0100.dma-controller: chan0 teardown timeout

    -> Yes, it's a know issue but shouldn't have any impact on audio out. Have you tired running the same app on our SK EVM?

    Regards,
    Krunal

  • hello Krunal

    we do not have EVK currently, 

    we are using our custom board, also can u please confirm the TDM and I2S settings are proper ? , why my WSCLK (Frame sync) is not in I2S format ?

    and we can not hear any audio from headpones (alsamixer is fine) 

    regards

    nagendra 

  • Nagendra

    For efficient support, please procure the EVM. We test are SDK on the EVM and if you are porting this to your custom board, and if the things are not working, we need to make sure you can compare/contrast what is working on the EVM vs what stopped working due to board port or driver porting issues on your board.

  • sure, we are in process of getting EVM, but for now, could you confirm me the why the frame sync is in TDM format and the configuration is in I2S format

    ? (according to config code is master) 

  • Hello,

    I am not sure I understand the question because TDM format (2 slots: right channel <-> left channel) is like I2S format. For example, here is the block diagram of TDM vs I2S:

    If you are operating in 2 slots, slot 0 would be right channel and slot 1 would be left channel. Could you share what you are observing on your waveforms and what's the expectation? 

    Regards,
    Krunal

  • hello Krunal, 

    yes its clear for me that the I2S is two channel TDM. 

    the configuration was I2S according to DTB  and code is master  (op_mode=0)  but the waveforms observed as below (like TDM) which i already explained in my previous post (currently i do not have scope capture) 

    so, the question is 

    1. is my configuration correct ? 

    2. if yes, why the codec provides TDM  output instead of I2S 

    3. if i can go with TDM, what are other changes to be done for the dts ?

    regards

    -nagendra 

  • Hello Nagendra,

    I believe your configuration is correct and it matches our setup as well. On my setup, I downloaded the latest PSDK8.04 and I was able to hear sound from the output. I have also attached my amixer settings and I am wondering if that helps with your debug.

    Regards,
    Krunal

    root@am62xx-evm:~# aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: AM62xSKEVM [AM62x-SKEVM], device 0: davinci-mcasp.0-tlv320aic3x-hifi tlv320aic3x-hifi-0 [davinci-mcasp.0-tlv320aic3x-hifi tlv320aic3x-hifi-0]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    root@am62xx-evm:~# amixer
    Simple mixer control 'PCM',0
      Capabilities: pvolume
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 127
      Mono:
      Front Left: Playback 87 [69%] [-20.00dB]
      Front Right: Playback 87 [69%] [-20.00dB]
    Simple mixer control 'Line',0
      Capabilities: pvolume pswitch
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 9
      Mono:
      Front Left: Playback 0 [0%] [0.00dB] [on]
      Front Right: Playback 0 [0%] [0.00dB] [on]
    Simple mixer control 'Line DAC',0
      Capabilities: pvolume
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 118
      Mono:
      Front Left: Playback 71 [60%] [-23.50dB]
      Front Right: Playback 71 [60%] [-23.50dB]
    Simple mixer control 'Line Line2 Bypass',0
      Capabilities: volume
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: 0 - 118
      Front Left: 71 [60%] [-23.50dB]
      Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'Line PGA Bypass',0
      Capabilities: volume
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: 0 - 118
      Front Left: 71 [60%] [-23.50dB]
      Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'Mono',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined
      Playback channels: Mono
      Limits: Playback 0 - 9
      Mono: Playback 0 [0%] [0.00dB] [on]
    Simple mixer control 'Mono DAC',0
      Capabilities: pvolume
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 118
      Mono:
      Front Left: Playback 71 [60%] [-23.50dB]
      Front Right: Playback 71 [60%] [-23.50dB]
    Simple mixer control 'Mono Line2 Bypass',0
      Capabilities: volume
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: 0 - 118
      Front Left: 71 [60%] [-23.50dB]
      Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'Mono Mixer DACL1',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [on]
    Simple mixer control 'Mono Mixer DACR1',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [on]
    Simple mixer control 'Mono Mixer Line2L Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Mono Mixer Line2R Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Mono Mixer PGAL Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Mono Mixer PGAR Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Mono PGA Bypass',0
      Capabilities: volume
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: 0 - 118
      Front Left: 71 [60%] [-23.50dB]
      Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'ADC HPF Cut-off',0
      Capabilities: enum
      Items: 'Disabled' '0.0045xFs' '0.0125xFs' '0.025xFs'
      Item0: 'Disabled'
      Item1: 'Disabled'
    Simple mixer control 'AGC',0
      Capabilities: pswitch
      Playback channels: Front Left - Front Right
      Mono:
      Front Left: Playback [off]
      Front Right: Playback [off]
    Simple mixer control 'De-emphasis',0
      Capabilities: pswitch
      Playback channels: Front Left - Front Right
      Mono:
      Front Left: Playback [off]
      Front Right: Playback [off]
    Simple mixer control 'HP',0
      Capabilities: pvolume pswitch
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 9
      Mono:
      Front Left: Playback 0 [0%] [0.00dB] [on]
      Front Right: Playback 0 [0%] [0.00dB] [on]
    Simple mixer control 'HP DAC',0
      Capabilities: pvolume
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 118
      Mono:
      Front Left: Playback 71 [60%] [-23.50dB]
      Front Right: Playback 71 [60%] [-23.50dB]
    Simple mixer control 'HP Line2 Bypass',0
      Capabilities: volume
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: 0 - 118
      Front Left: 71 [60%] [-23.50dB]
      Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'HP PGA Bypass',0
      Capabilities: volume
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: 0 - 118
      Front Left: 71 [60%] [-23.50dB]
      Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'HPCOM',0
      Capabilities: pvolume pswitch
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 9
      Mono:
      Front Left: Playback 0 [0%] [0.00dB] [on]
      Front Right: Playback 0 [0%] [0.00dB] [on]
    Simple mixer control 'HPCOM DAC',0
      Capabilities: pvolume
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 118
      Mono:
      Front Left: Playback 71 [60%] [-23.50dB]
      Front Right: Playback 71 [60%] [-23.50dB]
    Simple mixer control 'HPCOM Line2 Bypass',0
      Capabilities: volume
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: 0 - 118
      Front Left: 71 [60%] [-23.50dB]
      Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'HPCOM PGA Bypass',0
      Capabilities: volume
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: 0 - 118
      Front Left: 71 [60%] [-23.50dB]
      Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'Left AGC Attack time',0
      Capabilities: enum
      Items: '8ms' '11ms' '16ms' '20ms'
      Item0: '8ms'
    Simple mixer control 'Left AGC Decay time',0
      Capabilities: enum
      Items: '100ms' '200ms' '400ms' '500ms'
      Item0: '100ms'
    Simple mixer control 'Left AGC Target level',0
      Capabilities: enum
      Items: '-5.5dB' '-8dB' '-10dB' '-12dB' '-14dB' '-17dB' '-20dB' '-24dB'
      Item0: '-5.5dB'
    Simple mixer control 'Left DAC Mux',0
      Capabilities: enum
      Items: 'DAC_L1' 'DAC_L3' 'DAC_L2'
      Item0: 'DAC_L1'
    Simple mixer control 'Left HP Mixer DACL1',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [on]
    Simple mixer control 'Left HP Mixer DACR1',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined
      Playback channels: Mono
      Limits: Playback 0 - 118
      Mono: Playback 118 [100%] [0.00dB] [off]
    Simple mixer control 'Left HP Mixer Line2L Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Left HP Mixer Line2R Bypass',0
      Capabilities: volume volume-joined pswitch pswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: 0 - 118
      Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Left HP Mixer PGAL Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Left HP Mixer PGAR Bypass',0
      Capabilities: volume volume-joined pswitch pswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: 0 - 118
      Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Left HPCOM Mixer DACL1',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [on]
    Simple mixer control 'Left HPCOM Mixer DACR1',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined
      Playback channels: Mono
      Limits: Playback 0 - 118
      Mono: Playback 118 [100%] [0.00dB] [off]
    Simple mixer control 'Left HPCOM Mixer Line2L Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Left HPCOM Mixer Line2R Bypass',0
      Capabilities: volume volume-joined pswitch pswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: 0 - 118
      Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Left HPCOM Mixer PGAL Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Left HPCOM Mixer PGAR Bypass',0
      Capabilities: volume volume-joined pswitch pswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: 0 - 118
      Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Left HPCOM Mux',0
      Capabilities: enum
      Items: 'differential of HPLOUT' 'constant VCM' 'single-ended'
      Item0: 'differential of HPLOUT'
    Simple mixer control 'Left Line Mixer DACL1',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [on]
    Simple mixer control 'Left Line Mixer DACR1',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined
      Playback channels: Mono
      Limits: Playback 0 - 118
      Mono: Playback 118 [100%] [0.00dB] [off]
    Simple mixer control 'Left Line Mixer Line2L Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Left Line Mixer Line2R Bypass',0
      Capabilities: volume volume-joined pswitch pswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: 0 - 118
      Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Left Line Mixer PGAL Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Left Line Mixer PGAR Bypass',0
      Capabilities: volume volume-joined pswitch pswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: 0 - 118
      Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Left Line1L Mux',0
      Capabilities: enum
      Items: 'single-ended' 'differential'
      Item0: 'single-ended'
    Simple mixer control 'Left Line1R Mux',0
      Capabilities: enum
      Items: 'single-ended' 'differential'
      Item0: 'single-ended'
    Simple mixer control 'Left Line2L Mux',0
      Capabilities: enum
      Items: 'single-ended' 'differential'
      Item0: 'single-ended'
    Simple mixer control 'Left PGA Mixer Line1L',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [on]
    Simple mixer control 'Left PGA Mixer Line1R',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Left PGA Mixer Line2L',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Left PGA Mixer Mic3L',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Left PGA Mixer Mic3R',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Output Driver Power-On time',0
      Capabilities: enum
      Items: '0us' '10us' '100us' '1ms' '10ms' '50ms' '100ms' '200ms' '400ms' '800ms' '2s' '4s'
      Item0: '0us'
    Simple mixer control 'Output Driver Ramp-up step',0
      Capabilities: enum
      Items: '0ms' '1ms' '2ms' '4ms'
      Item0: '0ms'
    Simple mixer control 'PGA',0
      Capabilities: cvolume cswitch
      Capture channels: Front Left - Front Right
      Limits: Capture 0 - 119
      Front Left: Capture 32 [27%] [16.00dB] [on]
      Front Right: Capture 32 [27%] [16.00dB] [on]
    Simple mixer control 'Right AGC Attack time',0
      Capabilities: enum
      Items: '8ms' '11ms' '16ms' '20ms'
      Item0: '8ms'
    Simple mixer control 'Right AGC Decay time',0
      Capabilities: enum
      Items: '100ms' '200ms' '400ms' '500ms'
      Item0: '100ms'
    Simple mixer control 'Right AGC Target level',0
      Capabilities: enum
      Items: '-5.5dB' '-8dB' '-10dB' '-12dB' '-14dB' '-17dB' '-20dB' '-24dB'
      Item0: '-5.5dB'
    Simple mixer control 'Right DAC Mux',0
      Capabilities: enum
      Items: 'DAC_R1' 'DAC_R3' 'DAC_R2'
      Item0: 'DAC_R1'
    Simple mixer control 'Right HP Mixer DACL1',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined
      Playback channels: Mono
      Limits: Playback 0 - 118
      Mono: Playback 118 [100%] [0.00dB] [off]
    Simple mixer control 'Right HP Mixer DACR1',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [on]
    Simple mixer control 'Right HP Mixer Line2L Bypass',0
      Capabilities: volume volume-joined pswitch pswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: 0 - 118
      Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Right HP Mixer Line2R Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Right HP Mixer PGAL Bypass',0
      Capabilities: volume volume-joined pswitch pswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: 0 - 118
      Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Right HP Mixer PGAR Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Right HPCOM Mixer DACL1',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined
      Playback channels: Mono
      Limits: Playback 0 - 118
      Mono: Playback 118 [100%] [0.00dB] [off]
    Simple mixer control 'Right HPCOM Mixer DACR1',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [on]
    Simple mixer control 'Right HPCOM Mixer Line2L Bypass',0
      Capabilities: volume volume-joined pswitch pswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: 0 - 118
      Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Right HPCOM Mixer Line2R Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Right HPCOM Mixer PGAL Bypass',0
      Capabilities: volume volume-joined pswitch pswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: 0 - 118
      Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Right HPCOM Mixer PGAR Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Right HPCOM Mux',0
      Capabilities: enum
      Items: 'differential of HPROUT' 'constant VCM' 'single-ended' 'differential of HPLCOM' 'external feedback'
      Item0: 'differential of HPROUT'
    Simple mixer control 'Right Line Mixer DACL1',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined
      Playback channels: Mono
      Limits: Playback 0 - 118
      Mono: Playback 118 [100%] [0.00dB] [off]
    Simple mixer control 'Right Line Mixer DACR1',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [on]
    Simple mixer control 'Right Line Mixer Line2L Bypass',0
      Capabilities: volume volume-joined pswitch pswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: 0 - 118
      Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Right Line Mixer Line2R Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Right Line Mixer PGAL Bypass',0
      Capabilities: volume volume-joined pswitch pswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: 0 - 118
      Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Right Line Mixer PGAR Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Right Line1L Mux',0
      Capabilities: enum
      Items: 'single-ended' 'differential'
      Item0: 'single-ended'
    Simple mixer control 'Right Line1R Mux',0
      Capabilities: enum
      Items: 'single-ended' 'differential'
      Item0: 'single-ended'
    Simple mixer control 'Right Line2R Mux',0
      Capabilities: enum
      Items: 'single-ended' 'differential'
      Item0: 'single-ended'
    Simple mixer control 'Right PGA Mixer Line1L',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Right PGA Mixer Line1R',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [on]
    Simple mixer control 'Right PGA Mixer Line2R',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Right PGA Mixer Mic3L',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Right PGA Mixer Mic3R',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    root@am62xx-evm:~# aplay /usr/share/sounds/alsa/Front_Right.wav 
    Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
    [ 1536.759037] ti-bcdma 485c0100.dma-controller: chan1 teardown timeout!
    root@am62xx-evm:~# 
    

  • Hi Krunal ,

    we keep the print statements in machine driver(davinci-mcasp.c) as well as in codec driver (tlv320aic3x.c ) so we got logs . please check with that any help is needed to debug .

    LOGS :

    [  205.879093]  line = 1806 fun =sound/soc/codecs/tlv320aic3x.c file =aic3x_i2c_probe
    root@am62xx-evm:/home#
    root@am62xx-evm:/home#
    root@am62xx-evm:/home# insmod snd-soc-simple-card.ko
    [  205.879809]  line = 1737 file =sound/soc/codecs/tlv320aic3x.c fun =aic3x_configure_ocmv
    [  218.373728]  line = 1644 file =sound/soc/codecs/tlv320aic3x.c fun =aic3x_probe
    [  218.381867]  line = 1557 file =sound/soc/codecs/tlv320aic3x.c fun =aic3x_init
    [  218.389232]  line = 1533 file =sound/soc/codecs/tlv320aic3x.c fun =aic3x_mono_init
    [  218.396516]  line = 1009 file =sound/soc/codecs/tlv320aic3x.c fun =aic3x_add_widgets
    [  218.404771]  line = 1245 file =sound/soc/codecs/tlv320aic3x.c fun =aic3x_set_dai_sysclk
    [  218.428551]  line = 1262 file =sound/soc/codecs/tlv320aic3x.c fun =aic3x_set_dai_fmt
    [  218.436640] SND_SOC_DAIFMT_CBM_CFM fun=aic3x_set_dai_fmt
    [  218.444498] SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_IB_NF
    [  218.470936] SND_SOC_DAIFMT_DSP_B and SND_SOC_DAIFMT_AC97 ,file=sound/soc/ti/davinci-mcasp.c
    root@am62xx-evm:/home# [  218.521476]  line = 174 fun =sound/soc/codecs/tlv320aic3x.c file =snd_soc_dapm_put_volsw_aic3x
    [  218.521507]  line = 174 fun =sound/soc/codecs/tlv320aic3x.c file =snd_soc_dapm_put_volsw_aic3x
    [  218.530277]  line = 174 fun =sound/soc/codecs/tlv320aic3x.c file =snd_soc_dapm_put_volsw_aic3x
    [  218.539022]  line = 174 fun =sound/soc/codecs/tlv320aic3x.c file =snd_soc_dapm_put_volsw_aic3x
    [  218.547761]  line = 174 fun =sound/soc/codecs/tlv320aic3x.c file =snd_soc_dapm_put_volsw_aic3x
    [  218.556509]  line = 174 fun =sound/soc/codecs/tlv320aic3x.c file =snd_soc_dapm_put_volsw_aic3x
    [  218.565220]  line = 174 fun =sound/soc/codecs/tlv320aic3x.c file =snd_soc_dapm_put_volsw_aic3x
    [  218.573933]  line = 174 fun =sound/soc/codecs/tlv320aic3x.c file =snd_soc_dapm_put_volsw_aic3x
    [  218.582644]  line = 174 fun =sound/soc/codecs/tlv320aic3x.c file =snd_soc_dapm_put_volsw_aic3x

    root@am62xx-evm:/home# aplay Test_WAV_1MG.wav
    Playing WAVE 'Test_WAV_1MG.wav' : [  218.591362]  line = 174 fun =sound/soc/codecs/tlv320aic3x.c file =snd_soc_dapm_put_volsw_aic3x
    Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
    [  246.219125]  line = 1054 fun =sound/soc/codecs/tlv320aic3x.c file =aic3x_hw_params
    [  246.229618] 16 BIT
    [  246.243808] SND_SOC_DAIFMT_DSP_B and SND_SOC_DAIFMT_AC97 ,file=sound/soc/ti/davinci-mcasp.c
    [  246.252378]  line = 1207 fun =sound/soc/codecs/tlv320aic3x.c file =aic3x_prepare
    [  246.252523]  line = 1467 fun =sound/soc/codecs/tlv320aic3x.c file =aic3x_set_bias_level
    [  246.260015]  line = 1411 fun =sound/soc/codecs/tlv320aic3x.c file =aic3x_set_power
    [  246.352853]  line = 1467 fun =sound/soc/codecs/tlv320aic3x.c file =aic3x_set_bias_level
    [  246.363475]  line = 1467 fun =sound/soc/codecs/tlv320aic3x.c file =aic3x_set_bias_level

    [  246.371576]  line = 1228 fun =sound/soc/codecs/tlv320aic3x.c file =aic3x_mute
    root@am62xx-evm:/home#

    • we observed that I2S configuration was made in tlv320aic3x.c codec driver and please find attached one. please let us know if changes required ?

    Thanks,

    Naresh.

  • Hello,

    What happens if you change the simple-audio-card,format = "dsp_b"; to simple-audio-card,format = "i2s";?

    Regards,

    Krunal

  • Hello Krunal, 

    I tested  "simple-audio-card,format = "i2s"  by the past and not supported, may i know which format is tested on your setup ?

    err log when simple-audio-card,format = "i2s"

    root@am62xx-evm:/home# insmod snd-soc-simple-card.ko
    [   58.958684]  line = 1737 fun =aic3x_configure_ocmv file =sound/soc/codecs/tlv320aic3x.c
    [   65.938443]  line = 1644 fun =aic3x_probe file =sound/soc/codecs/tlv320aic3x.c
    [   65.946613]  line = 1557 fun =aic3x_init file =sound/soc/codecs/tlv320aic3x.c
    [   65.953970]  line = 1533 fun =aic3x_mono_init file =sound/soc/codecs/tlv320aic3x.c
    [   65.961258]  line = 1009 fun =aic3x_add_widgets file =sound/soc/codecs/tlv320aic3x.c
    [   65.969468]  line = 1245 fun =aic3x_set_dai_sysclk file =sound/soc/codecs/tlv320aic3x.c
    [   65.993236]  line = 1262 fun =aic3x_set_dai_fmt file =sound/soc/codecs/tlv320aic3x.c
    [   66.001332] SND_SOC_DAIFMT_CBM_CFM fun=aic3x_set_dai_fmt
    [   66.009200] default I2S: Error
    [   66.017751] tlv320aic3x-codec 3-001b: ASoC: error at snd_soc_dai_set_fmt on tlv320aic3x-hifi: -22
    [   66.026621] tlv320aic3x-codec 3-001b: ASoC: Failed to set DAI format: -22
    [   66.033922] asoc-simple-card: probe of sound failed with error -22

    -Nagendra 

  • Hi Krunal,

    we did check dts configurations from posted file, same configurations we made; however, sound is not coming.

    I observed from your dts as only transmitter [axr0] pin set (, not set axr2) in serilizer but pin configuration was done for both tx and rx pins.

    this query may not give the solution, just curious to know the solution.

    main_mcasp1_pins_default: main-mcasp1-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x0090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */
    			AM62X_IOPAD(0x0098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */
    			AM62X_IOPAD(0x008c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */
    			AM62X_IOPAD(0x0084, PIN_INPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */
    		>;
    	};
    &mcasp1 {
    	status = "okay";
    	#sound-dai-cells = <0>;
    
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mcasp1_pins_default>;
    
    	op-mode = <0>;          /* MCASP_IIS_MODE */
    	tdm-slots = <2>;
    
    	serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
    	       1 0 0 0
    	       0 0 0 0
    	       0 0 0 0
    	       0 0 0 0
    	>;
    	tx-num-evt = <32>;
    	rx-num-evt = <32>;
    };
    please suggest us what changes needs to be done in order to get the audio 

    Thanks,

    Naresh

  • Hi Krunal,

    Audio playback is working by disabling the AXR1 pin.

    please find below configurations:

    &mcasp0 {
            status = "okay";
            //added below properties
            #sound-dai-cells = <0>;

           pinctrl-names = "default";
            pinctrl-0 = <&main_mcasp0_pins_default>;

           op-mode = <0>;          /* MCASP_IIS_MODE */
            tdm-slots = <2>;

           serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
                   0 0 1 0
                   0 0 0 0
                   0 0 0 0
                   0 0 0 0
            >;
            tx-num-evt = <32>;
            rx-num-evt = <32>;
    };

    main_mcasp0_pins_default: main-mcasp0-pins-default {
                    pinctrl-single,pins = <

                           AM62X_IOPAD(0x019c, PIN_OUTPUT, 0) /* (B18) AM62X_MCASP0_AXR1\G */
                            AM62X_IOPAD(0x0198, PIN_INPUT, 0) /* (A19) AM62X_MCASP0_AXR2\G */
                            AM62X_IOPAD(0x01a4, PIN_INPUT, 0) /* (B20) AM62X_MCASP0_ACLKX\G */
                            AM62X_IOPAD(0x01a8, PIN_INPUT, 0) /* (D20) AM62X_MCASP0_AFSX\G */
                    >;
            };

     

    then how can we record /capture the audio if we disable the AXR1 pin?

    Thanks,

    Naresh

  • Hello,

    We do not have record working on the SK EVM and the SW team is currently debugging the issue. As of now, I don't have any timelines on when the fix will be available. 

    Regards,
    Krunal