aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-07-23 09:42:26 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:57:45 -0400
commita5ce88909d3007caa7b65996a8f6784350beb2a6 (patch)
treee9882165ba7f7fe88dd8de817028edefadb0d496 /sound/pci/echoaudio
parentb9ed4f2b68dc47b0c35c1a3ae8ae97c2517d5177 (diff)
[ALSA] 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>
Diffstat (limited to 'sound/pci/echoaudio')
-rw-r--r--sound/pci/echoaudio/echoaudio.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index f27b6a733b96..499ee1a5319d 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -1595,15 +1595,7 @@ static struct snd_kcontrol_new snd_echo_clock_source_switch __devinitdata = {
1595#ifdef ECHOCARD_HAS_PHANTOM_POWER 1595#ifdef ECHOCARD_HAS_PHANTOM_POWER
1596 1596
1597/******************* Phantom power switch *******************/ 1597/******************* Phantom power switch *******************/
1598static int snd_echo_phantom_power_info(struct snd_kcontrol *kcontrol, 1598#define snd_echo_phantom_power_info snd_ctl_boolean_mono_info
1599 struct snd_ctl_elem_info *uinfo)
1600{
1601 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1602 uinfo->count = 1;
1603 uinfo->value.integer.min = 0;
1604 uinfo->value.integer.max = 1;
1605 return 0;
1606}
1607 1599
1608static int snd_echo_phantom_power_get(struct snd_kcontrol *kcontrol, 1600static int snd_echo_phantom_power_get(struct snd_kcontrol *kcontrol,
1609 struct snd_ctl_elem_value *ucontrol) 1601 struct snd_ctl_elem_value *ucontrol)
@@ -1646,15 +1638,7 @@ static struct snd_kcontrol_new snd_echo_phantom_power_switch __devinitdata = {
1646#ifdef ECHOCARD_HAS_DIGITAL_IN_AUTOMUTE 1638#ifdef ECHOCARD_HAS_DIGITAL_IN_AUTOMUTE
1647 1639
1648/******************* Digital input automute switch *******************/ 1640/******************* Digital input automute switch *******************/
1649static int snd_echo_automute_info(struct snd_kcontrol *kcontrol, 1641#define snd_echo_automute_info snd_ctl_boolean_mono_info
1650 struct snd_ctl_elem_info *uinfo)
1651{
1652 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1653 uinfo->count = 1;
1654 uinfo->value.integer.min = 0;
1655 uinfo->value.integer.max = 1;
1656 return 0;
1657}
1658 1642
1659static int snd_echo_automute_get(struct snd_kcontrol *kcontrol, 1643static int snd_echo_automute_get(struct snd_kcontrol *kcontrol,
1660 struct snd_ctl_elem_value *ucontrol) 1644 struct snd_ctl_elem_value *ucontrol)
@@ -1695,18 +1679,7 @@ static struct snd_kcontrol_new snd_echo_automute_switch __devinitdata = {
1695 1679
1696 1680
1697/******************* VU-meters switch *******************/ 1681/******************* VU-meters switch *******************/
1698static int snd_echo_vumeters_switch_info(struct snd_kcontrol *kcontrol, 1682#define snd_echo_vumeters_switch_info snd_ctl_boolean_mono_info
1699 struct snd_ctl_elem_info *uinfo)
1700{
1701 struct echoaudio *chip;
1702
1703 chip = snd_kcontrol_chip(kcontrol);
1704 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1705 uinfo->count = 1;
1706 uinfo->value.integer.min = 0;
1707 uinfo->value.integer.max = 1;
1708 return 0;
1709}
1710 1683
1711static int snd_echo_vumeters_switch_put(struct snd_kcontrol *kcontrol, 1684static int snd_echo_vumeters_switch_put(struct snd_kcontrol *kcontrol,
1712 struct snd_ctl_elem_value *ucontrol) 1685 struct snd_ctl_elem_value *ucontrol)