ALSA: hda - Unify input label creations in generic parser

There are a few places creating the labels and indices of kctls for
each input pin in the current generic parser code.  This is redundant
and makes harder to maintain.  Let's create the labels and indices at
once and keep them in hda_gen_spec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai
2013-01-18 10:17:30 +01:00
parent 9dba205b48
commit c970042c12
2 changed files with 56 additions and 37 deletions

View File

@@ -105,6 +105,8 @@ struct hda_gen_spec {
hda_nid_t adc_nids[AUTO_CFG_MAX_OUTS];
hda_nid_t dig_in_nid; /* digital-in NID; optional */
hda_nid_t mixer_nid; /* analog-mixer NID */
const char *input_labels[AUTO_CFG_MAX_OUTS];
int input_label_idxs[AUTO_CFG_MAX_OUTS];
/* capture setup for dynamic dual-adc switch */
hda_nid_t cur_adc;