All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hda: enable speaker output for Compaq 6530s/6531s
@ 2009-08-16  8:53 Wu Fengguang
  2009-08-16  9:05 ` [PATCH] hda: enable speaker output of HP 2510p Wu Fengguang
  2009-08-16  9:22 ` [PATCH] hda: enable speaker output for Compaq 6530s/6531s Takashi Iwai
  0 siblings, 2 replies; 16+ messages in thread
From: Wu Fengguang @ 2009-08-16  8:53 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

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),

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] hda: enable speaker output of HP 2510p
  2009-08-16  8:53 [PATCH] hda: enable speaker output for Compaq 6530s/6531s Wu Fengguang
@ 2009-08-16  9:05 ` Wu Fengguang
  2009-08-16  9:24   ` Takashi Iwai
  2009-08-16  9:22 ` [PATCH] hda: enable speaker output for Compaq 6530s/6531s Takashi Iwai
  1 sibling, 1 reply; 16+ messages in thread
From: Wu Fengguang @ 2009-08-16  9:05 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

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 */

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] hda: enable speaker output for Compaq 6530s/6531s
  2009-08-16  8:53 [PATCH] hda: enable speaker output for Compaq 6530s/6531s Wu Fengguang
  2009-08-16  9:05 ` [PATCH] hda: enable speaker output of HP 2510p Wu Fengguang
@ 2009-08-16  9:22 ` Takashi Iwai
  2009-08-16 11:01   ` Wu Fengguang
  1 sibling, 1 reply; 16+ messages in thread
From: Takashi Iwai @ 2009-08-16  9:22 UTC (permalink / raw)
  To: Wu Fengguang; +Cc: alsa-devel

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),
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] hda: enable speaker output of HP 2510p
  2009-08-16  9:05 ` [PATCH] hda: enable speaker output of HP 2510p Wu Fengguang
@ 2009-08-16  9:24   ` Takashi Iwai
  2009-08-16 11:03     ` Wu Fengguang
  0 siblings, 1 reply; 16+ messages in thread
From: Takashi Iwai @ 2009-08-16  9:24 UTC (permalink / raw)
  To: Wu Fengguang; +Cc: alsa-devel

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,
> +				 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 */
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] hda: enable speaker output for Compaq 6530s/6531s
  2009-08-16  9:22 ` [PATCH] hda: enable speaker output for Compaq 6530s/6531s Takashi Iwai
@ 2009-08-16 11:01   ` Wu Fengguang
  2009-08-17  6:46     ` Takashi Iwai
  0 siblings, 1 reply; 16+ messages in thread
From: Wu Fengguang @ 2009-08-16 11:01 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

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),
> > 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] hda: enable speaker output of HP 2510p
  2009-08-16  9:24   ` Takashi Iwai
@ 2009-08-16 11:03     ` Wu Fengguang
  0 siblings, 0 replies; 16+ messages in thread
From: Wu Fengguang @ 2009-08-16 11:03 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

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,
> > +				 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 */
> > 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] hda: enable speaker output for Compaq 6530s/6531s
  2009-08-16 11:01   ` Wu Fengguang
@ 2009-08-17  6:46     ` Takashi Iwai
  2009-08-18  6:33       ` Takashi Iwai
  2009-08-19  8:27       ` Wu Fengguang
  0 siblings, 2 replies; 16+ messages in thread
From: Takashi Iwai @ 2009-08-17  6:46 UTC (permalink / raw)
  To: Wu Fengguang; +Cc: alsa-devel

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),
> > > 
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] hda: enable speaker output for Compaq 6530s/6531s
  2009-08-17  6:46     ` Takashi Iwai
@ 2009-08-18  6:33       ` Takashi Iwai
  2009-08-18  7:06         ` Wu Fengguang
  2009-08-19  7:56         ` Wu Fengguang
  2009-08-19  8:27       ` Wu Fengguang
  1 sibling, 2 replies; 16+ messages in thread
From: Takashi Iwai @ 2009-08-18  6:33 UTC (permalink / raw)
  To: Wu Fengguang; +Cc: alsa-devel

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] hda: enable speaker output for Compaq 6530s/6531s
  2009-08-18  6:33       ` Takashi Iwai
@ 2009-08-18  7:06         ` Wu Fengguang
  2009-08-19  7:56         ` Wu Fengguang
  1 sibling, 0 replies; 16+ messages in thread
From: Wu Fengguang @ 2009-08-18  7:06 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Lin, Ming M

