Questions on TX1 Audio ASoC

Hi,

I’m following the instructions in ASoC Driver of Release 23.2 package, however we do have a few questions

  1. “dmesg | grep ASoC” gives following logs " tegra-snd-t210ref-mobile-rt565x sound.18: ASoC: CODEC (null) not registered"

Is there anyway to register Codec driver, is that in board configuration file, similar as for mipi camera?

2) "cat /sys/kernel/debug/asoc/codecs" appears to give correct list of codecs? 
adsp_audio.3
tegra210-ope.1
tegra210-ope.0
tegra210-spdif
tegra210-mvc.1
tegra210-mvc.0
tegra210-afc.5
tegra210-afc.4
tegra210-afc.3
tegra210-afc.2
tegra210-afc.1
tegra210-afc.0
tegra210-sfc.3
tegra210-sfc.2
tegra210-sfc.1
tegra210-sfc.0
tegra210-mixer
tegra210-adx.1
tegra210-adx.0
tegra210-amx.1
tegra210-amx.0
tegra210-dmic.2
tegra210-dmic.1
tegra210-dmic.0
tegra210-i2s.4
tegra210-i2s.3
tegra210-i2s.2
tegra210-i2s.1
tegra210-i2s.0
tegra210-admaif
tegra210-axbar
spdif-dit.3
spdif-dit.2
spdif-dit.1
spdif-dit.0
snd-soc-dummy
  1. However “aplay -D hw:3 samples.wav” doesn’t work, and complaining “invalid value for card”
    ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card
    aplay: main:722: audio open error: No such file or directory

My plan is to play demo .wav sound over I2S interface, please let me know what else setting it requires?

The “aplay -L” has following results on Tegra TX1

ubuntu@tegra-ubuntu:~$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default
    Playback/recording through the PulseAudio sound server
music
demixer
voice
aux_plug
music_and_voice
hdmi:CARD=Tegra,DEV=0
    HDA NVIDIA Tegra, HDMI 0
    HDMI Audio Output
dmix:CARD=Tegra,DEV=3
    HDA NVIDIA Tegra, HDMI 0
    Direct sample mixing device
dsnoop:CARD=Tegra,DEV=3
    HDA NVIDIA Tegra, HDMI 0
    Direct sample snooping device
hw:CARD=Tegra,DEV=3
    HDA NVIDIA Tegra, HDMI 0
    Direct hardware device without any conversions
plughw:CARD=Tegra,DEV=3
    HDA NVIDIA Tegra, HDMI 0
    Hardware device with all software conversion

Hello, TKAI:
Can you confirm whether there’s audio codec mounted in your board? (I’m not sure your board, but there’s no such chip in my board.)

You can play audio through hdmi by the command:
aplay -D hw:x,x xxx.wav

(use aplay --list-devices to get HDA card and device number.)

br
ChenJian

Thanks ChenJian

We do have an Audio Codec on our customized board and will be able to program the Audio Codec through I2C bus. The codec is connected with TX1 through I2S interface.

However we don’t know the procedure to register the ASoC codec driver in TX1 kernel. We did follow the instructions in ASOC of Release 23.2, but it appears not covering all of required steps.

“dmesg | grep ASoC” gives us following message, apparently there is no codec provided to TX1 Kernel R23.2
" tegra-snd-t210ref-mobile-rt565x sound.18: ASoC: CODEC (null) not registered"

We’d like to know more details/instructions to register an codec driver, and play the sound over I2S bus (so we can probe the signals on I2S bus, including MCLK, BCLK, FSYN, IN/OUT data line.

Cheers
Kai

Hi ChenJian,

Hope you can help here further, the problem I encountered is that the current R23.2 kernel release doesn’t appear to enable the audio codec, the “dmesg | grep ASoC” logs show that it fails at “ASoC: CODEC %s not registered” from source code linux-l4t/sound/soc/soc-core.c, tracing back the calling code, it’s from snd_soc_register_card(card) in 'sound/soc/tegra-alt/tegra_t210ref_mobile_rt565x_alt.c.

Do you have any idea?

Cheers
Kai

Hello, TKAI:
I’m not sure what audio codec you are using.
It seems that you need develop a codec driver if that’s not among NV AVL.
You can refer to RT5639 driver.

br
ChenJian