diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-11-07 08:49:28 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-07 08:51:15 -0500 |
commit | 30cde0aacc5f6786b0c4d4fafaac95eac845b8d7 (patch) | |
tree | 716790843e7eb4c27989a4459e473d794e9110d9 /sound/pci/hda/patch_realtek.c | |
parent | 077402317291437521ed86d3326b3bcc62d40529 (diff) |
ALSA: hda - Fix ALC260 hp3013 master switch
The master switch doesn't influence on NID 0x15, the headphone jack
on HP 3013 model because alc260_hp_master_update() ignores the passed
arguments.
Also, corrected the wrong arguments of hp3013 (0x10 and 0x15) although
this doesn't change any behavior.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0f1fa1dac448..017abd01299d 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4272,13 +4272,13 @@ static void alc260_hp_master_update(struct hda_codec *codec, | |||
4272 | struct alc_spec *spec = codec->spec; | 4272 | struct alc_spec *spec = codec->spec; |
4273 | unsigned int val = spec->master_sw ? PIN_HP : 0; | 4273 | unsigned int val = spec->master_sw ? PIN_HP : 0; |
4274 | /* change HP and line-out pins */ | 4274 | /* change HP and line-out pins */ |
4275 | snd_hda_codec_write(codec, 0x0f, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, | 4275 | snd_hda_codec_write(codec, hp, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, |
4276 | val); | 4276 | val); |
4277 | snd_hda_codec_write(codec, 0x10, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, | 4277 | snd_hda_codec_write(codec, line, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, |
4278 | val); | 4278 | val); |
4279 | /* mono (speaker) depending on the HP jack sense */ | 4279 | /* mono (speaker) depending on the HP jack sense */ |
4280 | val = (val && !spec->jack_present) ? PIN_OUT : 0; | 4280 | val = (val && !spec->jack_present) ? PIN_OUT : 0; |
4281 | snd_hda_codec_write(codec, 0x11, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, | 4281 | snd_hda_codec_write(codec, mono, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, |
4282 | val); | 4282 | val); |
4283 | } | 4283 | } |
4284 | 4284 | ||
@@ -4357,7 +4357,7 @@ static struct snd_kcontrol_new alc260_hp_3013_mixer[] = { | |||
4357 | .info = snd_ctl_boolean_mono_info, | 4357 | .info = snd_ctl_boolean_mono_info, |
4358 | .get = alc260_hp_master_sw_get, | 4358 | .get = alc260_hp_master_sw_get, |
4359 | .put = alc260_hp_master_sw_put, | 4359 | .put = alc260_hp_master_sw_put, |
4360 | .private_value = (0x10 << 16) | (0x15 << 8) | 0x11 | 4360 | .private_value = (0x15 << 16) | (0x10 << 8) | 0x11 |
4361 | }, | 4361 | }, |
4362 | HDA_CODEC_VOLUME("Front Playback Volume", 0x09, 0x0, HDA_OUTPUT), | 4362 | HDA_CODEC_VOLUME("Front Playback Volume", 0x09, 0x0, HDA_OUTPUT), |
4363 | HDA_CODEC_MUTE("Front Playback Switch", 0x10, 0x0, HDA_OUTPUT), | 4363 | HDA_CODEC_MUTE("Front Playback Switch", 0x10, 0x0, HDA_OUTPUT), |
@@ -4410,7 +4410,7 @@ static void alc260_hp_3013_automute(struct hda_codec *codec) | |||
4410 | present = snd_hda_codec_read(codec, 0x15, 0, | 4410 | present = snd_hda_codec_read(codec, 0x15, 0, |
4411 | AC_VERB_GET_PIN_SENSE, 0); | 4411 | AC_VERB_GET_PIN_SENSE, 0); |
4412 | spec->jack_present = (present & AC_PINSENSE_PRESENCE) != 0; | 4412 | spec->jack_present = (present & AC_PINSENSE_PRESENCE) != 0; |
4413 | alc260_hp_master_update(codec, 0x10, 0x15, 0x11); | 4413 | alc260_hp_master_update(codec, 0x15, 0x10, 0x11); |
4414 | } | 4414 | } |
4415 | 4415 | ||
4416 | static void alc260_hp_3013_unsol_event(struct hda_codec *codec, | 4416 | static void alc260_hp_3013_unsol_event(struct hda_codec *codec, |