diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2011-01-10 16:25:44 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-01-10 16:46:53 +0100 |
commit | 9600732b6caba595f34acf2abd930098ec9a0b2b (patch) | |
tree | 7474e1b11894623186a2acd47a388aa87fdd002e /sound/pci/oxygen/xonar_cs43xx.c | |
parent | b532d6b8d3aa163e1dc143bc729e9ee92f75baf5 (diff) | |
download | kernel_goldelico_gta04-9600732b6caba595f34acf2abd930098ec9a0b2b.zip kernel_goldelico_gta04-9600732b6caba595f34acf2abd930098ec9a0b2b.tar.gz kernel_goldelico_gta04-9600732b6caba595f34acf2abd930098ec9a0b2b.tar.bz2 |
ALSA: core, oxygen, virtuoso: add an enum control info helper
Introduce the helper function snd_ctl_enum_info() to fill out the
elem_info fields for an enumerated control.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/oxygen/xonar_cs43xx.c')
-rw-r--r-- | sound/pci/oxygen/xonar_cs43xx.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sound/pci/oxygen/xonar_cs43xx.c b/sound/pci/oxygen/xonar_cs43xx.c index 55c52c7..9f72d42 100644 --- a/sound/pci/oxygen/xonar_cs43xx.c +++ b/sound/pci/oxygen/xonar_cs43xx.c @@ -298,13 +298,7 @@ static int rolloff_info(struct snd_kcontrol *ctl, "Fast Roll-off", "Slow Roll-off" }; - info->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; - info->count = 1; - info->value.enumerated.items = 2; - if (info->value.enumerated.item >= 2) - info->value.enumerated.item = 1; - strcpy(info->value.enumerated.name, names[info->value.enumerated.item]); - return 0; + return snd_ctl_enum_info(info, 1, 2, names); } static int rolloff_get(struct snd_kcontrol *ctl, |