]> git.proxmox.com Git - qemu.git/commit
hw/ac97: Make a bunch of mixer registers read only
authorHans de Goede <hdegoede@redhat.com>
Mon, 7 May 2012 07:24:35 +0000 (09:24 +0200)
committermalc <av1474@comtv.ru>
Mon, 7 May 2012 12:31:40 +0000 (16:31 +0400)
commitd044be3714db9c3750c430a2bb1be74beee6fd27
treef401d0f9673f9fa1dce107a7901ece3b478798b5
parenta4e652ebc0b2c473f2ded93e8528095da8251c6a
hw/ac97: Make a bunch of mixer registers read only

The Linux ac97 driver tries to see if optional things like video input
volume control are available in 2 ways:
1) See if the mute bit is set after reset, if it is no further tests are done
2) If the mute bit is not set it does a write/read test of the mute bit

This patch changes our ac97 to conform to what the Linux driver expects, it
initializes registers for things which we don't emulate to 0 (so the mute bit
is not set) and makes them read only.

This causes Linux to now longer show the following (functionless)
controls in alsamixer:

Master Mono vol + mute
3d Control toggle
PCM out pre / post 3d select
Surround toggle
CD vol + mute
Mic vol + mute
Mic boost toggle
Mic mic1 / mic2 select
Video vol + mute
Phone vol + mute
Beep mono vol + mute
Aux vol + mute
Mono "output mic" / "mix" select
Sigmatel 4 speaker stereo toggle
Sigmatel ADC 6Db att toggle
Sigmatel DAC 6Db att toggle

This patch was also tested with a Windows XP guest and there it also makes
a number of functionless mixer controls go away.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
hw/ac97.c