Headset support on some Dell machines
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HWE Next |
Fix Released
|
Undecided
|
David Henningsson | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
David Henningsson | ||
linux-lts-raring (Ubuntu) |
Won't Fix
|
High
|
David Henningsson | ||
pulseaudio (Ubuntu) |
Fix Released
|
Medium
|
David Henningsson | ||
Precise |
Fix Released
|
Undecided
|
David Henningsson | ||
Raring |
Won't Fix
|
Undecided
|
David Henningsson |
Bug Description
[SRU Justification]
Several new hardware has either headset jacks or headphone-or-mic jacks, where the system cannot detect what has been plugged in. E g, for such a headset jack you can either plug in a headphone or a headset, but since the system cannot tell which one it is, you have to manually tell the system whether you want to use the internal or external mic.
In the case of a headphone-or-mic jack, you can have the jack functioning as either a headphone or a mic, but not as a headset.
Without this patch, PulseAudio would not detect the jack correctly, and not making all options available to the user.
[Regression Potential] is very low: this only affects machines with the specific name "Headphone Mic Jack" or "Headset Mic Jack", which started to appear for a few machines in the 3.5 kernel. People who are running 12.04.0 or 12.04.1 will be unaffected. More machines are coming in the 3.10 kernel, so this is also a preparation for making certification easier later on.
[Test case] On an affected machine, plug in something into the jack. Then go to "Sound Settings" and note what options there are: e g, for a headset jack, you should be able to select both external and internal mic manually.
Changed in linux (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → David Henningsson (diwic) |
description: | updated |
tags: | added: blocks-hwcert-enablement |
Changed in linux (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in pulseaudio (Ubuntu): | |
assignee: | nobody → David Henningsson (diwic) |
Changed in pulseaudio (Ubuntu Precise): | |
assignee: | nobody → David Henningsson (diwic) |
status: | New → In Progress |
description: | updated |
description: | updated |
Changed in hwe-next: | |
status: | New → In Progress |
Changed in hwe-next: | |
assignee: | nobody → David Henningsson (diwic) |
Changed in linux-lts-raring (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → David Henningsson (diwic) |
importance: | Undecided → High |
no longer affects: | linux (Ubuntu Raring) |
no longer affects: | linux-lts-raring (Ubuntu Raring) |
Changed in pulseaudio (Ubuntu Raring): | |
status: | New → In Progress |
assignee: | nobody → David Henningsson (diwic) |
Changed in pulseaudio (Ubuntu Raring): | |
status: | Invalid → Won't Fix |
Changed in hwe-next: | |
status: | In Progress → Fix Released |
Changed in pulseaudio (Ubuntu): | |
importance: | Undecided → Medium |
On some machines, there is a headset jack that can support both
headphone, headsets (of both CTIA and OMTP type) and mic-in.
On other machines, the headset jack supports headphone, headsets
(both CTIA and OMTP), but not mic-in.
This patch implements that functionality as different capture sources.
Buglink: https:/ /bugs.launchpad .net/bugs/ 1169143 pci/hda/ patch_realtek. c | 386 +++++++ +++++++ +++++++ +++++++ +++++++ ++++++
Tested-by: David Chen <email address hidden>
Co-authored-by: Kailang <email address hidden>
Signed-off-by: David Henningsson <email address hidden>
---
sound/
1 file changed, 386 insertions(+)
diff --git a/sound/ pci/hda/ patch_realtek. c b/sound/ pci/hda/ patch_realtek. c pci/hda/ patch_realtek. c pci/hda/ patch_realtek. c
index 6cf27f5..f3307eb 100644
--- a/sound/
+++ b/sound/
@@ -52,6 +52,20 @@ enum {
ALC_INIT_GPIO3,
};
+enum { MODE_UNKNOWN, MODE_UNPLUGGED, MODE_HEADSET, MODE_MIC, MODE_HEADPHONE, TYPE_UNKNOWN, TYPE_CTIA, TYPE_OMTP, define {
+ ALC_HEADSET_
+ ALC_HEADSET_
+ ALC_HEADSET_
+ ALC_HEADSET_
+ ALC_HEADSET_
+};
+
+enum {
+ ALC_HEADSET_
+ ALC_HEADSET_
+ ALC_HEADSET_
+};
+
struct alc_customize_
unsigned int sku_cfg;
unsigned char port_connectivity;
@@ -87,6 +101,11 @@ struct alc_spec {
unsigned int gpio_led; /* used for alc269_ fixup_hp_ gpio_led( ) */
+ hda_nid_t headset_mic_pin; headset_ mode; headset_ type; fixup_hp_ gpio_led( struct hda_codec *codec,
+ hda_nid_t headphone_mic_pin;
+ int current_
+ int current_
+
/* hooks */
void (*init_hook)(struct hda_codec *codec);
#ifdef CONFIG_PM
@@ -2798,6 +2817,302 @@ static void alc269_
}
}
+static void alc_headset_ mode_unplugged( struct hda_codec *codec) coef_idx( codec, 0x1b, 0x0c0b); coef_idx( codec, 0x45, 0xc429); coef_idx( codec, 0x35); coef_idx( codec, 0x35, val & 0xbfff); coef_idx( codec, 0x06, 0x2104); coef_idx( codec, 0x1a, 0x0001); coef_idx( codec, 0x26, 0x0004); coef_idx( codec, 0x32, 0x42a3); coef_idx( codec, 0x76, 0x000e); coef_idx( codec, 0x6c, 0x2400); coef_idx( codec, 0x18, 0x7308); coef_idx( codec, 0x6b, 0xc429); coef_idx( codec, 0x15, 0x0d40); coef_idx( codec, 0xb7, 0x802b); "Headset jack set to unplugged mode.\n"); mode_mic_ in(struct hda_codec *codec, hda_nid_t hp_pin, coef_idx( codec, 0x45, 0xc429); set_pin_ ctl_cache( codec, hp_pin, 0); coef_idx( codec, 0x35); coef_idx( codec, 0x35, val | 1<<14); coef_idx( codec, 0x06, 0x2100); coef_idx( codec, 0x1a, 0x0021); coef_idx( codec, 0x26, 0x008c); set_pin_ ctl_cache( codec, mic_pin, PIN_VREF50); set_pin_ ctl_cache( codec, hp_pin, 0); coef_idx( codec, 0x19, 0xa208); coef_idx( codec, 0x2e, 0xacf0);
+{
+ int val;
+
+ switch (codec->vendor_id) {
+ case 0x10ec0283:
+ alc_write_
+ alc_write_
+ val = alc_read_
+ alc_write_
+ alc_write_
+ alc_write_
+ alc_write_
+ alc_write_
+ break;
+ case 0x10ec0292:
+ alc_write_
+ alc_write_
+ alc_write_
+ alc_write_
+ break;
+ case 0x10ec0668:
+ alc_write_
+ alc_write_
+ break;
+ }
+ snd_printdd(
+}
+
+
+static void alc_headset_
+ hda_nid_t mic_pin)
+{
+ int val;
+
+ switch (codec->vendor_id) {
+ case 0x10ec0283:
+ alc_write_
+ snd_hda_
+ val = alc_read_
+ alc_write_
+ alc_write_
+ alc_write_
+ alc_write_
+ snd_hda_
+ break;
+ case 0x10ec0292:
+ snd_hda_
+ alc_write_
+ alc_write_
+ break;...