[alsa-devel] Intel HD SigmaTel STAC9221 - Wrong input after output change
Hello,
I am on an iMac ("*imac-20" model/pinconfig) with a Intel HD card with the SigmaTel STAC9221 codec. I have attached the inital codec info after modprobe. When I plug in and then unplug my speakers the microphone stops working. Reproduction steps with codec dump diffs as follows
1) Initial codec info - attached - Microphone working
2) Plug in speakers - Microphone working
Node 0x0c [Pin Complex] wcaps 0x400181: Stereo Pincap 0x081737: IN OUT Detect Pin Default 0x9017e110: [Fixed] Speaker at Int N/A Conn = Analog, Color = White - Pin-ctls: 0x00: + Pin-ctls: 0x40: OUT Connection: 1 0x03
3) Unplug speakers - Microphone not working
Node 0x0b [Pin Complex] wcaps 0x400181: Stereo Pincap 0x081737: IN OUT Detect Pin Default 0x90a7012e: [Fixed] Mic at Int N/A Conn = Analog, Color = Unknown - Pin-ctls: 0x44: OUT + Pin-ctls: 0x04: Connection: 1 0x04 Node 0x0c [Pin Complex] wcaps 0x400181: Stereo Pincap 0x081737: IN OUT Detect Pin Default 0x9017e110: [Fixed] Speaker at Int N/A Conn = Analog, Color = White - Pin-ctls: 0x40: OUT + Pin-ctls: 0x00: Connection: 1 0x03 Node 0x0f [Pin Complex] wcaps 0x400181: Stereo Pincap 0x0837: IN OUT Detect Pin Default 0x0181e020: [Jack] Line In at Ext Rear Conn = 1/8, Color = White - Pin-ctls: 0x40: OUT + Pin-ctls: 0x00: Connection: 1 0x05
4) Plug in speakers again - Microphone not working
Node 0x0b [Pin Complex] wcaps 0x400181: Stereo Pincap 0x081737: IN OUT Detect Pin Default 0x90a7012e: [Fixed] Mic at Int N/A Conn = Analog, Color = Unknown - Pin-ctls: 0x04: + Pin-ctls: 0x44: OUT Connection: 1 0x04 Node 0x0c [Pin Complex] wcaps 0x400181: Stereo Pincap 0x081737: IN OUT Detect Pin Default 0x9017e110: [Fixed] Speaker at Int N/A Conn = Analog, Color = White - Pin-ctls: 0x00: + Pin-ctls: 0x40: OUT Connection: 1 0x03 Node 0x0f [Pin Complex] wcaps 0x400181: Stereo Pincap 0x0837: IN OUT Detect Pin Default 0x0181e020: [Jack] Line In at Ext Rear Conn = 1/8, Color = White - Pin-ctls: 0x00: + Pin-ctls: 0x40: OUT Connection: 1 0x05
At Sun, 27 May 2007 23:33:27 +0100, Ivan N. Zlatev wrote:
Hello,
I am on an iMac ("*imac-20" model/pinconfig) with a Intel HD card with the SigmaTel STAC9221 codec. I have attached the inital codec info after modprobe. When I plug in and then unplug my speakers the microphone stops working. Reproduction steps with codec dump diffs as follows
I guess you can restore the status via toggling "Line In as Output Switch" and "Mic as Output Switch" mixer elements. The problem looks like the unsolicited event handling. It doesn't cope with the shared input jacks well.
Takashi
Initial codec info - attached - Microphone working
Plug in speakers - Microphone working
Node 0x0c [Pin Complex] wcaps 0x400181: Stereo Pincap 0x081737: IN OUT Detect Pin Default 0x9017e110: [Fixed] Speaker at Int N/A Conn = Analog, Color = White
- Pin-ctls: 0x00:
- Pin-ctls: 0x40: OUT Connection: 1 0x03
- Unplug speakers - Microphone not working
Node 0x0b [Pin Complex] wcaps 0x400181: Stereo Pincap 0x081737: IN OUT Detect Pin Default 0x90a7012e: [Fixed] Mic at Int N/A Conn = Analog, Color = Unknown
- Pin-ctls: 0x44: OUT
- Pin-ctls: 0x04: Connection: 1 0x04
Node 0x0c [Pin Complex] wcaps 0x400181: Stereo Pincap 0x081737: IN OUT Detect Pin Default 0x9017e110: [Fixed] Speaker at Int N/A Conn = Analog, Color = White
- Pin-ctls: 0x40: OUT
- Pin-ctls: 0x00: Connection: 1 0x03
Node 0x0f [Pin Complex] wcaps 0x400181: Stereo Pincap 0x0837: IN OUT Detect Pin Default 0x0181e020: [Jack] Line In at Ext Rear Conn = 1/8, Color = White
- Pin-ctls: 0x40: OUT
- Pin-ctls: 0x00: Connection: 1 0x05
- Plug in speakers again - Microphone not working
Node 0x0b [Pin Complex] wcaps 0x400181: Stereo Pincap 0x081737: IN OUT Detect Pin Default 0x90a7012e: [Fixed] Mic at Int N/A Conn = Analog, Color = Unknown
- Pin-ctls: 0x04:
- Pin-ctls: 0x44: OUT Connection: 1 0x04
Node 0x0c [Pin Complex] wcaps 0x400181: Stereo Pincap 0x081737: IN OUT Detect Pin Default 0x9017e110: [Fixed] Speaker at Int N/A Conn = Analog, Color = White
- Pin-ctls: 0x00:
- Pin-ctls: 0x40: OUT Connection: 1 0x03
Node 0x0f [Pin Complex] wcaps 0x400181: Stereo Pincap 0x0837: IN OUT Detect Pin Default 0x0181e020: [Jack] Line In at Ext Rear Conn = 1/8, Color = White
- Pin-ctls: 0x00:
- Pin-ctls: 0x40: OUT Connection: 1 0x05
-- Ivan N. Zlatev
Web: http://www.i-nZ.net "It's all some kind of whacked out conspiracy."
At Tue, 29 May 2007 17:06:05 +0200, I wrote:
At Sun, 27 May 2007 23:33:27 +0100, Ivan N. Zlatev wrote:
Hello,
I am on an iMac ("*imac-20" model/pinconfig) with a Intel HD card with the SigmaTel STAC9221 codec. I have attached the inital codec info after modprobe. When I plug in and then unplug my speakers the microphone stops working. Reproduction steps with codec dump diffs as follows
I guess you can restore the status via toggling "Line In as Output Switch" and "Mic as Output Switch" mixer elements. The problem looks like the unsolicited event handling. It doesn't cope with the shared input jacks well.
In case my guess is correct, the patch below should fix the problem. Give it a try.
Takashi
diff -r ff3ed7049f84 pci/hda/patch_sigmatel.c --- a/pci/hda/patch_sigmatel.c Tue May 29 16:03:00 2007 +0200 +++ b/pci/hda/patch_sigmatel.c Tue May 29 17:25:52 2007 +0200 @@ -1797,6 +1797,21 @@ static void stac92xx_set_pinctl(struct h unsigned int pin_ctl = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0x00);
+ if (pin_ctl & AC_PINCTL_IN_EN) { + /* + * we need to check the current set-up direction of + * shared input pins since they can be switched via + * "xxx as Output" mixer switch + */ + struct sigmatel_spec *spec = codec->spec; + struct auto_pin_cfg *cfg = &spec->autocfg; + if ((nid == cfg->input_pins[AUTO_PIN_LINE] && + spec->line_switch) || + (nid == cfg->input_pins[AUTO_PIN_MIC] && + spec->mic_switch)) + return; + } + /* if setting pin direction bits, clear the current direction bits first */ if (flag & (AC_PINCTL_IN_EN | AC_PINCTL_OUT_EN))
On 5/29/07, Takashi Iwai tiwai@suse.de wrote:
At Tue, 29 May 2007 17:06:05 +0200, I wrote:
At Sun, 27 May 2007 23:33:27 +0100, Ivan N. Zlatev wrote:
Hello,
I am on an iMac ("*imac-20" model/pinconfig) with a Intel HD card with the SigmaTel STAC9221 codec. I have attached the inital codec info after modprobe. When I plug in and then unplug my speakers the microphone stops working. Reproduction steps with codec dump diffs as follows
I guess you can restore the status via toggling "Line In as Output Switch" and "Mic as Output Switch" mixer elements. The problem looks like the unsolicited event handling. It doesn't cope with the shared input jacks well.
In case my guess is correct, the patch below should fix the problem. Give it a try.
*Thumbs up!* Works, thanks!
At Tue, 29 May 2007 16:43:37 +0100, Ivan N. Zlatev wrote:
On 5/29/07, Takashi Iwai tiwai@suse.de wrote:
At Tue, 29 May 2007 17:06:05 +0200, I wrote:
At Sun, 27 May 2007 23:33:27 +0100, Ivan N. Zlatev wrote:
Hello,
I am on an iMac ("*imac-20" model/pinconfig) with a Intel HD card with the SigmaTel STAC9221 codec. I have attached the inital codec info after modprobe. When I plug in and then unplug my speakers the microphone stops working. Reproduction steps with codec dump diffs as follows
I guess you can restore the status via toggling "Line In as Output Switch" and "Mic as Output Switch" mixer elements. The problem looks like the unsolicited event handling. It doesn't cope with the shared input jacks well.
In case my guess is correct, the patch below should fix the problem. Give it a try.
*Thumbs up!* Works, thanks!
Glad to hear. I committed to ALSA tree now.
Takashi
participants (2)
-
Ivan N. Zlatev
-
Takashi Iwai