[-- Attachment #1: Type: text/plain, Size: 1286 bytes --]

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


[-- Attachment #2: alsa-info-6531s.txt --]
[-- Type: text/plain, Size: 21294 bytes --]


!!################################
!!ALSA Information Script v 0.4.57
!!################################

!!Script ran on: Tue Aug  4 15:19:17 UTC 2009


!!Linux Distribution
!!------------------

Fedora release 10 (Cambridge) Fedora release 10 (Cambridge) Fedora release 10 (Cambridge) Fedora release 10 (Cambridge)


!!DMI Information
!!---------------

Manufacturer:      Hewlett-Packard
Product Name:      HP Compaq 6531s


!!Kernel Information
!!------------------

Kernel release:    2.6.31-rc2
Operating System:  GNU/Linux
Architecture:      i686
Processor:         i686
SMP Enabled:       Yes


!!ALSA Version
!!------------

Driver version:     1.0.20
Library version:    1.0.18rc3
Utilities version:  1.0.18rc3


!!Loaded ALSA modules
!!-------------------



!!Sound Servers on this system
!!----------------------------

Pulseaudio:
      Installed - Yes (/usr/bin/pulseaudio)
      Running - Yes

aRts:
      Installed - Yes (/usr/bin/artsd)
      Running - No

Jack:
      Installed - Yes (/usr/bin/jackd)
      Running - No


!!Soundcards recognised by ALSA
!!-----------------------------

 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xd8500000 irq 17


!!PCI Soundcards installed in the system
!!--------------------------------------

00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)


!!Advanced information - PCI Vendor/Device/Susbsystem ID's
!!--------------------------------------------------------

00:1b.0 0403: 8086:293e (rev 03)
	Subsystem: 103c:30e9


!!Loaded sound module options
!!--------------------------


!!HDA-Intel Codec information
!!---------------------------
--startcollapse--

Codec: Analog Devices AD1984A
Address: 0
Function Id: 0x1
Vendor Id: 0x11d4194a
Subsystem Id: 0x103c30e9
Revision Id: 0x100400
No Modem Function Group found
Default PCM:
    rates [0x7ff]: 8000 11025 16000 22050 32000 44100 48000 88200 96000 176400 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Default Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x05, mute=0
GPIO: io=3, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=1, unsol=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x02 [Audio Output] wcaps 0x30211: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  PCM:
    rates [0x7e0]: 44100 48000 88200 96000 176400 192000
    bits [0xe]: 16 20 24
    formats [0x5]: PCM AC3
  Delay: 3 samples
Node 0x03 [Audio Output] wcaps 0x405: Stereo Amp-Out
  Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x05, mute=0
  Amp-Out vals:  [0x27 0x27]
  Converter: stream=0, channel=0
  Power: setting=D0, actual=D0
Node 0x04 [Audio Output] wcaps 0x405: Stereo Amp-Out
  Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x05, mute=0
  Amp-Out vals:  [0x27 0x27]
  Converter: stream=0, channel=0
  Power: setting=D0, actual=D0
Node 0x05 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x06 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x07 [Audio Mixer] wcaps 0x200103: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x00 0x00]
  Connection: 2
     0x22 0x21
Node 0x08 [Audio Input] wcaps 0x100501: Stereo
  Converter: stream=0, channel=0
  SDI-Select: 0
  Power: setting=D0, actual=D0
  Connection: 1
     0x0c
Node 0x09 [Audio Input] wcaps 0x100501: Stereo
  Converter: stream=0, channel=0
  SDI-Select: 0
  Power: setting=D0, actual=D0
  Connection: 1
     0x0d
Node 0x0a [Audio Mixer] wcaps 0x200103: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x00 0x00]
  Connection: 2
     0x04 0x21
Node 0x0b [Audio Mixer] wcaps 0x200103: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x00 0x00]
  Connection: 2
     0x0f 0x21
Node 0x0c [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x27, nsteps=0x36, stepsize=0x05, mute=1
  Amp-Out vals:  [0x34 0x34]
  Connection: 6
     0x14 0x15* 0x16 0x20 0x25 0x17
Node 0x0d [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x27, nsteps=0x36, stepsize=0x05, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 6
     0x14* 0x15 0x16 0x20 0x25 0x17
Node 0x0e [Audio Selector] wcaps 0x300101: Stereo
  Connection: 2
     0x03* 0x04
Node 0x0f [Audio Selector] wcaps 0x300101: Stereo
  Connection: 2
     0x03* 0x04
Node 0x10 [Beep Generator Widget] wcaps 0x70000c: Mono Amp-Out
  Amp-Out caps: ofs=0x0f, nsteps=0x0f, stepsize=0x0b, mute=1
  Amp-Out vals:  [0x00]
Node 0x11 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000001f: OUT HP Detect Trigger ImpSense
  Pin Default 0x02212040: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Grey
    DefAssociation = 0x4, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=37, enabled=1
  Connection: 1
     0x07
Node 0x12 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0001001f: OUT HP EAPD Detect Trigger ImpSense
  EAPD 0x0:
  Pin Default 0x410140f0: [N/A] Line Out at Ext Rear
    Conn = 1/8, Color = Green
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=00, enabled=0
  Power: setting=D0, actual=D0
  Connection: 1
     0x0a
Node 0x13 [Pin Complex] wcaps 0x40050c: Mono Amp-Out
  Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x00]
  Pincap 0x00010010: OUT EAPD
  EAPD 0x0:
  Pin Default 0x413711f0: [N/A] CD at Ext Rear
    Conn = Analog, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Power: setting=D0, actual=D0
  Connection: 1
     0x1f
Node 0x14 [Pin Complex] wcaps 0x40008b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x02 0x02]
  Pincap 0x00003727: IN Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x02a12060: [Jack] Mic at Ext Front
    Conn = 1/8, Color = Grey
    DefAssociation = 0x6, Sequence = 0x0
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=36, enabled=1
Node 0x15 [Pin Complex] wcaps 0x40008b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00003727: IN Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x91a71120: [Fixed] Mic at Int Rear
    Conn = Analog, Color = Black
    DefAssociation = 0x2, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=00, enabled=0
Node 0x16 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x00010037: IN OUT EAPD Detect Trigger ImpSense
  EAPD 0x2: EAPD
  Pin Default 0x92174110: [Fixed] Speaker at Int Front
    Conn = Analog, Color = Green
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power: setting=D0, actual=D0
  Connection: 1
     0x0b
