Dear Nvidia support,
I get the following error log from the ASoC
[ 10.782943] tegra-adma 2930000.dma-controller: Tegra210 ADMA driver registered 32 channels
[ 10.836989] tegra-asoc: sound: ASoC: no sink widget found for CVB-TLV IN_2L
[ 10.836996] tegra-asoc: sound: ASoC: Failed to add route CVB-TLV Mic Jack → direct → CVB-TLV IN_2L
[ 10.837014] tegra-asoc: sound: ASoC: no sink widget found for CVB-TLV IN_2R
[ 10.837016] tegra-asoc: sound: ASoC: Failed to add route CVB-TLV Mic Jack → direct → CVB-TLV IN_2R
[ 10.840758] tegra-asoc: sound: snd_soc_register_card failed (-19)
I tried the troubleshooting but the driver appears to have instantiated and the chip appears at 0x18 on the i2c1 bus.
Audio Setup and Development — NVIDIA Jetson Linux Developer Guide
Can you help me figure out what is wrong?
$ i2cdetect -y -r 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – –
10: – – – – – – – – UU – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: UU – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – –
$ cat /sys/kernel/debug/asoc/components
2910000.asrc
290e400.arad
290f000.admaif
2908000.processing-engine
290a200.mvc
2907500.afc
290a000.mvc
2907400.afc
2905100.dspk
2907300.afc
2905000.dspk
2907200.afc
2907100.afc
2904300.dmic
2907000.afc
290bb00.amixer
2904100.dmic
2904000.dmic
2902600.sfc
2902400.sfc
2902200.sfc
2903b00.adx
2902000.sfc
2903a00.adx
2903900.adx
2901400.i2s
2903300.amx
2903200.amx
2903800.adx
2901200.i2s
2903100.amx
2903000.amx
2901100.i2s
2900800.ahub
tlv320adc3xxx-codec.0-0018
snd-soc-dummy
snd-soc-dummy
$ amixer -c APE controls
Invalid card number 'APE'.
Environment
FW: l4t r36.4.4
I am using a custom carrier board for the Orin Nx that has a TLV320ADC3100 connected to the following pins on the Orin NX.
- I2S4_SDATA_IN
- I2S4_SCLK
- I2S4_LRCLK
- AUD_MCLK
- I2C1_CLK
- I2C1_DAT
- GPIO3_PQ6(reset pin)
Device Tree
i2c@3160000 {
clocks-frequency = <100000>;
status = "okay";
/delete-node/ eeprom@50;
/delete-node/ eeprom@57;
/* ADC */
tlv320adc3100: tlv320adc3100@18 {
#sound-dai-cells = <0>;
compatible = "ti,tlv320adc3100";
status ="okay";
reg = <0x18>;
reset-gpios = <&gpio TEGRA234_MAIN_GPIO(Q, 6) GPIO_ACTIVE_LOW>;
clocks = <&bpmp TEGRA234_CLK_AUD_MCLK>;
clock-names = "mclk";
ti,micbias1-vg = <ADC3XXX_MICBIAS_2_0V>;
AVDD-supply = <®_3p3v>;
IOVDD-supply = <®_1p8v>;
DVDD-supply = <®_1p8v>;
};
};
sound {
nvidia-audio-card,widgets =
"Microphone", "CVB-TLV Mic Jack";
nvidia-audio-card,routing =
"CVB-TLV IN_2L", "CVB-TLV Mic Jack",
"CVB-TLV IN_2R", "CVB-TLV Mic Jack";
nvidia-audio-card,mclk-fs = <256>;
/* ADC */
i2s4_to_codec: nvidia-audio-card,dai-link@79 {
link-name = "tlv320adc3xxx-hifi";
codec {
sound-dai = <&tlv320adc3100 0>;
prefix = "CVB-TLV";
};
};
};
Changes to tegra_codec.c
+ #include <drivers-private/sound/soc/codecs/tlv320adc3xxx.h>
+ static int tegra_machine_tlv320adc3xxx_init(struct snd_soc_pcm_runtime *rtd)
+ {
+ struct snd_soc_card *card = rtd->card;
+ struct device *dev = rtd->card->dev;
+ dev_err(dev, "Enter tegra_machine_tlv320adc3xxx_init\n");
+ snd_soc_dapm_sync(&card->dapm);
+ return tegra_audio_dai_init(rtd);
+ }
int tegra_codecs_runtime_setup(struct snd_soc_card *card,
unsigned int srate,
unsigned int channels,
unsigned int aud_mclk)
{
.
.
.
+ rtd = get_pcm_runtime(card, "tlv320adc3xxx-hifi");
+ if (rtd) {
+ err = snd_soc_dai_set_sysclk(rtd->dais[rtd->dai_link->num_cpus],
+ 0,
+ aud_mclk, SND_SOC_CLOCK_IN);
+ if (err < 0) {
+ dev_err(card->dev, "dais[%d] clock not set\n",
+ rtd->dai_link->num_cpus);
+ return err;
+ }
+ }
.
.
.
}
int tegra_codecs_init(struct snd_soc_card *card)
{
.
.
.
+ else if (strstr(dai_links[i].name, "tlv320adc3xxx-hifi"))
dai_links[i].init = tegra_machine_tlv320adc3xxx_init;
.
.
.
}
Driver code
I am using driver code that is modified.
The inputs are configured like this in the driver code:
SND_SOC_DAPM_INPUT("IN_2L"),
SND_SOC_DAPM_INPUT("IN_2R"),
Thank You