• ALSA don't see USB soundcard, but see it...

    From Denis Sovkov@2:5020/570.77 to All on Tue Apr 2 17:25:34 2024

    Hello everybody!

    I'm trying to use USB soundcard from AliExpress on Xilinx Zynq 7000 development board. I bringed up USB bus and 'lsusb' command showing me my soundcard. I've setup ALSA and PulseAudio. When i'm trying to listen anything from this soundcard - i'm hear nothing. But alsamixer looks ok and showing my soundcard in his list. When i'm trying invoke 'aplay -l' command - aplay tells me: "No soundcards found". What i'm doing not right?

    Denis


    --- GoldED+/LNX 1.1.5-b20240309
    * Origin: Written under Linux on Xilinx ZYNQ FPGA. (2:5020/570.77)
  • From Maurice Kinal@1:153/7001.53423 to Denis Sovkov on Fri Apr 12 16:08:50 2024
    Hey Denis!

    [command]: aplay --list-devices
    **** List of PLAYBACK Hardware Devices ****
    card 0: U192k [UMC202HD 192k], device 0: USB Audio [USB Audio]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

    Note that there is no other soundcard listed and it automagically gets set to card 0. Normally there is an audio chip on most motherboards and usb devices get allocated to card 1. If this is the case and you want the usb audio to be the default output then make sure that /etc/asound.conf reflects that.

    --- my /etc/asound.conf for usb audio ---
    defaults.pcm.card 0
    defaults.ctl.card 0
    -----------------------------------------

    Edit the above file by changing 0 to 1.

    Life is good,
    Maurice

    o- o- -o -o o- o- o- o- -o -o o- o- o- -o -o -o /) /) (\ (\ /) /) /) /) (\ (\ /) /) /) (\ (\ (\ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ... Fidonet Unplugged - One in a million.
    --- GNU bash, version 5.2.26(1)-release (x86_64-pc-linux-gnu)
    * Origin: One of us @ (1:153/7001.53423)
  • From Denis Sovkov@2:5020/570.77 to Maurice Kinal on Wed Apr 3 09:13:18 2024

    Hello Maurice!

    12 Apr 24 16:08, you wrote to me:

    --- my /etc/asound.conf for usb audio ---
    defaults.pcm.card 0
    defaults.ctl.card 0
    -----------------------------------------

    Ok I'll try it! Thank you!


    Denis


    --- GoldED+/LNX 1.1.5-b20240309
    * Origin: Written under Linux on Xilinx ZYNQ FPGA. (2:5020/570.77)
  • From Maurice Kinal@1:153/7001.2989 to Denis Sovkov on Sat Apr 13 15:29:50 2024
    Hey Denis!

    Ok I'll try it! Thank you!

    You're welcome. Here might be a better real world example using an onboard chip with analog and hdmi audio;

    [command]: aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: Generic [HD-Audio Generic], device 7: HDMI 1 [U28E590]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: Generic [HD-Audio Generic], device 8: HDMI 2 [HDMI 2]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: Generic [HD-Audio Generic], device 9: HDMI 3 [HDMI 3]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: Generic_1 [HD-Audio Generic], device 0: ALC233 Analog [ALC233 Analog]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

    Note that the analog is setup as 'card 1' and I want that to be the default as I have no use for hdmi audio. In this case I simply editted /etc/asound.conf to read;

    --- my /etc/asound.conf for analog audio ---
    defaults.pcm.card 1
    defaults.ctl.card 1
    --------------------------------------------

    Also apps like mpg123 can output to different alsa cards from the commandline without changing defaults in asound.conf. That might be more along the line of what you're after.

    Life is good,
    Maurice

    -o -o -o -o -o o- -o o- o- -o o- -o -o o- o- -o
    (\ (\ (\ (\ (\ /) (\ /) /) (\ /) (\ (\ /) /) (\
    ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ... Fidonet 4K - You load sixteen penguins and what do you get?
    --- GNU bash, version 5.2.26(1)-release (x86_64-pc-linux-gnu)
    * Origin: One of us @ (1:153/7001.2989)