diff options
author | Jaroslav Kysela <perex@perex.cz> | 2009-11-12 04:15:48 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-16 05:35:19 -0500 |
commit | 4d02d1b638af580ae3d69367248539a8b3893064 (patch) | |
tree | 2e3deb96c2fcd98e83644b816d1ae7294f67b05e /sound/pci/hda/hda_codec.c | |
parent | 3911a4c19e927738766003839aa447becbdbaa27 (diff) |
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>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 1ed1d88e1834..d71e651046eb 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1523,6 +1523,11 @@ int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid, | |||
1523 | int err; | 1523 | int err; |
1524 | struct hda_nid_item *item; | 1524 | struct hda_nid_item *item; |
1525 | 1525 | ||
1526 | if (kctl->id.subdevice & (1<<31)) { | ||
1527 | if (nid == 0) | ||
1528 | nid = kctl->id.subdevice & 0xffff; | ||
1529 | kctl->id.subdevice = 0; | ||
1530 | } | ||
1526 | err = snd_ctl_add(codec->bus->card, kctl); | 1531 | err = snd_ctl_add(codec->bus->card, kctl); |
1527 | if (err < 0) | 1532 | if (err < 0) |
1528 | return err; | 1533 | return err; |
@@ -3160,7 +3165,7 @@ EXPORT_SYMBOL_HDA(snd_hda_check_board_codec_sid_config); | |||
3160 | */ | 3165 | */ |
3161 | int snd_hda_add_new_ctls(struct hda_codec *codec, struct snd_kcontrol_new *knew) | 3166 | int snd_hda_add_new_ctls(struct hda_codec *codec, struct snd_kcontrol_new *knew) |
3162 | { | 3167 | { |
3163 | int err; | 3168 | int err; |
3164 | 3169 | ||
3165 | for (; knew->name; knew++) { | 3170 | for (; knew->name; knew++) { |
3166 | struct snd_kcontrol *kctl; | 3171 | struct snd_kcontrol *kctl; |