summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_cirrus.c
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2009-11-11 13:43:01 +0100
committerTakashi Iwai <tiwai@suse.de>2009-11-16 11:35:14 +0100
commit3911a4c19e927738766003839aa447becbdbaa27 (patch)
tree7a9dc03cfc6776a57a6e459cd4efe5d8e16797cd /sound/pci/hda/patch_cirrus.c
parent2dca0bba70ce3c233be152e384580c134935332d (diff)
downloadop-kernel-dev-3911a4c19e927738766003839aa447becbdbaa27.zip
op-kernel-dev-3911a4c19e927738766003839aa447becbdbaa27.tar.gz
ALSA: hda - proc - introduce Control: lines to show mixer<->NID assignment
This is an initial patch to show universal control<->NID assigment in proc codec file. The change helps to debug codec related problems. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_cirrus.c')
-rw-r--r--sound/pci/hda/patch_cirrus.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index 8ba3068..9ac09e4 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -500,7 +500,7 @@ static int add_mute(struct hda_codec *codec, const char *name, int index,
knew.private_value = pval;
snprintf(tmp, sizeof(tmp), "%s %s Switch", name, dir_sfx[dir]);
*kctlp = snd_ctl_new1(&knew, codec);
- return snd_hda_ctl_add(codec, *kctlp);
+ return snd_hda_ctl_add(codec, get_amp_nid_(pval), *kctlp);
}
static int add_volume(struct hda_codec *codec, const char *name,
@@ -513,7 +513,7 @@ static int add_volume(struct hda_codec *codec, const char *name,
knew.private_value = pval;
snprintf(tmp, sizeof(tmp), "%s %s Volume", name, dir_sfx[dir]);
*kctlp = snd_ctl_new1(&knew, codec);
- return snd_hda_ctl_add(codec, *kctlp);
+ return snd_hda_ctl_add(codec, get_amp_nid_(pval), *kctlp);
}
static void fix_volume_caps(struct hda_codec *codec, hda_nid_t dac)
@@ -536,14 +536,14 @@ static int add_vmaster(struct hda_codec *codec, hda_nid_t dac)
spec->vmaster_sw =
snd_ctl_make_virtual_master("Master Playback Switch", NULL);
- err = snd_hda_ctl_add(codec, spec->vmaster_sw);
+ err = snd_hda_ctl_add(codec, dac, spec->vmaster_sw);
if (err < 0)
return err;
snd_hda_set_vmaster_tlv(codec, dac, HDA_OUTPUT, tlv);
spec->vmaster_vol =
snd_ctl_make_virtual_master("Master Playback Volume", tlv);
- err = snd_hda_ctl_add(codec, spec->vmaster_vol);
+ err = snd_hda_ctl_add(codec, dac, spec->vmaster_vol);
if (err < 0)
return err;
return 0;
@@ -756,13 +756,13 @@ static int build_input(struct hda_codec *codec)
if (!kctl)
return -ENOMEM;
kctl->private_value = (long)spec->capture_bind[i];
- err = snd_hda_ctl_add(codec, kctl);
+ err = snd_hda_ctl_add(codec, 0, kctl);
if (err < 0)
return err;
}
if (spec->num_inputs > 1 && !spec->mic_detect) {
- err = snd_hda_ctl_add(codec,
+ err = snd_hda_ctl_add(codec, 0,
snd_ctl_new1(&cs_capture_source, codec));
if (err < 0)
return err;
OpenPOWER on IntegriCloud