From 2101855be4f6fb9c3b506113a79da4e0330c73c0 Mon Sep 17 00:00:00 2001 Message-Id: <2101855be4f6fb9c3b506113a79da4e0330c73c0.1345556225.git.minovotn@redhat.com> In-Reply-To: References: From: Gerd Hoffmann Date: Mon, 9 Jul 2012 13:20:10 +0200 Subject: [PATCH 3/3] hda: fix codec ids RH-Author: Gerd Hoffmann Message-id: <1341840010-30164-4-git-send-email-kraxel@redhat.com> Patchwork-id: 40243 O-Subject: [RHEL-6.4 qemu-kvm PATCH 3/3] hda: fix codec ids Bugzilla: 801063 RH-Acked-by: Paolo Bonzini RH-Acked-by: Hans de Goede RH-Acked-by: Laszlo Ersek Our hda codecs exist in two variants: With CONFIG_MIXEMU=y they expose amplifiers for volume control to the guest, with CONFIG_MIXEMU=n they don't. This patch changes the codec ids, they are different now for these two cases. This makes sure windows guests will notice the difference. Signed-off-by: Gerd Hoffmann Signed-off-by: malc (cherry picked from commit ec4a804792ea20f716371a0a661efc9ec15c7ff0) --- hw/hda-audio.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) Signed-off-by: Michal Novotny --- hw/hda-audio.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/hda-audio.c b/hw/hda-audio.c index 14628c5..1f6c12e 100644 --- a/hw/hda-audio.c +++ b/hw/hda-audio.c @@ -113,23 +113,25 @@ static void hda_codec_parse_fmt(uint32_t format, struct audsettings *as) /* some defines */ #define QEMU_HDA_ID_VENDOR 0x1af4 -#define QEMU_HDA_ID_OUTPUT ((QEMU_HDA_ID_VENDOR << 16) | 0x10) -#define QEMU_HDA_ID_DUPLEX ((QEMU_HDA_ID_VENDOR << 16) | 0x20) -#define QEMU_HDA_ID_MICRO ((QEMU_HDA_ID_VENDOR << 16) | 0x30) - #define QEMU_HDA_PCM_FORMATS (AC_SUPPCM_BITS_16 | \ 0x1fc /* 16 -> 96 kHz */) #define QEMU_HDA_AMP_NONE (0) #define QEMU_HDA_AMP_STEPS 0x4a #ifdef CONFIG_MIXEMU -#define QEMU_HDA_AMP_CAPS \ +# define QEMU_HDA_ID_OUTPUT ((QEMU_HDA_ID_VENDOR << 16) | 0x12) +# define QEMU_HDA_ID_DUPLEX ((QEMU_HDA_ID_VENDOR << 16) | 0x22) +# define QEMU_HDA_ID_MICRO ((QEMU_HDA_ID_VENDOR << 16) | 0x32) +# define QEMU_HDA_AMP_CAPS \ (AC_AMPCAP_MUTE | \ (QEMU_HDA_AMP_STEPS << AC_AMPCAP_OFFSET_SHIFT) | \ (QEMU_HDA_AMP_STEPS << AC_AMPCAP_NUM_STEPS_SHIFT) | \ (3 << AC_AMPCAP_STEP_SIZE_SHIFT)) #else -#define QEMU_HDA_AMP_CAPS QEMU_HDA_AMP_NONE +# define QEMU_HDA_ID_OUTPUT ((QEMU_HDA_ID_VENDOR << 16) | 0x11) +# define QEMU_HDA_ID_DUPLEX ((QEMU_HDA_ID_VENDOR << 16) | 0x21) +# define QEMU_HDA_ID_MICRO ((QEMU_HDA_ID_VENDOR << 16) | 0x31) +# define QEMU_HDA_AMP_CAPS QEMU_HDA_AMP_NONE #endif /* common: audio output widget */ -- 1.7.11.2