From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Henningsson Subject: Re: [PATCH] ALSA: HDA: Refactor Realtek's automute Date: Tue, 20 Sep 2011 17:29:22 +0200 Message-ID: <4E78B152.8070903@canonical.com> References: <4E786A56.3080202@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by alsa0.perex.cz (Postfix) with ESMTP id 9558E103819 for ; Tue, 20 Sep 2011 17:29:23 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Takashi Iwai Cc: ALSA Development Mailing List List-Id: alsa-devel@alsa-project.org On 09/20/2011 05:01 PM, Takashi Iwai wrote: > At Tue, 20 Sep 2011 12:26:30 +0200, > David Henningsson wrote: >> >> Ok, my automute refactoring has been rebased to your latest tree. I've >> tested it on my own machine, but I don't know if wider testing is needed >> to ensure there are no regressions. > > Thanks. > > alc_simple_setup_automute() calls can be more simplified. > The function can check spec->autocfg.line_out_pins[0], hp_pins[0] and > speaker_pins[0] to identify detect_hp& co flags. Otherwise, the > arguments "1, 0, 0, 1" are hard to understand. > > Other than that, the patch looks good to me. That means a functional change in one place (alc882_quirks.c), where there are line_out_pins but automute for line out is not set: @@ -2568,8 +2554,7 @@ static void alc888_lenovo_ms7195_setup(struct hda_codec *codec) spec->autocfg.hp_pins[0] = 0x1b; spec->autocfg.line_out_pins[0] = 0x14; spec->autocfg.speaker_pins[0] = 0x15; - spec->automute = 1; - spec->automute_mode = ALC_AUTOMUTE_AMP; + alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP, 1, 0, 0, 1); } If you don't mind that change I can do what you suggest. -- David Henningsson, Canonical Ltd. http://launchpad.net/~diwic