diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-10-16 14:59:10 -0700 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2007-10-16 14:59:10 -0700 |
commit | ef94e12ccb4e1ed5ae430cd499f5fb04122be522 (patch) | |
tree | 319204bc3085c7a556ca1187675acfc057ac7ccf | |
parent | c3f429e3bb295586c7516f8f3f8a1a2ab38ff254 (diff) | |
download | mediapointer-dvb-s2-ef94e12ccb4e1ed5ae430cd499f5fb04122be522.tar.gz mediapointer-dvb-s2-ef94e12ccb4e1ed5ae430cd499f5fb04122be522.tar.bz2 |
Backport kernel commit a5ce88909d3007caa7b65996a8f6784350beb2a6
kernel-sync:
ALSA HG commit 5194
Date: Mon, 23 Jul 2007 13:42:26 +0000 (+0200)
Clean up with common snd_ctl_boolean_*_info callbacks
Clean up codes using the new common snd_ctl_boolean_*_info() callbacks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r-- | linux/sound/pci/bt87x.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/linux/sound/pci/bt87x.c b/linux/sound/pci/bt87x.c index 40290e0c7..3f2047e84 100644 --- a/linux/sound/pci/bt87x.c +++ b/linux/sound/pci/bt87x.c @@ -39,6 +39,17 @@ /* From linux/pch_ids.h, appeared in 2.6.14 */ #define PCI_DEVICE_ID_BROOKTREE_879 0x0879 #endif +#ifdef COMPAT_SND_CTL_BOOLEAN_MONO +static int snd_ctl_boolean_mono_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; + uinfo->count = 1; + uinfo->value.integer.min = 0; + uinfo->value.integer.max = 1; + return 0; +} +#endif MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>"); MODULE_DESCRIPTION("Brooktree Bt87x audio driver"); @@ -586,15 +597,7 @@ static struct snd_kcontrol_new snd_bt87x_capture_volume = { .put = snd_bt87x_capture_volume_put, }; -static int snd_bt87x_capture_boost_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *info) -{ - info->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - info->count = 1; - info->value.integer.min = 0; - info->value.integer.max = 1; - return 0; -} +#define snd_bt87x_capture_boost_info snd_ctl_boolean_mono_info static int snd_bt87x_capture_boost_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *value) |