aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_cirrus.c
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2009-12-10 07:57:01 -0500
committerJaroslav Kysela <perex@perex.cz>2009-12-15 03:33:32 -0500
commit5e26dfd0615868872cb44842f1e1428c7b414ab0 (patch)
tree75472db826d948edde152969045a819653ac54b3 /sound/pci/hda/patch_cirrus.c
parent9e3fd8719f624a43575b56a4777b1552399a8be8 (diff)
ALSA: hda - simplify usage of HDA_SUBDEV_AMP_FLAG
The HDA_SUBDEV_NID_FLAG is duplicate for amplifier control elements. Move get_amp_nid_() call to the snd_hda_ctl_add() function. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda/patch_cirrus.c')
-rw-r--r--sound/pci/hda/patch_cirrus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index e51f6658aa2..eeb91f6a06c 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -501,7 +501,7 @@ static int add_mute(struct hda_codec *codec, const char *name, int index,
501 snprintf(tmp, sizeof(tmp), "%s %s Switch", name, dir_sfx[dir]); 501 snprintf(tmp, sizeof(tmp), "%s %s Switch", name, dir_sfx[dir]);
502 *kctlp = snd_ctl_new1(&knew, codec); 502 *kctlp = snd_ctl_new1(&knew, codec);
503 (*kctlp)->id.subdevice = HDA_SUBDEV_AMP_FLAG; 503 (*kctlp)->id.subdevice = HDA_SUBDEV_AMP_FLAG;
504 return snd_hda_ctl_add(codec, get_amp_nid_(pval), *kctlp); 504 return snd_hda_ctl_add(codec, 0, *kctlp);
505} 505}
506 506
507static int add_volume(struct hda_codec *codec, const char *name, 507static int add_volume(struct hda_codec *codec, const char *name,
@@ -515,7 +515,7 @@ static int add_volume(struct hda_codec *codec, const char *name,
515 snprintf(tmp, sizeof(tmp), "%s %s Volume", name, dir_sfx[dir]); 515 snprintf(tmp, sizeof(tmp), "%s %s Volume", name, dir_sfx[dir]);
516 *kctlp = snd_ctl_new1(&knew, codec); 516 *kctlp = snd_ctl_new1(&knew, codec);
517 (*kctlp)->id.subdevice = HDA_SUBDEV_AMP_FLAG; 517 (*kctlp)->id.subdevice = HDA_SUBDEV_AMP_FLAG;
518 return snd_hda_ctl_add(codec, get_amp_nid_(pval), *kctlp); 518 return snd_hda_ctl_add(codec, 0, *kctlp);
519} 519}
520 520
521static void fix_volume_caps(struct hda_codec *codec, hda_nid_t dac) 521static void fix_volume_caps(struct hda_codec *codec, hda_nid_t dac)