[alsa-devel] [PATCH] enable concurrent digital outputs for ALC1200

Takashi Iwai tiwai at suse.de
Fri Feb 6 09:23:10 CET 2009


At Fri, 6 Feb 2009 16:13:06 +0800,
Wu Fengguang wrote:
> 
> On Fri, Feb 06, 2009 at 10:01:54AM +0200, Takashi Iwai wrote:
> > At Fri, 6 Feb 2009 15:02:27 +0800,
> > Wu Fengguang wrote:
> > > 
> > > Add the SPDIF pin as slave digital out to enable concurrent
> > > HDMI/SPDIF outputs for ASUS M3A-H/HDMI with ALC1200 codec.
> > > 
> > > Tested-by: Thomas Schneider <nailstudio at gmx.net>
> > > Signed-off-by: Wu Fengguang <fengguang.wu at intel.com>
> > 
> > Applied now.  Thanks.
> > 
> > (We need a bit more (clean-up) work on these issues...)
> 
> I have an old patch that tries to convert the dig_out_pin from a
> scaler into an array. I wonder if this is the way to go... 

Well, my original thought was about the situation that both codec and
spec->multiout have the same slave_dig_out array.  It's a bit
confusing.


Takashi

> 
>  static int is_in_nid_list(hda_nid_t nid, hda_nid_t *list)
> diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
> index 7957fef..989e04b 100644
> --- a/sound/pci/hda/hda_local.h
> +++ b/sound/pci/hda/hda_local.h
> @@ -341,7 +341,8 @@ struct auto_pin_cfg {
>  	int line_out_type;	/* AUTO_PIN_XXX_OUT */
>  	hda_nid_t hp_pins[AUTO_CFG_MAX_OUTS];
>  	hda_nid_t input_pins[AUTO_PIN_LAST];
> -	hda_nid_t dig_out_pin;
> +	int dig_outs;
> +	hda_nid_t dig_out_pins[AUTO_CFG_MAX_OUTS];
>  	hda_nid_t dig_in_pin;
>  	hda_nid_t mono_out_pin;
>  };
> diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
> index 2b00c4a..bf94481 100644
> --- a/sound/pci/hda/patch_analog.c
> +++ b/sound/pci/hda/patch_analog.c
> @@ -2841,7 +2841,7 @@ static int ad1988_parse_auto_config(struct hda_codec *codec)
>  
>  	spec->multiout.max_channels = spec->multiout.num_dacs * 2;
>  
> -	if (spec->autocfg.dig_out_pin)
> +	if (spec->autocfg.dig_outs)
>  		spec->multiout.dig_out_nid = AD1988_SPDIF_OUT;
>  	if (spec->autocfg.dig_in_pin)
>  		spec->dig_in_nid = AD1988_SPDIF_IN;
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index c2ff85d..47f06d0 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -3784,7 +3784,7 @@ static int alc880_parse_auto_config(struct hda_codec *codec)
>  
>  	spec->multiout.max_channels = spec->multiout.num_dacs * 2;
>  
> -	if (spec->autocfg.dig_out_pin)
> +	if (spec->autocfg.dig_outs)
>  		spec->multiout.dig_out_nid = ALC880_DIGOUT_NID;
>  	if (spec->autocfg.dig_in_pin)
>  		spec->dig_in_nid = ALC880_DIGIN_NID;
> @@ -5185,7 +5185,7 @@ static int alc260_parse_auto_config(struct hda_codec *codec)
>  
>  	spec->multiout.max_channels = 2;
>  
> -	if (spec->autocfg.dig_out_pin)
> +	if (spec->autocfg.dig_outs)
>  		spec->multiout.dig_out_nid = ALC260_DIGOUT_NID;
>  	if (spec->kctl_alloc)
>  		spec->mixers[spec->num_mixers++] = spec->kctl_alloc;
> @@ -10249,7 +10249,7 @@ static int alc262_parse_auto_config(struct hda_codec *codec)
>  
>  	spec->multiout.max_channels = spec->multiout.num_dacs * 2;
>  
> -	if (spec->autocfg.dig_out_pin)
> +	if (spec->autocfg.dig_outs)
>  		spec->multiout.dig_out_nid = ALC262_DIGOUT_NID;
>  	if (spec->autocfg.dig_in_pin)
>  		spec->dig_in_nid = ALC262_DIGIN_NID;
> @@ -11382,7 +11382,7 @@ static int alc268_parse_auto_config(struct hda_codec *codec)
>  	spec->multiout.max_channels = 2;
>  
>  	/* digital only support output */
> -	if (spec->autocfg.dig_out_pin)
> +	if (spec->autocfg.dig_outs)
>  		spec->multiout.dig_out_nid = ALC268_DIGOUT_NID;
>  
>  	if (spec->kctl_alloc)
> @@ -12154,7 +12154,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
>  
>  	spec->multiout.max_channels = spec->multiout.num_dacs * 2;
>  
> -	if (spec->autocfg.dig_out_pin)
> +	if (spec->autocfg.dig_outs)
>  		spec->multiout.dig_out_nid = ALC269_DIGOUT_NID;
>  
>  	if (spec->kctl_alloc)
> @@ -13252,7 +13252,7 @@ static int alc861_parse_auto_config(struct hda_codec *codec)
>  
>  	spec->multiout.max_channels = spec->multiout.num_dacs * 2;
>  
> -	if (spec->autocfg.dig_out_pin)
> +	if (spec->autocfg.dig_outs)
>  		spec->multiout.dig_out_nid = ALC861_DIGOUT_NID;
>  
>  	if (spec->kctl_alloc)
> @@ -14363,7 +14363,7 @@ static int alc861vd_parse_auto_config(struct hda_codec *codec)
>  
>  	spec->multiout.max_channels = spec->multiout.num_dacs * 2;
>  
> -	if (spec->autocfg.dig_out_pin)
> +	if (spec->autocfg.dig_outs)
>  		spec->multiout.dig_out_nid = ALC861VD_DIGOUT_NID;
>  
>  	if (spec->kctl_alloc)
> @@ -16182,7 +16182,7 @@ static int alc662_parse_auto_config(struct hda_codec *codec)
>  
>  	spec->multiout.max_channels = spec->multiout.num_dacs * 2;
>  
> -	if (spec->autocfg.dig_out_pin)
> +	if (spec->autocfg.dig_outs)
>  		spec->multiout.dig_out_nid = ALC880_DIGOUT_NID;
>  
>  	if (spec->kctl_alloc)
> diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
> index 63e4871..cf0ce0b 100644
> --- a/sound/pci/hda/patch_via.c
> +++ b/sound/pci/hda/patch_via.c
> @@ -1368,7 +1368,7 @@ static int vt1708_parse_auto_config(struct hda_codec *codec)
>  
>  	spec->multiout.max_channels = spec->multiout.num_dacs * 2;
>  
> -	if (spec->autocfg.dig_out_pin)
> +	if (spec->autocfg.dig_outs)
>  		spec->multiout.dig_out_nid = VT1708_DIGOUT_NID;
>  	if (spec->autocfg.dig_in_pin)
>  		spec->dig_in_nid = VT1708_DIGIN_NID;
> @@ -1841,7 +1841,7 @@ static int vt1709_parse_auto_config(struct hda_codec *codec)
>  
>  	spec->multiout.max_channels = spec->multiout.num_dacs * 2;
>  
> -	if (spec->autocfg.dig_out_pin)
> +	if (spec->autocfg.dig_outs)
>  		spec->multiout.dig_out_nid = VT1709_DIGOUT_NID;
>  	if (spec->autocfg.dig_in_pin)
>  		spec->dig_in_nid = VT1709_DIGIN_NID;
> @@ -2385,7 +2385,7 @@ static int vt1708B_parse_auto_config(struct hda_codec *codec)
>  
>  	spec->multiout.max_channels = spec->multiout.num_dacs * 2;
>  
> -	if (spec->autocfg.dig_out_pin)
> +	if (spec->autocfg.dig_outs)
>  		spec->multiout.dig_out_nid = VT1708B_DIGOUT_NID;
>  	if (spec->autocfg.dig_in_pin)
>  		spec->dig_in_nid = VT1708B_DIGIN_NID;
> @@ -2850,7 +2850,7 @@ static int vt1708S_parse_auto_config(struct hda_codec *codec)
>  
>  	spec->multiout.max_channels = spec->multiout.num_dacs * 2;
>  
> -	if (spec->autocfg.dig_out_pin)
> +	if (spec->autocfg.dig_outs)
>  		spec->multiout.dig_out_nid = VT1708S_DIGOUT_NID;
>  
>  	spec->extra_dig_out_nid = 0x15;
> @@ -3169,7 +3169,7 @@ static int vt1702_parse_auto_config(struct hda_codec *codec)
>  
>  	spec->multiout.max_channels = spec->multiout.num_dacs * 2;
>  
> -	if (spec->autocfg.dig_out_pin)
> +	if (spec->autocfg.dig_outs)
>  		spec->multiout.dig_out_nid = VT1702_DIGOUT_NID;
>  
>  	spec->extra_dig_out_nid = 0x1B;
> 


More information about the Alsa-devel mailing list