/[linux-patches]/genpatches-2.6/trunk/2.6.24/2705_alsa-hda-fujitsu.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.24/2705_alsa-hda-fujitsu.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1283 - (show annotations) (download)
Mon Apr 14 12:23:24 2008 UTC (10 years, 5 months ago) by dsd
File size: 2795 byte(s)
Fix docking station headphone port and PC speaker for Fujitsu ALC262
1
2 From: Tony Vroon <chainsaw@gentoo.org>
3
4 Applied in ALSA upstream, queued for 2.6.25
5
6 --- a/sound/pci/hda/patch_realtek.c.orig 2008-04-12 13:40:33.000000000 +0100
7 +++ b/sound/pci/hda/patch_realtek.c 2008-04-12 13:40:40.000000000 +0100
8 @@ -7939,7 +7939,8 @@
9
10 /*
11 * fujitsu model
12 - * 0x14 = headphone/spdif-out, 0x15 = internal speaker
13 + * 0x14 = headphone/spdif-out, 0x15 = internal speaker,
14 + * 0x1b = port replicator headphone out
15 */
16
17 #define ALC_HP_EVENT 0x37
18 @@ -7947,6 +7948,8 @@
19 static struct hda_verb alc262_fujitsu_unsol_verbs[] = {
20 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
21 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
22 + {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
23 + {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
24 {}
25 };
26
27 @@ -7987,12 +7990,16 @@
28 unsigned int mute;
29
30 if (force || !spec->sense_updated) {
31 - unsigned int present;
32 + unsigned int present_int_hp, present_dock_hp;
33 /* need to execute and sync at first */
34 snd_hda_codec_read(codec, 0x14, 0, AC_VERB_SET_PIN_SENSE, 0);
35 - present = snd_hda_codec_read(codec, 0x14, 0,
36 + present_int_hp = snd_hda_codec_read(codec, 0x14, 0,
37 AC_VERB_GET_PIN_SENSE, 0);
38 - spec->jack_present = (present & 0x80000000) != 0;
39 + snd_hda_codec_read(codec, 0x1B, 0, AC_VERB_SET_PIN_SENSE, 0);
40 + present_dock_hp = snd_hda_codec_read(codec, 0x1b, 0,
41 + AC_VERB_GET_PIN_SENSE, 0);
42 + spec->jack_present = (present_int_hp & 0x80000000) != 0;
43 + spec->jack_present |= (present_dock_hp & 0x80000000) != 0;
44 spec->sense_updated = 1;
45 }
46 if (spec->jack_present) {
47 @@ -8034,12 +8041,13 @@
48 long *valp = ucontrol->value.integer.value;
49 int change;
50
51 - change = snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0,
52 - HDA_AMP_MUTE,
53 - valp[0] ? 0 : HDA_AMP_MUTE);
54 - change |= snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0,
55 - HDA_AMP_MUTE,
56 - valp[1] ? 0 : HDA_AMP_MUTE);
57 + change = snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
58 + HDA_AMP_MUTE,
59 + valp ? 0 : HDA_AMP_MUTE);
60 + change |= snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0,
61 + HDA_AMP_MUTE,
62 + valp ? 0 : HDA_AMP_MUTE);
63 +
64 if (change)
65 alc262_fujitsu_automute(codec, 0);
66 return change;
67 @@ -8057,6 +8065,8 @@
68 },
69 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
70 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
71 + HDA_CODEC_VOLUME("PC Speaker Volume", 0x0b, 0x05, HDA_INPUT),
72 + HDA_CODEC_MUTE("PC Speaker Switch", 0x0b, 0x05, HDA_INPUT),
73 HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
74 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
75 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),

  ViewVC Help
Powered by ViewVC 1.1.20