Re: SOLVED: RE: Garbled audio - Windows 7 64 bit guest on Debian

2012-12-06 Thread Simon O'Riordan

Sound works badly with hda.
There is a slight improvement with Pulseaudio in the host;
the solution, however, is to use ALSA with AC97.

Since qemu-kvm 1.1, ac97 emulation has been reworked
 and now works with Windows 7 x64.

The windows update mechanism will install the drivers
 automatically, but whatcan be seen is that the drivers
 are actually only the Realtek 6305-series OEM
drivers, so if you have an isolated Win 7 system, 
simply find the 6305 driver set(available as a zip, 
sorry no link at the moment, google '6305_Vista_Win7_PG537.zip'), 
run the setup programme and you should have perfect sound.
I know we do.

The same applies to Qemu-kvm 1.2.




--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: SOLVED: RE: Garbled audio - Windows 7 64 bit guest on Debian

2012-11-28 Thread razamatan
Jimmy Crossley jcrossley at CoNetrix.com writes:

 
  -Original Message-
  From: kvm-owner at vger.kernel.org [mailto:kvm-owner at 
  vger.kernel.org] 
On Behalf Of Jimmy Crossley
  Sent: Friday, June 08, 2012 17:29
  Subject: Garbled audio - Windows 7 64 bit guest on Debian
  
  I am experiencing garbled sound on a Windows 7 64 bit guest running under 
  64 
bit Debian.  I have
  searched many discussion groups, etc. on the net and could find nothing 
useful, so I thought I would
  post this here, hoping someone with a deeper understanding could help out.

** snip

  If I connect to the machine using remote desktop (mstsc.exe, rdesktop, 
xfreerdp), the sound gets
  redirected to the local machine and sounds perfect.  The sound is only 
garbled when using SDL.  The
  same audio problems exist if I start up the machine and connect to it with 
vnc.
  
 
 I have mostly solved this issue.  The sound works much, much, better, but is 
still not as good as on my host machine.
 
 I installed PulseAudio and used it instead of ALSA.  In order to get kvm to 
use it, I set the environment
 variable QEMU_AUDIO_DRV=pa.  I had been using sudo to start the VM, and that 
kept this environment
 variable from being used.  I did a sudo setcap cap_net_admin+ep 
 /usr/bin/kvm 
in order to be able to run
 kvm under a normal user account.  Now the sound works quite well.
 
 


i've pretty much nearly duplicated this setup (gentoo host, qemu-kvm 1.2.1, 
pulseaudio, sdl, emulated hda audio, windows 7 64bit sp1 guest) due to the same 
reasons and the same result.  however, as jcrossley mentioned, it's not as 
crisp 
as the host; there's a lot of crackling and popping still.

based on jcrossley's investigation using rdp instead (and seeing no ill effects 
wrt sound), wouldn't the issue be pointed at the hda emulation?

how would one go about getting involved in terms of helping out w/ the hda 
emulator?

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: SOLVED: RE: Garbled audio - Windows 7 64 bit guest on Debian

2012-06-19 Thread Avi Kivity
On 06/18/2012 10:32 PM, Jimmy Crossley wrote:
 
 I have mostly solved this issue.  The sound works much, much, better, but is 
 still not as good as on my host machine.
 
 I installed PulseAudio and used it instead of ALSA.  In order to get kvm to 
 use it, I set the environment variable QEMU_AUDIO_DRV=pa.  I had been using 
 sudo to start the VM, and that kept this environment variable from being 
 used.  I did a sudo setcap cap_net_admin+ep /usr/bin/kvm in order to be 
 able to run kvm under a normal user account.  Now the sound works quite well.
 

That is good to hear.  But you are giving up on a lot of security if
you're running kvm as root (or with CAP_NET_ADMIN).  qemu supports
setting up the network externally and running with no special privileges.

Of course, it may not matter for your use case.

-- 
error compiling committee.c: too many arguments to function


--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: SOLVED: RE: Garbled audio - Windows 7 64 bit guest on Debian

2012-06-19 Thread Jimmy Crossley
Thanks for that reminder, Avi.  You are right - it would be best to not be 
running kvm as root or with any special capabilities.  I mainly wanted to 
report back that I got the sound working by switching to PulseAudio.  I made 
the other changes so I would not have to run kvm as root and it would see the 
environment variable.  When I run without that capability, it seems that kvm 
cannot create the tun device.  I will do more research and if I can't find the 
information I need, I'll start a new thread.



-
Jimmy Crossley
CoNetrix
Sentry Plaza III
5214 68th Street, Suite 200
Lubbock, TX  79424
jcross...@conetrix.com
https://www.CoNetrix.com
Telephone: 806-687-8600
Toll Free: 800-356-6568
Fax: 806-687-8511
This e-mail message (and attachments) may contain confidential CoNetrix 
information. If you are not the intended recipient, you cannot use, distribute 
or copy the message or attachments. In such a case, please notify the sender by 
return e-mail immediately and erase all copies of the message and attachments. 
Opinions, conclusions and other information in this message and attachments 
that do not relate to official business are neither given nor endorsed by 
CoNetrix.


