diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-07-23 09:42:26 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 09:57:45 -0400 |
commit | a5ce88909d3007caa7b65996a8f6784350beb2a6 (patch) | |
tree | e9882165ba7f7fe88dd8de817028edefadb0d496 /sound/drivers | |
parent | b9ed4f2b68dc47b0c35c1a3ae8ae97c2517d5177 (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/drivers')
-rw-r--r-- | sound/drivers/dummy.c | 10 | ||||
-rw-r--r-- | sound/drivers/mts64.c | 10 | ||||
-rw-r--r-- | sound/drivers/vx/vx_mixer.c | 18 |
3 files changed, 4 insertions, 34 deletions
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index 4360ae9de19c..77bca5fdda50 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c | |||
@@ -510,15 +510,7 @@ static const DECLARE_TLV_DB_SCALE(db_scale_dummy, -4500, 30, 0); | |||
510 | .get = snd_dummy_capsrc_get, .put = snd_dummy_capsrc_put, \ | 510 | .get = snd_dummy_capsrc_get, .put = snd_dummy_capsrc_put, \ |
511 | .private_value = addr } | 511 | .private_value = addr } |
512 | 512 | ||
513 | static int snd_dummy_capsrc_info(struct snd_kcontrol *kcontrol, | 513 | #define snd_dummy_capsrc_info snd_ctl_boolean_stereo_info |
514 | struct snd_ctl_elem_info *uinfo) | ||
515 | { | ||
516 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
517 | uinfo->count = 2; | ||
518 | uinfo->value.integer.min = 0; | ||
519 | uinfo->value.integer.max = 1; | ||
520 | return 0; | ||
521 | } | ||
522 | 514 | ||
523 | static int snd_dummy_capsrc_get(struct snd_kcontrol *kcontrol, | 515 | static int snd_dummy_capsrc_get(struct snd_kcontrol *kcontrol, |
524 | struct snd_ctl_elem_value *ucontrol) | 516 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c index 2025db5947ae..911c159bb3d3 100644 --- a/sound/drivers/mts64.c +++ b/sound/drivers/mts64.c | |||
@@ -440,15 +440,7 @@ static void mts64_write_midi(struct mts64 *mts, u8 c, | |||
440 | *********************************************************************/ | 440 | *********************************************************************/ |
441 | 441 | ||
442 | /* SMPTE Switch */ | 442 | /* SMPTE Switch */ |
443 | static int snd_mts64_ctl_smpte_switch_info(struct snd_kcontrol *kctl, | 443 | #define snd_mts64_ctl_smpte_switch_info snd_ctl_boolean_mono_info |
444 | struct snd_ctl_elem_info *uinfo) | ||
445 | { | ||
446 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
447 | uinfo->count = 1; | ||
448 | uinfo->value.integer.min = 0; | ||
449 | uinfo->value.integer.max = 1; | ||
450 | return 0; | ||
451 | } | ||
452 | 444 | ||
453 | static int snd_mts64_ctl_smpte_switch_get(struct snd_kcontrol* kctl, | 445 | static int snd_mts64_ctl_smpte_switch_get(struct snd_kcontrol* kctl, |
454 | struct snd_ctl_elem_value *uctl) | 446 | struct snd_ctl_elem_value *uctl) |
diff --git a/sound/drivers/vx/vx_mixer.c b/sound/drivers/vx/vx_mixer.c index f63152a6a223..b8fcd79a7e11 100644 --- a/sound/drivers/vx/vx_mixer.c +++ b/sound/drivers/vx/vx_mixer.c | |||
@@ -647,14 +647,7 @@ static int vx_audio_monitor_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el | |||
647 | return 0; | 647 | return 0; |
648 | } | 648 | } |
649 | 649 | ||
650 | static int vx_audio_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 650 | #define vx_audio_sw_info snd_ctl_boolean_stereo_info |
651 | { | ||
652 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
653 | uinfo->count = 2; | ||
654 | uinfo->value.integer.min = 0; | ||
655 | uinfo->value.integer.max = 1; | ||
656 | return 0; | ||
657 | } | ||
658 | 651 | ||
659 | static int vx_audio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 652 | static int vx_audio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
660 | { | 653 | { |
@@ -865,14 +858,7 @@ static int vx_peak_meter_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_ | |||
865 | return 0; | 858 | return 0; |
866 | } | 859 | } |
867 | 860 | ||
868 | static int vx_saturation_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 861 | #define vx_saturation_info snd_ctl_boolean_stereo_info |
869 | { | ||
870 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
871 | uinfo->count = 2; | ||
872 | uinfo->value.integer.min = 0; | ||
873 | uinfo->value.integer.max = 1; | ||
874 | return 0; | ||
875 | } | ||
876 | 862 | ||
877 | static int vx_saturation_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 863 | static int vx_saturation_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
878 | { | 864 | { |