All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hda: add 2-channel mode to Intel ALC889/ALC889A models
@ 2009-07-30  6:36 Wu Fengguang
  2009-07-30  6:54 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Wu Fengguang @ 2009-07-30  6:36 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

This 2-channel mode is useful in that it will broadcast
a 2-channel audio stream to all front/side/... ports.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 sound/pci/hda/patch_realtek.c |   44 ++++++++++++++++++--------------
 1 file changed, 25 insertions(+), 19 deletions(-)

--- sound-2.6.orig/sound/pci/hda/patch_realtek.c
+++ sound-2.6/sound/pci/hda/patch_realtek.c
@@ -6682,18 +6682,27 @@ static struct hda_channel_mode alc883_3S
 };
 
 /*
+ * 2ch mode
+ */
+static struct hda_verb alc889_ch2_intel_init[] = {
+	{ 0x14, AC_VERB_SET_CONNECT_SEL, 0x00 },
+	{ 0x19, AC_VERB_SET_CONNECT_SEL, 0x00 },
+	{ 0x16, AC_VERB_SET_CONNECT_SEL, 0x00 },
+	{ 0x17, AC_VERB_SET_CONNECT_SEL, 0x00 },
+	{ 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
+	{ 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
+	{ } /* end */
+};
+
+/*
  * 6ch mode
  */
 static struct hda_verb alc889_ch6_intel_init[] = {
-	{ 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
-	{ 0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
-	{ 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
-	{ 0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
-	{ 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
-	{ 0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
-	{ 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
-	{ 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
-	{ 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
+	{ 0x14, AC_VERB_SET_CONNECT_SEL, 0x00 },
+	{ 0x19, AC_VERB_SET_CONNECT_SEL, 0x01 },
+	{ 0x16, AC_VERB_SET_CONNECT_SEL, 0x02 },
+	{ 0x17, AC_VERB_SET_CONNECT_SEL, 0x03 },
+	{ 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
 	{ 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
 	{ } /* end */
 };
@@ -6702,21 +6711,18 @@ static struct hda_verb alc889_ch6_intel_
  * 8ch mode
  */
 static struct hda_verb alc889_ch8_intel_init[] = {
-	{ 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
-	{ 0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
-	{ 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
-	{ 0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
-	{ 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
-	{ 0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
-	{ 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
-	{ 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
+	{ 0x14, AC_VERB_SET_CONNECT_SEL, 0x00 },
+	{ 0x19, AC_VERB_SET_CONNECT_SEL, 0x01 },
+	{ 0x16, AC_VERB_SET_CONNECT_SEL, 0x02 },
+	{ 0x17, AC_VERB_SET_CONNECT_SEL, 0x03 },
+	{ 0x1a, AC_VERB_SET_CONNECT_SEL, 0x03 },
 	{ 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
 	{ 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
-	{ 0x1a, AC_VERB_SET_CONNECT_SEL, 0x03 },
 	{ } /* end */
 };
 
-static struct hda_channel_mode alc889_8ch_intel_modes[2] = {
+static struct hda_channel_mode alc889_8ch_intel_modes[3] = {
+	{ 2, alc889_ch2_intel_init },
 	{ 6, alc889_ch6_intel_init },
 	{ 8, alc889_ch8_intel_init },
 };

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

* Re: [PATCH] hda: add 2-channel mode to Intel ALC889/ALC889A models
  2009-07-30  6:36 [PATCH] hda: add 2-channel mode to Intel ALC889/ALC889A models Wu Fengguang
@ 2009-07-30  6:54 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2009-07-30  6:54 UTC (permalink / raw)
  To: Wu Fengguang; +Cc: alsa-devel

At Thu, 30 Jul 2009 14:36:35 +0800,
Wu Fengguang wrote:
> 
> This 2-channel mode is useful in that it will broadcast
> a 2-channel audio stream to all front/side/... ports.
> 
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>

Applied now.  Thanks!


Takashi

> ---
>  sound/pci/hda/patch_realtek.c |   44 ++++++++++++++++++--------------
>  1 file changed, 25 insertions(+), 19 deletions(-)
> 
> --- sound-2.6.orig/sound/pci/hda/patch_realtek.c
> +++ sound-2.6/sound/pci/hda/patch_realtek.c
> @@ -6682,18 +6682,27 @@ static struct hda_channel_mode alc883_3S
>  };
>  
>  /*
> + * 2ch mode
> + */
> +static struct hda_verb alc889_ch2_intel_init[] = {
> +	{ 0x14, AC_VERB_SET_CONNECT_SEL, 0x00 },
> +	{ 0x19, AC_VERB_SET_CONNECT_SEL, 0x00 },
> +	{ 0x16, AC_VERB_SET_CONNECT_SEL, 0x00 },
> +	{ 0x17, AC_VERB_SET_CONNECT_SEL, 0x00 },
> +	{ 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
> +	{ 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
> +	{ } /* end */
> +};
> +
> +/*
>   * 6ch mode
>   */
>  static struct hda_verb alc889_ch6_intel_init[] = {
> -	{ 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
> -	{ 0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
> -	{ 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
> -	{ 0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
> -	{ 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
> -	{ 0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
> -	{ 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
> -	{ 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
> -	{ 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
> +	{ 0x14, AC_VERB_SET_CONNECT_SEL, 0x00 },
> +	{ 0x19, AC_VERB_SET_CONNECT_SEL, 0x01 },
> +	{ 0x16, AC_VERB_SET_CONNECT_SEL, 0x02 },
> +	{ 0x17, AC_VERB_SET_CONNECT_SEL, 0x03 },
> +	{ 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
>  	{ 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
>  	{ } /* end */
>  };
> @@ -6702,21 +6711,18 @@ static struct hda_verb alc889_ch6_intel_
>   * 8ch mode
>   */
>  static struct hda_verb alc889_ch8_intel_init[] = {
> -	{ 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
> -	{ 0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
> -	{ 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
> -	{ 0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
> -	{ 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
> -	{ 0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
> -	{ 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
> -	{ 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
> +	{ 0x14, AC_VERB_SET_CONNECT_SEL, 0x00 },
> +	{ 0x19, AC_VERB_SET_CONNECT_SEL, 0x01 },
> +	{ 0x16, AC_VERB_SET_CONNECT_SEL, 0x02 },
> +	{ 0x17, AC_VERB_SET_CONNECT_SEL, 0x03 },
> +	{ 0x1a, AC_VERB_SET_CONNECT_SEL, 0x03 },
>  	{ 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
>  	{ 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
> -	{ 0x1a, AC_VERB_SET_CONNECT_SEL, 0x03 },
>  	{ } /* end */
>  };
>  
> -static struct hda_channel_mode alc889_8ch_intel_modes[2] = {
> +static struct hda_channel_mode alc889_8ch_intel_modes[3] = {
> +	{ 2, alc889_ch2_intel_init },
>  	{ 6, alc889_ch6_intel_init },
>  	{ 8, alc889_ch8_intel_init },
>  };
> 

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

end of thread, other threads:[~2009-07-30  6:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30  6:36 [PATCH] hda: add 2-channel mode to Intel ALC889/ALC889A models Wu Fengguang
2009-07-30  6:54 ` 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.