Node 0x17 [Pin Complex] wcaps 0x40020b: Stereo Digital Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x17, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00000020: IN
  Pin Default 0x41a6e130: [N/A] Mic at Ext Rear
    Conn = Digital, Color = White
    DefAssociation = 0x3, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x24: IN
Node 0x18 [Vendor Defined Widget] wcaps 0xf00100: Mono
  Connection: 1
     0x06
Node 0x19 [Power Widget] wcaps 0x500500: Mono
  Power: setting=D0, actual=D0
  Connection: 2
     0x20 0x21
Node 0x1a [Pin Complex] wcaps 0x400000: Mono
  Pincap 0x00000020: IN
  Pin Default 0x90f711f0: [Fixed] Other at Int N/A
    Conn = Analog, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
Node 0x1b [Pin Complex] wcaps 0x40038d: Stereo Digital Amp-Out
  Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x05, mute=1
  Amp-Out vals:  [0x27 0x27]
  Pincap 0x00000014: OUT Detect
  Pin Default 0x41561150: [N/A] Digital Out at Ext Rear
    Conn = Digital, Color = Black
    DefAssociation = 0x5, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x02
Node 0x1c [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x00003737: IN OUT Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80 100
  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
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x24
Node 0x1d [Vendor Defined Widget] wcaps 0xf00100: Mono
  Connection: 25
     0x07* 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x11 0x12 0x13 0x14 0x15 0x16 0x19 0x1a 0x1c 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26
Node 0x1e [Audio Mixer] wcaps 0x200103: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x00 0x00]
  Connection: 2
     0x0e 0x21
Node 0x1f [Audio Mixer] wcaps 0x200100: Mono
  Connection: 1
     0x1e
Node 0x20 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x09 0x09] [0x97 0x97]
  Connection: 7
     0x14 0x15 0x16 0x1a 0x25 0x03 0x04
Node 0x21 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x1f 0x1f]
  Connection: 1
     0x20
Node 0x22 [Audio Selector] wcaps 0x300101: Stereo
  Connection: 2
     0x03* 0x04
Node 0x23 [Audio Selector] wcaps 0x300101: Stereo
  Connection: 2
     0x03* 0x04
Node 0x24 [Audio Mixer] wcaps 0x200103: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80]
  Connection: 2
     0x23 0x21
Node 0x25 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-Out vals:  [0x00 0x00]
  Connection: 1
     0x1c
Node 0x26 [Vendor Defined Widget] wcaps 0xf00100: Mono
  Connection: 3
     0x14* 0x15 0x1c
Node 0x27 [Vendor Defined Widget] wcaps 0xf00301: Stereo Digital
  Connection: 2
     0x08* 0x09
Node 0x28 [Vendor Defined Widget] wcaps 0xf0030d: Stereo Digital Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 2
     0x08* 0x09
Node 0x29 [Vendor Defined Widget] wcaps 0xf0030d: Stereo Digital Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 2
     0x08* 0x09
Node 0x2a [Vendor Defined Widget] wcaps 0xf00301: Stereo Digital
  Connection: 2
     0x01* 0x27
Codec: LSI ID 1040
Address: 1
Function Id: 0x2
Vendor Id: 0x11c11040
Subsystem Id: 0x103c1378
Revision Id: 0x100200
Modem Function Group: 0x1
--endcollapse--


!!ALSA Device nodes
!!-----------------

crw-rw----  1 root root 116, 8 Aug  4 23:13 /dev/snd/controlC0
crw-rw----  1 root root 116, 7 Aug  4 23:13 /dev/snd/hwC0D0
crw-rw----  1 root root 116, 6 Aug  4 23:13 /dev/snd/hwC0D1
crw-rw----  1 root root 116, 5 Aug  4 23:15 /dev/snd/pcmC0D0c
crw-rw----  1 root root 116, 4 Aug  4 23:15 /dev/snd/pcmC0D0p
crw-rw----  1 root root 116, 3 Aug  4 23:13 /dev/snd/seq
crw-rw----  1 root root 116, 2 Aug  4 23:13 /dev/snd/timer


!!ALSA configuration files
!!------------------------

!!System wide config file (/etc/asound.conf)

#
# Place your global alsa-lib configuration here...
#

@hooks [
	{
		func load
		files [
			"/etc/alsa/pulse-default.conf"
		]
		errors false
	}
]


!!Aplay/Arecord output
!!------------

APLAY

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

ARECORD

**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1

!!Amixer output
!!-------------

!!-------Mixer controls for card 0 [Intel]

