From patchwork Fri Apr 20 11:04:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 154016 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 34583B7031 for ; Fri, 20 Apr 2012 21:02:12 +1000 (EST) Received: from localhost ([::1]:59901 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLBbO-0008DE-4F for incoming@patchwork.ozlabs.org; Fri, 20 Apr 2012 07:02:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLBb2-0007xv-So for qemu-devel@nongnu.org; Fri, 20 Apr 2012 07:01:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLBb0-0005EW-LZ for qemu-devel@nongnu.org; Fri, 20 Apr 2012 07:01:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLBb0-0005EB-DK for qemu-devel@nongnu.org; Fri, 20 Apr 2012 07:01:46 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3KB1i15028821 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 20 Apr 2012 07:01:45 -0400 Received: from shalem.localdomain.com (vpn1-5-206.ams2.redhat.com [10.36.5.206]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3KB1els031729; Fri, 20 Apr 2012 07:01:43 -0400 From: Hans de Goede To: qemu-devel@nongnu.org Date: Fri, 20 Apr 2012 13:04:00 +0200 Message-Id: <1334919842-14610-3-git-send-email-hdegoede@redhat.com> In-Reply-To: <1334919842-14610-1-git-send-email-hdegoede@redhat.com> References: <1334919842-14610-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Hans de Goede Subject: [Qemu-devel] [PATCH 3/5] hw/ac97: Use AC97_Record_Gain_Mute not AC97_Line_In_Volume_Mute X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org After commit 19677a380a70348134ed7650b294522617eb03fc: "hw/ac97: add support for volume control" We are (correctly) using AC97_Record_Gain_Mute and not AC97_Line_In_Volume_Mute for recording volume, but various places in hw/ac97 were still assumimg that we are using AC97_Line_In_Volume_Mute for record volume control, this patch fixes this. Signed-off-by: Hans de Goede --- hw/ac97.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/ac97.c b/hw/ac97.c index 432382d..524dd7f 100644 --- a/hw/ac97.c +++ b/hw/ac97.c @@ -508,6 +508,7 @@ static void mixer_reset (AC97LinkState *s) mixer_store (s, AC97_PC_BEEP_Volume_Mute , 0x0000); mixer_store (s, AC97_Phone_Volume_Mute , 0x0000); mixer_store (s, AC97_Mic_Volume_Mute , 0x0000); + mixer_store (s, AC97_Line_In_Volume_Mute , 0x0000); mixer_store (s, AC97_CD_Volume_Mute , 0x0000); mixer_store (s, AC97_Video_Volume_Mute , 0x0000); mixer_store (s, AC97_Aux_Volume_Mute , 0x0000); @@ -533,7 +534,7 @@ static void mixer_reset (AC97LinkState *s) record_select (s, 0); set_volume (s, AC97_Master_Volume_Mute, 0x8000); set_volume (s, AC97_PCM_Out_Volume_Mute, 0x8808); - set_volume (s, AC97_Line_In_Volume_Mute, 0x8808); + set_volume (s, AC97_Record_Gain_Mute, 0x8808); reset_voices (s, active); } @@ -596,7 +597,6 @@ static void nam_writew (void *opaque, uint32_t addr, uint32_t val) case AC97_PCM_Out_Volume_Mute: case AC97_Master_Volume_Mute: case AC97_Record_Gain_Mute: - case AC97_Line_In_Volume_Mute: set_volume (s, index, val); break; case AC97_Record_Select: @@ -664,6 +664,7 @@ static void nam_writew (void *opaque, uint32_t addr, uint32_t val) case AC97_PC_BEEP_Volume_Mute: case AC97_Phone_Volume_Mute: case AC97_Mic_Volume_Mute: + case AC97_Line_In_Volume_Mute: case AC97_CD_Volume_Mute: case AC97_Video_Volume_Mute: case AC97_Aux_Volume_Mute: @@ -1175,8 +1176,8 @@ static int ac97_post_load (void *opaque, int version_id) mixer_load (s, AC97_Master_Volume_Mute)); set_volume (s, AC97_PCM_Out_Volume_Mute, mixer_load (s, AC97_PCM_Out_Volume_Mute)); - set_volume (s, AC97_Line_In_Volume_Mute, - mixer_load (s, AC97_Line_In_Volume_Mute)); + set_volume (s, AC97_Record_Gain_Mute, + mixer_load (s, AC97_Record_Gain_Mute)); active[PI_INDEX] = !!(s->bm_regs[PI_INDEX].cr & CR_RPBM); active[PO_INDEX] = !!(s->bm_regs[PO_INDEX].cr & CR_RPBM);