Routing in Audio codec

Hi All,

I have few questions on Audio codec driver integration.
I have got Audio codec driver from audio codec vendor. It contains DAPM widgets and audio routes.

In TX1 device tree, there is a property called “nvidia,audio-routing”. As routing information is already available in codec driver, Can we ignore this “nvidia,audio-routing” in device tree?
What is the significance of this property?

Thanks
Pal

Hello, Pal:
You can configure the audio-routing either through DTS or in driver.

br
Chenjian

Hi Chenjian,

Thanks for the response.

We are also planning to connect two Audio codecs into Tegra ASoC through I2S.

If We connect two different codecs, how it will appear in Sound card?

Do You have any documentation to explain the procedure?

Thanks
Pal

Hello, Pal:
It’s OK to connect 2 different audio codecs in Jetson, since the I2S modules are working independently. Just port the driver, and that will be 2 audio device.
There’s no specific document for this. The main part follows ALSA framework.

br
ChenJian

Okay Chenjian. Thanks for the information.

Below is the outline of changes I will be doing…

sound_card: sound {
compatible = “nvidia,tegra-audio-t210ref”;
nvidia,model = “tegra-snd-t210ref”;

    nvidia,num-codec-link = <2>;

    nvidia,xbar = <&tegra_axbar>;
    
    nvidia,dai-link-1 {
        <<<First Codec DAI link information>>
    };
    nvidia,dai-link-2 {
       <<<Second Codec DAI link information>>
    };
};

And corresponding I2S and I2C configurations. DAPM routing information will be given in respective Codec driver.

Thanks
Pal

Hello, Pal:
That looks weird. You’d better check ALSA doc and samples in kernel.
The change you made is 2 DAI links in same codec.
But you mentioned that you have 2 difference codecs.

br
ChenJian

Hi Chenjian,

Okay. I will read more on multiple codecs support.

Meanwhile it would be helpful if You can also point to any reference Samples for multiple codec support in L4T kernel and DT.

Thanks
Pal

Hello, Pal:
In Jetson L4T reference, there’s no multi-codec samples. You may search the internet for more help. That part is common issue, and not NV-specific.

br
Chenjian

Hi Chenjian,

Okay. I will look in internet. As Tegra supports multiple I2S interfaces, I thought multiple codec reference may be already there. So just checked with You.

Thanks
Pal

Hi Chenjian,

Just making sure we both of us are in sync.

As per my design, One Audio codec is connected to one I2S interface of Tegra and other Audio codec is connected to another I2S interface of Tegra. Was that your understanding also?

In CPU<–> Codec DAI link, Codec names are configured.

Thanks
Pal

Hello, Pal:
That’s OK to attach 2 codecs to 2 I2S interface. It depends on your use case.

br
Chenjian