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.

TLV320AIC34EVM-K: TLV320AIC34 audio codec with IMX8MP SoM

Part Number: TLV320AIC34EVM-K
Other Parts Discussed in Thread: TLV320AIC34

Hi,

I would like to connect my Variscite DT8M Custom Board with the TLV320AIC34 Evaluation Module by using an I2S connection.

For an unknow reason I cannot see SAI2_MCLK1 working properly, the value is always '0' on my oscilloscope, therefore when I try to play audio, aplay seems to be blocked.

HW configuration :

SAI vs Codec
SAI2_TXC <-> BCLK
SAI2_TXFS <-> WCLK
SAI2_MCLK <-> MCLK
SAI2_RXD0 <-> DIN
SAI2_TXD0 <-> DOUT

My device tree configuration :

	reg_audio_1v8: regulator-1p8v {
		compatible = "regulator-fixed";
		regulator-name = "1P8V";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
		regulator-always-on;
	};

	sound-tlv320aic34 {
	compatible = "simple-audio-card";
		simple-audio-card,name = "HTC2-Sound-Card";
		simple-audio-card,format = "i2s";
		simple-audio-card,bitclock-master = <&dailink0_master>;
		simple-audio-card,frame-master = <&dailink0_master>;
		simple-audio-card,widgets =
			"Microphone", "Microphone Jack",
			"Line", "Line In Jack",
			"Line", "Line Out Jack",
			"Headphone", "Headphone Jack",
			"Speaker", "Speaker External";
		simple-audio-card,routing =
			"MIC3L", "Microphone Jack",
			"MIC3R", "Microphone Jack",
			"Headphone Jack", "HPLOUT",
			"Headphone Jack", "HPROUT";
		simple-audio-card,cpu {
			sound-dai = <&sai2 0>;
		};
		dailink0_master: simple-audio-card,codec {
			sound-dai = <&tlv320aic34>;
		};
	};
};

&sai2 {
	#sound-dai-cells = <1>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_sai2>;
	clocks = <&audiomix_clk IMX8MP_CLK_AUDIOMIX_SAI2_IPG>, <&clk IMX8MP_CLK_DUMMY>, <&audiomix_clk IMX8MP_CLK_AUDIOMIX_SAI2_MCLK1>, <&clk IMX8MP_CLK_DUMMY>, <&clk IMX8MP_CLK_DUMMY>, <&clk IMX8MP_AUDIO_PLL1_OUT>, <&clk IMX8MP_AUDIO_PLL2_OUT>;
	clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll1", "pll2";
	assigned-clocks = <&clk IMX8MP_CLK_SAI2>;
	assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>;
	assigned-clock-rates = <12000000>;
	fsl,sai-asynchronous;
	fsl,sai-mclk-direction-output;
 	status = "okay";
};

pinctrl_sai2: sai2grp {
	fsl,pins = <
		MX8MP_IOMUXC_SAI2_TXFS__AUDIOMIX_SAI2_TX_SYNC			0xd6
		MX8MP_IOMUXC_SAI2_TXC__AUDIOMIX_SAI2_TX_BCLK			0xd6
		MX8MP_IOMUXC_SAI2_RXD0__AUDIOMIX_SAI2_RX_DATA00			0xd6
		MX8MP_IOMUXC_SAI2_TXD0__AUDIOMIX_SAI2_TX_DATA00			0xd6
		MX8MP_IOMUXC_SAI2_MCLK__AUDIOMIX_SAI2_MCLK			 0xd6
	>;
};

i2cdump : 

root@imx8mp-var-dart:~# i2cdump -y -f 2 0x18
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 00 00 10 04 00 00 00 00 00 00 01 00 00 00 80    ...??......?...?
10: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00    ?..xxxxxx?.?..?.
20: 00 00 00 00 00 00 00 00 00 00 00 80 80 00 00 00    ...........??...
30: 00 00 00 04 00 00 00 00 00 00 04 00 00 00 00 00    ...?......?.....
40: 00 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00    .?......?.......
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
60: 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00    ......?.........
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
80: 00 00 00 10 04 00 00 00 00 00 00 01 00 00 00 80    ...??......?...?
90: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00    ?..xxxxxx?.?..?.
a0: 00 00 00 00 00 00 00 00 00 00 00 80 80 00 00 00    ...........??...
b0: 00 00 00 04 00 00 00 00 00 00 04 00 00 00 00 00    ...?......?.....
c0: 00 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00    .?......?.......
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00    ......?.........
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
 

