diff options
Diffstat (limited to 'sound/pci/ymfpci/ymfpci_main.c')
-rw-r--r-- | sound/pci/ymfpci/ymfpci_main.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index 03ee4e365311..12a9a2b03387 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c | |||
@@ -1614,6 +1614,14 @@ static int snd_ymfpci_put_dup4ch(struct snd_kcontrol *kcontrol, struct snd_ctl_e | |||
1614 | return change; | 1614 | return change; |
1615 | } | 1615 | } |
1616 | 1616 | ||
1617 | static struct snd_kcontrol_new snd_ymfpci_dup4ch __devinitdata = { | ||
1618 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
1619 | .name = "4ch Duplication", | ||
1620 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, | ||
1621 | .info = snd_ymfpci_info_dup4ch, | ||
1622 | .get = snd_ymfpci_get_dup4ch, | ||
1623 | .put = snd_ymfpci_put_dup4ch, | ||
1624 | }; | ||
1617 | 1625 | ||
1618 | static struct snd_kcontrol_new snd_ymfpci_controls[] __devinitdata = { | 1626 | static struct snd_kcontrol_new snd_ymfpci_controls[] __devinitdata = { |
1619 | { | 1627 | { |
@@ -1642,13 +1650,6 @@ YMFPCI_DOUBLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,VOLUME), 1, YDSXGR_SPDIFLOOPVOL), | |||
1642 | YMFPCI_SINGLE(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH), 0, YDSXGR_SPDIFOUTCTRL, 0), | 1650 | YMFPCI_SINGLE(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH), 0, YDSXGR_SPDIFOUTCTRL, 0), |
1643 | YMFPCI_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), 0, YDSXGR_SPDIFINCTRL, 0), | 1651 | YMFPCI_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), 0, YDSXGR_SPDIFINCTRL, 0), |
1644 | YMFPCI_SINGLE(SNDRV_CTL_NAME_IEC958("Loop",NONE,NONE), 0, YDSXGR_SPDIFINCTRL, 4), | 1652 | YMFPCI_SINGLE(SNDRV_CTL_NAME_IEC958("Loop",NONE,NONE), 0, YDSXGR_SPDIFINCTRL, 4), |
1645 | { | ||
1646 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
1647 | .name = "4ch Duplication", | ||
1648 | .info = snd_ymfpci_info_dup4ch, | ||
1649 | .get = snd_ymfpci_get_dup4ch, | ||
1650 | .put = snd_ymfpci_put_dup4ch, | ||
1651 | }, | ||
1652 | }; | 1653 | }; |
1653 | 1654 | ||
1654 | 1655 | ||
@@ -1838,6 +1839,12 @@ int __devinit snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch) | |||
1838 | if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_ymfpci_controls[idx], chip))) < 0) | 1839 | if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_ymfpci_controls[idx], chip))) < 0) |
1839 | return err; | 1840 | return err; |
1840 | } | 1841 | } |
1842 | if (chip->ac97->ext_id & AC97_EI_SDAC) { | ||
1843 | kctl = snd_ctl_new1(&snd_ymfpci_dup4ch, chip); | ||
1844 | err = snd_ctl_add(chip->card, kctl); | ||
1845 | if (err < 0) | ||
1846 | return err; | ||
1847 | } | ||
1841 | 1848 | ||
1842 | /* add S/PDIF control */ | 1849 | /* add S/PDIF control */ |
1843 | if (snd_BUG_ON(!chip->pcm_spdif)) | 1850 | if (snd_BUG_ON(!chip->pcm_spdif)) |