Card hw:0 'Intel'/'HDA Intel at 0xd8500000 irq 17'
  Mixer name	: 'Analog Devices AD1984A'
  Components	: 'HDA:11d4194a,103c30e9,00100400 HDA:11c11040,103c1378,00100200'
  Controls      : 24
  Simple ctrls  : 16
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [0.00dB] [on]
  Front Right: Playback 31 [100%] [0.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [on]
  Front Right: Playback [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 23
  Mono:
  Front Left: Playback 9 [39%] [-21.00dB] [on]
  Front Right: Playback 9 [39%] [-21.00dB] [on]
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 23
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 2 [67%]
  Front Right: 2 [67%]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 54
  Front Left: Capture 52 [96%] [19.50dB] [on]
  Front Right: Capture 52 [96%] [19.50dB] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 54
  Front Left: Capture 0 [0%] [-58.50dB] [off]
  Front Right: Capture 0 [0%] [-58.50dB] [off]
Simple mixer control 'Beep',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 15
  Mono: Playback 15 [100%] [0.00dB] [off]
Simple mixer control 'Dock',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [off]
  Front Right: Playback [off]
Simple mixer control 'Dock Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 23
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Dock Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Mic' 'Internal Mic' 'Dock Mic' 'Mix'
  Item0: 'Internal Mic'
Simple mixer control 'Input Source',1
  Capabilities: cenum
  Items: 'Mic' 'Internal Mic' 'Dock Mic' 'Mix'
  Item0: 'Mic'
Simple mixer control 'Internal Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 23
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Internal Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'Speaker',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [on]
  Front Right: Playback [on]


!!Alsactl output
!!-------------

--startcollapse--
state.Intel {
	control.1 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 31'
		comment.dbmin -4650
		comment.dbmax 0
		iface MIXER
		name 'Master Playback Volume'
		value.0 31
		value.1 31
	}
	control.2 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Master Playback Switch'
		value.0 true
		value.1 true
	}
	control.3 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Dock Playback Switch'
		value.0 false
		value.1 false
	}
	control.4 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Headphone Playback Switch'
		value.0 true
		value.1 true
	}
	control.5 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Speaker Playback Switch'
		value.0 true
		value.1 true
	}
	control.6 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 23'
		comment.dbmin -3450
		comment.dbmax 0
		iface MIXER
		name 'PCM Playback Volume'
		value.0 9
		value.1 9
	}
	control.7 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'PCM Playback Switch'
		value.0 true
		value.1 true
	}
	control.8 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 23'
		comment.dbmin -3450
		comment.dbmax 0
		iface MIXER
		name 'Mic Playback Volume'
		value.0 0
		value.1 0
	}
	control.9 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Mic Playback Switch'
		value.0 false
		value.1 false
	}
	control.10 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 23'
		comment.dbmin -3450
		comment.dbmax 0
		iface MIXER
		name 'Internal Mic Playback Volume'
		value.0 0
		value.1 0
	}
	control.11 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Internal Mic Playback Switch'
		value.0 false
		value.1 false
	}
	control.12 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 23'
		comment.dbmin -3450
		comment.dbmax 0
		iface MIXER
		name 'Dock Mic Playback Volume'
		value.0 0
		value.1 0
	}
	control.13 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Dock Mic Playback Switch'
		value.0 false
		value.1 false
	}
	control.14 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 3'
		comment.dbmin 0
		comment.dbmax 3000
		iface MIXER
		name 'Mic Boost'
		value.0 2
		value.1 2
	}
	control.15 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 3'
		comment.dbmin 0
		comment.dbmax 3000
		iface MIXER
		name 'Internal Mic Boost'
		value.0 0
		value.1 0
	}
	control.16 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 3'
		comment.dbmin 0
		comment.dbmax 3000
		iface MIXER
		name 'Dock Mic Boost'
		value.0 0
		value.1 0
	}
	control.17 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 54'
		comment.dbmin -5850
		comment.dbmax 2250
		iface MIXER
		name 'Capture Volume'
		value.0 52
		value.1 52
	}
	control.18 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Capture Switch'
		value.0 true
		value.1 true
	}
	control.19 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 54'
		comment.dbmin -5850
		comment.dbmax 2250
		iface MIXER
		name 'Capture Volume'
		index 1
		value.0 0
		value.1 0
	}
	control.20 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Capture Switch'
		index 1
		value.0 false
		value.1 false
	}
	control.21 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Mic
		comment.item.1 'Internal Mic'
		comment.item.2 'Dock Mic'
		comment.item.3 Mix
		iface MIXER
		name 'Input Source'
		value 'Internal Mic'
	}
	control.22 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Mic
		comment.item.1 'Internal Mic'
		comment.item.2 'Dock Mic'
		comment.item.3 Mix
		iface MIXER
		name 'Input Source'
		index 1
		value Mic
	}
	control.23 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 15'
		comment.dbmin -4500
		comment.dbmax 0
		iface MIXER
		name 'Beep Playback Volume'
		value 15
	}
	control.24 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Beep Playback Switch'
		value false
	}
}
--endcollapse--


!!All Loaded Modules
!!------------------

Module


!!ALSA/HDA dmesg
!!------------------

[   13.148715] ata2.00: ATAPI: Optiarc DVD RW AD-7561S, AH03, max UDMA/100
[   13.155357] HDA Intel 0000:00:1b.0: power state changed by ACPI to D0
[   13.161971] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[   13.168508] HDA Intel 0000:00:1b.0: setting latency timer to 64
[   13.168776] ata2.00: ACPI cmd ef/10:03:00:00:00:a0 filtered out
--
[   13.566530] Synaptics Touchpad, model: 1, fw: 6.3, id: 0x1a0b1, caps: 0xa04711/0x200000
[   13.589683] ALSA device list:
[   13.596552]   #0: HDA Intel at 0xd8500000 irq 17
[   13.603683] oprofile: using NMI interrupt.