-Original Message-
 From: Avi Kivity [mailto:a...@redhat.com]
 Sent: Tuesday, June 19, 2012 04:21
 To: Jimmy Crossley
 Cc: kvm@vger.kernel.org
 Subject: Re: SOLVED: RE: Garbled audio - Windows 7 64 bit guest on Debian

 On 06/18/2012 10:32 PM, Jimmy Crossley wrote:
 
  I have mostly solved this issue.  The sound works much, much, better, but 
  is still not as good as
 on my host machine.
 
  I installed PulseAudio and used it instead of ALSA.  In order to get kvm to 
  use it, I set the
 environment variable QEMU_AUDIO_DRV=pa.  I had been using sudo to start the 
 VM, and that kept this
 environment variable from being used.  I did a sudo setcap cap_net_admin+ep 
 /usr/bin/kvm in order
 to be able to run kvm under a normal user account.  Now the sound works quite 
 well.
 

 That is good to hear.  But you are giving up on a lot of security if
 you're running kvm as root (or with CAP_NET_ADMIN).  qemu supports
 setting up the network externally and running with no special privileges.

 Of course, it may not matter for your use case.

 --
 error compiling committee.c: too many arguments to function


--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SOLVED: RE: Garbled audio - Windows 7 64 bit guest on Debian

2012-06-18 Thread Jimmy Crossley
 -Original Message-
 From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf 
 Of Jimmy Crossley
 Sent: Friday, June 08, 2012 17:29
 To: kvm@vger.kernel.org
 Subject: Garbled audio - Windows 7 64 bit guest on Debian
 
 I am experiencing garbled sound on a Windows 7 64 bit guest running under 64 
 bit Debian.  I have
 searched many discussion groups, etc. on the net and could find nothing 
 useful, so I thought I would
 post this here, hoping someone with a deeper understanding could help out.
 
 I am running 64 bit Debian GNU/Linux testing on a Lenovo Thinkpad T420s, 
 8GB RAM, Crucial m4 512GB
 disk.  Using ALSA, the sound works perfectly when playing all kinds of files. 
  I am running
 everything from the standard Debian repositories.  This is using kernel 
 version 3.0.0-1.  kvm --
 version says:
 
   QEMU emulator version 1.0 (qemu-kvm-1.0+dfsg-11, Debian), Copyright (c) 
 2003-2008 Fabrice Bellard
 
 I am running Windows 7 Enterprise service pack 1 as a virtual machine.  The 
 machine is started with
 the following command:
 
   /usr/bin/kvm \
   -M pc \
   -m 2048 \
   -drive file=csilt033-6.qcow,if=virtio \
   -soundhw hda \
   -display sdl 
 
 I believe I must use -soundhw hda because that is the only sound device 
 that kvm emulates which
 has Windows 7 64 bit drivers.  Windows 7 automatically detects a High 
 Definition Audio Device and
 uses the driver HDAudio.sys.  But the sounds it makes sound like they are 
 very highly compressed, or
 a lot of bits are being lost or something.  Any application used to play 
 sound has the same problem.
 Speech is barely recognizable.  Using the built in speakers or external 
 speakers through the audio
 jack give the same result.
 
 I have tried several QEMU_AUDIO* settings, but it seems like these make no 
 difference.
 
 If I connect to the machine using remote desktop (mstsc.exe, rdesktop, 
 xfreerdp), the sound gets
 redirected to the local machine and sounds perfect.  The sound is only 
 garbled when using SDL.  The
 same audio problems exist if I start up the machine and connect to it with 
 vnc.
 
 
 I want to use SDL because I need to use Microsoft Lync, which requires me to 
 log in on the console.
 Using voice with Lync is not supported in a remote desktop environment.
 
 Here is lspci on the audio device on the host machine.
 
 $ sudo lspci -vvv -s 00:1b.0
 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family 
 High Definition Audio
 Controller (rev 04)
 Subsystem: Lenovo Device 21d2
 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
 Stepping- SERR- FastB2B-
 DisINTx+
 Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast TAbort- 
 TAbort- MAbort- SERR-
 PERR- INTx-
 Latency: 0, Cache Line Size: 64 bytes
 Interrupt: pin A routed to IRQ 51
 Region 0: Memory at f162 (64-bit, non-prefetchable) [size=16K]
 Capabilities: [50] Power Management version 2
 Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA 
 PME(D0+,D1-,D2-,D3hot+,D3cold+)
 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
 Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
 Address: fee004b8  Data: 
 Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 
 00
 DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s 64ns, 
 L1 1us
 ExtTag- RBE- FLReset+
 DevCtl: Report errors: Correctable- Non-Fatal- Fatal- 
 Unsupported-
 RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
 MaxPayload 128 bytes, MaxReadReq 128 bytes
 DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ 
 TransPend-
 LnkCap: Port #0, Speed unknown, Width x0, ASPM unknown, 
 Latency L0 64ns, L1 1us
 ClockPM- Surprise- LLActRep- BwNot-
 LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk-
 ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
 LnkSta: Speed unknown, Width x0, TrErr- Train- SlotClk- 
 DLActive- BWMgmt- ABWMgmt-
 Capabilities: [100 v1] Virtual Channel
 Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
 Arb:Fixed- WRR32- WRR64- WRR128-
 Ctrl:   ArbSelect=Fixed
 Status: InProgress-
 VC0:Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
 Arb:Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
 Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=01
 Status: NegoPending- InProgress-
 VC1:Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
 Arb:Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
 Ctrl:   Enable+ ID=1 ArbSelect=Fixed TC/VC=22
 Status: