Bug 648486 (LibvirtHDA)

Summary: Provide to users some modern sound device like Intel HDA
Product: Red Hat Enterprise Linux 6 Reporter: Glauber Costa <gcosta>
Component: libvirtAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: acathrow, dallan, dyuan, eblake, jclift, mjenner, mzhan, xen-maint, ydu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.8.7-4.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:23:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 645342    
Bug Blocks: 644849    

Description Glauber Costa 2010-11-01 13:02:21 UTC
Nowadays, users does not have an option to use a fully featured sound driver. ac97 and es1370 simply does not live up to our needs, and won't even work in modern guests like Windows 7.

We should expose a newer option to users as soon as qemu implements it.
Qemu work is under progress, according to https://bugzilla.redhat.com/show_bug.cgi?id=645342

Comment 1 Dave Allan 2011-01-05 19:37:55 UTC
Cole is implementing support for the Intel HDA recently added to qemu.

Comment 6 Min Zhan 2011-01-28 05:16:28 UTC
Verified with Passed with below environment:
# uname -a
Linux dhcp-65-85.nay.redhat.com 2.6.32-99.el6.x86_64 #1 SMP Fri Jan 14 10:46:00
EST 2011 x86_64 x86_64 x86_64 GNU/Linux

libvirt-0.8.7-4.el6.x86_64
kernel-2.6.32-99.el6.x86_64
qemu-kvm-0.12.1.2-2.129.el6.x86_64

----
Steps:
1. In guest xml:
....
    <sound model='ich6'>
        <codec type='output' slot='0'/>
        <codec type='duplex' slot='3'/>
    </sound>
....
2. # virsh start <guest>
Domain rhel6 started

3. In guest, 
# lspci
...
00:04.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 01)
...

Comment 8 Min Zhan 2011-01-28 10:28:46 UTC
Also I try with win7 guest as following:
1. Install a win7 guest, and add the following into xml
....
    <sound model='ich6'>
        <codec type='output' slot='0'/>
        <codec type='duplex' slot='3'/>
    </sound>
....

2. # virsh start win7
   Domain win7 started

   # virsh dumpxml win7
...
    <sound model='ich6'>
      <alias name='sound0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </sound>
...

   # virt-viewer win7

And checked with Computer -> Properties, select Device Manager -> Sound, video and game controllers, High Definition Audio Device is there.

Comment 9 Justin Clift 2011-01-28 13:04:05 UTC
That looks promising.

Just to be absolutely sure, are you able to RDP into the windows client, and make sure the sound is being generated?

Comment 11 Justin Clift 2011-02-11 14:31:52 UTC
I can try, but I'll need an IP address I can access.

The IP address for the win7 guest of "192.168.122.239" means the address is not network routable.  It's probably only available to you.

Maybe if you use a bridged or routed network for the guest instead, with DCHP, then it might pick up an IP address I can get to? :)

Comment 12 Min Zhan 2011-02-17 07:11:06 UTC
(In reply to comment #11)

OK. I have prepared a bridged network, and the win7 guest ip is 10.66.65.167.  guest u/p is same as comment #10. Please have a try. Thanks:)

Comment 14 Justin Clift 2011-02-17 11:56:44 UTC
Sound for windows 7 guests is confirmed working (over RDP anyway) for both 32 bit and 64 bit windows 7 guests.

This is really good news. :)

Comment 15 Andrew Cathrow 2011-02-20 02:28:04 UTC
We need to make sure that we're testing this in Spice not just RDP.

Comment 16 Justin Clift 2011-02-20 09:38:53 UTC
That's a really good point.

Might be quickest if we ask one of the guys with Spice already set up to try it (ie one of the Spice developers?).  Otherwise, I can look into getting Spice set up locally here tomorrow (Monday).

Comment 17 Andrew Cathrow 2011-02-20 13:31:22 UTC
(In reply to comment #16)
> That's a really good point.
> 
> Might be quickest if we ask one of the guys with Spice already set up to try it
> (ie one of the Spice developers?).  Otherwise, I can look into getting Spice
> set up locally here tomorrow (Monday).

I know it works, I ran it last night, but it needs to be run in QE

Comment 18 Min Zhan 2011-02-21 10:35:26 UTC
For sound test with Spice,Verified as passed.
Environment:
# uname -a
Linux dhcp-65-85.nay.redhat.com 2.6.32-113.el6.x86_64 #1 SMP Fri Feb 4 11:15:56 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
qemu-kvm-0.12.1.2-2.145.el6.x86_64
libvirt-0.8.7-7.el6.x86_64

Steps:
1. Edit win7 guest's XML,
   #virsh edit win7

insert a sound device like:

    <sound model='ich6'>
        <codec type='output' slot='0'/>
        <codec type='duplex' slot='3'/>
    </sound>


2. Edit guest's XML,
   #virsh edit win7

insert a graphics device like:

<graphics type='spice' port='5900' autoport='no' keymap='en-us'/>

3. start guest

# virsh start win7

4. Install spice-client.  

   #yum install spice-client

5. Use spice-client to check guest windows. 

   # /usr/libexec/spicec -h 127.0.0.1 -p 5900

6. Download a multi-media file, install mplayer or similar, play the file and verify the sound can be heard.

Comment 21 errata-xmlrpc 2011-05-19 13:23:29 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0596.html