[-- Attachment #3: alsa-info-6530s.txt --]
[-- Type: text/plain, Size: 21813 bytes --]

upload=true&script=true&cardinfo=
!!################################
!!ALSA Information Script v 0.4.57
!!################################

!!Script ran on: Thu Jul 30 07:08:50 UTC 2009


!!Linux Distribution
!!------------------

Debian GNU/Linux 5.0 \n \l


!!DMI Information
!!---------------

Manufacturer:      Hewlett-Packard
Product Name:       


!!Kernel Information
!!------------------

Kernel release:    2.6.31-rc4
Operating System:  GNU/Linux
Architecture:      x86_64
Processor:         unknown
SMP Enabled:       Yes


!!ALSA Version
!!------------

Driver version:     1.0.20
Library version:    1.0.19
Utilities version:  1.0.16


!!Loaded ALSA modules
!!-------------------

snd_hda_intel


!!Sound Servers on this system
!!----------------------------

Pulseaudio:
      Installed - Yes (/usr/bin/pulseaudio)
      Running - No

ESound Daemon:
      Installed - Yes (/usr/bin/esd)
      Running - No

Jack:
      Installed - Yes (/usr/bin/jackd)
      Running - No


!!Soundcards recognised by ALSA
!!-----------------------------

 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0x98900000 irq 17


!!PCI Soundcards installed in the system
!!--------------------------------------

00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)


!!Advanced information - PCI Vendor/Device/Susbsystem ID's
!!--------------------------------------------------------

00:1b.0 0403: 8086:293e (rev 03)
	Subsystem: 103c:30e8


!!Modprobe options (Sound related)
!!--------------------------------

snd-atiixp-modem: index=-2
snd-intel8x0m: index=-2
snd-via82xx-modem: index=-2
snd-pcsp: index=-2


!!Loaded sound module options
!!--------------------------

!!Module: snd_hda_intel
	bdl_pos_adj : 1,-1,-1,-1,-1,-1,-1,-1
	enable : Y,Y,Y,Y,Y,Y,Y,Y
	enable_msi : 0
	id : <NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
	index : -1,-1,-1,-1,-1,-1,-1,-1
	model : <NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
	position_fix : 0,0,0,0,0,0,0,0
	probe_mask : -1,-1,-1,-1,-1,-1,-1,-1
	probe_only : N,N,N,N,N,N,N,N
	single_cmd : N


!!HDA-Intel Codec information
!!---------------------------
--startcollapse--

Codec: Analog Devices AD1984A
Address: 0
Function Id: 0x1
Vendor Id: 0x11d4194a
Subsystem Id: 0x103c30e8
Revision Id: 0x100300
No Modem Function Group found
Default PCM:
    rates [0x7ff]: 8000 11025 16000 22050 32000 44100 48000 88200 96000 176400 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Default Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x05, mute=0
GPIO: io=3, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=1, unsol=0
  IO[2]: enable=0, dir=0, wake=0, sticky=0, data=1, unsol=0
Node 0x02 [Audio Output] wcaps 0x30211: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  PCM:
    rates [0x7e0]: 44100 48000 88200 96000 176400 192000
    bits [0xe]: 16 20 24
    formats [0x5]: PCM AC3
  Delay: 3 samples
Node 0x03 [Audio Output] wcaps 0x405: Stereo Amp-Out
  Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x05, mute=0
  Amp-Out vals:  [0x27 0x27]
  Converter: stream=0, channel=0
  Power: setting=D0, actual=D0
Node 0x04 [Audio Output] wcaps 0x405: Stereo Amp-Out
  Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x05, mute=0
  Amp-Out vals:  [0x27 0x27]
  Converter: stream=0, channel=0
  Power: setting=D0, actual=D0
Node 0x05 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x06 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x07 [Audio Mixer] wcaps 0x200103: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x00 0x00]
  Connection: 2
     0x22 0x21
Node 0x08 [Audio Input] wcaps 0x100501: Stereo
  Converter: stream=0, channel=0
  SDI-Select: 0
  Power: setting=D0, actual=D0
  Connection: 1
     0x0c
Node 0x09 [Audio Input] wcaps 0x100501: Stereo
  Converter: stream=0, channel=0
  SDI-Select: 0
  Power: setting=D0, actual=D0
  Connection: 1
     0x0d
Node 0x0a [Audio Mixer] wcaps 0x200103: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x00 0x00]
  Connection: 2
     0x04 0x21
Node 0x0b [Audio Mixer] wcaps 0x200103: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x00 0x00]
  Connection: 2
     0x0f 0x21
Node 0x0c [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x27, nsteps=0x36, stepsize=0x05, mute=1
  Amp-Out vals:  [0x25 0x25]
  Connection: 6
     0x14 0x15* 0x16 0x20 0x25 0x17
Node 0x0d [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x27, nsteps=0x36, stepsize=0x05, mute=1
  Amp-Out vals:  [0x25 0x25]
  Connection: 6
     0x14* 0x15 0x16 0x20 0x25 0x17
Node 0x0e [Audio Selector] wcaps 0x300101: Stereo
  Connection: 2
     0x03* 0x04
Node 0x0f [Audio Selector] wcaps 0x300101: Stereo
  Connection: 2
     0x03* 0x04
Node 0x10 [Beep Generator Widget] wcaps 0x70000c: Mono Amp-Out
  Amp-Out caps: ofs=0x0f, nsteps=0x0f, stepsize=0x0b, mute=1
  Amp-Out vals:  [0x00]
Node 0x11 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000001f: OUT HP Detect Trigger ImpSense
  Pin Default 0x02212040: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Grey
    DefAssociation = 0x4, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=37, enabled=1
  Connection: 1
     0x07
Node 0x12 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0001001f: OUT HP EAPD Detect Trigger ImpSense
  EAPD 0x0:
  Pin Default 0x410140f0: [N/A] Line Out at Ext Rear
    Conn = 1/8, Color = Green
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=00, enabled=0
  Power: setting=D0, actual=D0
  Connection: 1
     0x0a
Node 0x13 [Pin Complex] wcaps 0x40050c: Mono Amp-Out
  Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x00]
  Pincap 0x00010010: OUT EAPD
  EAPD 0x0:
  Pin Default 0x413711f0: [N/A] CD at Ext Rear
    Conn = Analog, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Power: setting=D0, actual=D0
  Connection: 1
     0x1f
Node 0x14 [Pin Complex] wcaps 0x40008b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00003727: IN Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x02a12060: [Jack] Mic at Ext Front
    Conn = 1/8, Color = Grey
    DefAssociation = 0x6, Sequence = 0x0
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=36, enabled=1
Node 0x15 [Pin Complex] wcaps 0x40008b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x02 0x02]
  Pincap 0x00003727: IN Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x91a71120: [Fixed] Mic at Int Rear
    Conn = Analog, Color = Black
    DefAssociation = 0x2, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=00, enabled=0
