Jetson Xavier NX alsa card jetson-xaviernx-ape configuration problem

Hi! jonathanh, @jonathanh

We recently encountered a problem and would like to ask you!This question is about how to change the default device on the sound card “jetson-xaviernx-ape”.

In our previous research, no matter how the ADMIAF channel number is configured,the default alsa.device by gst-device-monitor is still 0,as follows:

Device found:

    name  : Built-in Audio Analog Stereo
    class : Audio/Sink
    caps  : audio/x-raw, format=(string){ S16LE, S16BE, F32LE, F32BE, S32LE, S32BE, S24LE, S24BE, S24_32LE, S24_32BE, U8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
            audio/x-alaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
            audio/x-mulaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
    properties:
            alsa.resolution_bits = 16
            device.api = alsa
            device.class = sound
            alsa.class = generic
            alsa.subclass = generic-mix
            alsa.name = ""
            *alsa.id = "ADMAIF1\ CIF\ ADMAIF1-0"*
            alsa.subdevice = 0
            alsa.subdevice_name = "subdevice\ \#0"
            *alsa.device = 0*
            alsa.card = 1
            alsa.card_name = jetson-xaviernx-ape
            alsa.long_card_name = jetson-xaviernx-ape
            device.bus_path = platform-sound
            sysfs.path = /devices/sound/sound/card1
            device.form_factor = internal
            device.string = front:1
            device.buffering.buffer_size = 32768
            device.buffering.fragment_size = 16384
            device.access_mode = mmap+timer
            device.profile.name = analog-stereo
            device.profile.description = "\346\250\241\346\213\237\347\253\213\344\275\223\345\243\260"
            device.description = "\345\206\205\347\275\256\351\237\263\351\242\221\ \346\250\241\346\213\237\347\253\213\344\275\223\345\243\260"
            module-udev-detect.discovered = 1
            device.icon_name = audio-card
    gst-launch-1.0 ... ! pulsesink device=alsa_output.platform-sound.analog-stereo

And in our development, we use I2S3 to associate with ADMAIF2 channel,and set the volume via MVC1 module,audio data is one-way,as follows:

## setup HDMI audio
amixer -c jetsonxaviernxa cset name="I2S3 codec master mode" "cbm-cfm"
amixer -c jetsonxaviernxa cset name="MVC1 Mux" I2S3
amixer -c jetsonxaviernxa cset name="ADMAIF2 Mux" MVC1

Then I have two questions:
(1) Why this default alsa.device by gst-device-monitor is 0? Is it configured in dts or driver?
(2) How can I configure to change this default alsa.device?we hope ADMAIF2 channel mapped device 1 as the default device by gst-device-monitor or pulseudio, “alsa.card = 1,alsa.device = 1”.

In addition, we have experimented with associating I2S3 with ADMAIF1 channel , in this way, mapped device is 0, also meet our needs, but for some reason we don’t want to do that,so can you please help us to resolve this issue?

Thanks and regards!

Hi fanjiaheng,

The default device is actually configured in ALSA configuration files. Can you please check if following helps?

diff --git a/rfs/usr/share/alsa/cards/jetson-xaviernx.conf b/rfs/usr/share/alsa/cards/jetson-xaviernx.conf
index 32817d0..768d350 100644
--- a/rfs/usr/share/alsa/cards/jetson-xaviernx.conf
+++ b/rfs/usr/share/alsa/cards/jetson-xaviernx.conf
@@ -19,4 +19,5 @@ jetson-xaviernx.pcm.front.0 {
        }
        type hw
        card $CARD
+       device 1
 }

For a quick check, you can directly edit this file on the target device (Jetson Xavier NX) and run the gst command again.

Thanks,
Sameer.

1 Like

Thanks,spujar.
We solved this problem with your suggestion.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.