aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712/aureon.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/ice1712/aureon.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/ice1712/aureon.c')
-rw-r--r--sound/pci/ice1712/aureon.c45
1 files changed, 10 insertions, 35 deletions
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c
index 66bacde1ead3..ec0699c89952 100644
--- a/sound/pci/ice1712/aureon.c
+++ b/sound/pci/ice1712/aureon.c
@@ -394,7 +394,7 @@ static int aureon_ac97_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_ele
394/* 394/*
395 * AC'97 mute controls 395 * AC'97 mute controls
396 */ 396 */
397#define aureon_ac97_mute_info aureon_mono_bool_info 397#define aureon_ac97_mute_info snd_ctl_boolean_mono_info
398 398
399static int aureon_ac97_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 399static int aureon_ac97_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
400{ 400{
@@ -430,7 +430,7 @@ static int aureon_ac97_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el
430/* 430/*
431 * AC'97 mute controls 431 * AC'97 mute controls
432 */ 432 */
433#define aureon_ac97_micboost_info aureon_mono_bool_info 433#define aureon_ac97_micboost_info snd_ctl_boolean_mono_info
434 434
435static int aureon_ac97_micboost_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 435static int aureon_ac97_micboost_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
436{ 436{
@@ -621,19 +621,12 @@ static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val)
621 621
622/* 622/*
623 */ 623 */
624static int aureon_mono_bool_info(struct snd_kcontrol *k, struct snd_ctl_elem_info *uinfo) 624#define aureon_mono_bool_info snd_ctl_boolean_mono_info
625{
626 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
627 uinfo->count = 1;
628 uinfo->value.integer.min = 0;
629 uinfo->value.integer.max = 1;
630 return 0;
631}
632 625
633/* 626/*
634 * AC'97 master playback mute controls (Mute on WM8770 chip) 627 * AC'97 master playback mute controls (Mute on WM8770 chip)
635 */ 628 */
636#define aureon_ac97_mmute_info aureon_mono_bool_info 629#define aureon_ac97_mmute_info snd_ctl_boolean_mono_info
637 630
638static int aureon_ac97_mmute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 631static int aureon_ac97_mmute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
639{ 632{
@@ -708,7 +701,7 @@ static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index, unsigned sho
708/* 701/*
709 * DAC mute control 702 * DAC mute control
710 */ 703 */
711#define wm_pcm_mute_info aureon_mono_bool_info 704#define wm_pcm_mute_info snd_ctl_boolean_mono_info
712 705
713static int wm_pcm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 706static int wm_pcm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
714{ 707{
@@ -879,13 +872,7 @@ static int wm_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value
879/* 872/*
880 * WM8770 master mute control 873 * WM8770 master mute control
881 */ 874 */
882static int wm_master_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { 875#define wm_master_mute_info snd_ctl_boolean_stereo_info
883 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
884 uinfo->count = 2;
885 uinfo->value.integer.min = 0;
886 uinfo->value.integer.max = 1;
887 return 0;
888}
889 876
890static int wm_master_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 877static int wm_master_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
891{ 878{
@@ -969,14 +956,7 @@ static int wm_pcm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val
969/* 956/*
970 * ADC mute control 957 * ADC mute control
971 */ 958 */
972static int wm_adc_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 959#define wm_adc_mute_info snd_ctl_boolean_stereo_info
973{
974 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
975 uinfo->count = 2;
976 uinfo->value.integer.min = 0;
977 uinfo->value.integer.max = 1;
978 return 0;
979}
980 960
981static int wm_adc_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 961static int wm_adc_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
982{ 962{
@@ -1210,12 +1190,7 @@ static int aureon_cs8415_rate_get (struct snd_kcontrol *kcontrol, struct snd_ctl
1210/* 1190/*
1211 * CS8415A Mute 1191 * CS8415A Mute
1212 */ 1192 */
1213static int aureon_cs8415_mute_info (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1193#define aureon_cs8415_mute_info snd_ctl_boolean_mono_info
1214{
1215 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1216 uinfo->count = 1;
1217 return 0;
1218}
1219 1194
1220static int aureon_cs8415_mute_get (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1195static int aureon_cs8415_mute_get (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1221{ 1196{
@@ -1316,7 +1291,7 @@ static int aureon_get_headphone_amp(struct snd_ice1712 *ice)
1316 return ( tmp & AUREON_HP_SEL )!= 0; 1291 return ( tmp & AUREON_HP_SEL )!= 0;
1317} 1292}
1318 1293
1319#define aureon_hpamp_info aureon_mono_bool_info 1294#define aureon_hpamp_info snd_ctl_boolean_mono_info
1320 1295
1321static int aureon_hpamp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1296static int aureon_hpamp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1322{ 1297{
@@ -1338,7 +1313,7 @@ static int aureon_hpamp_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_v
1338 * Deemphasis 1313 * Deemphasis
1339 */ 1314 */
1340 1315
1341#define aureon_deemp_info aureon_mono_bool_info 1316#define aureon_deemp_info snd_ctl_boolean_mono_info
1342 1317
1343static int aureon_deemp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1318static int aureon_deemp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1344{ 1319{