Node 0x16 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x00010037: IN OUT EAPD Detect Trigger ImpSense
  EAPD 0x0:
  Pin Default 0x92174110: [Fixed] Speaker at Int Front
    Conn = Analog, Color = Green
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power: setting=D0, actual=D0
  Connection: 1
     0x0b
Node 0x17 [Pin Complex] wcaps 0x40020b: Stereo Digital Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x17, mute=0
  Amp-In vals:  [0x02 0x02]
  Pincap 0x00000020: IN
  Pin Default 0x41a6e130: [N/A] Mic at Ext Rear
    Conn = Digital, Color = White
    DefAssociation = 0x3, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x24: IN
Node 0x18 [Vendor Defined Widget] wcaps 0xf00100: Mono
  Connection: 1
     0x06
Node 0x19 [Power Widget] wcaps 0x500500: Mono
  Power: setting=D0, actual=D0
  Connection: 2
     0x20 0x21
Node 0x1a [Pin Complex] wcaps 0x400000: Mono
  Pincap 0x00000020: IN
  Pin Default 0x90f711f0: [Fixed] Other at Int N/A
    Conn = Analog, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
Node 0x1b [Pin Complex] wcaps 0x40038d: Stereo Digital Amp-Out
  Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x05, mute=1
  Amp-Out vals:  [0x27 0x27]
  Pincap 0x00000014: OUT Detect
  Pin Default 0x41561150: [N/A] Digital Out at Ext Rear
    Conn = Digital, Color = Black
    DefAssociation = 0x5, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x02
Node 0x1c [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x00003737: IN OUT Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x018130f0: [Jack] Line In at Ext Rear
    Conn = 1/8, Color = Blue
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x24
Node 0x1d [Vendor Defined Widget] wcaps 0xf00100: Mono
  Connection: 25
     0x07* 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x11 0x12 0x13 0x14 0x15 0x16 0x19 0x1a 0x1c 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26
Node 0x1e [Audio Mixer] wcaps 0x200103: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x00 0x00]
  Connection: 2
     0x0e 0x21
Node 0x1f [Audio Mixer] wcaps 0x200100: Mono
  Connection: 1
     0x1e
Node 0x20 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x10 0x10] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x17 0x17] [0x97 0x97]
  Connection: 7
     0x14 0x15 0x16 0x1a 0x25 0x03 0x04
Node 0x21 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x1f 0x1f]
  Connection: 1
     0x20
Node 0x22 [Audio Selector] wcaps 0x300101: Stereo
  Connection: 2
     0x03* 0x04
Node 0x23 [Audio Selector] wcaps 0x300101: Stereo
  Connection: 2
     0x03* 0x04
Node 0x24 [Audio Mixer] wcaps 0x200103: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80]
  Connection: 2
     0x23 0x21
Node 0x25 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-Out vals:  [0x00 0x00]
  Connection: 1
     0x1c
Node 0x26 [Vendor Defined Widget] wcaps 0xf00100: Mono
  Connection: 3
     0x14* 0x15 0x1c
Node 0x27 [Vendor Defined Widget] wcaps 0xf00301: Stereo Digital
  Connection: 2
     0x08* 0x09
Node 0x28 [Vendor Defined Widget] wcaps 0xf0030d: Stereo Digital Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 2
     0x08* 0x09
Node 0x29 [Vendor Defined Widget] wcaps 0xf0030d: Stereo Digital Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 2
     0x08* 0x09
Node 0x2a [Vendor Defined Widget] wcaps 0xf00301: Stereo Digital
  Connection: 2
     0x01* 0x27
Codec: LSI ID 1040
Address: 1
Function Id: 0x2
Vendor Id: 0x11c11040
Subsystem Id: 0x103c1378
Revision Id: 0x100200
Modem Function Group: 0x1
--endcollapse--


!!ALSA Device nodes
!!-----------------

crw-rw---- 1 root audio 116,  0 Jul 30  2009 /dev/snd/controlC0
crw-rw---- 1 root audio 116,  4 Jul 30  2009 /dev/snd/hwC0D0
crw-rw---- 1 root audio 116,  5 Jul 30  2009 /dev/snd/hwC0D1
crw-rw---- 1 root audio 116, 24 Jul 30  2009 /dev/snd/pcmC0D0c
crw-rw---- 1 root audio 116, 16 Jul 30 15:08 /dev/snd/pcmC0D0p
crw-rw---- 1 root audio 116,  1 Jul 30  2009 /dev/snd/seq
crw-rw---- 1 root audio 116, 33 Jul 30  2009 /dev/snd/timer


!!Aplay/Arecord output
!!------------

APLAY

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

ARECORD

**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1

!!Amixer output
!!-------------

