diff options
author | Giuliano Pochini <pochini@shiny.it> | 2009-03-15 16:33:34 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-03-16 03:37:29 -0400 |
commit | 9f5d790d1b0af8e3705df12fd5d49a1df2a45c47 (patch) | |
tree | 55b1e309b1912b9cd8b6e539cc938ab4db43c441 /sound/pci/echoaudio | |
parent | 041b62374c7fedc11a8a1eeda2868612d3d1436c (diff) |
ALSA: echoaudio: remove line-out volume from vmixer cards
There is a long standing bug in the drivers for cards with a vmixer because
I overlooked a detail in the c++ generic driver by echoaudio. Those cards
do not have a line-out volume control. It is a virtual control provided by
the generic driver. The bug is harmless because the DSP just ignores the
command to change the volume.
*NB:* It breaks alsa-tools/echomixer. A patch for it will follow.
This patch removes the line-out volume control from vmixer-equipped cards.
Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/echoaudio')
-rw-r--r-- | sound/pci/echoaudio/echoaudio.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index 8dbc5c4ba421..4b70ea1e4c9f 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 *******************/ |
954 | static int snd_echo_output_gain_info(struct snd_kcontrol *kcontrol, | 956 | static 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 */ | ||
1006 | static 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 | ||
1016 | static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = { | 1006 | static 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 | ||
@@ -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 |