Gentoo Archives: gentoo-commits

From: "Daniel Drake (dsd)" <dsd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] linux-patches r1283 - genpatches-2.6/trunk/2.6.24
Date: Mon, 14 Apr 2008 12:23:28
Message-Id: E1JlNiX-0001Sn-3m@stork.gentoo.org
1 Author: dsd
2 Date: 2008-04-14 12:23:24 +0000 (Mon, 14 Apr 2008)
3 New Revision: 1283
4
5 Added:
6 genpatches-2.6/trunk/2.6.24/2705_alsa-hda-fujitsu.patch
7 Modified:
8 genpatches-2.6/trunk/2.6.24/0000_README
9 Log:
10 Fix docking station headphone port and PC speaker for Fujitsu ALC262
11
12 Modified: genpatches-2.6/trunk/2.6.24/0000_README
13 ===================================================================
14 --- genpatches-2.6/trunk/2.6.24/0000_README 2008-04-10 16:57:36 UTC (rev 1282)
15 +++ genpatches-2.6/trunk/2.6.24/0000_README 2008-04-14 12:23:24 UTC (rev 1283)
16 @@ -107,6 +107,10 @@
17 From: Tony Vroon <chainsaw@g.o>
18 Desc: Fix mixer controls for Fujitsu Lifebook E8410 sound chip
19
20 +Patch: 2705_alsa-hda-fujitsu.patch
21 +From: Tony Vroon <chainsaw@g.o>
22 +Desc: Fix docking station headphone port and PC speaker for Fujitsu ALC262
23 +
24 Patch: 2900_bluetooth-usb-conwise-sco.patch
25 From: http://bugs.gentoo.org/203196
26 Desc: Fix bluetooth log spam with a buggy conwise USB adapter
27
28 Added: genpatches-2.6/trunk/2.6.24/2705_alsa-hda-fujitsu.patch
29 ===================================================================
30 --- genpatches-2.6/trunk/2.6.24/2705_alsa-hda-fujitsu.patch (rev 0)
31 +++ genpatches-2.6/trunk/2.6.24/2705_alsa-hda-fujitsu.patch 2008-04-14 12:23:24 UTC (rev 1283)
32 @@ -0,0 +1,75 @@
33 +
34 +From: Tony Vroon <chainsaw@g.o>
35 +
36 +Applied in ALSA upstream, queued for 2.6.25
37 +
38 +--- a/sound/pci/hda/patch_realtek.c.orig 2008-04-12 13:40:33.000000000 +0100
39 ++++ b/sound/pci/hda/patch_realtek.c 2008-04-12 13:40:40.000000000 +0100
40 +@@ -7939,7 +7939,8 @@
41 +
42 + /*
43 + * fujitsu model
44 +- * 0x14 = headphone/spdif-out, 0x15 = internal speaker
45 ++ * 0x14 = headphone/spdif-out, 0x15 = internal speaker,
46 ++ * 0x1b = port replicator headphone out
47 + */
48 +
49 + #define ALC_HP_EVENT 0x37
50 +@@ -7947,6 +7948,8 @@
51 + static struct hda_verb alc262_fujitsu_unsol_verbs[] = {
52 + {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
53 + {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
54 ++ {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
55 ++ {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
56 + {}
57 + };
58 +
59 +@@ -7987,12 +7990,16 @@
60 + unsigned int mute;
61 +
62 + if (force || !spec->sense_updated) {
63 +- unsigned int present;
64 ++ unsigned int present_int_hp, present_dock_hp;
65 + /* need to execute and sync at first */
66 + snd_hda_codec_read(codec, 0x14, 0, AC_VERB_SET_PIN_SENSE, 0);
67 +- present = snd_hda_codec_read(codec, 0x14, 0,
68 ++ present_int_hp = snd_hda_codec_read(codec, 0x14, 0,
69 + AC_VERB_GET_PIN_SENSE, 0);
70 +- spec->jack_present = (present & 0x80000000) != 0;
71 ++ snd_hda_codec_read(codec, 0x1B, 0, AC_VERB_SET_PIN_SENSE, 0);
72 ++ present_dock_hp = snd_hda_codec_read(codec, 0x1b, 0,
73 ++ AC_VERB_GET_PIN_SENSE, 0);
74 ++ spec->jack_present = (present_int_hp & 0x80000000) != 0;
75 ++ spec->jack_present |= (present_dock_hp & 0x80000000) != 0;
76 + spec->sense_updated = 1;
77 + }
78 + if (spec->jack_present) {
79 +@@ -8034,12 +8041,13 @@
80 + long *valp = ucontrol->value.integer.value;
81 + int change;
82 +
83 +- change = snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0,
84 +- HDA_AMP_MUTE,
85 +- valp[0] ? 0 : HDA_AMP_MUTE);
86 +- change |= snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0,
87 +- HDA_AMP_MUTE,
88 +- valp[1] ? 0 : HDA_AMP_MUTE);
89 ++ change = snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
90 ++ HDA_AMP_MUTE,
91 ++ valp ? 0 : HDA_AMP_MUTE);
92 ++ change |= snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0,
93 ++ HDA_AMP_MUTE,
94 ++ valp ? 0 : HDA_AMP_MUTE);
95 ++
96 + if (change)
97 + alc262_fujitsu_automute(codec, 0);
98 + return change;
99 +@@ -8057,6 +8065,8 @@
100 + },
101 + HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
102 + HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
103 ++ HDA_CODEC_VOLUME("PC Speaker Volume", 0x0b, 0x05, HDA_INPUT),
104 ++ HDA_CODEC_MUTE("PC Speaker Switch", 0x0b, 0x05, HDA_INPUT),
105 + HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
106 + HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
107 + HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
108
109 --
110 gentoo-commits@l.g.o mailing list