!!-------Mixer controls for card 0 [Intel]

Card hw:0 'Intel'/'HDA Intel at 0x98900000 irq 17'
  Mixer name	: 'Analog Devices AD1984A'
  Components	: 'HDA:11d4194a,103c30e8,00100300 HDA:11c11040,103c1378,00100200'
  Controls      : 23
  Simple ctrls  : 15
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [0.00dB] [on]
  Front Right: Playback 31 [100%] [0.00dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 23
  Mono:
  Front Left: Playback 23 [100%] [0.00dB] [on]
  Front Right: Playback 23 [100%] [0.00dB] [on]
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 23
  Mono:
  Front Left: Playback 16 [70%] [-10.50dB] [on]
  Front Right: Playback 16 [70%] [-10.50dB] [on]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 54
  Front Left: Capture 37 [69%] [-3.00dB] [on]
  Front Right: Capture 37 [69%] [-3.00dB] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 54
  Front Left: Capture 37 [69%] [-3.00dB] [on]
  Front Right: Capture 37 [69%] [-3.00dB] [on]
Simple mixer control 'Beep',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 15
  Mono: Playback 15 [100%] [0.00dB] [on]
Simple mixer control 'Digital',0
  Capabilities: cvolume
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 120
  Front Left: Capture 60 [50%] [0.00dB]
  Front Right: Capture 60 [50%] [0.00dB]
Simple mixer control 'Dock',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [off]
  Front Right: Playback [off]
Simple mixer control 'Dock Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 23
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Dock Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Mic' 'Internal Mic' 'Dock Mic' 'Mix'
  Item0: 'Mic'
Simple mixer control 'Input Source',1
  Capabilities: cenum
  Items: 'Mic' 'Internal Mic' 'Dock Mic' 'Mix'
  Item0: 'Mic'
Simple mixer control 'Internal Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 23
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Internal Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 2 [67%]
  Front Right: 2 [67%]


!!Alsactl output
!!-------------

--startcollapse--
state.Intel {
	control.1 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 31'
		comment.dbmin -4650
		comment.dbmax 0
		iface MIXER
		name 'Master Playback Volume'
		value.0 31
		value.1 31
	}
	control.2 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Master Playback Switch'
		value.0 true
		value.1 true
	}
	control.3 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Dock Playback Switch'
		value.0 false
		value.1 false
	}
	control.4 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 23'
		comment.dbmin -3450
		comment.dbmax 0
		iface MIXER
		name 'PCM Playback Volume'
		value.0 23
		value.1 23
	}
	control.5 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'PCM Playback Switch'
		value.0 true
		value.1 true
	}
	control.6 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 23'
		comment.dbmin -3450
		comment.dbmax 0
		iface MIXER
		name 'Mic Playback Volume'
		value.0 16
		value.1 16
	}
	control.7 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Mic Playback Switch'
		value.0 true
		value.1 true
	}
	control.8 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 23'
		comment.dbmin -3450
		comment.dbmax 0
		iface MIXER
		name 'Internal Mic Playback Volume'
		value.0 0
		value.1 0
	}
	control.9 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Internal Mic Playback Switch'
		value.0 false
		value.1 false
	}
	control.10 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 23'
		comment.dbmin -3450
		comment.dbmax 0
		iface MIXER
		name 'Dock Mic Playback Volume'
		value.0 0
		value.1 0
	}
	control.11 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Dock Mic Playback Switch'
		value.0 false
		value.1 false
	}
	control.12 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 3'
		comment.dbmin 0
		comment.dbmax 3000
		iface MIXER
		name 'Mic Boost'
		value.0 0
		value.1 0
	}
	control.13 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 3'
		comment.dbmin 0
		comment.dbmax 3000
		iface MIXER
		name 'Internal Mic Boost'
		value.0 2
		value.1 2
	}
	control.14 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 3'
		comment.dbmin 0
		comment.dbmax 3000
		iface MIXER
		name 'Dock Mic Boost'
		value.0 0
		value.1 0
	}
	control.15 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 54'
		comment.dbmin -5850
		comment.dbmax 2250
		iface MIXER
		name 'Capture Volume'
		value.0 37
		value.1 37
	}
	control.16 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Capture Switch'
		value.0 true
		value.1 true
	}
	control.17 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 54'
		comment.dbmin -5850
		comment.dbmax 2250
		iface MIXER
		name 'Capture Volume'
		index 1
		value.0 37
		value.1 37
	}
	control.18 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Capture Switch'
		index 1
		value.0 true
		value.1 true
	}
	control.19 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Mic
		comment.item.1 'Internal Mic'
		comment.item.2 'Dock Mic'
		comment.item.3 Mix
		iface MIXER
		name 'Input Source'
		value Mic
	}
	control.20 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Mic
		comment.item.1 'Internal Mic'
		comment.item.2 'Dock Mic'
		comment.item.3 Mix
		iface MIXER
		name 'Input Source'
		index 1
		value Mic
	}
	control.21 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 15'
		comment.dbmin -4500
		comment.dbmax 0
		iface MIXER
		name 'Beep Playback Volume'
		value 15
	}
	control.22 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Beep Playback Switch'
		value true
	}
	control.23 {
		comment.access 'read write user'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 120'
		comment.tlv '0000000100000008fffff44800000032'
		comment.dbmin -3000
		comment.dbmax 3000
		iface MIXER
		name 'Digital Capture Volume'
		value.0 60
		value.1 60
	}
}
--endcollapse--


