ALSA: hda - add more NID->Control mapping
This set of changes add missing NID values to some static control elemenents. Also, it handles all "Capture Source" or "Input Source" controls. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
@@ -61,18 +61,21 @@ static const char *get_wid_type_name(unsigned int wid_value)
|
||||
return "UNKNOWN Widget";
|
||||
}
|
||||
|
||||
static void print_nid_mixers(struct snd_info_buffer *buffer,
|
||||
struct hda_codec *codec, hda_nid_t nid)
|
||||
static void print_nid_array(struct snd_info_buffer *buffer,
|
||||
struct hda_codec *codec, hda_nid_t nid,
|
||||
struct snd_array *array)
|
||||
{
|
||||
int i;
|
||||
struct hda_nid_item *items = codec->mixers.list;
|
||||
struct hda_nid_item *items = array->list, *item;
|
||||
struct snd_kcontrol *kctl;
|
||||
for (i = 0; i < codec->mixers.used; i++) {
|
||||
if (items[i].nid == nid) {
|
||||
kctl = items[i].kctl;
|
||||
for (i = 0; i < array->used; i++) {
|
||||
item = &items[i];
|
||||
if (item->nid == nid) {
|
||||
kctl = item->kctl;
|
||||
snd_iprintf(buffer,
|
||||
" Control: name=\"%s\", index=%i, device=%i\n",
|
||||
kctl->id.name, kctl->id.index, kctl->id.device);
|
||||
kctl->id.name, kctl->id.index + item->index,
|
||||
kctl->id.device);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -528,7 +531,8 @@ static void print_gpio(struct snd_info_buffer *buffer,
|
||||
(data & (1<<i)) ? 1 : 0,
|
||||
(unsol & (1<<i)) ? 1 : 0);
|
||||
/* FIXME: add GPO and GPI pin information */
|
||||
print_nid_mixers(buffer, codec, nid);
|
||||
print_nid_array(buffer, codec, nid, &codec->mixers);
|
||||
print_nid_array(buffer, codec, nid, &codec->nids);
|
||||
}
|
||||
|
||||
static void print_codec_info(struct snd_info_entry *entry,
|
||||
@@ -608,7 +612,8 @@ static void print_codec_info(struct snd_info_entry *entry,
|
||||
snd_iprintf(buffer, " CP");
|
||||
snd_iprintf(buffer, "\n");
|
||||
|
||||
print_nid_mixers(buffer, codec, nid);
|
||||
print_nid_array(buffer, codec, nid, &codec->mixers);
|
||||
print_nid_array(buffer, codec, nid, &codec->nids);
|
||||
print_nid_pcms(buffer, codec, nid);
|
||||
|
||||
/* volume knob is a special widget that always have connection
|
||||
|
Reference in New Issue
Block a user