TX2 ALSA configuration syntax in 01-tegra-rt565x.conf

Using, # R32 (release), REVISION: 3.1

Per this post:

https://forums.developer.nvidia.com/t/tx2-rt5639-on-r32-1/76743/9?u=iank

I’m modifying the ‘01-tegra-rt565x.conf’ file with some amixer settings we’d like present at flash and moving forward. I had assumed that it would be a good idea to place these additional settings inside of the ‘Tegra RT565x Init’ section of the config file.

At around line 21 this is present:
CTL{name}="x TDM Data Mux",PROGRAM!="__ctl_search",GOTO="Tegra RT565x Next"
From debugging the this file by running:
alsactl init tegrasndt186ref

I’m inferring that this a conditional saying something to the effect of: If the ‘x TDM Data Mux’ control is being fooled with and the program parsing this file isn’t ‘__ctl_search’ then goto a specified label. At which point a seconds similar conditional below the referenced goto label terminates the parsing of the configuration file.

Question: In the larger scheme of things why is this conditional present (what does it mean)? And, if I want to have my amixer settings implemented where should I park them inside of the file? I’m assuming before the first conditional statement.

I know that if I blow away my ‘/var/lib/alsa/asound.state’ and reboot the settings I want do get set, which I’m assuming means something using ‘__ctl_search’ is initializing the ALSA settings. The preferred behavior would be that one could run 'alsactl init ’ and have the desired setting be set.

Thanks,
Ian

Hello!

This statement is used to detect the presense of the RT5658 codec. We have a module that we can connect to the Jetson platform with a RT5658 for testing, however, because it is not always present, we need a means to detect if it is there dynamically. The mixer control ‘TDM Data Mux’ is specific to the RT5658 codec and so if this is present we know the codec is. For some Jetsons the RT5658 codec has the prefix ‘x’ and for some it has ‘y’ and that is why there are two tests. Note that this file is called 01-tegra-rt565x.conf because it is specific to the RT5658/9 codec. Therefore, it is recommended you add your own 01-tegra-xxxx.conf for your specific use-case.

Yes it is recommended that you modify or add the necessary settings so that when you run ‘alsactl init’ the default mixer settings are programmed how you want them for your setup.

Regards,
Jon

Jon,

Thanks, that’s what I did and it works wonderfully.

Best,
Ian

Hi Ian,

Great! Thanks for confirming.

Jon