Buenas tardes,
He comprado una tarjeta de sonido USB para poder conectar a un servidor
con Debian y poder sacar el sonido mediante un contenedor Docker. El
dispositivo que he comprado es este:
https://es.aliexpress.com/item/4000038850174.html
<https://es.aliexpress.com/item/4000038850174.html>
Esta es la información que muestra mi Debian 11.2:
$ lsusb | grep Audio
Bus 004 Device 003: ID 08bb:2902 Texas Instruments PCM2902 Audio Codec
# dmesg
[ 1923.797116] usb usb4-port2: disabled by hub (EMI?), re-enabling...
[ 1923.797141] usb 4-2: USB disconnect, device number 2
[ 1924.140040] usb 4-2: new full-speed USB device number 3 using ohci-pci
[ 1924.339006] usb 4-2: New USB device found, idVendor=08bb,
idProduct=2902, bcdDevice= 1.00
[ 1924.339017] usb 4-2: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[ 1924.339021] usb 4-2: Product: USB PnP Sound Device
[ 1924.339025] usb 4-2: Manufacturer: C-Media Electronics Inc.
[ 1924.510998] input: C-Media Electronics Inc. USB PnP Sound
Device as
/devices/pci0000:00/0000:00:12.0/usb4/4-2/4-2:1.3/0003:08BB:2902.0002/input/input4
[ 1924.568551] hid-generic 0003:08BB:2902.0002: input,hidraw0: USB HID
v1.00 Device [C-Media Electronics Inc. USB PnP Sound Device] on
usb-0000:00:12.0-2/input3
El problema es que el contenedor no puede sacar el sonido, da este error:
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4660:(_snd_config_evaluate) function
snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4660:(_snd_config_evaluate) function snd_func_concat
returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4660:(_snd_config_evaluate) function snd_func_refer
returned error: No such file or directory
ALSA lib conf.c:5148:(snd_config_expand) Evaluate error: No such file or
directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
[2022-02-18T09:40:36Z ERROR librespot_playback::audio_backend::alsa]
Alsa error PCM open ALSA function 'snd_pcm_open' failed with error
'ENOENT: No such file or directory'
[2022-02-18T09:40:36Z ERROR librespot_playback::player] Could not start
audio: Alsa error: PCM open failed
Si hago un alsamixer me da este error:
$ alsamixer
cannot open mixer: No existe el fichero o el directorio
Tengo que indicarle el dispositivo:
$ alsamixer -c 1
Me sale esto: https://ibb.co/tcJPc89 <https://ibb.co/tcJPc89>
Esto es lo que me muestra aplay:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
hw:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
Direct hardware device without any conversions
plughw:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
Hardware device with all software conversions
default:CARD=Device
USB PnP Sound Device, USB Audio
Default Audio Device
sysdefault:CARD=Device
USB PnP Sound Device, USB Audio
Default Audio Device
front:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
Front output / input
surround21:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
Direct sample mixing device
No entiendo lo que sucede, ¿puede que no esté soportado el dispositivo
en Debian?
Tengo instalados los paquetes alsa-tools y alsa-utils.
Agradezco cualquier ayuda, no se por donde tirar.
Gracias y un saludo.
--
Josu Lazkano