About using PCM3010 with jetson NANO

Hello,

There is no sound when I do the test sound.

When I run the company’s own qt application, the following message appears.
Failed to open ALSA sound device for input plughw:1,0 (Device or resource busy)

When I do the speaker-test, there is a beeping sound from side to side.
speaker-test -D hw:tegrasndt210ref,0 -c 2 -r 48000 -F S32_LE -t sine -f 500

Can you tell me how to fix it?

Thank you.

Hello!

Do you have an ‘/etc/asound.conf’ file? If so can you show the contents of this file?

Also what does the command ‘pacmd list-sinks’ show?

The ‘Device or resource busy’ usually means that something else like pulseaudio is using the audio device. Pulseaudio is the audio service that Ubuntu uses for playing audio and so if you want to play audio from a browser you need this. Can you direct the qt application to use pulse instead (aplay -D pulse)?

Regards,
Jon

1 Like

Hello,

Attach the file.
asound.conf_and_pacmd_list-sinks.zip (1.9 KB)

Thank you.

Hello!

Looks like pulseaudio is using 16-bit audio for this codec. Can you tell me if the following commands work for you …

speaker-test -D hw:tegrasndt210ref,0 -c 2 -r 48000 -F S16_LE -t sine -f 500
speaker-test -D hw:tegrasndt210ref,0 -c 2 -r 48000 -F S16_LE -t wav

If that works, then does the following work …

pacmd play-file /usr/share/sounds/alsa/Front_Center.wav alsa_output.platform-sound.analog-stereo

Regards,
Jon

1 Like

Hello,

It only makes a crushing sound.

Isn’t it 32, not sl16_le?
By the way, S32_LE only sounds crushing.
The noise is repeated.

Thank you.

Hello!

Yes S16_LE is 16-bit and not 32-bit. However, looking at the codec it appears to support both 24-bit and 16-bit audio and so I was wondering if 16-bit works.

I am a bit confused above you said …

Do you mean S16_LE here? I assume that S32_LE works fine. Please can you confirm?

Also it is not clear to me if …

pacmd play-file /usr/share/sounds/alsa/Front_Center.wav alsa_output.platform-sound.analog-stereo

Results in the same ‘crushing’ or distorted sound?

Thanks
Jon

1 Like

Hello,

Noise is heard in both S16_LE and S32_LE.

Thank you.

Hello!

You mentioned that …

So this was working correct? I am a bit confused, because I thought you had aplay working fine.

Jon

1 Like

Hello,

=> Yes, I can hear the sound alternately left and right of the earphone (beep~ sound).

Thank you.

If s32_LE can work fine, why do you say there is a noise? Can you explain what is different?

Hello,

In the article I quoted above, I only hear noise when I run the three commands Jonathan gave me. However, unlike normal noise, it seems that something can be heard left and right, but it is difficult to express it in words.

Thank you.

Hello,

When I run the above command on my Ubuntu PC (the output platform part is a little different), I can see that I hear a “front ~” sound.

Thank you.

Hello!

So to confirm the following work fine …

speaker-test -D hw:tegrasndt210ref,0 -c 2 -r 48000 -F S32_LE -t sine -f 500
speaker-test -D hw:tegrasndt210ref,0 -c 2 -r 48000 -F S32_LE -t wav

Regards,
Jon

Hello!

Can you edit the file /etc/pulse/daemon.conf. By default you should have …

; default-sample-format = s16le

Change the above to …

default-sample-format = s32le

And then reboot the board. After reboot try …

pacmd play-file /usr/share/sounds/alsa/Front_Center.wav alsa_output.platform-sound.analog-stereo

Regards,
Jon

1 Like

Hello,

I can hear a voice saying “Front center”.

Thank you.

Hello,

The sound comes out even when I turn on YouTube. Thank you.

Can you briefly explain the edited content?

And there is still no sound in qt
Failed to open ALSA sound device for input plughw:1,0 (Device or resource busy) message appears

Can you tell us a few things you need to refer to the following information that you gave me before?

Thank you.

Hello!

Thanks for the update. Great to hear the youtube is working.

I have observed the ‘Device or resource busy’ message from time to time and when I have seen this it is because pulseaudio is using the device. I have verified that by disabling pulseaudio temporarily. However, you need pulseaudio for applications like youtube to work and so that is not a solution that will work for you.

Is the device plughw:1,0 definitely the codec? I recommend that people use the soundcard name where possible because the order in which sound cards are registered could change. So better to use plughw:tegrasndt210ref,0.

Have you tried using pulse:tegrasndt210ref,0 instead of plughw:tegrasndt210ref,0 to see if this helps?

Jon

1 Like