You are not logged in.
I run Arch with multilib packages in an nspawn container on a Arch host whitout multilib. On the host audio works fine, the machine sees the hardware, the kernel modules are loaded, alsa sees the cartds, etc. and I hear the sound. In the container however the hardware is detected
[root@df ~]# lspci | grep "Audio"
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Wrestler HDMI Audio
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 01)
the modules are loaded
[root@df ~]# lsmod | grep snd
snd_hda_codec_conexant 24576 1
snd_hda_codec_generic 69632 1 snd_hda_codec_conexant
snd_hda_codec_hdmi 45056 1
snd_hda_intel 32768 0
snd_hda_codec 106496 4 snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_hda_codec_generic,snd_hda_intel
snd_hda_core 61440 5 snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
snd_hwdep 16384 1 snd_hda_codec
snd_aloop 24576 0
snd_pcm 86016 5 snd_aloop,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_core
snd_timer 28672 1 snd_pcm
snd 65536 9 snd_aloop,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
soundcore 16384 1 snd
as it all should be, but alsa does not see anything.
[root@df ~]# aplay -l
aplay: device_list:268: no soundcards found...
[root@df ~]# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
Things in /proc/asound all seem to be right
[root@df ~]# ls /proc/asound/
Generic Generic_1 Loopback card0 card1 card2 cards devices hwdep modules oss pcm seq timers version
I start the container with systemd-nspawn -bD, tried using --bind /dev/snd but it didn't change anything.
The closest the wiki has to my problem, is setting up skype in an nspawn container, wich uses --share-system ( instead of b ), but that didn't change the situatiln either.
As far as I understand, all the working stuff (kernel, hw, /proc) is shared between the two systems. At what elvel/point does the containerised alsa diverge from the other one? What should I see, the same cards/device, or even the pcms/stuff set up in .asoundrc should be the same (propably not)?
I'm not hard set on using pure alsa, if it's easier with pulse I'm open, I just dont have any experience with it (and it needs somewhat working alsa?).
EDIT: added that container has multilib, host does not
Last edited by matyilona200 (2016-07-29 08:25:48)
Offline
I almost had the solution last time, it is to use --bind /dev/snd AND --share-system. It fixed it for me, the alsa in the container saw the same devices and cards, muting/changing volume in the container worked (affected the whole system, as it should). With the same config files in the container as on the host, everything works, I can hear sounds from the container etc.
Offline