diff options
Diffstat (limited to 'sound/pci')
37 files changed, 92 insertions, 720 deletions
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 581ebba4d1a7..630c961895dc 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -1880,14 +1880,7 @@ static int patch_ad1981b(struct snd_ac97 *ac97) | |||
1880 | return 0; | 1880 | return 0; |
1881 | } | 1881 | } |
1882 | 1882 | ||
1883 | static int snd_ac97_ad1888_lohpsel_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 1883 | #define snd_ac97_ad1888_lohpsel_info snd_ctl_boolean_mono_info |
1884 | { | ||
1885 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1886 | uinfo->count = 1; | ||
1887 | uinfo->value.integer.min = 0; | ||
1888 | uinfo->value.integer.max = 1; | ||
1889 | return 0; | ||
1890 | } | ||
1891 | 1884 | ||
1892 | static int snd_ac97_ad1888_lohpsel_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 1885 | static int snd_ac97_ad1888_lohpsel_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1893 | { | 1886 | { |
@@ -2186,15 +2179,7 @@ static int patch_ad1985(struct snd_ac97 * ac97) | |||
2186 | return 0; | 2179 | return 0; |
2187 | } | 2180 | } |
2188 | 2181 | ||
2189 | static int snd_ac97_ad1986_bool_info(struct snd_kcontrol *kcontrol, | 2182 | #define snd_ac97_ad1986_bool_info snd_ctl_boolean_mono_info |
2190 | struct snd_ctl_elem_info *uinfo) | ||
2191 | { | ||
2192 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2193 | uinfo->count = 1; | ||
2194 | uinfo->value.integer.min = 0; | ||
2195 | uinfo->value.integer.max = 1; | ||
2196 | return 0; | ||
2197 | } | ||
2198 | 2183 | ||
2199 | static int snd_ac97_ad1986_lososel_get(struct snd_kcontrol *kcontrol, | 2184 | static int snd_ac97_ad1986_lososel_get(struct snd_kcontrol *kcontrol, |
2200 | struct snd_ctl_elem_value *ucontrol) | 2185 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index 05b4c8696941..4c2bd7adf674 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c | |||
@@ -1804,15 +1804,7 @@ static int __devinit snd_ali_build_pcms(struct snd_ali *codec) | |||
1804 | .info = snd_ali5451_spdif_info, .get = snd_ali5451_spdif_get, \ | 1804 | .info = snd_ali5451_spdif_info, .get = snd_ali5451_spdif_get, \ |
1805 | .put = snd_ali5451_spdif_put, .private_value = value} | 1805 | .put = snd_ali5451_spdif_put, .private_value = value} |
1806 | 1806 | ||
1807 | static int snd_ali5451_spdif_info(struct snd_kcontrol *kcontrol, | 1807 | #define snd_ali5451_spdif_info snd_ctl_boolean_mono_info |
1808 | struct snd_ctl_elem_info *uinfo) | ||
1809 | { | ||
1810 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1811 | uinfo->count = 1; | ||
1812 | uinfo->value.integer.min = 0; | ||
1813 | uinfo->value.integer.max = 1; | ||
1814 | return 0; | ||
1815 | } | ||
1816 | 1808 | ||
1817 | static int snd_ali5451_spdif_get(struct snd_kcontrol *kcontrol, | 1809 | static int snd_ali5451_spdif_get(struct snd_kcontrol *kcontrol, |
1818 | struct snd_ctl_elem_value *ucontrol) | 1810 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/au88x0/au88x0_eq.c b/sound/pci/au88x0/au88x0_eq.c index 0c86a31c4336..38602b85874d 100644 --- a/sound/pci/au88x0/au88x0_eq.c +++ b/sound/pci/au88x0/au88x0_eq.c | |||
@@ -728,15 +728,7 @@ static void vortex_Eqlzr_shutdown(vortex_t * vortex) | |||
728 | /* ALSA interface */ | 728 | /* ALSA interface */ |
729 | 729 | ||
730 | /* Control interface */ | 730 | /* Control interface */ |
731 | static int | 731 | #define snd_vortex_eqtoggle_info snd_ctl_boolean_mono_info |
732 | snd_vortex_eqtoggle_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | ||
733 | { | ||
734 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
735 | uinfo->count = 1; | ||
736 | uinfo->value.integer.min = 0; | ||
737 | uinfo->value.integer.max = 1; | ||
738 | return 0; | ||
739 | } | ||
740 | 732 | ||
741 | static int | 733 | static int |
742 | snd_vortex_eqtoggle_get(struct snd_kcontrol *kcontrol, | 734 | snd_vortex_eqtoggle_get(struct snd_kcontrol *kcontrol, |
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 131952f55857..f0e12985dc29 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -569,15 +569,7 @@ static struct snd_kcontrol_new snd_bt87x_capture_volume = { | |||
569 | .put = snd_bt87x_capture_volume_put, | 569 | .put = snd_bt87x_capture_volume_put, |
570 | }; | 570 | }; |
571 | 571 | ||
572 | static int snd_bt87x_capture_boost_info(struct snd_kcontrol *kcontrol, | 572 | #define snd_bt87x_capture_boost_info snd_ctl_boolean_mono_info |
573 | struct snd_ctl_elem_info *info) | ||
574 | { | ||
575 | info->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
576 | info->count = 1; | ||
577 | info->value.integer.min = 0; | ||
578 | info->value.integer.max = 1; | ||
579 | return 0; | ||
580 | } | ||
581 | 573 | ||
582 | static int snd_bt87x_capture_boost_get(struct snd_kcontrol *kcontrol, | 574 | static int snd_bt87x_capture_boost_get(struct snd_kcontrol *kcontrol, |
583 | struct snd_ctl_elem_value *value) | 575 | struct snd_ctl_elem_value *value) |
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index 9c3a9c8d1dc2..a135b9c4c3c8 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c | |||
@@ -77,15 +77,7 @@ | |||
77 | static const DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale1, -5175, 25, 1); | 77 | static const DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale1, -5175, 25, 1); |
78 | static const DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale2, -10350, 50, 1); | 78 | static const DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale2, -10350, 50, 1); |
79 | 79 | ||
80 | static int snd_ca0106_shared_spdif_info(struct snd_kcontrol *kcontrol, | 80 | #define snd_ca0106_shared_spdif_info snd_ctl_boolean_mono_info |
81 | struct snd_ctl_elem_info *uinfo) | ||
82 | { | ||
83 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
84 | uinfo->count = 1; | ||
85 | uinfo->value.integer.min = 0; | ||
86 | uinfo->value.integer.max = 1; | ||
87 | return 0; | ||
88 | } | ||
89 | 81 | ||
90 | static int snd_ca0106_shared_spdif_get(struct snd_kcontrol *kcontrol, | 82 | static int snd_ca0106_shared_spdif_get(struct snd_kcontrol *kcontrol, |
91 | struct snd_ctl_elem_value *ucontrol) | 83 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 7d3c5ee0005c..f38054ead176 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -2139,15 +2139,7 @@ struct cmipci_switch_args { | |||
2139 | */ | 2139 | */ |
2140 | }; | 2140 | }; |
2141 | 2141 | ||
2142 | static int snd_cmipci_uswitch_info(struct snd_kcontrol *kcontrol, | 2142 | #define snd_cmipci_uswitch_info snd_ctl_boolean_mono_info |
2143 | struct snd_ctl_elem_info *uinfo) | ||
2144 | { | ||
2145 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2146 | uinfo->count = 1; | ||
2147 | uinfo->value.integer.min = 0; | ||
2148 | uinfo->value.integer.max = 1; | ||
2149 | return 0; | ||
2150 | } | ||
2151 | 2143 | ||
2152 | static int _snd_cmipci_uswitch_get(struct snd_kcontrol *kcontrol, | 2144 | static int _snd_cmipci_uswitch_get(struct snd_kcontrol *kcontrol, |
2153 | struct snd_ctl_elem_value *ucontrol, | 2145 | struct snd_ctl_elem_value *ucontrol, |
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index 71d7aab9d869..0dc69d071406 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c | |||
@@ -1818,15 +1818,7 @@ static int snd_cs46xx_vol_iec958_put(struct snd_kcontrol *kcontrol, struct snd_c | |||
1818 | } | 1818 | } |
1819 | #endif | 1819 | #endif |
1820 | 1820 | ||
1821 | static int snd_mixer_boolean_info(struct snd_kcontrol *kcontrol, | 1821 | #define snd_mixer_boolean_info snd_ctl_boolean_mono_info |
1822 | struct snd_ctl_elem_info *uinfo) | ||
1823 | { | ||
1824 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1825 | uinfo->count = 1; | ||
1826 | uinfo->value.integer.min = 0; | ||
1827 | uinfo->value.integer.max = 1; | ||
1828 | return 0; | ||
1829 | } | ||
1830 | 1822 | ||
1831 | static int snd_cs46xx_iec958_get(struct snd_kcontrol *kcontrol, | 1823 | static int snd_cs46xx_iec958_get(struct snd_kcontrol *kcontrol, |
1832 | struct snd_ctl_elem_value *ucontrol) | 1824 | struct snd_ctl_elem_value *ucontrol) |
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 *******************/ |
1598 | static 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 | ||
1608 | static int snd_echo_phantom_power_get(struct snd_kcontrol *kcontrol, | 1600 | static 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 *******************/ |
1649 | static 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 | ||
1659 | static int snd_echo_automute_get(struct snd_kcontrol *kcontrol, | 1643 | static 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 *******************/ |
1698 | static 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 | ||
1711 | static int snd_echo_vumeters_switch_put(struct snd_kcontrol *kcontrol, | 1684 | static int snd_echo_vumeters_switch_put(struct snd_kcontrol *kcontrol, |
1712 | struct snd_ctl_elem_value *ucontrol) | 1685 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index e4af7a9b808c..1ec7ebaff9e9 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c | |||
@@ -1062,14 +1062,7 @@ static int __devinit snd_emu10k1x_proc_init(struct emu10k1x * emu) | |||
1062 | return 0; | 1062 | return 0; |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | static int snd_emu10k1x_shared_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 1065 | #define snd_emu10k1x_shared_spdif_info snd_ctl_boolean_mono_info |
1066 | { | ||
1067 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1068 | uinfo->count = 1; | ||
1069 | uinfo->value.integer.min = 0; | ||
1070 | uinfo->value.integer.max = 1; | ||
1071 | return 0; | ||
1072 | } | ||
1073 | 1066 | ||
1074 | static int snd_emu10k1x_shared_spdif_get(struct snd_kcontrol *kcontrol, | 1067 | static int snd_emu10k1x_shared_spdif_get(struct snd_kcontrol *kcontrol, |
1075 | struct snd_ctl_elem_value *ucontrol) | 1068 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index 7b2c1dcc5337..6c26319430d7 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c | |||
@@ -400,15 +400,7 @@ static struct snd_kcontrol_new snd_emu1010_input_enum_ctls[] __devinitdata = { | |||
400 | 400 | ||
401 | 401 | ||
402 | 402 | ||
403 | 403 | #define snd_emu1010_adc_pads_info snd_ctl_boolean_mono_info | |
404 | static int snd_emu1010_adc_pads_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | ||
405 | { | ||
406 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
407 | uinfo->count = 1; | ||
408 | uinfo->value.integer.min = 0; | ||
409 | uinfo->value.integer.max = 1; | ||
410 | return 0; | ||
411 | } | ||
412 | 404 | ||
413 | static int snd_emu1010_adc_pads_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 405 | static int snd_emu1010_adc_pads_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
414 | { | 406 | { |
@@ -456,14 +448,7 @@ static struct snd_kcontrol_new snd_emu1010_adc_pads[] __devinitdata = { | |||
456 | EMU1010_ADC_PADS("ADC1 14dB PAD 0202 Capture Switch", EMU_HANA_0202_ADC_PAD1), | 448 | EMU1010_ADC_PADS("ADC1 14dB PAD 0202 Capture Switch", EMU_HANA_0202_ADC_PAD1), |
457 | }; | 449 | }; |
458 | 450 | ||
459 | static int snd_emu1010_dac_pads_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 451 | #define snd_emu1010_dac_pads_info snd_ctl_boolean_mono_info |
460 | { | ||
461 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
462 | uinfo->count = 1; | ||
463 | uinfo->value.integer.min = 0; | ||
464 | uinfo->value.integer.max = 1; | ||
465 | return 0; | ||
466 | } | ||
467 | 452 | ||
468 | static int snd_emu1010_dac_pads_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 453 | static int snd_emu1010_dac_pads_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
469 | { | 454 | { |
@@ -1326,14 +1311,7 @@ static struct snd_kcontrol_new snd_emu10k1_efx_attn_control = | |||
1326 | .put = snd_emu10k1_efx_attn_put | 1311 | .put = snd_emu10k1_efx_attn_put |
1327 | }; | 1312 | }; |
1328 | 1313 | ||
1329 | static int snd_emu10k1_shared_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 1314 | #define snd_emu10k1_shared_spdif_info snd_ctl_boolean_mono_info |
1330 | { | ||
1331 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1332 | uinfo->count = 1; | ||
1333 | uinfo->value.integer.min = 0; | ||
1334 | uinfo->value.integer.max = 1; | ||
1335 | return 0; | ||
1336 | } | ||
1337 | 1315 | ||
1338 | static int snd_emu10k1_shared_spdif_get(struct snd_kcontrol *kcontrol, | 1316 | static int snd_emu10k1_shared_spdif_get(struct snd_kcontrol *kcontrol, |
1339 | struct snd_ctl_elem_value *ucontrol) | 1317 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index 21cb4268a59b..9017bdb513a1 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c | |||
@@ -1419,15 +1419,7 @@ static int snd_ens1373_spdif_stream_put(struct snd_kcontrol *kcontrol, | |||
1419 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_es1371_spdif_info, \ | 1419 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_es1371_spdif_info, \ |
1420 | .get = snd_es1371_spdif_get, .put = snd_es1371_spdif_put } | 1420 | .get = snd_es1371_spdif_get, .put = snd_es1371_spdif_put } |
1421 | 1421 | ||
1422 | static int snd_es1371_spdif_info(struct snd_kcontrol *kcontrol, | 1422 | #define snd_es1371_spdif_info snd_ctl_boolean_mono_info |
1423 | struct snd_ctl_elem_info *uinfo) | ||
1424 | { | ||
1425 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1426 | uinfo->count = 1; | ||
1427 | uinfo->value.integer.min = 0; | ||
1428 | uinfo->value.integer.max = 1; | ||
1429 | return 0; | ||
1430 | } | ||
1431 | 1423 | ||
1432 | static int snd_es1371_spdif_get(struct snd_kcontrol *kcontrol, | 1424 | static int snd_es1371_spdif_get(struct snd_kcontrol *kcontrol, |
1433 | struct snd_ctl_elem_value *ucontrol) | 1425 | struct snd_ctl_elem_value *ucontrol) |
@@ -1489,15 +1481,7 @@ static struct snd_kcontrol_new snd_es1371_mixer_spdif[] __devinitdata = { | |||
1489 | }; | 1481 | }; |
1490 | 1482 | ||
1491 | 1483 | ||
1492 | static int snd_es1373_rear_info(struct snd_kcontrol *kcontrol, | 1484 | #define snd_es1373_rear_info snd_ctl_boolean_mono_info |
1493 | struct snd_ctl_elem_info *uinfo) | ||
1494 | { | ||
1495 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1496 | uinfo->count = 1; | ||
1497 | uinfo->value.integer.min = 0; | ||
1498 | uinfo->value.integer.max = 1; | ||
1499 | return 0; | ||
1500 | } | ||
1501 | 1485 | ||
1502 | static int snd_es1373_rear_get(struct snd_kcontrol *kcontrol, | 1486 | static int snd_es1373_rear_get(struct snd_kcontrol *kcontrol, |
1503 | struct snd_ctl_elem_value *ucontrol) | 1487 | struct snd_ctl_elem_value *ucontrol) |
@@ -1542,15 +1526,7 @@ static struct snd_kcontrol_new snd_ens1373_rear __devinitdata = | |||
1542 | .put = snd_es1373_rear_put, | 1526 | .put = snd_es1373_rear_put, |
1543 | }; | 1527 | }; |
1544 | 1528 | ||
1545 | static int snd_es1373_line_info(struct snd_kcontrol *kcontrol, | 1529 | #define snd_es1373_line_info snd_ctl_boolean_mono_info |
1546 | struct snd_ctl_elem_info *uinfo) | ||
1547 | { | ||
1548 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1549 | uinfo->count = 1; | ||
1550 | uinfo->value.integer.min = 0; | ||
1551 | uinfo->value.integer.max = 1; | ||
1552 | return 0; | ||
1553 | } | ||
1554 | 1530 | ||
1555 | static int snd_es1373_line_get(struct snd_kcontrol *kcontrol, | 1531 | static int snd_es1373_line_get(struct snd_kcontrol *kcontrol, |
1556 | struct snd_ctl_elem_value *ucontrol) | 1532 | struct snd_ctl_elem_value *ucontrol) |
@@ -1707,15 +1683,7 @@ static int __devinit snd_ensoniq_1371_mixer(struct ensoniq *ensoniq, | |||
1707 | .get = snd_ensoniq_control_get, .put = snd_ensoniq_control_put, \ | 1683 | .get = snd_ensoniq_control_get, .put = snd_ensoniq_control_put, \ |
1708 | .private_value = mask } | 1684 | .private_value = mask } |
1709 | 1685 | ||
1710 | static int snd_ensoniq_control_info(struct snd_kcontrol *kcontrol, | 1686 | #define snd_ensoniq_control_info snd_ctl_boolean_mono_info |
1711 | struct snd_ctl_elem_info *uinfo) | ||
1712 | { | ||
1713 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1714 | uinfo->count = 1; | ||
1715 | uinfo->value.integer.min = 0; | ||
1716 | uinfo->value.integer.max = 1; | ||
1717 | return 0; | ||
1718 | } | ||
1719 | 1687 | ||
1720 | static int snd_ensoniq_control_get(struct snd_kcontrol *kcontrol, | 1688 | static int snd_ensoniq_control_get(struct snd_kcontrol *kcontrol, |
1721 | struct snd_ctl_elem_value *ucontrol) | 1689 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c index fec29a108945..fc686db59ce8 100644 --- a/sound/pci/es1938.c +++ b/sound/pci/es1938.c | |||
@@ -1066,15 +1066,7 @@ static int snd_es1938_put_mux(struct snd_kcontrol *kcontrol, | |||
1066 | return snd_es1938_mixer_bits(chip, 0x1c, 0x07, val) != val; | 1066 | return snd_es1938_mixer_bits(chip, 0x1c, 0x07, val) != val; |
1067 | } | 1067 | } |
1068 | 1068 | ||
1069 | static int snd_es1938_info_spatializer_enable(struct snd_kcontrol *kcontrol, | 1069 | #define snd_es1938_info_spatializer_enable snd_ctl_boolean_mono_info |
1070 | struct snd_ctl_elem_info *uinfo) | ||
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 | 1070 | ||
1079 | static int snd_es1938_get_spatializer_enable(struct snd_kcontrol *kcontrol, | 1071 | static int snd_es1938_get_spatializer_enable(struct snd_kcontrol *kcontrol, |
1080 | struct snd_ctl_elem_value *ucontrol) | 1072 | struct snd_ctl_elem_value *ucontrol) |
@@ -1120,15 +1112,7 @@ static int snd_es1938_get_hw_volume(struct snd_kcontrol *kcontrol, | |||
1120 | return 0; | 1112 | return 0; |
1121 | } | 1113 | } |
1122 | 1114 | ||
1123 | static int snd_es1938_info_hw_switch(struct snd_kcontrol *kcontrol, | 1115 | #define snd_es1938_info_hw_switch snd_ctl_boolean_stereo_info |
1124 | struct snd_ctl_elem_info *uinfo) | ||
1125 | { | ||
1126 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1127 | uinfo->count = 2; | ||
1128 | uinfo->value.integer.min = 0; | ||
1129 | uinfo->value.integer.max = 1; | ||
1130 | return 0; | ||
1131 | } | ||
1132 | 1116 | ||
1133 | static int snd_es1938_get_hw_switch(struct snd_kcontrol *kcontrol, | 1117 | static int snd_es1938_get_hw_switch(struct snd_kcontrol *kcontrol, |
1134 | struct snd_ctl_elem_value *ucontrol) | 1118 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index f87f8f088956..a05db2f214bd 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1129,15 +1129,7 @@ static int snd_hda_spdif_default_put(struct snd_kcontrol *kcontrol, | |||
1129 | return change; | 1129 | return change; |
1130 | } | 1130 | } |
1131 | 1131 | ||
1132 | static int snd_hda_spdif_out_switch_info(struct snd_kcontrol *kcontrol, | 1132 | #define snd_hda_spdif_out_switch_info snd_ctl_boolean_mono_info |
1133 | struct snd_ctl_elem_info *uinfo) | ||
1134 | { | ||
1135 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1136 | uinfo->count = 1; | ||
1137 | uinfo->value.integer.min = 0; | ||
1138 | uinfo->value.integer.max = 1; | ||
1139 | return 0; | ||
1140 | } | ||
1141 | 1133 | ||
1142 | static int snd_hda_spdif_out_switch_get(struct snd_kcontrol *kcontrol, | 1134 | static int snd_hda_spdif_out_switch_get(struct snd_kcontrol *kcontrol, |
1143 | struct snd_ctl_elem_value *ucontrol) | 1135 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 4d7f8d11ad75..fafadf9fab8e 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -350,15 +350,7 @@ static struct hda_codec_ops ad198x_patch_ops = { | |||
350 | * EAPD control | 350 | * EAPD control |
351 | * the private value = nid | (invert << 8) | 351 | * the private value = nid | (invert << 8) |
352 | */ | 352 | */ |
353 | static int ad198x_eapd_info(struct snd_kcontrol *kcontrol, | 353 | #define ad198x_eapd_info snd_ctl_boolean_mono_info |
354 | struct snd_ctl_elem_info *uinfo) | ||
355 | { | ||
356 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
357 | uinfo->count = 1; | ||
358 | uinfo->value.integer.min = 0; | ||
359 | uinfo->value.integer.max = 1; | ||
360 | return 0; | ||
361 | } | ||
362 | 354 | ||
363 | static int ad198x_eapd_get(struct snd_kcontrol *kcontrol, | 355 | static int ad198x_eapd_get(struct snd_kcontrol *kcontrol, |
364 | struct snd_ctl_elem_value *ucontrol) | 356 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 4d8e8af5c819..26034315197f 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -368,15 +368,7 @@ static struct hda_codec_ops conexant_patch_ops = { | |||
368 | * the private value = nid | (invert << 8) | 368 | * the private value = nid | (invert << 8) |
369 | */ | 369 | */ |
370 | 370 | ||
371 | static int cxt_eapd_info(struct snd_kcontrol *kcontrol, | 371 | #define cxt_eapd_info snd_ctl_boolean_mono_info |
372 | struct snd_ctl_elem_info *uinfo) | ||
373 | { | ||
374 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
375 | uinfo->count = 1; | ||
376 | uinfo->value.integer.min = 0; | ||
377 | uinfo->value.integer.max = 1; | ||
378 | return 0; | ||
379 | } | ||
380 | 372 | ||
381 | static int cxt_eapd_get(struct snd_kcontrol *kcontrol, | 373 | static int cxt_eapd_get(struct snd_kcontrol *kcontrol, |
382 | struct snd_ctl_elem_value *ucontrol) | 374 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 9a47eec5a27b..7e6cc01b521a 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -486,15 +486,7 @@ static int alc_pin_mode_put(struct snd_kcontrol *kcontrol, | |||
486 | * needed for any "production" models. | 486 | * needed for any "production" models. |
487 | */ | 487 | */ |
488 | #ifdef CONFIG_SND_DEBUG | 488 | #ifdef CONFIG_SND_DEBUG |
489 | static int alc_gpio_data_info(struct snd_kcontrol *kcontrol, | 489 | #define alc_gpio_data_info snd_ctl_boolean_mono_info |
490 | struct snd_ctl_elem_info *uinfo) | ||
491 | { | ||
492 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
493 | uinfo->count = 1; | ||
494 | uinfo->value.integer.min = 0; | ||
495 | uinfo->value.integer.max = 1; | ||
496 | return 0; | ||
497 | } | ||
498 | 490 | ||
499 | static int alc_gpio_data_get(struct snd_kcontrol *kcontrol, | 491 | static int alc_gpio_data_get(struct snd_kcontrol *kcontrol, |
500 | struct snd_ctl_elem_value *ucontrol) | 492 | struct snd_ctl_elem_value *ucontrol) |
@@ -547,15 +539,7 @@ static int alc_gpio_data_put(struct snd_kcontrol *kcontrol, | |||
547 | * necessary. | 539 | * necessary. |
548 | */ | 540 | */ |
549 | #ifdef CONFIG_SND_DEBUG | 541 | #ifdef CONFIG_SND_DEBUG |
550 | static int alc_spdif_ctrl_info(struct snd_kcontrol *kcontrol, | 542 | #define alc_spdif_ctrl_info snd_ctl_boolean_mono_info |
551 | struct snd_ctl_elem_info *uinfo) | ||
552 | { | ||
553 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
554 | uinfo->count = 1; | ||
555 | uinfo->value.integer.min = 0; | ||
556 | uinfo->value.integer.max = 1; | ||
557 | return 0; | ||
558 | } | ||
559 | 543 | ||
560 | static int alc_spdif_ctrl_get(struct snd_kcontrol *kcontrol, | 544 | static int alc_spdif_ctrl_get(struct snd_kcontrol *kcontrol, |
561 | struct snd_ctl_elem_value *ucontrol) | 545 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/hda/patch_si3054.c b/sound/pci/hda/patch_si3054.c index 6d2ecc38905c..9838eac9ab59 100644 --- a/sound/pci/hda/patch_si3054.c +++ b/sound/pci/hda/patch_si3054.c | |||
@@ -94,15 +94,7 @@ struct si3054_spec { | |||
94 | #define PRIVATE_REG(val) ((val>>16)&0xffff) | 94 | #define PRIVATE_REG(val) ((val>>16)&0xffff) |
95 | #define PRIVATE_MASK(val) (val&0xffff) | 95 | #define PRIVATE_MASK(val) (val&0xffff) |
96 | 96 | ||
97 | static int si3054_switch_info(struct snd_kcontrol *kcontrol, | 97 | #define si3054_switch_info snd_ctl_boolean_mono_info |
98 | struct snd_ctl_elem_info *uinfo) | ||
99 | { | ||
100 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
101 | uinfo->count = 1; | ||
102 | uinfo->value.integer.min = 0; | ||
103 | uinfo->value.integer.max = 1; | ||
104 | return 0; | ||
105 | } | ||
106 | 98 | ||
107 | static int si3054_switch_get(struct snd_kcontrol *kcontrol, | 99 | static int si3054_switch_get(struct snd_kcontrol *kcontrol, |
108 | struct snd_ctl_elem_value *uvalue) | 100 | struct snd_ctl_elem_value *uvalue) |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 3f25de72966b..d2c340e45f9e 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1069,14 +1069,7 @@ static void stac92xx_auto_set_pinctl(struct hda_codec *codec, hda_nid_t nid, int | |||
1069 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, pin_type); | 1069 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, pin_type); |
1070 | } | 1070 | } |
1071 | 1071 | ||
1072 | static int stac92xx_io_switch_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 1072 | #define stac92xx_io_switch_info snd_ctl_boolean_mono_info |
1073 | { | ||
1074 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1075 | uinfo->count = 1; | ||
1076 | uinfo->value.integer.min = 0; | ||
1077 | uinfo->value.integer.max = 1; | ||
1078 | return 0; | ||
1079 | } | ||
1080 | 1073 | ||
1081 | static int stac92xx_io_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 1074 | static int stac92xx_io_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1082 | { | 1075 | { |
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 | ||
399 | static int aureon_ac97_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 399 | static 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 | ||
435 | static int aureon_ac97_micboost_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 435 | static 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 | */ |
624 | static 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 | ||
638 | static int aureon_ac97_mmute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 631 | static 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 | ||
713 | static int wm_pcm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 706 | static 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 | */ |
882 | static 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 | ||
890 | static int wm_master_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 877 | static 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 | */ |
972 | static 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 | ||
981 | static int wm_adc_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 961 | static 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 | */ |
1213 | static 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 | ||
1220 | static int aureon_cs8415_mute_get (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 1195 | static 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 | ||
1321 | static int aureon_hpamp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 1296 | static 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 | ||
1343 | static int aureon_deemp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 1318 | static int aureon_deemp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1344 | { | 1319 | { |
diff --git a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c index af659800c9b0..66886dff4845 100644 --- a/sound/pci/ice1712/delta.c +++ b/sound/pci/ice1712/delta.c | |||
@@ -393,15 +393,8 @@ static void delta_setup_spdif(struct snd_ice1712 *ice, int rate) | |||
393 | snd_ice1712_delta_cs8403_spdif_write(ice, tmp); | 393 | snd_ice1712_delta_cs8403_spdif_write(ice, tmp); |
394 | } | 394 | } |
395 | 395 | ||
396 | static int snd_ice1712_delta1010lt_wordclock_status_info(struct snd_kcontrol *kcontrol, | 396 | #define snd_ice1712_delta1010lt_wordclock_status_info \ |
397 | struct snd_ctl_elem_info *uinfo) | 397 | snd_ctl_boolean_mono_info |
398 | { | ||
399 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
400 | uinfo->count = 1; | ||
401 | uinfo->value.integer.min = 0; | ||
402 | uinfo->value.integer.max = 1; | ||
403 | return 0; | ||
404 | } | ||
405 | 398 | ||
406 | static int snd_ice1712_delta1010lt_wordclock_status_get(struct snd_kcontrol *kcontrol, | 399 | static int snd_ice1712_delta1010lt_wordclock_status_get(struct snd_kcontrol *kcontrol, |
407 | struct snd_ctl_elem_value *ucontrol) | 400 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/ice1712/ews.c b/sound/pci/ice1712/ews.c index b135389fec6c..b2b4eff1ac6c 100644 --- a/sound/pci/ice1712/ews.c +++ b/sound/pci/ice1712/ews.c | |||
@@ -700,14 +700,7 @@ static struct snd_kcontrol_new snd_ice1712_ews88mt_output_sense __devinitdata = | |||
700 | * EWS88D specific controls | 700 | * EWS88D specific controls |
701 | */ | 701 | */ |
702 | 702 | ||
703 | static int snd_ice1712_ews88d_control_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 703 | #define snd_ice1712_ews88d_control_info snd_ctl_boolean_mono_info |
704 | { | ||
705 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
706 | uinfo->count = 1; | ||
707 | uinfo->value.integer.min = 0; | ||
708 | uinfo->value.integer.max = 1; | ||
709 | return 0; | ||
710 | } | ||
711 | 704 | ||
712 | static int snd_ice1712_ews88d_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 705 | static int snd_ice1712_ews88d_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
713 | { | 706 | { |
@@ -812,14 +805,7 @@ static int snd_ice1712_6fire_write_pca(struct snd_ice1712 *ice, unsigned char re | |||
812 | return 0; | 805 | return 0; |
813 | } | 806 | } |
814 | 807 | ||
815 | static int snd_ice1712_6fire_control_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 808 | #define snd_ice1712_6fire_control_info snd_ctl_boolean_mono_info |
816 | { | ||
817 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
818 | uinfo->count = 1; | ||
819 | uinfo->value.integer.min = 0; | ||
820 | uinfo->value.integer.max = 1; | ||
821 | return 0; | ||
822 | } | ||
823 | 809 | ||
824 | static int snd_ice1712_6fire_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 810 | static int snd_ice1712_6fire_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
825 | { | 811 | { |
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index 6630a0ae9527..cd41c7eb6c6b 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c | |||
@@ -256,14 +256,7 @@ static unsigned short snd_ice1712_pro_ac97_read(struct snd_ac97 *ac97, | |||
256 | /* | 256 | /* |
257 | * consumer ac97 digital mix | 257 | * consumer ac97 digital mix |
258 | */ | 258 | */ |
259 | static int snd_ice1712_digmix_route_ac97_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 259 | #define snd_ice1712_digmix_route_ac97_info snd_ctl_boolean_mono_info |
260 | { | ||
261 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
262 | uinfo->count = 1; | ||
263 | uinfo->value.integer.min = 0; | ||
264 | uinfo->value.integer.max = 1; | ||
265 | return 0; | ||
266 | } | ||
267 | 260 | ||
268 | static int snd_ice1712_digmix_route_ac97_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 261 | static int snd_ice1712_digmix_route_ac97_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
269 | { | 262 | { |
@@ -1300,14 +1293,7 @@ static void snd_ice1712_update_volume(struct snd_ice1712 *ice, int index) | |||
1300 | outw(val, ICEMT(ice, MONITOR_VOLUME)); | 1293 | outw(val, ICEMT(ice, MONITOR_VOLUME)); |
1301 | } | 1294 | } |
1302 | 1295 | ||
1303 | static int snd_ice1712_pro_mixer_switch_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 1296 | #define snd_ice1712_pro_mixer_switch_info snd_ctl_boolean_stereo_info |
1304 | { | ||
1305 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1306 | uinfo->count = 2; | ||
1307 | uinfo->value.integer.min = 0; | ||
1308 | uinfo->value.integer.max = 1; | ||
1309 | return 0; | ||
1310 | } | ||
1311 | 1297 | ||
1312 | static int snd_ice1712_pro_mixer_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 1298 | static int snd_ice1712_pro_mixer_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1313 | { | 1299 | { |
@@ -1759,15 +1745,7 @@ static struct snd_kcontrol_new snd_ice1712_spdif_stream __devinitdata = | |||
1759 | .put = snd_ice1712_spdif_stream_put | 1745 | .put = snd_ice1712_spdif_stream_put |
1760 | }; | 1746 | }; |
1761 | 1747 | ||
1762 | int snd_ice1712_gpio_info(struct snd_kcontrol *kcontrol, | 1748 | #define snd_ice1712_gpio_info snd_ctl_boolean_mono_info |
1763 | struct snd_ctl_elem_info *uinfo) | ||
1764 | { | ||
1765 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1766 | uinfo->count = 1; | ||
1767 | uinfo->value.integer.min = 0; | ||
1768 | uinfo->value.integer.max = 1; | ||
1769 | return 0; | ||
1770 | } | ||
1771 | 1749 | ||
1772 | int snd_ice1712_gpio_get(struct snd_kcontrol *kcontrol, | 1750 | int snd_ice1712_gpio_get(struct snd_kcontrol *kcontrol, |
1773 | struct snd_ctl_elem_value *ucontrol) | 1751 | struct snd_ctl_elem_value *ucontrol) |
@@ -1968,15 +1946,7 @@ static struct snd_kcontrol_new snd_ice1712_pro_internal_clock_default __devinitd | |||
1968 | .put = snd_ice1712_pro_internal_clock_default_put | 1946 | .put = snd_ice1712_pro_internal_clock_default_put |
1969 | }; | 1947 | }; |
1970 | 1948 | ||
1971 | static int snd_ice1712_pro_rate_locking_info(struct snd_kcontrol *kcontrol, | 1949 | #define snd_ice1712_pro_rate_locking_info snd_ctl_boolean_mono_info |
1972 | struct snd_ctl_elem_info *uinfo) | ||
1973 | { | ||
1974 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1975 | uinfo->count = 1; | ||
1976 | uinfo->value.integer.min = 0; | ||
1977 | uinfo->value.integer.max = 1; | ||
1978 | return 0; | ||
1979 | } | ||
1980 | 1950 | ||
1981 | static int snd_ice1712_pro_rate_locking_get(struct snd_kcontrol *kcontrol, | 1951 | static int snd_ice1712_pro_rate_locking_get(struct snd_kcontrol *kcontrol, |
1982 | struct snd_ctl_elem_value *ucontrol) | 1952 | struct snd_ctl_elem_value *ucontrol) |
@@ -2007,15 +1977,7 @@ static struct snd_kcontrol_new snd_ice1712_pro_rate_locking __devinitdata = { | |||
2007 | .put = snd_ice1712_pro_rate_locking_put | 1977 | .put = snd_ice1712_pro_rate_locking_put |
2008 | }; | 1978 | }; |
2009 | 1979 | ||
2010 | static int snd_ice1712_pro_rate_reset_info(struct snd_kcontrol *kcontrol, | 1980 | #define snd_ice1712_pro_rate_reset_info snd_ctl_boolean_mono_info |
2011 | struct snd_ctl_elem_info *uinfo) | ||
2012 | { | ||
2013 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2014 | uinfo->count = 1; | ||
2015 | uinfo->value.integer.min = 0; | ||
2016 | uinfo->value.integer.max = 1; | ||
2017 | return 0; | ||
2018 | } | ||
2019 | 1981 | ||
2020 | static int snd_ice1712_pro_rate_reset_get(struct snd_kcontrol *kcontrol, | 1982 | static int snd_ice1712_pro_rate_reset_get(struct snd_kcontrol *kcontrol, |
2021 | struct snd_ctl_elem_value *ucontrol) | 1983 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index ee620dea7ef3..32560cfb6c3f 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c | |||
@@ -1479,15 +1479,7 @@ static struct snd_kcontrol_new snd_vt1724_spdif_maskp __devinitdata = | |||
1479 | .get = snd_vt1724_spdif_maskp_get, | 1479 | .get = snd_vt1724_spdif_maskp_get, |
1480 | }; | 1480 | }; |
1481 | 1481 | ||
1482 | static int snd_vt1724_spdif_sw_info(struct snd_kcontrol *kcontrol, | 1482 | #define snd_vt1724_spdif_sw_info snd_ctl_boolean_mono_info |
1483 | struct snd_ctl_elem_info *uinfo) | ||
1484 | { | ||
1485 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1486 | uinfo->count = 1; | ||
1487 | uinfo->value.integer.min = 0; | ||
1488 | uinfo->value.integer.max = 1; | ||
1489 | return 0; | ||
1490 | } | ||
1491 | 1483 | ||
1492 | static int snd_vt1724_spdif_sw_get(struct snd_kcontrol *kcontrol, | 1484 | static int snd_vt1724_spdif_sw_get(struct snd_kcontrol *kcontrol, |
1493 | struct snd_ctl_elem_value *ucontrol) | 1485 | struct snd_ctl_elem_value *ucontrol) |
@@ -1532,15 +1524,7 @@ static struct snd_kcontrol_new snd_vt1724_spdif_switch __devinitdata = | |||
1532 | * GPIO access from extern | 1524 | * GPIO access from extern |
1533 | */ | 1525 | */ |
1534 | 1526 | ||
1535 | int snd_vt1724_gpio_info(struct snd_kcontrol *kcontrol, | 1527 | #define snd_vt1724_gpio_info snd_ctl_boolean_mono_info |
1536 | struct snd_ctl_elem_info *uinfo) | ||
1537 | { | ||
1538 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1539 | uinfo->count = 1; | ||
1540 | uinfo->value.integer.min = 0; | ||
1541 | uinfo->value.integer.max = 1; | ||
1542 | return 0; | ||
1543 | } | ||
1544 | 1528 | ||
1545 | int snd_vt1724_gpio_get(struct snd_kcontrol *kcontrol, | 1529 | int snd_vt1724_gpio_get(struct snd_kcontrol *kcontrol, |
1546 | struct snd_ctl_elem_value *ucontrol) | 1530 | struct snd_ctl_elem_value *ucontrol) |
@@ -1706,15 +1690,7 @@ static struct snd_kcontrol_new snd_vt1724_pro_internal_clock __devinitdata = { | |||
1706 | .put = snd_vt1724_pro_internal_clock_put | 1690 | .put = snd_vt1724_pro_internal_clock_put |
1707 | }; | 1691 | }; |
1708 | 1692 | ||
1709 | static int snd_vt1724_pro_rate_locking_info(struct snd_kcontrol *kcontrol, | 1693 | #define snd_vt1724_pro_rate_locking_info snd_ctl_boolean_mono_info |
1710 | struct snd_ctl_elem_info *uinfo) | ||
1711 | { | ||
1712 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1713 | uinfo->count = 1; | ||
1714 | uinfo->value.integer.min = 0; | ||
1715 | uinfo->value.integer.max = 1; | ||
1716 | return 0; | ||
1717 | } | ||
1718 | 1694 | ||
1719 | static int snd_vt1724_pro_rate_locking_get(struct snd_kcontrol *kcontrol, | 1695 | static int snd_vt1724_pro_rate_locking_get(struct snd_kcontrol *kcontrol, |
1720 | struct snd_ctl_elem_value *ucontrol) | 1696 | struct snd_ctl_elem_value *ucontrol) |
@@ -1745,15 +1721,7 @@ static struct snd_kcontrol_new snd_vt1724_pro_rate_locking __devinitdata = { | |||
1745 | .put = snd_vt1724_pro_rate_locking_put | 1721 | .put = snd_vt1724_pro_rate_locking_put |
1746 | }; | 1722 | }; |
1747 | 1723 | ||
1748 | static int snd_vt1724_pro_rate_reset_info(struct snd_kcontrol *kcontrol, | 1724 | #define snd_vt1724_pro_rate_reset_info snd_ctl_boolean_mono_info |
1749 | struct snd_ctl_elem_info *uinfo) | ||
1750 | { | ||
1751 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1752 | uinfo->count = 1; | ||
1753 | uinfo->value.integer.min = 0; | ||
1754 | uinfo->value.integer.max = 1; | ||
1755 | return 0; | ||
1756 | } | ||
1757 | 1725 | ||
1758 | static int snd_vt1724_pro_rate_reset_get(struct snd_kcontrol *kcontrol, | 1726 | static int snd_vt1724_pro_rate_reset_get(struct snd_kcontrol *kcontrol, |
1759 | struct snd_ctl_elem_value *ucontrol) | 1727 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/ice1712/phase.c b/sound/pci/ice1712/phase.c index 40a9098af777..3ac25058bb58 100644 --- a/sound/pci/ice1712/phase.c +++ b/sound/pci/ice1712/phase.c | |||
@@ -270,7 +270,7 @@ static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index, unsigned sho | |||
270 | /* | 270 | /* |
271 | * DAC mute control | 271 | * DAC mute control |
272 | */ | 272 | */ |
273 | #define wm_pcm_mute_info phase28_mono_bool_info | 273 | #define wm_pcm_mute_info snd_ctl_boolean_mono_info |
274 | 274 | ||
275 | static int wm_pcm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 275 | static int wm_pcm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
276 | { | 276 | { |
@@ -527,13 +527,7 @@ static int wm_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value | |||
527 | /* | 527 | /* |
528 | * WM8770 master mute control | 528 | * WM8770 master mute control |
529 | */ | 529 | */ |
530 | static int wm_master_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { | 530 | #define wm_master_mute_info snd_ctl_boolean_stereo_info |
531 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
532 | uinfo->count = 2; | ||
533 | uinfo->value.integer.min = 0; | ||
534 | uinfo->value.integer.max = 1; | ||
535 | return 0; | ||
536 | } | ||
537 | 531 | ||
538 | static int wm_master_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 532 | static int wm_master_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
539 | { | 533 | { |
@@ -615,20 +609,9 @@ static int wm_pcm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val | |||
615 | } | 609 | } |
616 | 610 | ||
617 | /* | 611 | /* |
618 | */ | ||
619 | static int phase28_mono_bool_info(struct snd_kcontrol *k, struct snd_ctl_elem_info *uinfo) | ||
620 | { | ||
621 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
622 | uinfo->count = 1; | ||
623 | uinfo->value.integer.min = 0; | ||
624 | uinfo->value.integer.max = 1; | ||
625 | return 0; | ||
626 | } | ||
627 | |||
628 | /* | ||
629 | * Deemphasis | 612 | * Deemphasis |
630 | */ | 613 | */ |
631 | #define phase28_deemp_info phase28_mono_bool_info | 614 | #define phase28_deemp_info snd_ctl_boolean_mono_info |
632 | 615 | ||
633 | static int phase28_deemp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 616 | static int phase28_deemp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
634 | { | 617 | { |
diff --git a/sound/pci/ice1712/pontis.c b/sound/pci/ice1712/pontis.c index 01c69453ddeb..faefd52c1b80 100644 --- a/sound/pci/ice1712/pontis.c +++ b/sound/pci/ice1712/pontis.c | |||
@@ -216,14 +216,7 @@ static int wm_adc_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val | |||
216 | /* | 216 | /* |
217 | * ADC input mux mixer control | 217 | * ADC input mux mixer control |
218 | */ | 218 | */ |
219 | static int wm_adc_mux_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 219 | #define wm_adc_mux_info snd_ctl_boolean_mono_info |
220 | { | ||
221 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
222 | uinfo->count = 1; | ||
223 | uinfo->value.integer.min = 0; | ||
224 | uinfo->value.integer.max = 1; | ||
225 | return 0; | ||
226 | } | ||
227 | 220 | ||
228 | static int wm_adc_mux_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 221 | static int wm_adc_mux_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
229 | { | 222 | { |
@@ -260,14 +253,7 @@ static int wm_adc_mux_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val | |||
260 | /* | 253 | /* |
261 | * Analog bypass (In -> Out) | 254 | * Analog bypass (In -> Out) |
262 | */ | 255 | */ |
263 | static int wm_bypass_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 256 | #define wm_bypass_info snd_ctl_boolean_mono_info |
264 | { | ||
265 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
266 | uinfo->count = 1; | ||
267 | uinfo->value.integer.min = 0; | ||
268 | uinfo->value.integer.max = 1; | ||
269 | return 0; | ||
270 | } | ||
271 | 257 | ||
272 | static int wm_bypass_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 258 | static int wm_bypass_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
273 | { | 259 | { |
@@ -302,14 +288,7 @@ static int wm_bypass_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_valu | |||
302 | /* | 288 | /* |
303 | * Left/Right swap | 289 | * Left/Right swap |
304 | */ | 290 | */ |
305 | static int wm_chswap_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 291 | #define wm_chswap_info snd_ctl_boolean_mono_info |
306 | { | ||
307 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
308 | uinfo->count = 1; | ||
309 | uinfo->value.integer.min = 0; | ||
310 | uinfo->value.integer.max = 1; | ||
311 | return 0; | ||
312 | } | ||
313 | 292 | ||
314 | static int wm_chswap_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 293 | static int wm_chswap_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
315 | { | 294 | { |
diff --git a/sound/pci/ice1712/prodigy192.c b/sound/pci/ice1712/prodigy192.c index 4bae7305a79b..4180f9739ecb 100644 --- a/sound/pci/ice1712/prodigy192.c +++ b/sound/pci/ice1712/prodigy192.c | |||
@@ -81,14 +81,7 @@ static inline unsigned char stac9460_get(struct snd_ice1712 *ice, int reg) | |||
81 | /* | 81 | /* |
82 | * DAC mute control | 82 | * DAC mute control |
83 | */ | 83 | */ |
84 | static int stac9460_dac_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 84 | #define stac9460_dac_mute_info snd_ctl_boolean_mono_info |
85 | { | ||
86 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
87 | uinfo->count = 1; | ||
88 | uinfo->value.integer.min = 0; | ||
89 | uinfo->value.integer.max = 1; | ||
90 | return 0; | ||
91 | } | ||
92 | 85 | ||
93 | static int stac9460_dac_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 86 | static int stac9460_dac_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
94 | { | 87 | { |
@@ -177,14 +170,7 @@ static int stac9460_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el | |||
177 | /* | 170 | /* |
178 | * ADC mute control | 171 | * ADC mute control |
179 | */ | 172 | */ |
180 | static int stac9460_adc_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 173 | #define stac9460_adc_mute_info snd_ctl_boolean_stereo_info |
181 | { | ||
182 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
183 | uinfo->count = 2; | ||
184 | uinfo->value.integer.min = 0; | ||
185 | uinfo->value.integer.max = 1; | ||
186 | return 0; | ||
187 | } | ||
188 | 174 | ||
189 | static int stac9460_adc_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 175 | static int stac9460_adc_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
190 | { | 176 | { |
@@ -292,14 +278,7 @@ static int aureon_get_headphone_amp(struct snd_ice1712 *ice) | |||
292 | return ( tmp & AUREON_HP_SEL )!= 0; | 278 | return ( tmp & AUREON_HP_SEL )!= 0; |
293 | } | 279 | } |
294 | 280 | ||
295 | static int aureon_bool_info(struct snd_kcontrol *k, struct snd_ctl_elem_info *uinfo) | 281 | #define aureon_bool_info snd_ctl_boolean_mono_info |
296 | { | ||
297 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
298 | uinfo->count = 1; | ||
299 | uinfo->value.integer.min = 0; | ||
300 | uinfo->value.integer.max = 1; | ||
301 | return 0; | ||
302 | } | ||
303 | 282 | ||
304 | static int aureon_hpamp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 283 | static int aureon_hpamp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
305 | { | 284 | { |
diff --git a/sound/pci/ice1712/wtm.c b/sound/pci/ice1712/wtm.c index 04e535c8542b..7fcce0a506d6 100644 --- a/sound/pci/ice1712/wtm.c +++ b/sound/pci/ice1712/wtm.c | |||
@@ -71,14 +71,7 @@ static inline unsigned char stac9460_2_get(struct snd_ice1712 *ice, int reg) | |||
71 | /* | 71 | /* |
72 | * DAC mute control | 72 | * DAC mute control |
73 | */ | 73 | */ |
74 | static int stac9460_dac_mute_info(struct snd_kcontrol *kcontrol, | 74 | #define stac9460_dac_mute_info snd_ctl_boolean_mono_info |
75 | struct snd_ctl_elem_info *uinfo) | ||
76 | { | ||
77 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
78 | uinfo->count = 1; | ||
79 | uinfo->value.integer.min = 0; | ||
80 | return 0; | ||
81 | } | ||
82 | 75 | ||
83 | static int stac9460_dac_mute_get(struct snd_kcontrol *kcontrol, | 76 | static int stac9460_dac_mute_get(struct snd_kcontrol *kcontrol, |
84 | struct snd_ctl_elem_value *ucontrol) | 77 | struct snd_ctl_elem_value *ucontrol) |
@@ -218,15 +211,7 @@ static int stac9460_dac_vol_put(struct snd_kcontrol *kcontrol, | |||
218 | /* | 211 | /* |
219 | * ADC mute control | 212 | * ADC mute control |
220 | */ | 213 | */ |
221 | static int stac9460_adc_mute_info(struct snd_kcontrol *kcontrol, | 214 | #define stac9460_adc_mute_info snd_ctl_boolean_stereo_info |
222 | struct snd_ctl_elem_info *uinfo) | ||
223 | { | ||
224 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
225 | uinfo->count = 2; | ||
226 | uinfo->value.integer.min = 0; | ||
227 | uinfo->value.integer.max = 1; | ||
228 | return 0; | ||
229 | } | ||
230 | 215 | ||
231 | static int stac9460_adc_mute_get(struct snd_kcontrol *kcontrol, | 216 | static int stac9460_adc_mute_get(struct snd_kcontrol *kcontrol, |
232 | struct snd_ctl_elem_value *ucontrol) | 217 | struct snd_ctl_elem_value *ucontrol) |
@@ -357,15 +342,7 @@ static int stac9460_adc_vol_put(struct snd_kcontrol *kcontrol, | |||
357 | * MIC / LINE switch fonction | 342 | * MIC / LINE switch fonction |
358 | */ | 343 | */ |
359 | 344 | ||
360 | static int stac9460_mic_sw_info(struct snd_kcontrol *kcontrol, | 345 | #define stac9460_mic_sw_info snd_ctl_boolean_mono_info |
361 | struct snd_ctl_elem_info *uinfo) | ||
362 | { | ||
363 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
364 | uinfo->count = 1; | ||
365 | uinfo->value.integer.min = 0; | ||
366 | uinfo->value.integer.max = 1; | ||
367 | return 0; | ||
368 | } | ||
369 | 346 | ||
370 | static int stac9460_mic_sw_get(struct snd_kcontrol *kcontrol, | 347 | static int stac9460_mic_sw_get(struct snd_kcontrol *kcontrol, |
371 | struct snd_ctl_elem_value *ucontrol) | 348 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/mixart/mixart_mixer.c b/sound/pci/mixart/mixart_mixer.c index d7d15c036e02..0e16512d25f7 100644 --- a/sound/pci/mixart/mixart_mixer.c +++ b/sound/pci/mixart/mixart_mixer.c | |||
@@ -403,14 +403,7 @@ static struct snd_kcontrol_new mixart_control_analog_level = { | |||
403 | }; | 403 | }; |
404 | 404 | ||
405 | /* shared */ | 405 | /* shared */ |
406 | static int mixart_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 406 | #define mixart_sw_info snd_ctl_boolean_stereo_info |
407 | { | ||
408 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
409 | uinfo->count = 2; | ||
410 | uinfo->value.integer.min = 0; | ||
411 | uinfo->value.integer.max = 1; | ||
412 | return 0; | ||
413 | } | ||
414 | 407 | ||
415 | static int mixart_audio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 408 | static int mixart_audio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
416 | { | 409 | { |
diff --git a/sound/pci/pcxhr/pcxhr_mixer.c b/sound/pci/pcxhr/pcxhr_mixer.c index d9cc8d2beb6d..b913453063f8 100644 --- a/sound/pci/pcxhr/pcxhr_mixer.c +++ b/sound/pci/pcxhr/pcxhr_mixer.c | |||
@@ -144,14 +144,7 @@ static struct snd_kcontrol_new pcxhr_control_analog_level = { | |||
144 | }; | 144 | }; |
145 | 145 | ||
146 | /* shared */ | 146 | /* shared */ |
147 | static int pcxhr_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 147 | #define pcxhr_sw_info snd_ctl_boolean_stereo_info |
148 | { | ||
149 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
150 | uinfo->count = 2; | ||
151 | uinfo->value.integer.min = 0; | ||
152 | uinfo->value.integer.max = 1; | ||
153 | return 0; | ||
154 | } | ||
155 | 148 | ||
156 | static int pcxhr_audio_sw_get(struct snd_kcontrol *kcontrol, | 149 | static int pcxhr_audio_sw_get(struct snd_kcontrol *kcontrol, |
157 | struct snd_ctl_elem_value *ucontrol) | 150 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c index 618653e22561..ee0189b756d1 100644 --- a/sound/pci/rme32.c +++ b/sound/pci/rme32.c | |||
@@ -1582,16 +1582,8 @@ static void __devinit snd_rme32_proc_init(struct rme32 * rme32) | |||
1582 | * control interface | 1582 | * control interface |
1583 | */ | 1583 | */ |
1584 | 1584 | ||
1585 | static int | 1585 | #define snd_rme32_info_loopback_control snd_ctl_boolean_mono_info |
1586 | snd_rme32_info_loopback_control(struct snd_kcontrol *kcontrol, | 1586 | |
1587 | struct snd_ctl_elem_info *uinfo) | ||
1588 | { | ||
1589 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1590 | uinfo->count = 1; | ||
1591 | uinfo->value.integer.min = 0; | ||
1592 | uinfo->value.integer.max = 1; | ||
1593 | return 0; | ||
1594 | } | ||
1595 | static int | 1587 | static int |
1596 | snd_rme32_get_loopback_control(struct snd_kcontrol *kcontrol, | 1588 | snd_rme32_get_loopback_control(struct snd_kcontrol *kcontrol, |
1597 | struct snd_ctl_elem_value *ucontrol) | 1589 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c index e3304b7ccbcb..9a4596f879e8 100644 --- a/sound/pci/rme96.c +++ b/sound/pci/rme96.c | |||
@@ -1826,15 +1826,8 @@ snd_rme96_proc_init(struct rme96 *rme96) | |||
1826 | * control interface | 1826 | * control interface |
1827 | */ | 1827 | */ |
1828 | 1828 | ||
1829 | static int | 1829 | #define snd_rme96_info_loopback_control snd_ctl_boolean_mono_info |
1830 | snd_rme96_info_loopback_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 1830 | |
1831 | { | ||
1832 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1833 | uinfo->count = 1; | ||
1834 | uinfo->value.integer.min = 0; | ||
1835 | uinfo->value.integer.max = 1; | ||
1836 | return 0; | ||
1837 | } | ||
1838 | static int | 1831 | static int |
1839 | snd_rme96_get_loopback_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 1832 | snd_rme96_get_loopback_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1840 | { | 1833 | { |
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index 3b3ef657f73e..8f798f2fc040 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c | |||
@@ -1623,14 +1623,7 @@ static int hdsp_set_spdif_output(struct hdsp *hdsp, int out) | |||
1623 | return 0; | 1623 | return 0; |
1624 | } | 1624 | } |
1625 | 1625 | ||
1626 | static int snd_hdsp_info_spdif_bits(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 1626 | #define snd_hdsp_info_spdif_bits snd_ctl_boolean_mono_info |
1627 | { | ||
1628 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1629 | uinfo->count = 1; | ||
1630 | uinfo->value.integer.min = 0; | ||
1631 | uinfo->value.integer.max = 1; | ||
1632 | return 0; | ||
1633 | } | ||
1634 | 1627 | ||
1635 | static int snd_hdsp_get_spdif_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 1628 | static int snd_hdsp_get_spdif_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1636 | { | 1629 | { |
@@ -2111,14 +2104,7 @@ static int snd_hdsp_put_clock_source(struct snd_kcontrol *kcontrol, struct snd_c | |||
2111 | return change; | 2104 | return change; |
2112 | } | 2105 | } |
2113 | 2106 | ||
2114 | static int snd_hdsp_info_clock_source_lock(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 2107 | #define snd_hdsp_info_clock_source_lock snd_ctl_boolean_mono_info |
2115 | { | ||
2116 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2117 | uinfo->count = 1; | ||
2118 | uinfo->value.integer.min = 0; | ||
2119 | uinfo->value.integer.max = 1; | ||
2120 | return 0; | ||
2121 | } | ||
2122 | 2108 | ||
2123 | static int snd_hdsp_get_clock_source_lock(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 2109 | static int snd_hdsp_get_clock_source_lock(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
2124 | { | 2110 | { |
@@ -2420,14 +2406,7 @@ static int hdsp_set_xlr_breakout_cable(struct hdsp *hdsp, int mode) | |||
2420 | return 0; | 2406 | return 0; |
2421 | } | 2407 | } |
2422 | 2408 | ||
2423 | static int snd_hdsp_info_xlr_breakout_cable(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 2409 | #define snd_hdsp_info_xlr_breakout_cable snd_ctl_boolean_mono_info |
2424 | { | ||
2425 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2426 | uinfo->count = 1; | ||
2427 | uinfo->value.integer.min = 0; | ||
2428 | uinfo->value.integer.max = 1; | ||
2429 | return 0; | ||
2430 | } | ||
2431 | 2410 | ||
2432 | static int snd_hdsp_get_xlr_breakout_cable(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 2411 | static int snd_hdsp_get_xlr_breakout_cable(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
2433 | { | 2412 | { |
@@ -2483,14 +2462,7 @@ static int hdsp_set_aeb(struct hdsp *hdsp, int mode) | |||
2483 | return 0; | 2462 | return 0; |
2484 | } | 2463 | } |
2485 | 2464 | ||
2486 | static int snd_hdsp_info_aeb(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 2465 | #define snd_hdsp_info_aeb snd_ctl_boolean_mono_info |
2487 | { | ||
2488 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2489 | uinfo->count = 1; | ||
2490 | uinfo->value.integer.min = 0; | ||
2491 | uinfo->value.integer.max = 1; | ||
2492 | return 0; | ||
2493 | } | ||
2494 | 2466 | ||
2495 | static int snd_hdsp_get_aeb(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 2467 | static int snd_hdsp_get_aeb(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
2496 | { | 2468 | { |
@@ -2729,14 +2701,7 @@ static int hdsp_set_line_output(struct hdsp *hdsp, int out) | |||
2729 | return 0; | 2701 | return 0; |
2730 | } | 2702 | } |
2731 | 2703 | ||
2732 | static int snd_hdsp_info_line_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 2704 | #define snd_hdsp_info_line_out snd_ctl_boolean_mono_info |
2733 | { | ||
2734 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2735 | uinfo->count = 1; | ||
2736 | uinfo->value.integer.min = 0; | ||
2737 | uinfo->value.integer.max = 1; | ||
2738 | return 0; | ||
2739 | } | ||
2740 | 2705 | ||
2741 | static int snd_hdsp_get_line_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 2706 | static int snd_hdsp_get_line_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
2742 | { | 2707 | { |
@@ -2782,14 +2747,7 @@ static int hdsp_set_precise_pointer(struct hdsp *hdsp, int precise) | |||
2782 | return 0; | 2747 | return 0; |
2783 | } | 2748 | } |
2784 | 2749 | ||
2785 | static int snd_hdsp_info_precise_pointer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 2750 | #define snd_hdsp_info_precise_pointer snd_ctl_boolean_mono_info |
2786 | { | ||
2787 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2788 | uinfo->count = 1; | ||
2789 | uinfo->value.integer.min = 0; | ||
2790 | uinfo->value.integer.max = 1; | ||
2791 | return 0; | ||
2792 | } | ||
2793 | 2751 | ||
2794 | static int snd_hdsp_get_precise_pointer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 2752 | static int snd_hdsp_get_precise_pointer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
2795 | { | 2753 | { |
@@ -2835,14 +2793,7 @@ static int hdsp_set_use_midi_tasklet(struct hdsp *hdsp, int use_tasklet) | |||
2835 | return 0; | 2793 | return 0; |
2836 | } | 2794 | } |
2837 | 2795 | ||
2838 | static int snd_hdsp_info_use_midi_tasklet(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 2796 | #define snd_hdsp_info_use_midi_tasklet snd_ctl_boolean_mono_info |
2839 | { | ||
2840 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2841 | uinfo->count = 1; | ||
2842 | uinfo->value.integer.min = 0; | ||
2843 | uinfo->value.integer.max = 1; | ||
2844 | return 0; | ||
2845 | } | ||
2846 | 2797 | ||
2847 | static int snd_hdsp_get_use_midi_tasklet(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 2798 | static int snd_hdsp_get_use_midi_tasklet(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
2848 | { | 2799 | { |
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 143185e7e4dc..83ea4623e77c 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -1834,15 +1834,7 @@ static int hdspm_set_line_output(struct hdspm * hdspm, int out) | |||
1834 | return 0; | 1834 | return 0; |
1835 | } | 1835 | } |
1836 | 1836 | ||
1837 | static int snd_hdspm_info_line_out(struct snd_kcontrol *kcontrol, | 1837 | #define snd_hdspm_info_line_out snd_ctl_boolean_mono_info |
1838 | struct snd_ctl_elem_info *uinfo) | ||
1839 | { | ||
1840 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1841 | uinfo->count = 1; | ||
1842 | uinfo->value.integer.min = 0; | ||
1843 | uinfo->value.integer.max = 1; | ||
1844 | return 0; | ||
1845 | } | ||
1846 | 1838 | ||
1847 | static int snd_hdspm_get_line_out(struct snd_kcontrol *kcontrol, | 1839 | static int snd_hdspm_get_line_out(struct snd_kcontrol *kcontrol, |
1848 | struct snd_ctl_elem_value *ucontrol) | 1840 | struct snd_ctl_elem_value *ucontrol) |
@@ -1897,15 +1889,7 @@ static int hdspm_set_tx_64(struct hdspm * hdspm, int out) | |||
1897 | return 0; | 1889 | return 0; |
1898 | } | 1890 | } |
1899 | 1891 | ||
1900 | static int snd_hdspm_info_tx_64(struct snd_kcontrol *kcontrol, | 1892 | #define snd_hdspm_info_tx_64 snd_ctl_boolean_mono_info |
1901 | struct snd_ctl_elem_info *uinfo) | ||
1902 | { | ||
1903 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1904 | uinfo->count = 1; | ||
1905 | uinfo->value.integer.min = 0; | ||
1906 | uinfo->value.integer.max = 1; | ||
1907 | return 0; | ||
1908 | } | ||
1909 | 1893 | ||
1910 | static int snd_hdspm_get_tx_64(struct snd_kcontrol *kcontrol, | 1894 | static int snd_hdspm_get_tx_64(struct snd_kcontrol *kcontrol, |
1911 | struct snd_ctl_elem_value *ucontrol) | 1895 | struct snd_ctl_elem_value *ucontrol) |
@@ -1960,15 +1944,7 @@ static int hdspm_set_c_tms(struct hdspm * hdspm, int out) | |||
1960 | return 0; | 1944 | return 0; |
1961 | } | 1945 | } |
1962 | 1946 | ||
1963 | static int snd_hdspm_info_c_tms(struct snd_kcontrol *kcontrol, | 1947 | #define snd_hdspm_info_c_tms snd_ctl_boolean_mono_info |
1964 | struct snd_ctl_elem_info *uinfo) | ||
1965 | { | ||
1966 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1967 | uinfo->count = 1; | ||
1968 | uinfo->value.integer.min = 0; | ||
1969 | uinfo->value.integer.max = 1; | ||
1970 | return 0; | ||
1971 | } | ||
1972 | 1948 | ||
1973 | static int snd_hdspm_get_c_tms(struct snd_kcontrol *kcontrol, | 1949 | static int snd_hdspm_get_c_tms(struct snd_kcontrol *kcontrol, |
1974 | struct snd_ctl_elem_value *ucontrol) | 1950 | struct snd_ctl_elem_value *ucontrol) |
@@ -2023,15 +1999,7 @@ static int hdspm_set_safe_mode(struct hdspm * hdspm, int out) | |||
2023 | return 0; | 1999 | return 0; |
2024 | } | 2000 | } |
2025 | 2001 | ||
2026 | static int snd_hdspm_info_safe_mode(struct snd_kcontrol *kcontrol, | 2002 | #define snd_hdspm_info_safe_mode snd_ctl_boolean_mono_info |
2027 | struct snd_ctl_elem_info *uinfo) | ||
2028 | { | ||
2029 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2030 | uinfo->count = 1; | ||
2031 | uinfo->value.integer.min = 0; | ||
2032 | uinfo->value.integer.max = 1; | ||
2033 | return 0; | ||
2034 | } | ||
2035 | 2003 | ||
2036 | static int snd_hdspm_get_safe_mode(struct snd_kcontrol *kcontrol, | 2004 | static int snd_hdspm_get_safe_mode(struct snd_kcontrol *kcontrol, |
2037 | struct snd_ctl_elem_value *ucontrol) | 2005 | struct snd_ctl_elem_value *ucontrol) |
@@ -2086,15 +2054,7 @@ static int hdspm_set_emphasis(struct hdspm * hdspm, int emp) | |||
2086 | return 0; | 2054 | return 0; |
2087 | } | 2055 | } |
2088 | 2056 | ||
2089 | static int snd_hdspm_info_emphasis(struct snd_kcontrol *kcontrol, | 2057 | #define snd_hdspm_info_emphasis snd_ctl_boolean_mono_info |
2090 | struct snd_ctl_elem_info *uinfo) | ||
2091 | { | ||
2092 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2093 | uinfo->count = 1; | ||
2094 | uinfo->value.integer.min = 0; | ||
2095 | uinfo->value.integer.max = 1; | ||
2096 | return 0; | ||
2097 | } | ||
2098 | 2058 | ||
2099 | static int snd_hdspm_get_emphasis(struct snd_kcontrol *kcontrol, | 2059 | static int snd_hdspm_get_emphasis(struct snd_kcontrol *kcontrol, |
2100 | struct snd_ctl_elem_value *ucontrol) | 2060 | struct snd_ctl_elem_value *ucontrol) |
@@ -2149,15 +2109,7 @@ static int hdspm_set_dolby(struct hdspm * hdspm, int dol) | |||
2149 | return 0; | 2109 | return 0; |
2150 | } | 2110 | } |
2151 | 2111 | ||
2152 | static int snd_hdspm_info_dolby(struct snd_kcontrol *kcontrol, | 2112 | #define snd_hdspm_info_dolby snd_ctl_boolean_mono_info |
2153 | struct snd_ctl_elem_info *uinfo) | ||
2154 | { | ||
2155 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2156 | uinfo->count = 1; | ||
2157 | uinfo->value.integer.min = 0; | ||
2158 | uinfo->value.integer.max = 1; | ||
2159 | return 0; | ||
2160 | } | ||
2161 | 2113 | ||
2162 | static int snd_hdspm_get_dolby(struct snd_kcontrol *kcontrol, | 2114 | static int snd_hdspm_get_dolby(struct snd_kcontrol *kcontrol, |
2163 | struct snd_ctl_elem_value *ucontrol) | 2115 | struct snd_ctl_elem_value *ucontrol) |
@@ -2212,15 +2164,7 @@ static int hdspm_set_professional(struct hdspm * hdspm, int dol) | |||
2212 | return 0; | 2164 | return 0; |
2213 | } | 2165 | } |
2214 | 2166 | ||
2215 | static int snd_hdspm_info_professional(struct snd_kcontrol *kcontrol, | 2167 | #define snd_hdspm_info_professional snd_ctl_boolean_mono_info |
2216 | struct snd_ctl_elem_info *uinfo) | ||
2217 | { | ||
2218 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2219 | uinfo->count = 1; | ||
2220 | uinfo->value.integer.min = 0; | ||
2221 | uinfo->value.integer.max = 1; | ||
2222 | return 0; | ||
2223 | } | ||
2224 | 2168 | ||
2225 | static int snd_hdspm_get_professional(struct snd_kcontrol *kcontrol, | 2169 | static int snd_hdspm_get_professional(struct snd_kcontrol *kcontrol, |
2226 | struct snd_ctl_elem_value *ucontrol) | 2170 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index 2de27405a0bd..34f96f12e5bf 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 | ||
1070 | static 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 | ||
1079 | static int snd_rme9652_get_spdif_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 1072 | static 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 | ||
1341 | static 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 | ||
1350 | static int snd_rme9652_get_passthru(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 1336 | static 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 | ||
1448 | static 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 | ||
1457 | static int snd_rme9652_get_tc_valid(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 1436 | static int snd_rme9652_get_tc_valid(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1458 | { | 1437 | { |
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index 7ca606272460..00e4004d5638 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c | |||
@@ -2317,15 +2317,7 @@ int __devinit snd_trident_spdif_pcm(struct snd_trident * trident, | |||
2317 | Description: enable/disable S/PDIF out from ac97 mixer | 2317 | Description: enable/disable S/PDIF out from ac97 mixer |
2318 | ---------------------------------------------------------------------------*/ | 2318 | ---------------------------------------------------------------------------*/ |
2319 | 2319 | ||
2320 | static int snd_trident_spdif_control_info(struct snd_kcontrol *kcontrol, | 2320 | #define snd_trident_spdif_control_info snd_ctl_boolean_mono_info |
2321 | struct snd_ctl_elem_info *uinfo) | ||
2322 | { | ||
2323 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2324 | uinfo->count = 1; | ||
2325 | uinfo->value.integer.min = 0; | ||
2326 | uinfo->value.integer.max = 1; | ||
2327 | return 0; | ||
2328 | } | ||
2329 | 2321 | ||
2330 | static int snd_trident_spdif_control_get(struct snd_kcontrol *kcontrol, | 2322 | static int snd_trident_spdif_control_get(struct snd_kcontrol *kcontrol, |
2331 | struct snd_ctl_elem_value *ucontrol) | 2323 | struct snd_ctl_elem_value *ucontrol) |
@@ -2545,15 +2537,7 @@ static struct snd_kcontrol_new snd_trident_spdif_stream __devinitdata = | |||
2545 | Description: enable/disable rear path for ac97 | 2537 | Description: enable/disable rear path for ac97 |
2546 | ---------------------------------------------------------------------------*/ | 2538 | ---------------------------------------------------------------------------*/ |
2547 | 2539 | ||
2548 | static int snd_trident_ac97_control_info(struct snd_kcontrol *kcontrol, | 2540 | #define snd_trident_ac97_control_info snd_ctl_boolean_mono_info |
2549 | struct snd_ctl_elem_info *uinfo) | ||
2550 | { | ||
2551 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2552 | uinfo->count = 1; | ||
2553 | uinfo->value.integer.min = 0; | ||
2554 | uinfo->value.integer.max = 1; | ||
2555 | return 0; | ||
2556 | } | ||
2557 | 2541 | ||
2558 | static int snd_trident_ac97_control_get(struct snd_kcontrol *kcontrol, | 2542 | static int snd_trident_ac97_control_get(struct snd_kcontrol *kcontrol, |
2559 | struct snd_ctl_elem_value *ucontrol) | 2543 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 6ea09df0c73a..5faa57956ca9 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -1572,15 +1572,7 @@ static struct snd_kcontrol_new snd_via8233_capture_source __devinitdata = { | |||
1572 | .put = snd_via8233_capture_source_put, | 1572 | .put = snd_via8233_capture_source_put, |
1573 | }; | 1573 | }; |
1574 | 1574 | ||
1575 | static int snd_via8233_dxs3_spdif_info(struct snd_kcontrol *kcontrol, | 1575 | #define snd_via8233_dxs3_spdif_info snd_ctl_boolean_mono_info |
1576 | struct snd_ctl_elem_info *uinfo) | ||
1577 | { | ||
1578 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1579 | uinfo->count = 1; | ||
1580 | uinfo->value.integer.min = 0; | ||
1581 | uinfo->value.integer.max = 1; | ||
1582 | return 0; | ||
1583 | } | ||
1584 | 1576 | ||
1585 | static int snd_via8233_dxs3_spdif_get(struct snd_kcontrol *kcontrol, | 1577 | static int snd_via8233_dxs3_spdif_get(struct snd_kcontrol *kcontrol, |
1586 | struct snd_ctl_elem_value *ucontrol) | 1578 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index ab7a81c35705..7fa57c9ecc5f 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c | |||
@@ -1443,22 +1443,7 @@ static struct snd_kcontrol_new snd_ymfpci_drec_source __devinitdata = { | |||
1443 | .get = snd_ymfpci_get_single, .put = snd_ymfpci_put_single, \ | 1443 | .get = snd_ymfpci_get_single, .put = snd_ymfpci_put_single, \ |
1444 | .private_value = ((reg) | ((shift) << 16)) } | 1444 | .private_value = ((reg) | ((shift) << 16)) } |
1445 | 1445 | ||
1446 | static int snd_ymfpci_info_single(struct snd_kcontrol *kcontrol, | 1446 | #define snd_ymfpci_info_single snd_ctl_boolean_mono_info |
1447 | struct snd_ctl_elem_info *uinfo) | ||
1448 | { | ||
1449 | int reg = kcontrol->private_value & 0xffff; | ||
1450 | |||
1451 | switch (reg) { | ||
1452 | case YDSXGR_SPDIFOUTCTRL: break; | ||
1453 | case YDSXGR_SPDIFINCTRL: break; | ||
1454 | default: return -EINVAL; | ||
1455 | } | ||
1456 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1457 | uinfo->count = 1; | ||
1458 | uinfo->value.integer.min = 0; | ||
1459 | uinfo->value.integer.max = 1; | ||
1460 | return 0; | ||
1461 | } | ||
1462 | 1447 | ||
1463 | static int snd_ymfpci_get_single(struct snd_kcontrol *kcontrol, | 1448 | static int snd_ymfpci_get_single(struct snd_kcontrol *kcontrol, |
1464 | struct snd_ctl_elem_value *ucontrol) | 1449 | struct snd_ctl_elem_value *ucontrol) |
@@ -1570,14 +1555,7 @@ static int snd_ymfpci_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_e | |||
1570 | /* | 1555 | /* |
1571 | * 4ch duplication | 1556 | * 4ch duplication |
1572 | */ | 1557 | */ |
1573 | static int snd_ymfpci_info_dup4ch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 1558 | #define snd_ymfpci_info_dup4ch snd_ctl_boolean_mono_info |
1574 | { | ||
1575 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1576 | uinfo->count = 1; | ||
1577 | uinfo->value.integer.min = 0; | ||
1578 | uinfo->value.integer.max = 1; | ||
1579 | return 0; | ||
1580 | } | ||
1581 | 1559 | ||
1582 | static int snd_ymfpci_get_dup4ch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 1560 | static int snd_ymfpci_get_dup4ch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1583 | { | 1561 | { |
@@ -1665,14 +1643,7 @@ static int snd_ymfpci_set_gpio_out(struct snd_ymfpci *chip, int pin, int enable) | |||
1665 | return 0; | 1643 | return 0; |
1666 | } | 1644 | } |
1667 | 1645 | ||
1668 | static int snd_ymfpci_gpio_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 1646 | #define snd_ymfpci_gpio_sw_info snd_ctl_boolean_mono_info |
1669 | { | ||
1670 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1671 | uinfo->count = 1; | ||
1672 | uinfo->value.integer.min = 0; | ||
1673 | uinfo->value.integer.max = 1; | ||
1674 | return 0; | ||
1675 | } | ||
1676 | 1647 | ||
1677 | static int snd_ymfpci_gpio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 1648 | static int snd_ymfpci_gpio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1678 | { | 1649 | { |