Skip to content

Commit

Permalink
ALSA: hda - More line-out auto-mute support for Realtek
Browse files Browse the repository at this point in the history
Not only supporting the line-out automute as additional feature
to the existing headphone automute, now the headphone jack can
mute the line-out alone even without the speaker outs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Apr 28, 2011
1 parent 1a1455d commit 1daf5f4
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -1517,16 +1517,19 @@ static void alc_init_auto_hp(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
struct auto_pin_cfg *cfg = &spec->autocfg;
int present = 0;
int i;

if (!cfg->hp_pins[0]) {
if (cfg->line_out_type != AUTO_PIN_HP_OUT)
return;
}
if (cfg->hp_pins[0])
present++;
if (cfg->line_out_pins[0])
present++;
if (cfg->speaker_pins[0])
present++;
if (present < 2) /* need two different output types */
return;

if (!cfg->speaker_pins[0]) {
if (cfg->line_out_type != AUTO_PIN_SPEAKER_OUT)
return;
memcpy(cfg->speaker_pins, cfg->line_out_pins,
sizeof(cfg->speaker_pins));
cfg->speaker_outs = cfg->line_outs;
Expand Down

0 comments on commit 1daf5f4

Please sign in to comment.