diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-06-10 09:28:15 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-06-10 09:28:15 -0400 |
commit | c0a20263dbe1fc5f394913d71063c9cd8282c5db (patch) | |
tree | c41815b92ee389fb0185e94b2c9af9e7c1f6fd76 /sound | |
parent | 20f5e0b36d968326fab3b720035f226113e34ae9 (diff) |
ALSA: hda - Fix initialization of hp pins with master_mute in Realtek
Some Reatlek model quirks use master_mute bool switch for controlling
the master-mute of outputs. For these cases, the initialization of HP
pins/amps were forgotten during the transition to the common automute
helper function in 3.0 development time, and resulted in the muted HP
output as default.
This patch fixes the issue by adjusting the HP output explicitly with
master_mute switch.
Tested-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index ca211c1cba03..43fcfbd32847 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1141,6 +1141,13 @@ static void update_speakers(struct hda_codec *codec) | |||
1141 | struct alc_spec *spec = codec->spec; | 1141 | struct alc_spec *spec = codec->spec; |
1142 | int on; | 1142 | int on; |
1143 | 1143 | ||
1144 | /* Control HP pins/amps depending on master_mute state; | ||
1145 | * in general, HP pins/amps control should be enabled in all cases, | ||
1146 | * but currently set only for master_mute, just to be safe | ||
1147 | */ | ||
1148 | do_automute(codec, ARRAY_SIZE(spec->autocfg.hp_pins), | ||
1149 | spec->autocfg.hp_pins, spec->master_mute, true); | ||
1150 | |||
1144 | if (!spec->automute) | 1151 | if (!spec->automute) |
1145 | on = 0; | 1152 | on = 0; |
1146 | else | 1153 | else |
@@ -6201,11 +6208,6 @@ static const struct snd_kcontrol_new alc260_input_mixer[] = { | |||
6201 | /* update HP, line and mono out pins according to the master switch */ | 6208 | /* update HP, line and mono out pins according to the master switch */ |
6202 | static void alc260_hp_master_update(struct hda_codec *codec) | 6209 | static void alc260_hp_master_update(struct hda_codec *codec) |
6203 | { | 6210 | { |
6204 | struct alc_spec *spec = codec->spec; | ||
6205 | |||
6206 | /* change HP pins */ | ||
6207 | do_automute(codec, ARRAY_SIZE(spec->autocfg.hp_pins), | ||
6208 | spec->autocfg.hp_pins, spec->master_mute, true); | ||
6209 | update_speakers(codec); | 6211 | update_speakers(codec); |
6210 | } | 6212 | } |
6211 | 6213 | ||