/sys/clk/kernel/debug/clk_summary :

 

    audio_pll2_ref_sel                0        0        0    24000000          0     0  50000
       audio_pll2                     0        0        0   361267200          0     0  50000
          audio_pll2_bypass           0        0        0   361267200          0     0  50000
             audio_pll2_out           0        0        0   361267200          0     0  50000
                sai2                  0        0        0    12042240          0     0  50000
                   sai2_mclk1_sel       0        0        0    12042240          0     0  50000
                      sai2_mclk1_clk       0        0        0    12042240          0     0  50000

Any idea that could help ? I've tried many things but the SAI2_MCLK1 is still not moving.

  • Link to the Variscite dev kit documentation : www.variscite.com/.../

  • Hi,

    Are you using the USB-MODEVM in this setup, if you want to use external MCLK you need to configure SW2 as shown below.

    Here is the link to the EVM user guide for more detail.

    https://www.ti.com/lit/ug/slau855/slau855.pdf?ts=1633530475737&ref_url=https%253A%252F%252Fwww.ti.com%252Ftool%252FTLV320AIC34EVM-K

    Regards.

  • Hi Pjuandi,

    Thanks for your answer, I've done this already but it doesn't work.

    My BLCK value is always '1', MCLK '0', WCLK '0'

    When I try to play audio, aplay is blocked without any error logs :

    root@imx8mp-var-dart:~# aplay -D sysdefault:HTC2SoundCard /usr/share/sounds/alsa/Front_Left.wav 
    Playing WAVE '/usr/share/sounds/alsa/Front_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
    


    CLK, ID, Frequency, Mapping from dmesg ;

    root@imx8mp-var-dart:~# dmesg | grep tlv
    [    5.136874] tlv320aic3x-codec 2-0018: CLK_ID : 0, FREQ : 12042240
    [    5.144810] asoc-simple-card sound-tlv320aic34: tlv320aic3x-hifi <-> 30c20000.sai mapping ok
    

    Mathieu.

  • Hi,

    First thing first, have you checked your MCLK is correct from your source Sai2 and what frequency prior to connecting to the USB-MODEVM?

    Are you following the MCLK frequency as mentioned in the codec driver?

    If it's correct, where do you connect this MCLK in the EVM after you have configured SW2 above?

    Showing always '1' or '0' on the clock shows either the MCLK is not present from the source itself or some connection issue.

    If you set SW2 as above, you should connect MCLK at J14 and you can probe it either on the USB-MODEVM J17 header or on the TLV320AIC310xEVM MCLK pin.

    Once the MCLK is correct to the TLV320AIC310xEVM, then the WCLK and BCLK should be provided by the audio part since I think you are configuring them as master.

    Maybe send me the scope captures of MCLK, WCLK and BCLK once you have the MCLK running. Most of the time it's because the MCLK is not correct.

    Regards.

  • Hi Pdjuandi,

    MCLK is provided by the SoM and as you said BCLK and WCLK are provided by the codec as it's configured as master.

    I found the solution for MCLK, so my frequency is 12 MHz, my BCLK frequency is 1.5 Mhz and my WCLK frequency is 48 Khz when I try to play audio by using this command line: 

    root@imx8mp-var-dart:~# speaker-test -D sysdefault:HTC2SoundCard

    But I still cannot hear sound on my Headphone and speaker-test stays blocked :

    root@imx8mp-var-dart:~# speaker-test -D sysdefault:HTC2SoundCard

    speaker-test 1.1.9

    Playback device is sysdefault:HTC2SoundCard
    Stream parameters are 48000Hz, S16_LE, 1 channels
    Using 16 octaves of pink noise
    Rate set to 48000Hz (requested 48000Hz)
    Buffer size range from 64 to 16384
    Period size range from 32 to 8192
    Using max buffer size 16384
    Periods = 4
    was set period_size = 4096
    was set buffer_size = 16384
    0 - Front Left

    BLCK 1.5Mhz :

    WCLK 48Khz : 

    MCLK 12 Mhz : 

    Mathieu.

  • Hi Mathieu,

    That's good you have the clocks running, the clock frequencies look correct.

    So which path are you testing? What is your input and output?

    Can you send me your register settings?

    regards.

  • Hi Pdjuandi,

    I try to play sound on my Headphone outputs connected to HPCOM : 

    Simple mixer control 'PCM',0
      Capabilities: pvolume
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 127
      Mono:
      Front Left: Playback 127 [100%] [0.00dB]
      Front Right: Playback 127 [100%] [0.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] [off]
      Front Right: Playback 0 [0%] [0.00dB] [off]
    Simple mixer control 'Line DAC',0
      Capabilities: pvolume
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 118
      Mono:
      Front Left: Playback 0 [0%] [-99999.99dB]
      Front Right: Playback 0 [0%] [-99999.99dB]
    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: 0 [0%] [-99999.99dB]
      Front Right: 0 [0%] [-99999.99dB]
    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: 0 [0%] [-99999.99dB]
      Front Right: 0 [0%] [-99999.99dB]
    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] [off]
    Simple mixer control 'Mono DAC',0
      Capabilities: pvolume
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 118
      Mono:
      Front Left: Playback 0 [0%] [-99999.99dB]
      Front Right: Playback 0 [0%] [-99999.99dB]
    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: 0 [0%] [-99999.99dB]
      Front Right: 0 [0%] [-99999.99dB]
    Simple mixer control 'Mono Mixer DACL1',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Mono Mixer DACR1',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    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: 0 [0%] [-99999.99dB]
      Front Right: 0 [0%] [-99999.99dB]
    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] [off]
      Front Right: Playback 0 [0%] [0.00dB] [off]
    Simple mixer control 'HP DAC',0
      Capabilities: pvolume
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 118
      Mono:
      Front Left: Playback 0 [0%] [-99999.99dB]
      Front Right: Playback 0 [0%] [-99999.99dB]
    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: 0 [0%] [-99999.99dB]
      Front Right: 0 [0%] [-99999.99dB]
    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: 0 [0%] [-99999.99dB]
      Front Right: 0 [0%] [-99999.99dB]
    Simple mixer control 'HPCOM',0
      Capabilities: pvolume pswitch
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 9
      Mono:
      Front Left: Playback 9 [100%] [9.00dB] [on]
      Front Right: Playback 9 [100%] [9.00dB] [on]
    Simple mixer control 'HPCOM DAC',0
      Capabilities: pvolume
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 118
      Mono:
      Front Left: Playback 118 [100%] [0.00dB]
      Front Right: Playback 118 [100%] [0.00dB]
    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: 0 [0%] [-99999.99dB]
      Front Right: 0 [0%] [-99999.99dB]
    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: 0 [0%] [-99999.99dB]
      Front Right: 0 [0%] [-99999.99dB]
    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 [off]
    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 [on]
    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] [on]
    Simple mixer control 'Left HPCOM Mixer Line2L Bypass',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [on]
    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 [off]
    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 [off]
    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 [off]
    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 [off]
    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 [off]
    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 [off]
    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@imx8mp-var-dart:~# i2cdump -y -f 2 0x18
    No size specified (using byte-data access)
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
    00: 00 00 00 10 20 19 80 0a 00 00 00 01 00 00 00 80    ...? ???...?...?
    10: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00    ?..xxxxxx?.?..?.
    20: 00 00 00 00 00 00 00 00 00 00 00 80 80 00 00 00    ...........??...
    30: 00 00 00 04 00 00 00 00 00 00 04 00 00 00 00 00    ...?......?.....
    40: 00 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00    .?......?.......
    50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    60: 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00    ......?.........
    70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    80: 00 00 00 10 20 19 80 0a 00 00 00 01 00 00 00 80    ...? ???...?...?
    90: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00    ?..xxxxxx?.?..?.
    a0: 00 00 00 00 00 00 00 00 00 00 00 80 80 00 00 00    ...........??...
    b0: 00 00 00 04 00 00 00 00 00 00 04 00 00 00 00 00    ...?......?.....
    c0: 00 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00    .?......?.......
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    e0: 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00    ......?.........
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    

  • I don't understand why aplay or speaker-test stay blocked even if the audio routing is not properly configured

    root@imx8mp-var-dart:~# aplay -L
    null
    Discard all samples (playback) or generate zero samples (capture)
    pulse
    PulseAudio Sound Server
    sysdefault:CARD=HTC2SoundCard
    HTC2-Sound-Card,
    Default Audio Device

  • Hi,

    OK, looking at your register dump above, none of the audio path is enabled.

    Here is the detail and what's need to be set to send digital audio to HPL and HPR output:

    Regards.

  • root@imx8mp-var-dart:~# i2cdump -y -f 2 0x18
    No size specified (using byte-data access)
    0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
    00: 00 00 00 10 20 19 80 0a 00 00 00 01 00 00 00 80 ...? ???...?...?
    10: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00 ?..xxxxxx?.?..?.
    20: 00 00 00 00 00 00 00 00 00 00 00 80 80 00 00 00 ...........??...
    30: 00 00 00 04 00 00 00 00 00 00 04 00 00 00 00 00 ...?......?.....
    40: 00 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00 .?......?.......
    50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    60: 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 ......?.........
    70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    80: 00 00 00 10 20 19 80 0a 00 00 00 01 00 00 00 80 ...? ???...?...?
    90: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00 ?..xxxxxx?.?..?.
    a0: 00 00 00 00 00 00 00 00 00 00 00 80 80 00 00 00 ...........??...
    b0: 00 00 00 04 00 00 00 00 00 00 04 00 00 00 00 00 ...?......?.....
    c0: 00 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00 .?......?.......
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    e0: 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 ......?.........
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

  • See my feedback above. Your settings are not enabling the audio path.

  • Hi Pdjuandi,

    I tried to change manually the audio settings, when I open alsamixer they stay as they are, but when I try to use aplay or speaker-test everything is modified and looks like my previous i2cdump.

  • I tried a different command and I have this error message : 

    root@imx8mp-var-dart:~# speaker-test -D sysdefault:HTC2SoundCard -c 2 -t 3

    speaker-test 1.1.9

    Playback device is sysdefault:HTC2SoundCard
    Stream parameters are 48000Hz, S16_LE, 2 channels
    WAV file(s)
    Rate set to 48000Hz (requested 48000Hz)
    Buffer size range from 64 to 16384
    Period size range from 32 to 8192
    Using max buffer size 16384
    Periods = 4
    was set period_size = 4096
    was set buffer_size = 16384
    0 - Front Left
    Write error: -5,Input/output error
    xrun_recovery failed: -5,Input/output error
    Transfer failed: Input/output error

  • Hi Mathieu,

    I don't know why aplay or speaker-test change the settings of codec.

    It seems like they are not set with the correct input/output between the two.

    Regards.

    Peter

  • Hi Pdjuandi,

    This is my DIN CLK while I play audio and I have no input on it :

  • Hi Mathieu,

    I believe this DIN is data in and not a clock.

    Nonetheless, the issue still lies in getting the correct configuration on codec. Why the settings got changed?

    Regards.

    Peter

  • Hi Pdjuandi,

    Yes, sorry DATA and not CLK, all the other signals, BCLK, MCLK and WCLK are the same but DIN looks like that.

    Mathieu.

  • Hi Pdjuandi,

    Thanks for all this information, I found the solution, here are my settings for those who would like to know :

     

    sound-tlv320aic34 {
    compatible = "simple-audio-card";
    simple-audio-card,name = "HTC2-Sound-Card";
    simple-audio-card,format = "i2s";
    simple-audio-card,bitclock-master = <&dailink_master>;
    simple-audio-card,frame-master = <&dailink_master>;
    simple-audio-card,mclk-fs = <256>;
    simple-audio-card,widgets =
    "Microphone", "Microphone Jack",
    "Line", "Line In Jack",
    "Line", "Line Out Jack",
    "Headphone", "Headphone Jack",
    "Speaker", "Speaker External";
    simple-audio-card,routing =
    "Headphone Jack", "HPLOUT",
    "Headphone Jack", "HPROUT";
    dailink_master: simple-audio-card,cpu {
    sound-dai = <&sai2>;
    };
    simple-audio-card,codec {
    sound-dai = <&tlv320aic34>;
    clocks = <&audiomix_clk IMX8MP_CLK_AUDIOMIX_SAI2_MCLK1>;
    };
    };
    };

    &sai2 {
    #sound-dai-cells = <0>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_sai2>;
    assigned-clocks = <&clk IMX8MP_CLK_SAI2>;
    assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
    assigned-clock-rates = <12288000>;
    clocks = <&audiomix_clk IMX8MP_CLK_AUDIOMIX_SAI2_IPG>, <&clk IMX8MP_CLK_DUMMY>,
    <&audiomix_clk IMX8MP_CLK_AUDIOMIX_SAI2_MCLK1>, <&clk IMX8MP_CLK_DUMMY>,
    <&clk IMX8MP_CLK_DUMMY>, <&clk IMX8MP_AUDIO_PLL1_OUT>,
    <&clk IMX8MP_AUDIO_PLL2_OUT>;
    clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
    fsl,sai-synchronous-rx;
    status = "okay";
    };

     

    &i2c3 {
    tlv320aic34: tlv320aic34@18 {
    #sound-dai-cells = <0>;
    compatible = "ti,tlv320aic3x";
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_tlv320>;
    reg = <0x18>;
    reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
    IOVDD-supply = <&reg_audio>; /* 3V3 */
    DVDD-supply = <&reg_audio_1v8>; /* 1V8 */
    AVDD-supply = <&reg_audio>; /* 3V3 */
    DRVDD-supply = <&reg_audio>; /* 3V3 */
    };
    };

    pinctrl_sai2: sai2grp {
    fsl,pins = <
    MX8MP_IOMUXC_SAI2_MCLK__AUDIOMIX_SAI2_MCLK 0xd6
    MX8MP_IOMUXC_SAI2_RXD0__AUDIOMIX_SAI2_RX_DATA00 0xd6
    MX8MP_IOMUXC_SAI2_RXFS__AUDIOMIX_SAI2_RX_SYNC 0xd6
    MX8MP_IOMUXC_SAI2_TXC__AUDIOMIX_SAI2_TX_BCLK 0xd6
    MX8MP_IOMUXC_SAI2_TXD0__AUDIOMIX_SAI2_TX_DATA00 0xd6
    >;
    };

    pinctrl_tlv320: tlv320grp {
    fsl,pins = <
    MX8MP_IOMUXC_GPIO1_IO06__GPIO1_IO06 0x16
    >;
    };

  • amixer settings 

    Simple mixer control 'PCM',0
    Capabilities: pvolume
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 127
    Mono:
    Front Left: Playback 100 [79%] [-13.50dB]
    Front Right: Playback 100 [79%] [-13.50dB]
    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] [off]
    Front Right: Playback 0 [0%] [0.00dB] [off]
    Simple mixer control 'Line DAC',0
    Capabilities: pvolume
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 118
    Mono:
    Front Left: Playback 0 [0%] [-99999.99dB]
    Front Right: Playback 0 [0%] [-99999.99dB]
    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: 0 [0%] [-99999.99dB]
    Front Right: 0 [0%] [-99999.99dB]
    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: 0 [0%] [-99999.99dB]
    Front Right: 0 [0%] [-99999.99dB]
    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] [off]
    Simple mixer control 'Mono DAC',0
    Capabilities: pvolume
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 118
    Mono:
    Front Left: Playback 0 [0%] [-99999.99dB]
    Front Right: Playback 0 [0%] [-99999.99dB]
    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: 0 [0%] [-99999.99dB]
    Front Right: 0 [0%] [-99999.99dB]
    Simple mixer control 'Mono Mixer DACL1',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Mono Mixer DACR1',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    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: 0 [0%] [-99999.99dB]
    Front Right: 0 [0%] [-99999.99dB]
    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 4 [44%] [4.00dB] [on]
    Front Right: Playback 4 [44%] [4.00dB] [on]
    Simple mixer control 'HP DAC',0
    Capabilities: pvolume
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 118
    Mono:
    Front Left: Playback 76 [64%] [-21.00dB]
    Front Right: Playback 76 [64%] [-21.00dB]
    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: 0 [0%] [-99999.99dB]
    Front Right: 0 [0%] [-99999.99dB]
    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: 0 [0%] [-99999.99dB]
    Front Right: 0 [0%] [-99999.99dB]
    Simple mixer control 'HPCOM',0
    Capabilities: pvolume pswitch
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 9
    Mono:
    Front Left: Playback 4 [44%] [4.00dB] [on]
    Front Right: Playback 4 [44%] [4.00dB] [on]
    Simple mixer control 'HPCOM DAC',0
    Capabilities: pvolume
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 118
    Mono:
    Front Left: Playback 76 [64%] [-21.00dB]
    Front Right: Playback 76 [64%] [-21.00dB]
    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: 0 [0%] [-99999.99dB]
    Front Right: 0 [0%] [-99999.99dB]
    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: 0 [0%] [-99999.99dB]
    Front Right: 0 [0%] [-99999.99dB]
    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 [off]
    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 [off]
    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 [off]
    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 [off]
    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 HPLCOM'
    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 [off]
    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 [off]
    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]

  • Hi Mathieu,

    Glad you fix the issue, so what's specifically you have to change in the aplay that overwrites the codec setting?

    Regards,

    Peter

  • Hi Pdjuandi,

    the codec has to be a slave and not a master, the NXP support pointed me at this configuration : 

    https://wiki.phytec.com/display/public/MD/L-1008e.A2+phyCORE-i.MX+8M+Plus+Alpha+Kit+Quickstart+Guide
    https://git.phytec.de/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-peb-av-010...

    I did a mix of their settings and mine, since it works perfectly well.