[alsa-devel] [PATCH 2/2] hda: Mono mux mixer support

Takashi Iwai tiwai at suse.de
Mon Jan 21 18:17:55 CET 2008


At Mon, 21 Jan 2008 12:12:38 -0500,
Matthew Ranostay wrote:
> 
> @@ -2318,6 +2362,35 @@ static int stac92xx_auto_create_hp_ctls(
>  	return 0;
>  }
>  
> +/* labels for mono mux outputs */
> +static const char *stac92xx_mono_labels[3] = {
> +	"DAC0", "DAC1", "Mixer"
> +};
> +
> +/* create mono mux for mono out on capable codecs */
> +static int stac92xx_auto_create_mono_output_ctls(struct hda_codec *codec)
> +{
> +	struct sigmatel_spec *spec = codec->spec;
> +	struct hda_input_mux *mono_mux = &spec->private_mono_mux;
> +	int i, num_cons;
> +	hda_nid_t con_lst[HDA_MAX_NUM_INPUTS];

Make this con_lst[ARRAY_SIZE(stac92xx_mono_labsl)] and

> +
> +	num_cons = snd_hda_get_connections(codec,
> +				spec->mono_nid,
> +				con_lst,
> +				HDA_MAX_NUM_INPUTS);

Pass ARRAY_SIZE(con_lst) here.  So that it won't be over the size of
the label array.


thanks,

Takashi


More information about the Alsa-devel mailing list