aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio/echoaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/echoaudio/echoaudio.c')
-rw-r--r--sound/pci/echoaudio/echoaudio.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index 8dbc5c4ba421..da2065cd2c0d 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -950,6 +950,8 @@ static int __devinit snd_echo_new_pcm(struct echoaudio *chip)
950 Control interface 950 Control interface
951******************************************************************************/ 951******************************************************************************/
952 952
953#ifndef ECHOCARD_HAS_VMIXER
954
953/******************* PCM output volume *******************/ 955/******************* PCM output volume *******************/
954static int snd_echo_output_gain_info(struct snd_kcontrol *kcontrol, 956static int snd_echo_output_gain_info(struct snd_kcontrol *kcontrol,
955 struct snd_ctl_elem_info *uinfo) 957 struct snd_ctl_elem_info *uinfo)
@@ -1001,18 +1003,6 @@ static int snd_echo_output_gain_put(struct snd_kcontrol *kcontrol,
1001 return changed; 1003 return changed;
1002} 1004}
1003 1005
1004#ifdef ECHOCARD_HAS_VMIXER
1005/* On Vmixer cards this one controls the line-out volume */
1006static struct snd_kcontrol_new snd_echo_line_output_gain __devinitdata = {
1007 .name = "Line Playback Volume",
1008 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1009 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ,
1010 .info = snd_echo_output_gain_info,
1011 .get = snd_echo_output_gain_get,
1012 .put = snd_echo_output_gain_put,
1013 .tlv = {.p = db_scale_output_gain},
1014};
1015#else
1016static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = { 1006static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = {
1017 .name = "PCM Playback Volume", 1007 .name = "PCM Playback Volume",
1018 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1008 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -1022,6 +1012,7 @@ static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = {
1022 .put = snd_echo_output_gain_put, 1012 .put = snd_echo_output_gain_put,
1023 .tlv = {.p = db_scale_output_gain}, 1013 .tlv = {.p = db_scale_output_gain},
1024}; 1014};
1015
1025#endif 1016#endif
1026 1017
1027 1018
@@ -1997,9 +1988,9 @@ static int __devinit snd_echo_probe(struct pci_dev *pci,
1997 1988
1998 DE_INIT(("Echoaudio driver starting...\n")); 1989 DE_INIT(("Echoaudio driver starting...\n"));
1999 i = 0; 1990 i = 0;
2000 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 1991 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
2001 if (card == NULL) 1992 if (err < 0)
2002 return -ENOMEM; 1993 return err;
2003 1994
2004 snd_card_set_dev(card, &pci->dev); 1995 snd_card_set_dev(card, &pci->dev);
2005 1996
@@ -2037,8 +2028,6 @@ static int __devinit snd_echo_probe(struct pci_dev *pci,
2037 2028
2038#ifdef ECHOCARD_HAS_VMIXER 2029#ifdef ECHOCARD_HAS_VMIXER
2039 snd_echo_vmixer.count = num_pipes_out(chip) * num_busses_out(chip); 2030 snd_echo_vmixer.count = num_pipes_out(chip) * num_busses_out(chip);
2040 if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_line_output_gain, chip))) < 0)
2041 goto ctl_error;
2042 if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_vmixer, chip))) < 0) 2031 if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_vmixer, chip))) < 0)
2043 goto ctl_error; 2032 goto ctl_error;
2044#else 2033#else