aboutsummaryrefslogtreecommitdiffstats
path: root/sound/aoa
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/aoa
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/aoa')
-rw-r--r--sound/aoa/codecs/snd-aoa-codec-onyx.c20
-rw-r--r--sound/aoa/codecs/snd-aoa-codec-tas.c20
-rw-r--r--sound/aoa/fabrics/snd-aoa-fabric-layout.c10
3 files changed, 5 insertions, 45 deletions
diff --git a/sound/aoa/codecs/snd-aoa-codec-onyx.c b/sound/aoa/codecs/snd-aoa-codec-onyx.c
index 028852374f21..71e3f9360658 100644
--- a/sound/aoa/codecs/snd-aoa-codec-onyx.c
+++ b/sound/aoa/codecs/snd-aoa-codec-onyx.c
@@ -297,15 +297,7 @@ static struct snd_kcontrol_new capture_source_control = {
297 .put = onyx_snd_capture_source_put, 297 .put = onyx_snd_capture_source_put,
298}; 298};
299 299
300static int onyx_snd_mute_info(struct snd_kcontrol *kcontrol, 300#define onyx_snd_mute_info snd_ctl_boolean_stereo_info
301 struct snd_ctl_elem_info *uinfo)
302{
303 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
304 uinfo->count = 2;
305 uinfo->value.integer.min = 0;
306 uinfo->value.integer.max = 1;
307 return 0;
308}
309 301
310static int onyx_snd_mute_get(struct snd_kcontrol *kcontrol, 302static int onyx_snd_mute_get(struct snd_kcontrol *kcontrol,
311 struct snd_ctl_elem_value *ucontrol) 303 struct snd_ctl_elem_value *ucontrol)
@@ -359,15 +351,7 @@ static struct snd_kcontrol_new mute_control = {
359}; 351};
360 352
361 353
362static int onyx_snd_single_bit_info(struct snd_kcontrol *kcontrol, 354#define onyx_snd_single_bit_info snd_ctl_boolean_mono_info
363 struct snd_ctl_elem_info *uinfo)
364{
365 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
366 uinfo->count = 1;
367 uinfo->value.integer.min = 0;
368 uinfo->value.integer.max = 1;
369 return 0;
370}
371 355
372#define FLAG_POLARITY_INVERT 1 356#define FLAG_POLARITY_INVERT 1
373#define FLAG_SPDIFLOCK 2 357#define FLAG_SPDIFLOCK 2
diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.c b/sound/aoa/codecs/snd-aoa-codec-tas.c
index 3cbfe4619aa8..70c341684794 100644
--- a/sound/aoa/codecs/snd-aoa-codec-tas.c
+++ b/sound/aoa/codecs/snd-aoa-codec-tas.c
@@ -272,15 +272,7 @@ static struct snd_kcontrol_new volume_control = {
272 .put = tas_snd_vol_put, 272 .put = tas_snd_vol_put,
273}; 273};
274 274
275static int tas_snd_mute_info(struct snd_kcontrol *kcontrol, 275#define tas_snd_mute_info snd_ctl_boolean_stereo_info
276 struct snd_ctl_elem_info *uinfo)
277{
278 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
279 uinfo->count = 2;
280 uinfo->value.integer.min = 0;
281 uinfo->value.integer.max = 1;
282 return 0;
283}
284 276
285static int tas_snd_mute_get(struct snd_kcontrol *kcontrol, 277static int tas_snd_mute_get(struct snd_kcontrol *kcontrol,
286 struct snd_ctl_elem_value *ucontrol) 278 struct snd_ctl_elem_value *ucontrol)
@@ -431,15 +423,7 @@ static struct snd_kcontrol_new drc_range_control = {
431 .put = tas_snd_drc_range_put, 423 .put = tas_snd_drc_range_put,
432}; 424};
433 425
434static int tas_snd_drc_switch_info(struct snd_kcontrol *kcontrol, 426#define tas_snd_drc_switch_info snd_ctl_boolean_mono_info
435 struct snd_ctl_elem_info *uinfo)
436{
437 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
438 uinfo->count = 1;
439 uinfo->value.integer.min = 0;
440 uinfo->value.integer.max = 1;
441 return 0;
442}
443 427
444static int tas_snd_drc_switch_get(struct snd_kcontrol *kcontrol, 428static int tas_snd_drc_switch_get(struct snd_kcontrol *kcontrol,
445 struct snd_ctl_elem_value *ucontrol) 429 struct snd_ctl_elem_value *ucontrol)
diff --git a/sound/aoa/fabrics/snd-aoa-fabric-layout.c b/sound/aoa/fabrics/snd-aoa-fabric-layout.c
index 98806283d1b2..8b2ba99d7f8a 100644
--- a/sound/aoa/fabrics/snd-aoa-fabric-layout.c
+++ b/sound/aoa/fabrics/snd-aoa-fabric-layout.c
@@ -582,15 +582,7 @@ static int layouts_list_items;
582 * make the fabric handle all the card stuff, etc... */ 582 * make the fabric handle all the card stuff, etc... */
583static struct layout_dev *layout_device; 583static struct layout_dev *layout_device;
584 584
585static int control_info(struct snd_kcontrol *kcontrol, 585#define control_info snd_ctl_boolean_mono_info
586 struct snd_ctl_elem_info *uinfo)
587{
588 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
589 uinfo->count = 1;
590 uinfo->value.integer.min = 0;
591 uinfo->value.integer.max = 1;
592 return 0;
593}
594 586
595#define AMP_CONTROL(n, description) \ 587#define AMP_CONTROL(n, description) \
596static int n##_control_get(struct snd_kcontrol *kcontrol, \ 588static int n##_control_get(struct snd_kcontrol *kcontrol, \