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: How to work device tree(dts file) file for TLV320AIC3106IRGZT MONO_LOUT

Part Number: PROCESSOR-SDK-AM62X
Other Parts Discussed in Thread: AM6252, SK-AM62B-P1

Hi, experts

Hello, I have a question regarding the AM6252 custom board and Audio.


I created a custom board by modifying the circuit using the SK-AM62B-P1 base and installed AM6252.

The same IC (TLV320AIC3106IRGZT) as the EVM is used, but the MONO pin output connection is used to output a single speaker after the audio amp through the TPA3111D IC. The circuit diagram is as follows.

MONO_LOUT is connected to INN, INP pin in TPA3111D.

Please let me know how to set "simple-audio-card,routing" in device tree.

My code is below.

  codec_audio: sound {
    compatible = "simple-audio-card";
    simple-audio-card,name = "AM62x-SKEVM";
    simple-audio-card,widgets =
      "Headphone",  "Headphone Jack",
      "Line",   "Line In",
      "Speaker", "Speaker External",
      "Microphone", "Microphone Jack";
    simple-audio-card,routing =
      "Headphone Jack", "HPLOUT",
      "Headphone Jack", "HPROUT",
      "LINE1L",   "Line In",
      "LINE1R",   "Line In",
      "Mono Out", "MONO_LOUT",                                                                                                                                                                                                                              
     // "Amplifier",    "MONO_LOUT",
     // "Speaker External", "Amplifier",
      //"Speaker", "SP_AMP OUTL",
      "MIC3R",    "Microphone Jack",
      "Microphone Jack",  "Mic Bias";
    simple-audio-card,format = "dsp_b";

  • Hi,

    The audio_routing for MONO_LOUT is correct in your Devicetree.

    Are you able to run any ALSA commands to see if its functional with the amplifier?

    Best Regards,

    Suren

  • Thank you for your answer.

    Please Let me know how to test the amplifier using also commands.

    I tried to test a play command, but we couldn't hear sounds from the speaker. (ex> aplay 1.wav)

  • Hi,

    Let me route your query to our Audio Team for further support. If you don't hear back in the next day or two, feel free to ping me back and I can see what best can be done.

    Best Regards,

    Suren

  • Hi Inseok,

    When you run the command, do you see signal on the line out pins? I've also looped in our software team to comment on the device tree and alsa commands. Your colleague Oh also shared some alsa command errors on a different thread. Can that be shared here?

    Thank you,
    Jeff McPherson

  • hello

    I will post my question here.

    The waveform is as shown above, and the current circuit diagram output waveforms of AUDIO CODEC's HP OUT, MONO Pin OUT and AMP output are uploaded.

    Please check the problem.

  • Hi Sangbong,

    The current routing path depends on you amixer setting, what's your amixer setting? please check if it's correct before running aplay command.

    Thanks

    Kevin

  • Regarding MONO_LOUT, please let me know what is the item of the mixer setting.

    My board's the amixer setting is in below.


    root@am62xx-evm:~# amixer -d
    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 9 [100%] [9.00dB] [on]
    Simple mixer control 'Mono DAC',0
      Capabilities: pvolume
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 118
      Mono:
      Front Left: Playback 106 [90%] [-6.00dB]
      Front Right: Playback 106 [90%] [-6.00dB]
    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 107 [90%] [53.50dB] [on]
      Front Right: Capture 107 [90%] [53.50dB] [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:~# 

    Thanks

  • Hi Sangbong,

    tlv320aic3x-linux-audio-routing-path-setting.pdf

    Pls check attached pdf file to set the audio routing path.

    To check the amixer contents, kindly use command "#amixer contents"

    Thanks

    Kevin