]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.drivers/alsa-hda-hp-3013-master-fix
Add a patch to fix Intel E100 wake-on-lan problems.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / alsa-hda-hp-3013-master-fix
1 From: Takashi Iwai <tiwai@suse.de>
2 Subject: ALSA: hda - Fix ALC260 hp3013 master switch
3 Patch-mainline:
4 References: bnc#441068
5
6 The master switch doesn't influence on NID 0x15, the headphone jack
7 on HP 3013 model because alc260_hp_master_update() ignores the passed
8 arguments.
9
10 Also, corrected the wrong arguments of hp3013 (0x10 and 0x15) although
11 this doesn't change any behavior.
12
13 Signed-off-by: Takashi Iwai <tiwai@suse.de>
14
15 ---
16 sound/pci/hda/patch_realtek.c | 10 +++++-----
17 1 file changed, 5 insertions(+), 5 deletions(-)
18
19 --- a/sound/pci/hda/patch_realtek.c
20 +++ b/sound/pci/hda/patch_realtek.c
21 @@ -4159,13 +4159,13 @@ static void alc260_hp_master_update(stru
22 struct alc_spec *spec = codec->spec;
23 unsigned int val = spec->master_sw ? PIN_HP : 0;
24 /* change HP and line-out pins */
25 - snd_hda_codec_write(codec, 0x0f, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
26 + snd_hda_codec_write(codec, hp, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
27 val);
28 - snd_hda_codec_write(codec, 0x10, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
29 + snd_hda_codec_write(codec, line, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
30 val);
31 /* mono (speaker) depending on the HP jack sense */
32 val = (val && !spec->jack_present) ? PIN_OUT : 0;
33 - snd_hda_codec_write(codec, 0x11, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
34 + snd_hda_codec_write(codec, mono, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
35 val);
36 }
37
38 @@ -4244,7 +4244,7 @@ static struct snd_kcontrol_new alc260_hp
39 .info = snd_ctl_boolean_mono_info,
40 .get = alc260_hp_master_sw_get,
41 .put = alc260_hp_master_sw_put,
42 - .private_value = (0x10 << 16) | (0x15 << 8) | 0x11
43 + .private_value = (0x15 << 16) | (0x10 << 8) | 0x11
44 },
45 HDA_CODEC_VOLUME("Front Playback Volume", 0x09, 0x0, HDA_OUTPUT),
46 HDA_CODEC_MUTE("Front Playback Switch", 0x10, 0x0, HDA_OUTPUT),
47 @@ -4297,7 +4297,7 @@ static void alc260_hp_3013_automute(stru
48 present = snd_hda_codec_read(codec, 0x15, 0,
49 AC_VERB_GET_PIN_SENSE, 0);
50 spec->jack_present = (present & AC_PINSENSE_PRESENCE) != 0;
51 - alc260_hp_master_update(codec, 0x10, 0x15, 0x11);
52 + alc260_hp_master_update(codec, 0x15, 0x10, 0x11);
53 }
54
55 static void alc260_hp_3013_unsol_event(struct hda_codec *codec,