aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/rme9652/rme9652.c
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/rme9652/rme9652.c
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/rme9652/rme9652.c')
-rw-r--r--sound/pci/rme9652/rme9652.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c
index 2de27405a0b..34f96f12e5b 100644
--- a/sound/pci/rme9652/rme9652.c
+++ b/sound/pci/rme9652/rme9652.c
@@ -1067,14 +1067,7 @@ static int rme9652_set_spdif_output(struct snd_rme9652 *rme9652, int out)
1067 return 0; 1067 return 0;
1068} 1068}
1069 1069
1070static int snd_rme9652_info_spdif_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1070#define snd_rme9652_info_spdif_out snd_ctl_boolean_mono_info
1071{
1072 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1073 uinfo->count = 1;
1074 uinfo->value.integer.min = 0;
1075 uinfo->value.integer.max = 1;
1076 return 0;
1077}
1078 1071
1079static int snd_rme9652_get_spdif_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1072static int snd_rme9652_get_spdif_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1080{ 1073{
@@ -1338,14 +1331,7 @@ static int snd_rme9652_put_thru(struct snd_kcontrol *kcontrol, struct snd_ctl_el
1338 .put = snd_rme9652_put_passthru, \ 1331 .put = snd_rme9652_put_passthru, \
1339 .get = snd_rme9652_get_passthru } 1332 .get = snd_rme9652_get_passthru }
1340 1333
1341static int snd_rme9652_info_passthru(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1334#define snd_rme9652_info_passthru snd_ctl_boolean_mono_info
1342{
1343 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1344 uinfo->count = 1;
1345 uinfo->value.integer.min = 0;
1346 uinfo->value.integer.max = 1;
1347 return 0;
1348}
1349 1335
1350static int snd_rme9652_get_passthru(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1336static int snd_rme9652_get_passthru(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1351{ 1337{
@@ -1445,14 +1431,7 @@ static int snd_rme9652_get_adat_sync(struct snd_kcontrol *kcontrol, struct snd_c
1445 .info = snd_rme9652_info_tc_valid, \ 1431 .info = snd_rme9652_info_tc_valid, \
1446 .get = snd_rme9652_get_tc_valid } 1432 .get = snd_rme9652_get_tc_valid }
1447 1433
1448static int snd_rme9652_info_tc_valid(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1434#define snd_rme9652_info_tc_valid snd_ctl_boolean_mono_info
1449{
1450 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1451 uinfo->count = 1;
1452 uinfo->value.integer.min = 0;
1453 uinfo->value.integer.max = 1;
1454 return 0;
1455}
1456 1435
1457static int snd_rme9652_get_tc_valid(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1436static int snd_rme9652_get_tc_valid(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1458{ 1437{