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.

TDA4VM: How can I get the sound output from the J40/J41 ports on TDA4VM EVM

Part Number: TDA4VM
Other Parts Discussed in Thread: PCM3168A

Tool/software:

Hi TI experts,

According to Figure 4-37 of Jacinto7 J721E user guide as below: 

There are several audio output interfaces:

HPOUT L VOUT1/3/5
HPOUT R VOUT 2/4/6
Line-OUT L VOUT7
Line-OUT R VOUT8

..

But I powered up the TDA4VM EVM and tried below command: 

aplay -D plughw:0,0 Asine.wav -v

I can only hear the playback sound from the J40 top port (ie. HPOUT L VOUT1 and HPOUT R VOUT2)

My question is, how can I get the sound output from other interfaces? (J41 top/bottom and J40 bottom ports)

Thanks

Regards,

Christopher

  • Hi Christopher,

    Those ports are for audio with more channels. You can read more about it in the documentation: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/10_01_00_04/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Audio.html

    If you play audio with more channels, then they will be used.

    Best,
    Jared

  • Hi Jared,

    Thanks for providing the link, I will read it.

    According to the description below, does it mean that even if the audio file I play has fewer than 2 channels, it still cannot be output through the Line-out port?

    The audio channel mapping to jacks depends on the number of channels (slots) in the audio stream:
    
           |o|c1  |o|p1  |o|p3
     _     | |    | |    | |
    |o|c3  |o|c2  |o|p4  |o|p2
    --------------------------
    
    c1/2/3 - capture jacks (3rd is line input)
    p1/2/3/4 - playback jacks (4th is line output)
    
    2 channel audio (stereo):
    -------------------------
    0 (left):  p1/c1 left
    1 (right): p1/c1 right
    
    4 channel audio:
    ----------------
    0: p1/c1 left
    1: p2/c2 left
    2: p1/c1 right
    3: p2/c2 right
    
    6 channel audio:
    ----------------
    0: p1/c1 left
    1: p2/c2 left
    2: p3/c3 left
    3: p1/c1 right
    4: p2/c2 right
    5: p3/c3 right
    
    8 channel audio:
    ----------------
    0: p1/c1 left
    1: p2/c2 left
    2: p3/c3 left
    3: p4 left
    4: p1/c1 right
    5: p2/c2 right
    6: p3/c3 right
    7: p4 right

    Just wondering if audio with less than 2 channels can be output through the Line-out port (J40 bottom).

    If so, how can this be achieved?

    For example:

    1. Modify aplay.c by setting snd_pcm_hw_params_set_channels_first/last() to 7/8?

    2. Modify mcasp/codec driver to force input from DIN1 -> DAC7/8)

    Thanks.

    Regards,

    Christopher

  • Hi Christopher,

    Ideally, you would be able to control the PCM3168A to use DAC7/8 instead of DAC1/2, but I didn't find any controls in the datasheet. You may want to ask another question on E2E to those experts.

    I would think the easiest option would be to convert your 2 channel audio files to 8 channel and move the original 2 channels to the last 2 channels. 

    Best,
    Jared

  • Hi Jared,

    I believe that converting the audio file format as you suggested could enable sound output through the Line-OUT port.

    Additionally, instead of controlling the PCM3168A to use DAC7/8, is it possible to configure the MCASP to direct the audio signal output from PCM3168A DIN1 to DIN4?

    Thanks.

    Regards,

    Christopher

  • Hi Christopher,

    Within the device tree, you can disable the serializer lines that lead to DIN1 - DIN3. I don't know how the PCM3168A would take this though.

    Best,
    Jared

  • Hi Jared,

    Understood, I will give it a try.

    Thanks.

    Regards,

    Christopher