ALSA: hda - proc - add support for dynamic controls to mixer<->NID mapping

This patch adds support for dynamically created controls to proc codec file
(Control: lines).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Jaroslav Kysela
2009-11-12 10:15:48 +01:00
committed by Takashi Iwai
parent 3911a4c19e
commit 4d02d1b638
6 changed files with 22 additions and 4 deletions

View File

@@ -2571,6 +2571,8 @@ static int add_control(struct ad198x_spec *spec, int type, const char *name,
knew->name = kstrdup(name, GFP_KERNEL);
if (! knew->name)
return -ENOMEM;
if (get_amp_nid_(val))
knew->subdevice = (1<<31)|get_amp_nid_(val);
knew->private_value = val;
return 0;
}