[alsa-devel] [PATCH] ALSA: HDA: Refactor Realtek's automute

David Henningsson david.henningsson at canonical.com
Tue Sep 20 17:29:22 CEST 2011


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


More information about the Alsa-devel mailing list