At Mon, 21 Jan 2008 13:50:45 -0500, Matthew Ranostay wrote:
Takashi Iwai wrote:
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
Done.
- 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.
Done. Maybe someday I'll remember of the 'ARRAY_SIZE' function without being reminded :)
thanks,
Takashi
Add support for the mono mux on several 92HD7xxx codecs. Creates a dynamic mixer for the mux selection.
Signed-off-by: Matthew Ranostay mranostay@embeddedalley.com
Applied to HG tree now. Thanks.
Takashi