!!All Loaded Modules
!!------------------

Module
iwlagn
iwlcore
led_class
snd_hda_codec_analog
snd_hda_intel
snd_hda_codec
snd_hwdep
snd_pcm
snd_seq
snd_timer
snd_seq_device
snd
soundcore
snd_page_alloc
video


!!Sysfs Files
!!-----------

/sys/class/sound/hwC0D0/init_pin_configs:
0x11 0x02212040
0x12 0x410140f0
0x13 0x413711f0
0x14 0x02a12060
0x15 0x91a71120
0x16 0x92174110
0x17 0x41a6e130
0x1a 0x90f711f0
0x1b 0x41561150
0x1c 0x018130f0

/sys/class/sound/hwC0D0/driver_pin_configs:

/sys/class/sound/hwC0D0/user_pin_configs:

/sys/class/sound/hwC0D0/init_verbs:

/sys/class/sound/hwC0D1/init_pin_configs:

/sys/class/sound/hwC0D1/driver_pin_configs:

/sys/class/sound/hwC0D1/user_pin_configs:

/sys/class/sound/hwC0D1/init_verbs:


!!ALSA/HDA dmesg
!!------------------

[   12.287483] path_id used greatest stack depth: 2336 bytes left
[   12.829953] HDA Intel 0000:00:1b.0: power state changed by ACPI to D0
[   12.830404] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[   12.831024] HDA Intel 0000:00:1b.0: setting latency timer to 64
[   17.145749] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27k



[-- Attachment #4: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] hda: enable speaker output for Compaq 6530s/6531s
  2009-08-18  6:33       ` Takashi Iwai
  2009-08-18  7:06         ` Wu Fengguang
@ 2009-08-19  7:56         ` Wu Fengguang
  2009-08-19  8:01           ` Wu Fengguang
  1 sibling, 1 reply; 16+ messages in thread
From: Wu Fengguang @ 2009-08-19  7:56 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] hda: enable speaker output for Compaq 6530s/6531s
  2009-08-19  7:56         ` Wu Fengguang
@ 2009-08-19  8:01           ` Wu Fengguang
  2009-08-19  8:50             ` Takashi Iwai
  0 siblings, 1 reply; 16+ messages in thread
From: Wu Fengguang @ 2009-08-19  8:01 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Lin, Ming M

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),

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] hda: enable speaker output for Compaq 6530s/6531s
  2009-08-17  6:46     ` Takashi Iwai
  2009-08-18  6:33       ` Takashi Iwai
@ 2009-08-19  8:27       ` Wu Fengguang
  2009-08-19  8:47         ` Takashi Iwai
  1 sibling, 1 reply; 16+ messages in thread
From: Wu Fengguang @ 2009-08-19  8:27 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

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),
> > > > 
> > 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] hda: enable speaker output for Compaq 6530s/6531s
  2009-08-19  8:27       ` Wu Fengguang
@ 2009-08-19  8:47         ` Takashi Iwai
  0 siblings, 0 replies; 16+ messages in thread
From: Takashi Iwai @ 2009-08-19  8:47 UTC (permalink / raw)
  To: Wu Fengguang; +Cc: alsa-devel

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] hda: enable speaker output for Compaq 6530s/6531s
  2009-08-19  8:01           ` Wu Fengguang
@ 2009-08-19  8:50             ` Takashi Iwai
  2009-08-19  8:58               ` Wu Fengguang
  0 siblings, 1 reply; 16+ messages in thread
From: Takashi Iwai @ 2009-08-19  8:50 UTC (permalink / raw)
  To: Wu Fengguang; +Cc: alsa-devel, Lin, Ming M

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] hda: enable speaker output for Compaq 6530s/6531s
  2009-08-19  8:50             ` Takashi Iwai
@ 2009-08-19  8:58               ` Wu Fengguang
  2009-08-19 10:12                 ` Takashi Iwai
  0 siblings, 1 reply; 16+ messages in thread
From: Wu Fengguang @ 2009-08-19  8:58 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Lin, Ming M

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 */

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] hda: enable speaker output for Compaq 6530s/6531s
  2009-08-19  8:58               ` Wu Fengguang
@ 2009-08-19 10:12                 ` Takashi Iwai
  0 siblings, 0 replies; 16+ messages in thread
From: Takashi Iwai @ 2009-08-19 10:12 UTC (permalink / raw)
  To: Wu Fengguang; +Cc: alsa-devel, Lin, Ming M

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-08-19 10:12 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-16  8:53 [PATCH] hda: enable speaker output for Compaq 6530s/6531s Wu Fengguang
2009-08-16  9:05 ` [PATCH] hda: enable speaker output of HP 2510p Wu Fengguang
2009-08-16  9:24   ` Takashi Iwai
2009-08-16 11:03     ` Wu Fengguang
2009-08-16  9:22 ` [PATCH] hda: enable speaker output for Compaq 6530s/6531s Takashi Iwai
2009-08-16 11:01   ` Wu Fengguang
2009-08-17  6:46     ` Takashi Iwai
2009-08-18  6:33       ` Takashi Iwai
2009-08-18  7:06         ` Wu Fengguang
2009-08-19  7:56         ` Wu Fengguang
2009-08-19  8:01           ` Wu Fengguang
2009-08-19  8:50             ` Takashi Iwai
2009-08-19  8:58               ` Wu Fengguang
2009-08-19 10:12                 ` Takashi Iwai
2009-08-19  8:27       ` Wu Fengguang
2009-08-19  8:47         ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.