[alsa-devel] [PATCH] hda: enable speaker output for Compaq 6530s/6531s
There are 3 causes to the silence of Compaq 6530s' internal speaker: - HP pin 0x11 always return 0xffff,ffff (pin_presence=1), which automutes the speaker at module loading time. - HP pin 0x11 won't emit unsol events on jack plug/unplug, so the speaker have no chance to be unmuted. - pin 0x1c must be set to PIN_OUT mode to make the speaker work this is the most weird part - line-in pin 0x1c and speaker pin 0x16 seem to be unrelated.
Fix the problems by - add "Speaker" and "Headphone" mixers to allow hand tuning by user - add the 0x1c PIN_OUT quirk
Signed-off-by: Wu Fengguang fengguang.wu@intel.com --- sound/pci/hda/patch_analog.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
--- sound-2.6.orig/sound/pci/hda/patch_analog.c 2009-08-05 09:40:13.000000000 +0800 +++ sound-2.6/sound/pci/hda/patch_analog.c 2009-08-16 16:49:39.000000000 +0800 @@ -3717,6 +3717,8 @@ static struct snd_kcontrol_new ad1884a_l HDA_CODEC_VOLUME("Master Playback Volume", 0x21, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Dock Playback Switch", 0x12, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Headphone Playback Switch", 0x11, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Speaker Playback Switch", 0x16, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("PCM Playback Volume", 0x20, 0x5, HDA_INPUT), HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x00, HDA_INPUT), @@ -3837,8 +3839,10 @@ static struct hda_verb ad1884a_laptop_ve {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, /* Port-F pin */ - {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, + {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, + /* required for compaq 6530s speaker output */ + {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Port-C pin - internal mic-in */ {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */ @@ -4003,6 +4007,8 @@ static struct snd_pci_quirk ad1884a_cfg_ SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP), SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), + SND_PCI_QUIRK(0x103c, 0x30e8, "HP Compaq 6530s", AD1884A_LAPTOP), + SND_PCI_QUIRK(0x103c, 0x30e9, "HP Compaq 6531s", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x3070, "HP", AD1884A_MOBILE), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30d0, "HP laptop", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30e0, "HP laptop", AD1884A_LAPTOP),
The Speaker/HP volumes of 2510p is binded, so shall the mute state.
Signed-off-by: Wu Fengguang fengguang.wu@intel.com --- sound/pci/hda/patch_analog.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
--- sound-2.6.orig/sound/pci/hda/patch_analog.c 2009-08-16 16:59:20.000000000 +0800 +++ sound-2.6/sound/pci/hda/patch_analog.c 2009-08-16 17:01:34.000000000 +0800 @@ -1512,7 +1512,7 @@ static struct hda_verb ad1981_hp_init_ve {} };
-/* turn on/off EAPD (+ mute HP) as a master switch */ +/* turn on/off EAPD (+ mute Speaker/HP) as a master switch */ static int ad1981_hp_master_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { @@ -1525,7 +1525,10 @@ static int ad1981_hp_master_sw_put(struc snd_hda_codec_write(codec, 0x05, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, spec->cur_eapd ? PIN_OUT : 0); - /* toggle HP mute appropriately */ + /* toggle Speaker/HP mute appropriately */ + snd_hda_codec_amp_stereo(codec, 0x05, HDA_OUTPUT, 0, + HDA_AMP_MUTE, + spec->cur_eapd ? 0 : HDA_AMP_MUTE); snd_hda_codec_amp_stereo(codec, 0x06, HDA_OUTPUT, 0, HDA_AMP_MUTE, spec->cur_eapd ? 0 : HDA_AMP_MUTE); @@ -1724,6 +1727,7 @@ static struct snd_pci_quirk ad1981_cfg_t SND_PCI_QUIRK(0x1014, 0x0597, "Lenovo Z60", AD1981_THINKPAD), SND_PCI_QUIRK(0x1014, 0x05b7, "Lenovo Z60m", AD1981_THINKPAD), /* All HP models */ + SND_PCI_QUIRK(0x103c, 0x30c9, "HP 2510p", AD1981_HP), SND_PCI_QUIRK_VENDOR(0x103c, "HP nx", AD1981_HP), SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba U205", AD1981_TOSHIBA), /* Lenovo Thinkpad T60/X60/Z6xx */
At Sun, 16 Aug 2009 17:05:13 +0800, Wu Fengguang wrote:
The Speaker/HP volumes of 2510p is binded, so shall the mute state.
Signed-off-by: Wu Fengguang fengguang.wu@intel.com
Actually it wasn't needed because EAPD disables the speaker output. But additional muting is harmless, though.
Takashi
sound/pci/hda/patch_analog.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
--- sound-2.6.orig/sound/pci/hda/patch_analog.c 2009-08-16 16:59:20.000000000 +0800 +++ sound-2.6/sound/pci/hda/patch_analog.c 2009-08-16 17:01:34.000000000 +0800 @@ -1512,7 +1512,7 @@ static struct hda_verb ad1981_hp_init_ve {} };
-/* turn on/off EAPD (+ mute HP) as a master switch */ +/* turn on/off EAPD (+ mute Speaker/HP) as a master switch */ static int ad1981_hp_master_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { @@ -1525,7 +1525,10 @@ static int ad1981_hp_master_sw_put(struc snd_hda_codec_write(codec, 0x05, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, spec->cur_eapd ? PIN_OUT : 0);
- /* toggle HP mute appropriately */
- /* toggle Speaker/HP mute appropriately */
- snd_hda_codec_amp_stereo(codec, 0x05, HDA_OUTPUT, 0,
HDA_AMP_MUTE,
snd_hda_codec_amp_stereo(codec, 0x06, HDA_OUTPUT, 0, HDA_AMP_MUTE, spec->cur_eapd ? 0 : HDA_AMP_MUTE);spec->cur_eapd ? 0 : HDA_AMP_MUTE);
@@ -1724,6 +1727,7 @@ static struct snd_pci_quirk ad1981_cfg_t SND_PCI_QUIRK(0x1014, 0x0597, "Lenovo Z60", AD1981_THINKPAD), SND_PCI_QUIRK(0x1014, 0x05b7, "Lenovo Z60m", AD1981_THINKPAD), /* All HP models */
- SND_PCI_QUIRK(0x103c, 0x30c9, "HP 2510p", AD1981_HP), SND_PCI_QUIRK_VENDOR(0x103c, "HP nx", AD1981_HP), SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba U205", AD1981_TOSHIBA), /* Lenovo Thinkpad T60/X60/Z6xx */
On Sun, Aug 16, 2009 at 05:24:19PM +0800, Takashi Iwai wrote:
At Sun, 16 Aug 2009 17:05:13 +0800, Wu Fengguang wrote:
The Speaker/HP volumes of 2510p is binded, so shall the mute state.
Signed-off-by: Wu Fengguang fengguang.wu@intel.com
Actually it wasn't needed because EAPD disables the speaker output. But additional muting is harmless, though.
Right, what I care is the unmute part, which fixed the silence bug :)
Thanks, Fengguang
sound/pci/hda/patch_analog.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
--- sound-2.6.orig/sound/pci/hda/patch_analog.c 2009-08-16 16:59:20.000000000 +0800 +++ sound-2.6/sound/pci/hda/patch_analog.c 2009-08-16 17:01:34.000000000 +0800 @@ -1512,7 +1512,7 @@ static struct hda_verb ad1981_hp_init_ve {} };
-/* turn on/off EAPD (+ mute HP) as a master switch */ +/* turn on/off EAPD (+ mute Speaker/HP) as a master switch */ static int ad1981_hp_master_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { @@ -1525,7 +1525,10 @@ static int ad1981_hp_master_sw_put(struc snd_hda_codec_write(codec, 0x05, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, spec->cur_eapd ? PIN_OUT : 0);
- /* toggle HP mute appropriately */
- /* toggle Speaker/HP mute appropriately */
- snd_hda_codec_amp_stereo(codec, 0x05, HDA_OUTPUT, 0,
HDA_AMP_MUTE,
snd_hda_codec_amp_stereo(codec, 0x06, HDA_OUTPUT, 0, HDA_AMP_MUTE, spec->cur_eapd ? 0 : HDA_AMP_MUTE);spec->cur_eapd ? 0 : HDA_AMP_MUTE);
@@ -1724,6 +1727,7 @@ static struct snd_pci_quirk ad1981_cfg_t SND_PCI_QUIRK(0x1014, 0x0597, "Lenovo Z60", AD1981_THINKPAD), SND_PCI_QUIRK(0x1014, 0x05b7, "Lenovo Z60m", AD1981_THINKPAD), /* All HP models */
- SND_PCI_QUIRK(0x103c, 0x30c9, "HP 2510p", AD1981_HP), SND_PCI_QUIRK_VENDOR(0x103c, "HP nx", AD1981_HP), SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba U205", AD1981_TOSHIBA), /* Lenovo Thinkpad T60/X60/Z6xx */
At Sun, 16 Aug 2009 16:53:17 +0800, Wu Fengguang wrote:
There are 3 causes to the silence of Compaq 6530s' internal speaker:
- HP pin 0x11 always return 0xffff,ffff (pin_presence=1), which automutes the speaker at module loading time.
This is odd. Is the sense-trigger issued before reading the pin sense?
- HP pin 0x11 won't emit unsol events on jack plug/unplug, so the speaker have no chance to be unmuted.
Can it be fixed with enable_msi=1 option?
- pin 0x1c must be set to PIN_OUT mode to make the speaker work this is the most weird part - line-in pin 0x1c and speaker pin 0x16 seem to be unrelated.
Hm, sounds strange.
Fix the problems by
- add "Speaker" and "Headphone" mixers to allow hand tuning by user
It's a bit buggy because the auto-mute feature can turn on/off these silently. If any, these controls have to be notified at changing the state via plugging.
thanks,
Takashi
- add the 0x1c PIN_OUT quirk
Signed-off-by: Wu Fengguang fengguang.wu@intel.com
sound/pci/hda/patch_analog.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
--- sound-2.6.orig/sound/pci/hda/patch_analog.c 2009-08-05 09:40:13.000000000 +0800 +++ sound-2.6/sound/pci/hda/patch_analog.c 2009-08-16 16:49:39.000000000 +0800 @@ -3717,6 +3717,8 @@ static struct snd_kcontrol_new ad1884a_l HDA_CODEC_VOLUME("Master Playback Volume", 0x21, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Dock Playback Switch", 0x12, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Headphone Playback Switch", 0x11, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Speaker Playback Switch", 0x16, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("PCM Playback Volume", 0x20, 0x5, HDA_INPUT), HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x00, HDA_INPUT),
@@ -3837,8 +3839,10 @@ static struct hda_verb ad1884a_laptop_ve {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, /* Port-F pin */
- {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
- {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
- /* required for compaq 6530s speaker output */
- {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Port-C pin - internal mic-in */ {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */
@@ -4003,6 +4007,8 @@ static struct snd_pci_quirk ad1884a_cfg_ SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP), SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE),
- SND_PCI_QUIRK(0x103c, 0x30e8, "HP Compaq 6530s", AD1884A_LAPTOP),
- SND_PCI_QUIRK(0x103c, 0x30e9, "HP Compaq 6531s", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x3070, "HP", AD1884A_MOBILE), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30d0, "HP laptop", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30e0, "HP laptop", AD1884A_LAPTOP),
On Sun, Aug 16, 2009 at 05:22:23PM +0800, Takashi Iwai wrote:
At Sun, 16 Aug 2009 16:53:17 +0800, Wu Fengguang wrote:
There are 3 causes to the silence of Compaq 6530s' internal speaker:
- HP pin 0x11 always return 0xffff,ffff (pin_presence=1), which automutes the speaker at module loading time.
This is odd. Is the sense-trigger issued before reading the pin sense?
Sorry, what do you mean? The facts I explored are: - ad1884a_hp_automute() will be explicitly called by ad1884a_hp_init() - ad1884a_hp_unsol_event() is never called on plug events - I tried manually execute AC_VERB_SET_PIN_SENSE then read pin sense, it takes effect on the impedance, but pin_presence still remains 1.
- HP pin 0x11 won't emit unsol events on jack plug/unplug, so the speaker have no chance to be unmuted.
Can it be fixed with enable_msi=1 option?
Not yet, will try it.
- pin 0x1c must be set to PIN_OUT mode to make the speaker work this is the most weird part - line-in pin 0x1c and speaker pin 0x16 seem to be unrelated.
Hm, sounds strange.
Yes. Note that the 6530s I have is a test box. Another 6531s which is bought directly from market don't have this bug.
Fix the problems by
- add "Speaker" and "Headphone" mixers to allow hand tuning by user
It's a bit buggy because the auto-mute feature can turn on/off these silently. If any, these controls have to be notified at changing the state via plugging.
OK. Are there code examples for doing this? Thank you!
Thanks, Fengguang
thanks,
Takashi
- add the 0x1c PIN_OUT quirk
Signed-off-by: Wu Fengguang fengguang.wu@intel.com
sound/pci/hda/patch_analog.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
--- sound-2.6.orig/sound/pci/hda/patch_analog.c 2009-08-05 09:40:13.000000000 +0800 +++ sound-2.6/sound/pci/hda/patch_analog.c 2009-08-16 16:49:39.000000000 +0800 @@ -3717,6 +3717,8 @@ static struct snd_kcontrol_new ad1884a_l HDA_CODEC_VOLUME("Master Playback Volume", 0x21, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Dock Playback Switch", 0x12, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Headphone Playback Switch", 0x11, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Speaker Playback Switch", 0x16, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("PCM Playback Volume", 0x20, 0x5, HDA_INPUT), HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x00, HDA_INPUT),
@@ -3837,8 +3839,10 @@ static struct hda_verb ad1884a_laptop_ve {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, /* Port-F pin */
- {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
- {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
- /* required for compaq 6530s speaker output */
- {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Port-C pin - internal mic-in */ {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */
@@ -4003,6 +4007,8 @@ static struct snd_pci_quirk ad1884a_cfg_ SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP), SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE),
- SND_PCI_QUIRK(0x103c, 0x30e8, "HP Compaq 6530s", AD1884A_LAPTOP),
- SND_PCI_QUIRK(0x103c, 0x30e9, "HP Compaq 6531s", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x3070, "HP", AD1884A_MOBILE), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30d0, "HP laptop", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30e0, "HP laptop", AD1884A_LAPTOP),
At Sun, 16 Aug 2009 19:01:10 +0800, Wu Fengguang wrote:
On Sun, Aug 16, 2009 at 05:22:23PM +0800, Takashi Iwai wrote:
At Sun, 16 Aug 2009 16:53:17 +0800, Wu Fengguang wrote:
There are 3 causes to the silence of Compaq 6530s' internal speaker:
- HP pin 0x11 always return 0xffff,ffff (pin_presence=1), which automutes the speaker at module loading time.
This is odd. Is the sense-trigger issued before reading the pin sense?
Sorry, what do you mean? The facts I explored are:
- ad1884a_hp_automute() will be explicitly called by ad1884a_hp_init()
- ad1884a_hp_unsol_event() is never called on plug events
- I tried manually execute AC_VERB_SET_PIN_SENSE then read pin sense, it takes effect on the impedance, but pin_presence still remains 1.
The fact that it returns only -1 sounds rather like a hardware issue. Or, at least, reading a wrong place or so.
- HP pin 0x11 won't emit unsol events on jack plug/unplug, so the speaker have no chance to be unmuted.
Can it be fixed with enable_msi=1 option?
Not yet, will try it.
- pin 0x1c must be set to PIN_OUT mode to make the speaker work this is the most weird part - line-in pin 0x1c and speaker pin 0x16 seem to be unrelated.
Hm, sounds strange.
Yes. Note that the 6530s I have is a test box. Another 6531s which is bought directly from market don't have this bug.
Fix the problems by
- add "Speaker" and "Headphone" mixers to allow hand tuning by user
It's a bit buggy because the auto-mute feature can turn on/off these silently. If any, these controls have to be notified at changing the state via plugging.
OK. Are there code examples for doing this? Thank you!
Basically you need to call snd_ctl_notify() to control elements which h/w values are changed. In that way, the mixer app can be notified and update the values appropriately.
However, I think adding these control unconditionally to the existing model is no right solution. The laptop model is designed for the device where the HP jack detection works properly. If the device isn't such one, the model itself isn't applicable.
So, it's better to create either another model without jack detection, or add a check for hint strings, at least. In either case, you can create two controls, Headphone and Speaker, which access the h/w normally without master control. Then a master control will be automatically created as vmaster.
Takashi
Thanks, Fengguang
thanks,
Takashi
- add the 0x1c PIN_OUT quirk
Signed-off-by: Wu Fengguang fengguang.wu@intel.com
sound/pci/hda/patch_analog.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
--- sound-2.6.orig/sound/pci/hda/patch_analog.c 2009-08-05 09:40:13.000000000 +0800 +++ sound-2.6/sound/pci/hda/patch_analog.c 2009-08-16 16:49:39.000000000 +0800 @@ -3717,6 +3717,8 @@ static struct snd_kcontrol_new ad1884a_l HDA_CODEC_VOLUME("Master Playback Volume", 0x21, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Dock Playback Switch", 0x12, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Headphone Playback Switch", 0x11, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Speaker Playback Switch", 0x16, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("PCM Playback Volume", 0x20, 0x5, HDA_INPUT), HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x00, HDA_INPUT),
@@ -3837,8 +3839,10 @@ static struct hda_verb ad1884a_laptop_ve {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, /* Port-F pin */
- {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
- {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
- /* required for compaq 6530s speaker output */
- {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Port-C pin - internal mic-in */ {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */
@@ -4003,6 +4007,8 @@ static struct snd_pci_quirk ad1884a_cfg_ SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP), SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE),
- SND_PCI_QUIRK(0x103c, 0x30e8, "HP Compaq 6530s", AD1884A_LAPTOP),
- SND_PCI_QUIRK(0x103c, 0x30e9, "HP Compaq 6531s", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x3070, "HP", AD1884A_MOBILE), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30d0, "HP laptop", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30e0, "HP laptop", AD1884A_LAPTOP),
At Mon, 17 Aug 2009 08:46:14 +0200, I wrote:
At Sun, 16 Aug 2009 19:01:10 +0800, Wu Fengguang wrote:
On Sun, Aug 16, 2009 at 05:22:23PM +0800, Takashi Iwai wrote:
At Sun, 16 Aug 2009 16:53:17 +0800, Wu Fengguang wrote:
There are 3 causes to the silence of Compaq 6530s' internal speaker:
- HP pin 0x11 always return 0xffff,ffff (pin_presence=1), which automutes the speaker at module loading time.
This is odd. Is the sense-trigger issued before reading the pin sense?
Sorry, what do you mean? The facts I explored are:
- ad1884a_hp_automute() will be explicitly called by ad1884a_hp_init()
- ad1884a_hp_unsol_event() is never called on plug events
- I tried manually execute AC_VERB_SET_PIN_SENSE then read pin sense, it takes effect on the impedance, but pin_presence still remains 1.
The fact that it returns only -1 sounds rather like a hardware issue. Or, at least, reading a wrong place or so.
BTW, could you give alsa-info.sh output on both machines?
thanks,
Takashi
On Tue, Aug 18, 2009 at 02:33:43PM +0800, Takashi Iwai wrote:
At Mon, 17 Aug 2009 08:46:14 +0200, I wrote:
At Sun, 16 Aug 2009 19:01:10 +0800, Wu Fengguang wrote:
On Sun, Aug 16, 2009 at 05:22:23PM +0800, Takashi Iwai wrote:
At Sun, 16 Aug 2009 16:53:17 +0800, Wu Fengguang wrote:
There are 3 causes to the silence of Compaq 6530s' internal speaker:
- HP pin 0x11 always return 0xffff,ffff (pin_presence=1), which automutes the speaker at module loading time.
This is odd. Is the sense-trigger issued before reading the pin sense?
Sorry, what do you mean? The facts I explored are:
- ad1884a_hp_automute() will be explicitly called by ad1884a_hp_init()
- ad1884a_hp_unsol_event() is never called on plug events
- I tried manually execute AC_VERB_SET_PIN_SENSE then read pin sense, it takes effect on the impedance, but pin_presence still remains 1.
The fact that it returns only -1 sounds rather like a hardware issue. Or, at least, reading a wrong place or so.
BTW, could you give alsa-info.sh output on both machines?
Attached the saved ones. I should be able to get access to both boxes tomorrow.
Thanks, Fengguang
On Tue, Aug 18, 2009 at 02:33:43PM +0800, Takashi Iwai wrote:
At Mon, 17 Aug 2009 08:46:14 +0200, I wrote:
At Sun, 16 Aug 2009 19:01:10 +0800, Wu Fengguang wrote:
On Sun, Aug 16, 2009 at 05:22:23PM +0800, Takashi Iwai wrote:
At Sun, 16 Aug 2009 16:53:17 +0800, Wu Fengguang wrote:
There are 3 causes to the silence of Compaq 6530s' internal speaker:
- HP pin 0x11 always return 0xffff,ffff (pin_presence=1), which automutes the speaker at module loading time.
This is odd. Is the sense-trigger issued before reading the pin sense?
Sorry, what do you mean? The facts I explored are:
- ad1884a_hp_automute() will be explicitly called by ad1884a_hp_init()
- ad1884a_hp_unsol_event() is never called on plug events
- I tried manually execute AC_VERB_SET_PIN_SENSE then read pin sense, it takes effect on the impedance, but pin_presence still remains 1.
The fact that it returns only -1 sounds rather like a hardware issue. Or, at least, reading a wrong place or so.
BTW, could you give alsa-info.sh output on both machines?
I'm now testing 6531s. All verbs/states seem OK.
With vanilla kernel, on HP plug/unplug, these verbs are executed:
[ 311.351460] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x16:SET_AMP_GAIN_MUTE:0xa080 [ 311.353061] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x16:SET_AMP_GAIN_MUTE:0x9080 [ 311.354500] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x16:SET_EAPD_BTLENABLE:0x0
[ 323.060534] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x16:SET_AMP_GAIN_MUTE:0xa000 [ 323.062030] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x16:SET_AMP_GAIN_MUTE:0x9000 [ 323.063499] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x16:SET_EAPD_BTLENABLE:0x2
This is all write commands since boot.
[ 11.243798] HDA Intel 0000:00:1b.0: power state changed by ACPI to D0 [ 11.244874] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 [ 11.246217] HDA Intel 0000:00:1b.0: setting latency timer to 64 [ 11.247184] ALSA sound/pci/hda/hda_intel.c:2394: chipset global capabilities = 0x4401 [ 11.279839] ALSA sound/pci/hda/hda_intel.c:873: codec_mask = 0x3 [ 11.281091] ALSA sound/pci/hda/hda_intel.c:1304: codec #0 probed OK [ 11.282234] ALSA sound/pci/hda/hda_intel.c:1304: codec #1 probed OK [ 11.299858] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x3:SET_POWER_STATE:0x0 [ 11.301361] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x4:SET_POWER_STATE:0x0 [ 11.302848] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x8:SET_POWER_STATE:0x0 [ 11.304304] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x9:SET_POWER_STATE:0x0 [ 11.305758] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x12:SET_POWER_STATE:0x0 [ 11.307217] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x13:SET_POWER_STATE:0x0 [ 11.308775] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x16:SET_POWER_STATE:0x0 [ 11.310260] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x19:SET_POWER_STATE:0x0 [ 11.954768] ALSA sound/pci/hda/hda_codec.c:3281: hda_codec: model 'laptop' is selected for config 103c:30e0 (HP laptop) [ 12.017172] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x3:SET_AMP_GAIN_MUTE:0x27 [ 12.019392] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x4:SET_AMP_GAIN_MUTE:0x27 [ 12.021766] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x7:SET_AMP_GAIN_MUTE:0x7080 [ 12.024142] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x7:SET_AMP_GAIN_MUTE:0x7100 [ 12.026398] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x11:SET_PIN_WIDGET_CONTROL:0xc0 [ 12.028750] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x11:SET_AMP_GAIN_MUTE:0xb080 [ 12.031047] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xa:SET_AMP_GAIN_MUTE:0x7080 [ 12.033076] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xa:SET_AMP_GAIN_MUTE:0x7100 [ 12.034587] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x12:SET_PIN_WIDGET_CONTROL:0xc0 [ 12.036157] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x12:SET_AMP_GAIN_MUTE:0xb080 [ 12.037703] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x1e:SET_AMP_GAIN_MUTE:0x7080 [ 12.039265] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x1e:SET_AMP_GAIN_MUTE:0x7100 [ 12.040821] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x13:SET_PIN_WIDGET_CONTROL:0xc0 [ 12.042376] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x13:SET_AMP_GAIN_MUTE:0xb080 [ 12.043902] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x14:SET_PIN_WIDGET_CONTROL:0x24 [ 12.045507] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x14:SET_AMP_GAIN_MUTE:0x7000 [ 12.047057] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x15:SET_PIN_WIDGET_CONTROL:0x20 [ 12.048711] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x15:SET_AMP_GAIN_MUTE:0x7000 [ 12.050234] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x1c:SET_PIN_WIDGET_CONTROL:0x24 [ 12.051812] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x1c:SET_AMP_GAIN_MUTE:0xb080 [ 12.053357] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x25:SET_AMP_GAIN_MUTE:0xb000 [ 12.054908] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x16:SET_PIN_WIDGET_CONTROL:0x20 [ 12.056519] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x16:SET_AMP_GAIN_MUTE:0xb080 [ 12.058049] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x7080 [ 12.059563] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x7180 [ 12.061172] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x7280 [ 12.062736] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x7380 [ 12.064309] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x7400 [ 12.065826] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x7580 [ 12.067348] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x21:SET_AMP_GAIN_MUTE:0xb080 [ 12.068897] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xc:SET_CONNECT_SEL:0x0 [ 12.070368] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xc:SET_AMP_GAIN_MUTE:0xb080 [ 12.071942] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xd:SET_CONNECT_SEL:0x0 [ 12.073394] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xd:SET_AMP_GAIN_MUTE:0xb080 [ 12.074870] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x1b:SET_AMP_GAIN_MUTE:0xb027 [ 12.076407] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x11:SET_AMP_GAIN_MUTE:0xb000 [ 12.077972] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xb:SET_AMP_GAIN_MUTE:0x7080 [ 12.079526] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xb:SET_AMP_GAIN_MUTE:0x7100 [ 12.081052] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x16:SET_PIN_WIDGET_CONTROL:0xc0 [ 12.082602] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x16:SET_AMP_GAIN_MUTE:0xb080 [ 12.084134] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x15:SET_PIN_WIDGET_CONTROL:0x24 [ 12.085740] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x14:SET_AMP_GAIN_MUTE:0x7002 [ 12.087297] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x15:SET_AMP_GAIN_MUTE:0x7002 [ 12.088849] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x7480 [ 12.090354] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x11:SET_UNSOLICITED_ENABLE:0xb7 [ 12.091922] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x14:SET_UNSOLICITED_ENABLE:0xb6 [ 12.093644] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x16:SET_AMP_GAIN_MUTE:0xa000 [ 12.095273] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x16:SET_AMP_GAIN_MUTE:0x9000 [ 12.096823] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x16:SET_EAPD_BTLENABLE:0x2 [ 12.098419] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xc:SET_CONNECT_SEL:0x1
[ 18.518177] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x21:SET_AMP_GAIN_MUTE:0xa09f [ 18.520576] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x21:SET_AMP_GAIN_MUTE:0x909f [ 18.522905] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x21:SET_AMP_GAIN_MUTE:0xa01f [ 18.525366] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x21:SET_AMP_GAIN_MUTE:0x901f [ 18.527958] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x6597 [ 18.530303] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x5597 [ 18.532640] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x6517 [ 18.534929] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x5517 [ 18.537008] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x6097 [ 18.538647] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x5097 [ 18.540193] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x6017 [ 18.541739] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x20:SET_AMP_GAIN_MUTE:0x5017 [ 18.543736] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x14:SET_AMP_GAIN_MUTE:0x6000 [ 18.545333] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x14:SET_AMP_GAIN_MUTE:0x5000 [ 18.547385] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xc:SET_AMP_GAIN_MUTE:0xa0ab [ 18.549002] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xc:SET_AMP_GAIN_MUTE:0x90ab [ 18.550529] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xc:SET_AMP_GAIN_MUTE:0xa02b [ 18.552110] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xc:SET_AMP_GAIN_MUTE:0x902b [ 18.553791] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xd:SET_AMP_GAIN_MUTE:0xa0a9 [ 18.555376] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xd:SET_AMP_GAIN_MUTE:0x90a9 [ 18.556977] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xd:SET_AMP_GAIN_MUTE:0xa029 [ 18.558523] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0xd:SET_AMP_GAIN_MUTE:0x9029 [ 18.560221] ALSA sound/pci/hda/hda_codec.c:443: hda-codec: write cmd 0x0:0:0x10:SET_AMP_GAIN_MUTE:0xa083
Thanks, Fengguang
On Wed, Aug 19, 2009 at 03:56:59PM +0800, Wu Fengguang wrote:
On Tue, Aug 18, 2009 at 02:33:43PM +0800, Takashi Iwai wrote:
At Mon, 17 Aug 2009 08:46:14 +0200, I wrote:
At Sun, 16 Aug 2009 19:01:10 +0800, Wu Fengguang wrote:
On Sun, Aug 16, 2009 at 05:22:23PM +0800, Takashi Iwai wrote:
At Sun, 16 Aug 2009 16:53:17 +0800, Wu Fengguang wrote:
There are 3 causes to the silence of Compaq 6530s' internal speaker:
- HP pin 0x11 always return 0xffff,ffff (pin_presence=1), which automutes the speaker at module loading time.
This is odd. Is the sense-trigger issued before reading the pin sense?
Sorry, what do you mean? The facts I explored are:
- ad1884a_hp_automute() will be explicitly called by ad1884a_hp_init()
- ad1884a_hp_unsol_event() is never called on plug events
- I tried manually execute AC_VERB_SET_PIN_SENSE then read pin sense, it takes effect on the impedance, but pin_presence still remains 1.
The fact that it returns only -1 sounds rather like a hardware issue. Or, at least, reading a wrong place or so.
BTW, could you give alsa-info.sh output on both machines?
I'm now testing 6531s. All verbs/states seem OK.
In fact for 6531s, the speaker can produce sound on fresh boot. However after a while the sound disappeared. No single write verb was executed during the time! And then I found the 0x1c trick can be applied to 6530s as well as 6531s, and magically make the speaker work by applying this patch.
--- hda: enable speaker output for Compaq 6530s/6531s
HP Compaq 6530s and 6531s internal speaker is silence or becomes silence within 1 minute after fresh boot. It is found that pin 0x1c must be set to PIN_OUT mode to make the speaker work. This is weird - line-in pin 0x1c and speaker pin 0x16 seem to be unrelated.
The codec differences before/after patch are:
@@ Node 0x17 [Pin Complex] wcaps 0x40020b: Pin Default 0x41a6e130: [N/A] Mic at Ext Rear Conn = Digital, Color = White DefAssociation = 0x3, Sequence = 0x0 Misc = NO_PRESENCE - Pin-ctls: 0x24: IN + Pin-ctls: 0x40: OUT @@ Node 0x1c [Pin Complex] wcaps 0x40018d: Pin Default 0x41813021: [N/A] Line In at Ext Rear Conn = 1/8, Color = Blue DefAssociation = 0x2, Sequence = 0x1 - Pin-ctls: 0x24: IN VREF_80 + Pin-ctls: 0x40: OUT VREF_HIZ Unsolicited: tag=00, enabled=0 Connection: 1 0x24
Signed-off-by: Wu Fengguang fengguang.wu@intel.com --- sound/pci/hda/patch_analog.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
--- sound-2.6.orig/sound/pci/hda/patch_analog.c 2009-08-19 15:35:09.000000000 +0800 +++ sound-2.6/sound/pci/hda/patch_analog.c 2009-08-19 15:46:41.000000000 +0800 @@ -3836,9 +3836,11 @@ static struct hda_verb ad1884a_laptop_ve /* Port-F (int speaker) mixer - route only from analog mixer */ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - /* Port-F pin */ - {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, + /* Port-F (int speaker) pin */ + {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, + /* required for compaq 6530s/6531s speaker output */ + {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Port-C pin - internal mic-in */ {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */ @@ -4003,6 +4005,8 @@ static struct snd_pci_quirk ad1884a_cfg_ SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP), SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), + SND_PCI_QUIRK(0x103c, 0x30e8, "HP Compaq 6530s", AD1884A_LAPTOP), + SND_PCI_QUIRK(0x103c, 0x30e9, "HP Compaq 6531s", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x3070, "HP", AD1884A_MOBILE), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30d0, "HP laptop", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30e0, "HP laptop", AD1884A_LAPTOP),
At Wed, 19 Aug 2009 16:01:51 +0800, Wu Fengguang wrote:
On Wed, Aug 19, 2009 at 03:56:59PM +0800, Wu Fengguang wrote:
On Tue, Aug 18, 2009 at 02:33:43PM +0800, Takashi Iwai wrote:
At Mon, 17 Aug 2009 08:46:14 +0200, I wrote:
At Sun, 16 Aug 2009 19:01:10 +0800, Wu Fengguang wrote:
On Sun, Aug 16, 2009 at 05:22:23PM +0800, Takashi Iwai wrote:
At Sun, 16 Aug 2009 16:53:17 +0800, Wu Fengguang wrote: > > There are 3 causes to the silence of Compaq 6530s' internal speaker: > - HP pin 0x11 always return 0xffff,ffff (pin_presence=1), > which automutes the speaker at module loading time.
This is odd. Is the sense-trigger issued before reading the pin sense?
Sorry, what do you mean? The facts I explored are:
- ad1884a_hp_automute() will be explicitly called by ad1884a_hp_init()
- ad1884a_hp_unsol_event() is never called on plug events
- I tried manually execute AC_VERB_SET_PIN_SENSE then read pin sense, it takes effect on the impedance, but pin_presence still remains 1.
The fact that it returns only -1 sounds rather like a hardware issue. Or, at least, reading a wrong place or so.
BTW, could you give alsa-info.sh output on both machines?
I'm now testing 6531s. All verbs/states seem OK.
In fact for 6531s, the speaker can produce sound on fresh boot. However after a while the sound disappeared. No single write verb was executed during the time! And then I found the 0x1c trick can be applied to 6530s as well as 6531s, and magically make the speaker work by applying this patch.
OK, I'm going to apply your fix.
@@ -4003,6 +4005,8 @@ static struct snd_pci_quirk ad1884a_cfg_ SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP), SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE),
- SND_PCI_QUIRK(0x103c, 0x30e8, "HP Compaq 6530s", AD1884A_LAPTOP),
- SND_PCI_QUIRK(0x103c, 0x30e9, "HP Compaq 6531s", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x3070, "HP", AD1884A_MOBILE), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30d0, "HP laptop", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30e0, "HP laptop", AD1884A_LAPTOP),
These entries are unnecessary because they match with model=laptop with the masked entry 013c:30e* (the last one in the chunk above).
Could you remove it and repost?
thanks,
Takashi
On Wed, Aug 19, 2009 at 04:50:41PM +0800, Takashi Iwai wrote:
At Wed, 19 Aug 2009 16:01:51 +0800, Wu Fengguang wrote:
On Wed, Aug 19, 2009 at 03:56:59PM +0800, Wu Fengguang wrote:
On Tue, Aug 18, 2009 at 02:33:43PM +0800, Takashi Iwai wrote:
At Mon, 17 Aug 2009 08:46:14 +0200, I wrote:
At Sun, 16 Aug 2009 19:01:10 +0800, Wu Fengguang wrote:
On Sun, Aug 16, 2009 at 05:22:23PM +0800, Takashi Iwai wrote: > At Sun, 16 Aug 2009 16:53:17 +0800, > Wu Fengguang wrote: > > > > There are 3 causes to the silence of Compaq 6530s' internal speaker: > > - HP pin 0x11 always return 0xffff,ffff (pin_presence=1), > > which automutes the speaker at module loading time. > > This is odd. Is the sense-trigger issued before reading the pin sense?
Sorry, what do you mean? The facts I explored are:
- ad1884a_hp_automute() will be explicitly called by ad1884a_hp_init()
- ad1884a_hp_unsol_event() is never called on plug events
- I tried manually execute AC_VERB_SET_PIN_SENSE then read pin sense, it takes effect on the impedance, but pin_presence still remains 1.
The fact that it returns only -1 sounds rather like a hardware issue. Or, at least, reading a wrong place or so.
BTW, could you give alsa-info.sh output on both machines?
I'm now testing 6531s. All verbs/states seem OK.
In fact for 6531s, the speaker can produce sound on fresh boot. However after a while the sound disappeared. No single write verb was executed during the time! And then I found the 0x1c trick can be applied to 6530s as well as 6531s, and magically make the speaker work by applying this patch.
OK, I'm going to apply your fix.
@@ -4003,6 +4005,8 @@ static struct snd_pci_quirk ad1884a_cfg_ SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP), SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE),
- SND_PCI_QUIRK(0x103c, 0x30e8, "HP Compaq 6530s", AD1884A_LAPTOP),
- SND_PCI_QUIRK(0x103c, 0x30e9, "HP Compaq 6531s", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x3070, "HP", AD1884A_MOBILE), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30d0, "HP laptop", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30e0, "HP laptop", AD1884A_LAPTOP),
These entries are unnecessary because they match with model=laptop with the masked entry 013c:30e* (the last one in the chunk above).
Yes I was aware of this. Just that printing the exact names may make some users feel better :)
Could you remove it and repost?
Sure.
--- hda: enable speaker output for Compaq 6530s/6531s
HP Compaq 6530s and 6531s internal speaker is silence or becomes silence within 1 minute after fresh boot. It is found that pin 0x1c must be set to PIN_OUT mode to make the speaker work. This is weird - line-in pin 0x1c and speaker pin 0x16 seem to be unrelated.
The codec differences before/after patch are:
@@ Node 0x17 [Pin Complex] wcaps 0x40020b: Pin Default 0x41a6e130: [N/A] Mic at Ext Rear Conn = Digital, Color = White DefAssociation = 0x3, Sequence = 0x0 Misc = NO_PRESENCE - Pin-ctls: 0x24: IN + Pin-ctls: 0x40: OUT @@ Node 0x1c [Pin Complex] wcaps 0x40018d: Pin Default 0x41813021: [N/A] Line In at Ext Rear Conn = 1/8, Color = Blue DefAssociation = 0x2, Sequence = 0x1 - Pin-ctls: 0x24: IN VREF_80 + Pin-ctls: 0x40: OUT VREF_HIZ Unsolicited: tag=00, enabled=0 Connection: 1 0x24
Tests show that it won't impact (external) Mic recording.
Reported-by: "Lin, Ming M" ming.m.lin@intel.com Signed-off-by: Wu Fengguang fengguang.wu@intel.com --- sound/pci/hda/patch_analog.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
--- sound-2.6.orig/sound/pci/hda/patch_analog.c 2009-08-19 16:56:11.000000000 +0800 +++ sound-2.6/sound/pci/hda/patch_analog.c 2009-08-19 16:56:12.000000000 +0800 @@ -3836,9 +3836,11 @@ static struct hda_verb ad1884a_laptop_ve /* Port-F (int speaker) mixer - route only from analog mixer */ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - /* Port-F pin */ - {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, + /* Port-F (int speaker) pin */ + {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, + /* required for compaq 6530s/6531s speaker output */ + {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Port-C pin - internal mic-in */ {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */
At Wed, 19 Aug 2009 16:58:59 +0800, Wu Fengguang wrote:
On Wed, Aug 19, 2009 at 04:50:41PM +0800, Takashi Iwai wrote:
At Wed, 19 Aug 2009 16:01:51 +0800, Wu Fengguang wrote:
On Wed, Aug 19, 2009 at 03:56:59PM +0800, Wu Fengguang wrote:
On Tue, Aug 18, 2009 at 02:33:43PM +0800, Takashi Iwai wrote:
At Mon, 17 Aug 2009 08:46:14 +0200, I wrote:
At Sun, 16 Aug 2009 19:01:10 +0800, Wu Fengguang wrote: > > On Sun, Aug 16, 2009 at 05:22:23PM +0800, Takashi Iwai wrote: > > At Sun, 16 Aug 2009 16:53:17 +0800, > > Wu Fengguang wrote: > > > > > > There are 3 causes to the silence of Compaq 6530s' internal speaker: > > > - HP pin 0x11 always return 0xffff,ffff (pin_presence=1), > > > which automutes the speaker at module loading time. > > > > This is odd. Is the sense-trigger issued before reading the pin sense? > > Sorry, what do you mean? The facts I explored are: > - ad1884a_hp_automute() will be explicitly called by ad1884a_hp_init() > - ad1884a_hp_unsol_event() is never called on plug events > - I tried manually execute AC_VERB_SET_PIN_SENSE then read pin sense, > it takes effect on the impedance, but pin_presence still remains 1.
The fact that it returns only -1 sounds rather like a hardware issue. Or, at least, reading a wrong place or so.
BTW, could you give alsa-info.sh output on both machines?
I'm now testing 6531s. All verbs/states seem OK.
In fact for 6531s, the speaker can produce sound on fresh boot. However after a while the sound disappeared. No single write verb was executed during the time! And then I found the 0x1c trick can be applied to 6530s as well as 6531s, and magically make the speaker work by applying this patch.
OK, I'm going to apply your fix.
@@ -4003,6 +4005,8 @@ static struct snd_pci_quirk ad1884a_cfg_ SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP), SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE),
- SND_PCI_QUIRK(0x103c, 0x30e8, "HP Compaq 6530s", AD1884A_LAPTOP),
- SND_PCI_QUIRK(0x103c, 0x30e9, "HP Compaq 6531s", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x3070, "HP", AD1884A_MOBILE), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30d0, "HP laptop", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30e0, "HP laptop", AD1884A_LAPTOP),
These entries are unnecessary because they match with model=laptop with the masked entry 013c:30e* (the last one in the chunk above).
Yes I was aware of this. Just that printing the exact names may make some users feel better :)
Could you remove it and repost?
Sure.
hda: enable speaker output for Compaq 6530s/6531s
HP Compaq 6530s and 6531s internal speaker is silence or becomes silence within 1 minute after fresh boot. It is found that pin 0x1c must be set to PIN_OUT mode to make the speaker work. This is weird - line-in pin 0x1c and speaker pin 0x16 seem to be unrelated.
The codec differences before/after patch are:
@@ Node 0x17 [Pin Complex] wcaps 0x40020b: Pin Default 0x41a6e130: [N/A] Mic at Ext Rear Conn = Digital, Color = White DefAssociation = 0x3, Sequence = 0x0 Misc = NO_PRESENCE
- Pin-ctls: 0x24: IN
- Pin-ctls: 0x40: OUT
@@ Node 0x1c [Pin Complex] wcaps 0x40018d: Pin Default 0x41813021: [N/A] Line In at Ext Rear Conn = 1/8, Color = Blue DefAssociation = 0x2, Sequence = 0x1
- Pin-ctls: 0x24: IN VREF_80
- Pin-ctls: 0x40: OUT VREF_HIZ Unsolicited: tag=00, enabled=0 Connection: 1 0x24
Tests show that it won't impact (external) Mic recording.
Reported-by: "Lin, Ming M" ming.m.lin@intel.com Signed-off-by: Wu Fengguang fengguang.wu@intel.com
Applied now. Thanks.
Takashi
On Mon, Aug 17, 2009 at 02:46:14PM +0800, Takashi Iwai wrote:
At Sun, 16 Aug 2009 19:01:10 +0800, Wu Fengguang wrote:
On Sun, Aug 16, 2009 at 05:22:23PM +0800, Takashi Iwai wrote:
At Sun, 16 Aug 2009 16:53:17 +0800, Wu Fengguang wrote:
There are 3 causes to the silence of Compaq 6530s' internal speaker:
- HP pin 0x11 always return 0xffff,ffff (pin_presence=1), which automutes the speaker at module loading time.
This is odd. Is the sense-trigger issued before reading the pin sense?
Sorry, what do you mean? The facts I explored are:
- ad1884a_hp_automute() will be explicitly called by ad1884a_hp_init()
- ad1884a_hp_unsol_event() is never called on plug events
- I tried manually execute AC_VERB_SET_PIN_SENSE then read pin sense, it takes effect on the impedance, but pin_presence still remains 1.
The fact that it returns only -1 sounds rather like a hardware issue. Or, at least, reading a wrong place or so.
It may well be a hardware issue. But note that SET_PIN_SENSE could change the return value of GET_PIN_SENSE, except for the highest pin_presence bit:
root@hp /home/wfg# hda-verb /dev/snd/hwC0D0 0x16 GET_PIN_SENSE 0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0x7fffffff root@hp /home/wfg# hda-verb /dev/snd/hwC0D0 0x16 GET_PIN_SENSE 0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0x7fffffff root@hp /home/wfg# hda-verb /dev/snd/hwC0D0 0x16 SET_PIN_SENSE 0 nid = 0x16, verb = 0x709, param = 0x0 value = 0x0 root@hp /home/wfg# hda-verb /dev/snd/hwC0D0 0x16 GET_PIN_SENSE 0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0xcd00 root@hp /home/wfg# hda-verb /dev/snd/hwC0D0 0x16 GET_PIN_SENSE 0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0xcd00
- HP pin 0x11 won't emit unsol events on jack plug/unplug, so the speaker have no chance to be unmuted.
Can it be fixed with enable_msi=1 option?
Not yet, will try it.
- pin 0x1c must be set to PIN_OUT mode to make the speaker work this is the most weird part - line-in pin 0x1c and speaker pin 0x16 seem to be unrelated.
Hm, sounds strange.
Yes. Note that the 6530s I have is a test box. Another 6531s which is bought directly from market don't have this bug.
Fix the problems by
- add "Speaker" and "Headphone" mixers to allow hand tuning by user
It's a bit buggy because the auto-mute feature can turn on/off these silently. If any, these controls have to be notified at changing the state via plugging.
OK. Are there code examples for doing this? Thank you!
Basically you need to call snd_ctl_notify() to control elements which h/w values are changed. In that way, the mixer app can be notified and update the values appropriately.
However, I think adding these control unconditionally to the existing model is no right solution. The laptop model is designed for the device where the HP jack detection works properly. If the device isn't such one, the model itself isn't applicable.
So, it's better to create either another model without jack detection, or add a check for hint strings, at least. In either case, you can create two controls, Headphone and Speaker, which access the h/w normally without master control. Then a master control will be automatically created as vmaster.
Thanks for the tips! However I'm now wondering the value of doing this: it may well be an early stage hardware bug and may no longer exist in the market.. I'm quite content on enabling 6531s and assume the patch will work alike for 6530s in the market :)
Thanks, Fengguang
- add the 0x1c PIN_OUT quirk
Signed-off-by: Wu Fengguang fengguang.wu@intel.com
sound/pci/hda/patch_analog.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
--- sound-2.6.orig/sound/pci/hda/patch_analog.c 2009-08-05 09:40:13.000000000 +0800 +++ sound-2.6/sound/pci/hda/patch_analog.c 2009-08-16 16:49:39.000000000 +0800 @@ -3717,6 +3717,8 @@ static struct snd_kcontrol_new ad1884a_l HDA_CODEC_VOLUME("Master Playback Volume", 0x21, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Dock Playback Switch", 0x12, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Headphone Playback Switch", 0x11, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Speaker Playback Switch", 0x16, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("PCM Playback Volume", 0x20, 0x5, HDA_INPUT), HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x00, HDA_INPUT),
@@ -3837,8 +3839,10 @@ static struct hda_verb ad1884a_laptop_ve {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, /* Port-F pin */
- {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
- {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
- /* required for compaq 6530s speaker output */
- {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Port-C pin - internal mic-in */ {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */
@@ -4003,6 +4007,8 @@ static struct snd_pci_quirk ad1884a_cfg_ SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP), SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE),
- SND_PCI_QUIRK(0x103c, 0x30e8, "HP Compaq 6530s", AD1884A_LAPTOP),
- SND_PCI_QUIRK(0x103c, 0x30e9, "HP Compaq 6531s", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x3070, "HP", AD1884A_MOBILE), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30d0, "HP laptop", AD1884A_LAPTOP), SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30e0, "HP laptop", AD1884A_LAPTOP),
At Wed, 19 Aug 2009 16:27:52 +0800, Wu Fengguang wrote:
On Mon, Aug 17, 2009 at 02:46:14PM +0800, Takashi Iwai wrote:
At Sun, 16 Aug 2009 19:01:10 +0800, Wu Fengguang wrote:
On Sun, Aug 16, 2009 at 05:22:23PM +0800, Takashi Iwai wrote:
At Sun, 16 Aug 2009 16:53:17 +0800, Wu Fengguang wrote:
There are 3 causes to the silence of Compaq 6530s' internal speaker:
- HP pin 0x11 always return 0xffff,ffff (pin_presence=1), which automutes the speaker at module loading time.
This is odd. Is the sense-trigger issued before reading the pin sense?
Sorry, what do you mean? The facts I explored are:
- ad1884a_hp_automute() will be explicitly called by ad1884a_hp_init()
- ad1884a_hp_unsol_event() is never called on plug events
- I tried manually execute AC_VERB_SET_PIN_SENSE then read pin sense, it takes effect on the impedance, but pin_presence still remains 1.
The fact that it returns only -1 sounds rather like a hardware issue. Or, at least, reading a wrong place or so.
It may well be a hardware issue. But note that SET_PIN_SENSE could change the return value of GET_PIN_SENSE, except for the highest pin_presence bit:
root@hp /home/wfg# hda-verb /dev/snd/hwC0D0 0x16 GET_PIN_SENSE 0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0x7fffffff root@hp /home/wfg# hda-verb /dev/snd/hwC0D0 0x16 GET_PIN_SENSE 0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0x7fffffff root@hp /home/wfg# hda-verb /dev/snd/hwC0D0 0x16 SET_PIN_SENSE 0 nid = 0x16, verb = 0x709, param = 0x0 value = 0x0 root@hp /home/wfg# hda-verb /dev/snd/hwC0D0 0x16 GET_PIN_SENSE 0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0xcd00 root@hp /home/wfg# hda-verb /dev/snd/hwC0D0 0x16 GET_PIN_SENSE 0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0xcd00
Indeed. I guess the impedance measurement is done at the trigger time.
- HP pin 0x11 won't emit unsol events on jack plug/unplug, so the speaker have no chance to be unmuted.
Can it be fixed with enable_msi=1 option?
Not yet, will try it.
- pin 0x1c must be set to PIN_OUT mode to make the speaker work this is the most weird part - line-in pin 0x1c and speaker pin 0x16 seem to be unrelated.
Hm, sounds strange.
Yes. Note that the 6530s I have is a test box. Another 6531s which is bought directly from market don't have this bug.
Fix the problems by
- add "Speaker" and "Headphone" mixers to allow hand tuning by user
It's a bit buggy because the auto-mute feature can turn on/off these silently. If any, these controls have to be notified at changing the state via plugging.
OK. Are there code examples for doing this? Thank you!
Basically you need to call snd_ctl_notify() to control elements which h/w values are changed. In that way, the mixer app can be notified and update the values appropriately.
However, I think adding these control unconditionally to the existing model is no right solution. The laptop model is designed for the device where the HP jack detection works properly. If the device isn't such one, the model itself isn't applicable.
So, it's better to create either another model without jack detection, or add a check for hint strings, at least. In either case, you can create two controls, Headphone and Speaker, which access the h/w normally without master control. Then a master control will be automatically created as vmaster.
Thanks for the tips! However I'm now wondering the value of doing this: it may well be an early stage hardware bug and may no longer exist in the market.. I'm quite content on enabling 6531s and assume the patch will work alike for 6530s in the market :)
Yeah, I agree.
thanks,
Takashi
participants (2)
-
Takashi Iwai
-
Wu Fengguang