aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2009-12-10 13:57:01 +0100
committerJaroslav Kysela <perex@perex.cz>2009-12-15 09:33:32 +0100
commit5e26dfd0615868872cb44842f1e1428c7b414ab0 (patch)
tree75472db826d948edde152969045a819653ac54b3 /sound/pci/hda/patch_sigmatel.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_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 1ee586b65b6..0bafea9d510 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -2685,7 +2685,7 @@ static struct snd_kcontrol_new *
stac_control_new(struct sigmatel_spec *spec,
struct snd_kcontrol_new *ktemp,
const char *name,
- hda_nid_t nid)
+ unsigned int subdev)
{
struct snd_kcontrol_new *knew;
@@ -2701,9 +2701,7 @@ stac_control_new(struct sigmatel_spec *spec,
spec->kctls.alloced--;
return NULL;
}
- if (nid)
- knew->subdevice = HDA_SUBDEV_NID_FLAG |
- HDA_SUBDEV_AMP_FLAG | nid;
+ knew->subdevice = subdev;
return knew;
}
@@ -2713,7 +2711,7 @@ static int stac92xx_add_control_temp(struct sigmatel_spec *spec,
unsigned long val)
{
struct snd_kcontrol_new *knew = stac_control_new(spec, ktemp, name,
- get_amp_nid_(val));
+ HDA_SUBDEV_AMP_FLAG);
if (!knew)
return -ENOMEM;
knew->index = idx;