Hello everybody,
I need access to an USB microphone (insde an USB camera) in one of my LXC containers.
I installed ALSA on both, the host system and the container.
When I enter arecord -l on the host it detects the USB mic fine.
But on the guest it's not showing up.
Host:
I can see the mic here:
the linked controlC1 is listed fine here with group 116:
I also tested recording audio on the host and I can hear my voice in the WAV file afterwards:
I added to /etc/pve/nodes/pve/lxc/107.conf:
But a arecord - l on the container only prints a
Any idea what I'm missing here?
I need access to an USB microphone (insde an USB camera) in one of my LXC containers.
I installed ALSA on both, the host system and the container.
When I enter arecord -l on the host it detects the USB mic fine.
But on the guest it's not showing up.
Host:
Code:
root@pve:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC283 Analog [ALC283 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: CameraB409241 [USB Camera-B4.09.24.1], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
root@pve:~#
I can see the mic here:
Code:
root@pve:~# ls -la /dev/snd/by-id/
total 0
drwxr-xr-x 2 root root 60 Jul 10 23:26 .
drwxr-xr-x 4 root root 360 Jul 10 23:26 ..
lrwxrwxrwx 1 root root 12 Jul 11 08:50 usb-OmniVision_Technologies__Inc._USB_Camera-B4.09.24.1-01 -> ../controlC1
the linked controlC1 is listed fine here with group 116:
Code:
root@pve:~# ls -la /dev/snd
total 0
drwxr-xr-x 4 root root 360 Jul 10 23:26 .
drwxr-xr-x 24 root root 4300 Jul 10 23:26 ..
drwxr-xr-x 2 root root 60 Jul 10 23:26 by-id
drwxr-xr-x 2 root root 80 Jul 10 23:26 by-path
crw-rw---- 1 root audio 116, 2 Jul 11 08:50 controlC0
crw-rw---- 1 root audio 116, 12 Jul 11 08:50 controlC1
...
I also tested recording audio on the host and I can hear my voice in the WAV file afterwards:
Code:
arecord --device=hw:1,0 -f S16_LE -c 4 -r 16000 -d5 test.wav
I added to /etc/pve/nodes/pve/lxc/107.conf:
Code:
lxc.mount.entry: /dev/snd dev/snd none bind,create=dir,optional 0 0
lxc.cgroup.devices.allow: c 116:* rwm
But a arecord - l on the container only prints a
Code:
arecord -l
arecord: device_list:268: no soundcards found...
Any idea what I'm missing here?