assigned EHCI USB headset not working
Hi,
I am using latest clone from qemu-kvm git with kernel 2.6.35.7.
Since assigning PCI soundcards, did not yield any usable results, I assigned a USB headset to a Windows7 VM. I used the following two command lines to enable the EHCI controller inside the VM and to assign the device to it:
...
-device usb-ehci,id=ehci \
-device usb-host,vendorid=046d,productid=0a01,bus=ehci.0 \
...
Right after starting the VM I see the following output:
...
Booting from Hard Disk...
Booting from 0000:7c00
husb: config #1 need 1
husb: 2 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 2 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 2 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1 USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
USB stall
husb: config #1 need 1
husb: 2 interfaces claimed for configuration 1
"info usb" on the monitor looks like this:
Device 0.1, Port 1, Speed 1.5 Mb/s, Product Microsoft Wireless
Desktop Rece
Device 1.1, Port 1, Speed 480 Mb/s, Product Logitech USB Headset
The sound device shows up under Windows7 and drivers are installed automatically. Unfortunately it does not work. All the players I tried, did not even start playing the sound file, although they detected the DirectSound Device.
When connected to a "natively" running Windows7, the USB headset works the way it's supposed to.
Any help is greatly appreciated.
Regards
André
Hi,
Quoted 4 lines
The sound device shows up under Windows7 and drivers are installed automatically. Unfortunately it does not work. All the players I tried, did not even start playing the sound file, although they detected the DirectSound Device.
iso xfer's from usb-linux via ehci are flaky for reasons not yet tracked down.
Any reason why you don't just plug in a virtual sound card? The HDA emulation should work fine with win7.
cheers,
Gerd
Hi Gerd,
Quoted 7 lines · Gerd Hoffmann
Hi,
Quoted 4 lines
The sound device shows up under Windows7 and drivers are installed automatically. Unfortunately it does not work. All the players I tried, did not even start playing the sound file, although they detected the DirectSound Device.
Quoted 5 lines
iso xfer's from usb-linux via ehci are flaky for reasons not yet tracked down.
Any reason why you don't just plug in a virtual sound card? The HDA emulation should work fine with win7.
Using the hda driver was my first attempt. But the result was not very convincing. When playing mp3s inside the VM, I could hear music coming from the speakers, but the sound was very choppy and too slow. It was no joy listening to it. I assumed that it may be a clocking issue, since the man page for qemu lists the module paramter "clocking=48000" for the i810_audio driver. The snd_hda_intel module however does not seem to have such a parameter.
I then double checked whether playing an mp3 works on the server, rather than from inside the VM. I used mpg123 to test it and mp3s play without distortion on the machine.
Regards
André
Quoted 13 lines · André Weidemann
Hi Gerd,
Quoted 10 lines · Gerd Hoffmann
Hi,
Quoted 4 lines
The sound device shows up under Windows7 and drivers are installed automatically. Unfortunately it does not work. All the players I tried, did not even start playing the sound file, although they detected the DirectSound Device.
iso xfer's from usb-linux via ehci are flaky for reasons not yet tracked down.
Quoted 7 lines
Quoted 2 lines
Any reason why you don't just plug in a virtual sound card? The HDA emulation should work fine with win7.
Using the hda driver was my first attempt. But the result was not very convincing. When playing mp3s inside the VM, I could hear music coming from the speakers, but the sound was very choppy and too slow. It was no joy listening to it.
Does "export QEMU_AUDIO_DAC_TRY_POLL=0" before invoking qemu helps? It depends on your host-side interface. Using ALSA here, it is generally required.
Note that this discussion rather belongs on qemu-devel.
Jan
Hi Jan,
Quoted 22 lines · Jan Kiszka
Quoted 13 lines · André Weidemann
Hi Gerd,
Quoted 10 lines · Gerd Hoffmann
Hi,
Quoted 4 lines
The sound device shows up under Windows7 and drivers are installed automatically. Unfortunately it does not work. All the players I tried, did not even start playing the sound file, although they detected the DirectSound Device.
iso xfer's from usb-linux via ehci are flaky for reasons not yet tracked down.
Quoted 7 lines
Quoted 2 lines
Any reason why you don't just plug in a virtual sound card? The HDA emulation should work fine with win7.
Using the hda driver was my first attempt. But the result was not very convincing. When playing mp3s inside the VM, I could hear music coming from the speakers, but the sound was very choppy and too slow. It was no joy listening to it.
Quoted 5 lines
Does "export QEMU_AUDIO_DAC_TRY_POLL=0" before invoking qemu helps? It depends on your host-side interface. Using ALSA here, it is generally required.
Note that this discussion rather belongs on qemu-devel.
Thank you very much. Setting the variable did the trick.
Could this perhaps be included in the man page? I am sure there will be others who will eventually run into the same problem as I did.
Regards
André
Quoted 31 lines · André Weidemann
Hi Jan,
Quoted 28 lines · Jan Kiszka
Quoted 15 lines · André Weidemann
Hi Gerd,
Quoted 12 lines · Gerd Hoffmann
Hi,
Quoted 5 lines
The sound device shows up under Windows7 and drivers are installed automatically. Unfortunately it does not work. All the players I tried,
did not even start playing the sound file, although they detected the DirectSound Device.iso xfer's from usb-linux via ehci are flaky for reasons not yet tracked
down.Quoted 7 lines
Quoted 2 lines
Any reason why you don't just plug in a virtual sound card? The HDA emulation should work fine with win7.
Using the hda driver was my first attempt. But the result was not very convincing. When playing mp3s inside the VM, I could hear music coming from the speakers, but the sound was very choppy and too slow. It was no joy listening to it.
Does "export QEMU_AUDIO_DAC_TRY_POLL=0" before invoking qemu helps? It depends on your host-side interface. Using ALSA here, it is generally required.
Quoted 5 lines
Quoted 1 line
Note that this discussion rather belongs on qemu-devel.
Thank you very much. Setting the variable did the trick. Could this perhaps be included in the man page? I am sure there will be others who will eventually run into the same problem as I did.
It is a long-standing issue of QEMU that I always wanted to understand but never found the time for. CC'ing malc, maybe he has a good idea how to finally attack this.
Jan
Quoted 34 lines · Jan Kiszka
Quoted 33 lines · Andr? Weidemann
Hi Jan,
Quoted 29 lines · Jan Kiszka
Quoted 15 lines · Andr? Weidemann
Hi Gerd,
Quoted 12 lines · Gerd Hoffmann
Hi,
Quoted 5 lines
The sound device shows up under Windows7 and drivers are installed automatically. Unfortunately it does not work. All the players I tried,
did not even start playing the sound file, although they detected the DirectSound Device.iso xfer's from usb-linux via ehci are flaky for reasons not yet tracked
down.Quoted 7 lines
Quoted 2 lines
Any reason why you don't just plug in a virtual sound card? The HDA emulation should work fine with win7.
Using the hda driver was my first attempt. But the result was not very convincing. When playing mp3s inside the VM, I could hear music coming from the speakers, but the sound was very choppy and too slow. It was no joy listening to it.
Does "export QEMU_AUDIO_DAC_TRY_POLL=0" before invoking qemu helps? It depends on your host-side interface. Using ALSA here, it is generally required.
Note that this discussion rather belongs on qemu-devel.
Quoted 8 lines
Quoted 3 lines
Thank you very much. Setting the variable did the trick. Could this perhaps be included in the man page? I am sure there will be others who will eventually run into the same problem as I did.
It is a long-standing issue of QEMU that I always wanted to understand but never found the time for. CC'ing malc, maybe he has a good idea how to finally attack this.
Attack what exactly?
Signature · 1 line
mailto:[email protected]
Quoted 40 lines · malc
Quoted 38 lines · Jan Kiszka
Quoted 36 lines · Andr? Weidemann
Hi Jan,
Quoted 24 lines · Jan Kiszka
Quoted 15 lines · Andr? Weidemann
Hi Gerd,
Quoted 12 lines · Gerd Hoffmann
Hi,
Quoted 5 lines
The sound device shows up under Windows7 and drivers are installed automatically. Unfortunately it does not work. All the players I tried,
did not even start playing the sound file, although they detected the DirectSound Device.iso xfer's from usb-linux via ehci are flaky for reasons not yet tracked
down.Quoted 7 lines
Quoted 2 lines
Any reason why you don't just plug in a virtual sound card? The HDA emulation should work fine with win7.
Using the hda driver was my first attempt. But the result was not very convincing. When playing mp3s inside the VM, I could hear music coming from the speakers, but the sound was very choppy and too slow. It was no joy listening to it.
Quoted 5 lines
Does "export QEMU_AUDIO_DAC_TRY_POLL=0" before invoking qemu helps? It depends on your host-side interface. Using ALSA here, it is generally required.
Note that this discussion rather belongs on qemu-devel.
Thank you very much. Setting the variable did the trick. Could this perhaps be included in the man page? I am sure there will be others who will eventually run into the same problem as I did.
Quoted 6 lines
Quoted 4 lines
It is a long-standing issue of QEMU that I always wanted to understand but never found the time for. CC'ing malc, maybe he has a good idea how to finally attack this.
Attack what exactly?
Sound output over (at least) ALSA is not smoothly working in polled mode. It's similar to [1], which is yet unsolved.
Jan
[1] http://thread.gmane.org/gmane.comp.emulators.qemu/52365
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Quoted 3 lines · Jan Kiszka
Quoted 2 lines · malc
On Thu, 9 Jun 2011, Jan Kiszka wrote:
[..snip..]
Quoted 8 lines
Sound output over (at least) ALSA is not smoothly working in polled mode. It's similar to [1], which is yet unsolved.
Jan
I've lost the mail from that period, have you sent me the info i've requested? In any case, please do provide detailed information on how to reproduce this (not involving windows guests though, i don't have those)
Signature · 1 line
mailto:[email protected]
Quoted 12 lines · malc
Quoted 3 lines · Jan Kiszka
Quoted 2 lines · malc
On Thu, 9 Jun 2011, Jan Kiszka wrote:
[..snip..]
Quoted 4 lines
Sound output over (at least) ALSA is not smoothly working in polled mode. It's similar to [1], which is yet unsolved.
Quoted 7 lines
Quoted 4 lines
Jan
I've lost the mail from that period, have you sent me the info i've requested?
Just reposted it privately.
Quoted 3 lines
In any case, please do provide detailed information on how to reproduce this (not involving windows guests though, i don't have those)
I've two scenarios at hand now: one involves a Windows 7 guest with -soundhw hda, the other is my Musicpal (do you still have a firmware image at hand?). Some Linux guest here with identical configuration like Win7 does not show any problems in polling mode.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Hi,
Quoted 4 lines
I've two scenarios at hand now: one involves a Windows 7 guest with -soundhw hda, the other is my Musicpal (do you still have a firmware image at hand?). Some Linux guest here with identical configuration like Win7 does not show any problems in polling mode.
Noteworthy difference between linux and windows 7: Windows 7 uses a pretty small ring buffer (~ one page, where 20ms sound data fit in) whereas linux uses *alot* more, 128k or so.
That makes win7 guests quite sensitive to latency issues, be it in the audio subsystem or elsewhere. For example bulky screen updates with the non-threaded vnc server are enougth to cause audible glitches in audio playback.
HTH,
Gerd