View previous topic :: View next topic |
Author |
Message |
umka69 Tux's lil' helper


Joined: 31 Mar 2013 Posts: 124
|
Posted: Sat Sep 26, 2015 8:34 pm Post subject: [SOLVED] QEMU guest sound support |
|
|
Hello!
I'm working on sound support in a guest system.
The host is Gentoo amd64, the guest is Windows x64.
Here is my start script. Audio support is not working here - the guest can not see audio device.
Code: | rolan@home ~ $ cat start.sh
#!/bin/sh
exec qemu-system-x86_64 \
-enable-kvm -cpu host -smp 4 -m 6G \
-device intel-hda, -soundhw hda \
-vga std \
-boot d \
-drive file="/dev/repo/microsoft-desktop",if=virtio \
-monitor stdio -name "Windows 10 x64" \
-k en-us \
-vnc :0,password \
"$@" |
Runnig...
Code: | rolan@home ~ $ sudo start.sh
QEMU 2.4.0 monitor - type 'help' for more information
(qemu) ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.0.29/work/alsa-lib-1.0.29/src/pcm/pcm_dmix.c:1024:(snd_pcm_dmix_open) unable to open slave
sdl: SDL_OpenAudio failed
sdl: Reason: No available audio device
sdl: SDL_OpenAudio failed
sdl: Reason: No available audio device
audio: Failed to create voice `dac'
audio: Failed to create voice `adc'
(qemu) |
Host sound works good (mplayer runs without errors), but the speaker-test runs with an error:
Code: | rolan@home ~ $ speaker-test -t wav -c 2
speaker-test 1.0.29
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.0.29/work/alsa-lib-1.0.29/src/pcm/pcm_hw.c:1693:(_snd_pcm_hw_open) Invalid value for card
Playback open error: -19,No such file or directory |
Can you advice something please? A have tried a lot of combinations of arguments and kerner drivres.
Where it comes from? _________________ Make a wish, this text is magic. 
Last edited by umka69 on Sun Sep 27, 2015 10:11 pm; edited 1 time in total |
|
Back to top |
|
 |
umka69 Tux's lil' helper


Joined: 31 Mar 2013 Posts: 124
|
Posted: Sun Sep 27, 2015 1:30 pm Post subject: |
|
|
I've got it.
At first it used not to have all necessary use flags. Here is the full story.
Than I missed that sudo command means root user environment, so all user configuration are not available.
The solution is to copy all alsa user configuration to root.
Code: | rolan@home ~ $ cat .asoundrc
defaults.pcm.card 1
defaults.pcm.device 0
rolan@home ~ $ sudo cp .asoundrc /root/ |
_________________ Make a wish, this text is magic.  |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|