aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ymfpci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/ymfpci')
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c35
1 files changed, 3 insertions, 32 deletions
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
1446static 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
1463static int snd_ymfpci_get_single(struct snd_kcontrol *kcontrol, 1448static 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 */
1573static 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
1582static int snd_ymfpci_get_dup4ch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1560static 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
1668static 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
1677static int snd_ymfpci_gpio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1648static int snd_ymfpci_gpio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1678{ 1649{