Re: [gentoo-user] QEMU unable to initialize audio
On Fri, Dec 25, 2015 at 04:10:40AM +, Ian Bloss wrote > I was saying the libsdl packages have a USE flag "sound" which builds the > sound module for sdl. So if qemu makes any calls to the sound module not > pure alsa calls, that might be causing your issue. > > Wabes USE flag output shows he's building sdl with the "sound" use flag > enabled and not just alsa alone. "sound" is a default USE flag for libalsa and libalsa2. I.e. "+sound" in IUSE in the ebuilds. It shows up in the emerge, and both libsdl's had it. Apparently QEMU prefers libsdl2 over libsdl when both USE flags are set. I removed the "sdl2" flag from qemu, and re-emerged qemu. I no longer get the error message, apparently because the libsdl version that qemu now uses does have "alsa" enabled. -- Walter DnesI don't run "desktop environments"; I run useful applications
Re: [gentoo-user] QEMU unable to initialize audio
Libsdl and libsdl2 built with sound use flag on host? On Thu, Dec 24, 2015, 16:04wrote: > Any ideas? The error message is... > > sdl: SDL failed to initialize audio subsystem > sdl: Reason: No available audio device > audio: Could not init `sdl' audio driver > > I get this both with a Gentoo guest... > > #!/bin/bash > qemu-system-i386 -enable-kvm \ >-cpu host -display gtk \ >-drive file=gentoo32.img,format=raw \ >-drive file=linuxswap.img,format=raw \ >-net nic,model=virtio \ >-rtc base=localtime,clock=host \ >-net user,hostname=gentoovm,hostfwd=tcp::2022-:22 \ >-m 3G -name "Gentoo VM" \ >-soundhw sb16 -parallel none \ >${@} > > ...and an OS/2 Warp 4 guest... > > #!/bin/bash > qemu-system-i386 -enable-kvm \ >-cpu coreduo -monitor vc \ >-drive file=os2.img,format=raw \ >-net nic,model=pcnet \ >-m size=64 -name "OS/2 VM" \ >-soundhw sb16 -vga std \ >${@} > > On the host, from "emerge -pv qemu"... > > app-emulation/qemu-2.4.1-r2::gentoo USE="aio alsa curl fdt gtk gtk2 jpeg > ncurses opengl pin-upstream-blobs png sdl sdl2 ssh threads usb vhost-net > vnc -accessibility -bluetooth -caps -debug -filecaps (-glusterfs) > -infiniband -iscsi -lzo -nfs -nls -numa -pulseaudio -python -rbd -sasl > -seccomp (-selinux) -smartcard -snappy -spice -static -static-softmmu > -static-user -systemtap -tci {-test} -tls -usbredir -uuid -vde -virtfs -vte > -xattr -xen -xfs" > PYTHON_TARGETS="python2_7" > QEMU_SOFTMMU_TARGETS="i386 x86_64" > QEMU_USER_TARGETS="i386 x86_64" > > -- > Walter Dnes > I don't run "desktop environments"; I run useful applications > >
Re: [gentoo-user] QEMU unable to initialize audio
On Thu, Dec 24, 2015 at 10:48:28PM +, Ian Bloss wrote > Libsdl and libsdl2 built with sound use flag on host? I didn't bother enabling alsa except for packages that actually need it. I've enabled it for libsdl, but not for sdl2, because I didn't realize libsdl2 even existed. According to equery, the only package pulling in libsdl2 is qemu, and that's because I set the flag. If I remove the "alsa2" flag from qemu, will it work properly with "alsa" alone? -- Walter DnesI don't run "desktop environments"; I run useful applications
Re: [gentoo-user] QEMU unable to initialize audio
I was saying the libsdl packages have a USE flag "sound" which builds the sound module for sdl. So if qemu makes any calls to the sound module not pure alsa calls, that might be causing your issue. Wabes USE flag output shows he's building sdl with the "sound" use flag enabled and not just alsa alone. On Thu, Dec 24, 2015, 22:26wrote: > waltd...@waltdnes.org wrote: > > > On Thu, Dec 24, 2015 at 10:48:28PM +, Ian Bloss wrote > > > Libsdl and libsdl2 built with sound use flag on host? > > > > I didn't bother enabling alsa except for packages that actually need > > it. I've enabled it for libsdl, but not for sdl2, because I didn't > > realize libsdl2 even existed. According to equery, the only package > > pulling in libsdl2 is qemu, and that's because I set the flag. If I > > remove the "alsa2" flag from qemu, will it work properly with "alsa" > > alone? > > On my host system I use alsa and no pulseaudio. However it doesn't > make any difference if I set the alsa USE-flag for qemu or not. > > I don't know if qemu runs flawless without sdl2 USE-flag. But you can > easily test this. > > Btw. Since I reverted from qemu-2.5.0 back to qemu-2.4.1-r2, qemu > hangs no longer when I specify ac97, hda or es1370 as sound hardware > emulation. But I have to start the xfce mixer application on the > guest OS after the desktop is loaded. If I don't do this, then one > core on my host is always at 100% load and qemu is slow and sometimes > doesn't respond for some seconds. But no error message appears on > guest or host. > Strange is, that the guest OS doesn't show a high load but only the > host OS. After I started the xfce-mixer app on guest OS, everything > is smooth and host load count normalizes. > > I now use qemu with "-soundhw es1370" and am have automated the start > of the mixer app. With this, sound is working fine. > > As I already said, when I use sb16 or gus then I have no sound at all. > Only ac97, hda and es1370 are working for me. Maybe this has something > to do with the guest OS. > > Here are the USE-flags that I use for qemu, libsdl and libsdl2. > > app-emulation/qemu-2.4.1-r2 aio caps curl fdt filecaps gtk gtk2 jpeg lzo > ncurses nfs nls opengl pin-upstream-blobs png python sasl sdl sdl2 seccomp > spice threads usb uuid vde vhost-net vnc xattr xfs -accessibility -alsa > -bluetooth -debug -glusterfs -infiniband -iscsi -numa -pulseaudio -rbd > -selinux -smartcard -snappy -ssh -static -static-softmmu -static-user > -systemtap -tci -test -tls -usbredir -virtfs -vte -xen > > media-libs/libsdl-1.2.15-r9 X alsa dga fbcon joystick opengl oss sound > video xv -aalib -custom-cflags -libcaca -nas -pulseaudio -static-libs > -tslib -xinerama > > media-libs/libsdl2-2.0.3-r200 X alsa dbus joystick opengl oss sound > threads udev video xscreensaver -altivec -custom-cflags -fusionsound -gles > -haptic -nas -pulseaudio -static-libs -tslib -wayland -xinerama > > -- > Regards > wabe > >
Re: [gentoo-user] QEMU unable to initialize audio
waltd...@waltdnes.org wrote: > On Thu, Dec 24, 2015 at 10:48:28PM +, Ian Bloss wrote > > Libsdl and libsdl2 built with sound use flag on host? > > I didn't bother enabling alsa except for packages that actually need > it. I've enabled it for libsdl, but not for sdl2, because I didn't > realize libsdl2 even existed. According to equery, the only package > pulling in libsdl2 is qemu, and that's because I set the flag. If I > remove the "alsa2" flag from qemu, will it work properly with "alsa" > alone? On my host system I use alsa and no pulseaudio. However it doesn't make any difference if I set the alsa USE-flag for qemu or not. I don't know if qemu runs flawless without sdl2 USE-flag. But you can easily test this. Btw. Since I reverted from qemu-2.5.0 back to qemu-2.4.1-r2, qemu hangs no longer when I specify ac97, hda or es1370 as sound hardware emulation. But I have to start the xfce mixer application on the guest OS after the desktop is loaded. If I don't do this, then one core on my host is always at 100% load and qemu is slow and sometimes doesn't respond for some seconds. But no error message appears on guest or host. Strange is, that the guest OS doesn't show a high load but only the host OS. After I started the xfce-mixer app on guest OS, everything is smooth and host load count normalizes. I now use qemu with "-soundhw es1370" and am have automated the start of the mixer app. With this, sound is working fine. As I already said, when I use sb16 or gus then I have no sound at all. Only ac97, hda and es1370 are working for me. Maybe this has something to do with the guest OS. Here are the USE-flags that I use for qemu, libsdl and libsdl2. app-emulation/qemu-2.4.1-r2 aio caps curl fdt filecaps gtk gtk2 jpeg lzo ncurses nfs nls opengl pin-upstream-blobs png python sasl sdl sdl2 seccomp spice threads usb uuid vde vhost-net vnc xattr xfs -accessibility -alsa -bluetooth -debug -glusterfs -infiniband -iscsi -numa -pulseaudio -rbd -selinux -smartcard -snappy -ssh -static -static-softmmu -static-user -systemtap -tci -test -tls -usbredir -virtfs -vte -xen media-libs/libsdl-1.2.15-r9 X alsa dga fbcon joystick opengl oss sound video xv -aalib -custom-cflags -libcaca -nas -pulseaudio -static-libs -tslib -xinerama media-libs/libsdl2-2.0.3-r200 X alsa dbus joystick opengl oss sound threads udev video xscreensaver -altivec -custom-cflags -fusionsound -gles -haptic -nas -pulseaudio -static-libs -tslib -wayland -xinerama -- Regards wabe