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

Takashi Iwai tiwai at suse.de
Tue Sep 20 17:36:39 CEST 2011


At Tue, 20 Sep 2011 17:29:22 +0200,
David Henningsson wrote:
> 
> 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.

The above must be a bug.  It should follow the standard configuration,
too.  So you'll fix a bug automagically :)


Takashi


More information about the Alsa-devel mailing list