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.

TLV320AIC3120: Speaker paths for playback

Part Number: TLV320AIC3120


Tool/software:

Hi,

I'm currently working on bringing up the TLV320AIC3120 codec on a QCS6490 platform, but I'm having trouble configuring the speaker widget audio paths.

The codec driver loads and registers correctly, but audio playback through the path isn’t functioning as expected.

Could you please provide guidance on how to properly define the audio path for the TLV320 on the QCS6490 platform?

The tlv320aic31xx driver version we are using is: git.kernel.org/.../tlv320aic31xx.c

Thanks in advance for your support.

Best regards,

Rui

  • Hi Rui,

    What does your current DTS file look like? In the driver, there are a few snd_soc_dapm_route structs (starting at the one I screenshotted and attached) that contain all the possible device-defined ins and outs, which you can use in your "routing" entry in your dts. This is the documentation on audio cards being used in dts: https://www.kernel.org/doc/Documentation/devicetree/bindings/sound/simple-card.txt

    Best,
    Mir

  • Hi Mir,

    Thanks for your reply.
    The problem is that I already tried a couple of different configurations for routing without any luck.

    Bellow you can find a device tree snippet that defines the audio card. Do you think I'm using the correct routing?

    Best regards,

    Rui

  • Hi Rui,

    I think the AIC3120 only supports one digital microphone, and I do not see references to it within the driver code routing. The route that you have does not have references to the soc_dapm_route in the driver.

    You can configure the digital microphone with register 0x51 to enable the digital mic on the ADC, and 0x33 to select the digital microphone clock out of GPIO1. I would suggest to do it manually or to put the default values you want in the driver defaults section.

    Best,
    Mir

  • Hi Mir,

    As described in the device tree snippet I shared in my previous message, I'm using "SPK ClassD" as the sink widget.

    Is this the correct dapm_route if I want to use the Class-D speaker connected to the SPKP and SPKM pins of the AIC320?

    Regarding the microphone: in the device tree implementation I shared, I only focused on the speaker route. However, I also need to configure a single microphone connected to the MIC1LP, MIC1RP, and MIC1LM pins. Could you help me understand the correct source widget to use in order to feed the microphone sink widget on the SoM?

    Thanks!

    Best regards,

    Rui

  • Hi,

    "SPK ClassD" should work for your speaker output. Although, I am seeing you are connecting to a jack or some kind, just make sure this isn't a headphone output, as the device has a dedicated headphone driver as well. 

    For the microphone inputs, you can probably use "MIC1LP", "MIC1RP", and "MIC1LM" as your source. Are you trying to switch between the MIC1LP and MIC1RP in software? If not, they will be added together, so you may want to give each a -6dB reduction in gain to halve the input so the swing will be similar on both inputs to the PGA.

    Best,
    Mir 

  • Hi Mir,

    Do you think the following speaker paths should work for my hardware?

    tinymix "DAC Left Input" "Mono"
    tinymix "Output Left" "From Left DAC"
    tinymix "Speaker Left" "Switch"

    I'm not trying to switch between MIC1LP and MIC1RP, I want to add them together, so will follow your advice on the 6db gain reduction.

    Thanks.

    Best regards,

    Rui



  • Hi Rui,

    I'll get back to you on the speaker paths tomorrow.

    -Mir

  • Hi Rui,

    These look okay according to the driver, let me know if it is not working.

    -Mir