I have connected a codec on NX board, and it works. But I have met a issue. The sound card number of jetsonxaviernxa should always be 1. However, it sometimes becomes 2, when NX reboot with a usb headphone on it. The change of sound card number have brought me some trouble. Could anyone tell me how to fix the sound card number of jetsonxaviernxa?
Personally, I think it is always better to use the sound card name instead of sound card number, because you cannot always guarantee the order in which devices are registered with the kernel. Is there any reason you don’t want to use the sound card name instead of the sound card number?
Thank you for your reply! I met some issues that I thought may be associated with sound card number. But now it turns out to be associated with other factors and has been solved. Using the sound card name can work very well.
Thanks for your support!
I have faced the same issue.
I need to get alsa card number and device number to configure “device” property of the gstreamer plugin alsasrc to use a specific audio capture device.
It is not allowed to configure device name for alsasrc.
$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: jetsonxaviernxa [jetson-xaviernx-ape], device 0: ADMAIF1 CIF ADMAIF1-0
Subdevice #0: subdevice #0
gst-launch-1.0 alsasrc device=“hw:1,0” ! ‘audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2’ ! filesink location=./raw.pcm
I am not sure why it is no allowed. However, on my Jetson Nano I tried the following and this worked fine …
$ gst-launch-1.0 filesrc location=/usr/share/sounds/alsa/Front_Center.wav ! wavparse ! audioconvert ! alsasink device=hw:tegrahda,3
Therefore, I would expect that the following should work as well …
gst-launch-1.0 alsasrc device=“hw:jetsonxaviernxa,0” ! ‘audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2’ ! filesink location=./raw.pcm
It is working, the problem is solved. Thank you so much.
Why I said not allowed is because “device-name” property of alsasrc is not writable and I didn’t know the card name could be configured to “device” property.
device : ALSA device, as defined in an asound configuration file
flags: readable, writable
String. Default: “default”
device-name : Human-readable name of the sound device
String. Default: null
Thanks for the update! Glad to hear it is working.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.