aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio/echoaudio.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 11:05:17 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 11:05:17 -0700
commit502012534dd23e4a88aba7e5827b2ca1e1eaa4ca (patch)
tree58f0cfc09f1bcd4ae1689efa805d7d344b5fd5ad /sound/pci/echoaudio/echoaudio.c
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 (diff)
parentMerge branch 'topic/usb-caiaq' into for-linus (diff)
downloadlinux-dev-502012534dd23e4a88aba7e5827b2ca1e1eaa4ca.tar.xz
linux-dev-502012534dd23e4a88aba7e5827b2ca1e1eaa4ca.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (430 commits) ALSA: hda - Add quirk for Acer Ferrari 5000 ALSA: hda - Use cached calls to get widget caps and pin caps ALSA: hda - Don't create empty/single-item input source ALSA: hda - Fix the wrong pin-cap check in patch_realtek.c ALSA: hda - Cache pin-cap values ALSA: hda - Avoid output amp manipulation to digital mic pins ALSA: hda - Add function id to proc output ALSA: pcm - Safer boundary checks ALSA: hda - Detect digital-mic inputs on ALC663 / ALC272 ALSA: sound/ali5451: typo: s/resouces/resources/ ALSA: hda - Don't show the current connection for power widgets ALSA: Fix wrong pointer to dev_err() in arm/pxa2xx-ac97-lib.c ASoC: Declare Headset as Mic and Headphone widgets for SDP3430 ASoC: OMAP: N810: Add more jack functions ASoC: OMAP: N810: Mark not connected input pins ASoC: Add FLL support for WM8400 ALSA: hda - Don't reset stream at each prepare callback ALSA: hda - Don't reset BDL unnecessarily ALSA: pcm - Fix delta calculation at boundary overlap ALSA: pcm - Reset invalid position even without debug option ...
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)
Control interface
******************************************************************************/
+#ifndef ECHOCARD_HAS_VMIXER
+
/******************* PCM output volume *******************/
static int snd_echo_output_gain_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
@@ -1001,18 +1003,6 @@ static int snd_echo_output_gain_put(struct snd_kcontrol *kcontrol,
return changed;
}
-#ifdef ECHOCARD_HAS_VMIXER
-/* On Vmixer cards this one controls the line-out volume */
-static struct snd_kcontrol_new snd_echo_line_output_gain __devinitdata = {
- .name = "Line Playback Volume",
- .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
- .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ,
- .info = snd_echo_output_gain_info,
- .get = snd_echo_output_gain_get,
- .put = snd_echo_output_gain_put,
- .tlv = {.p = db_scale_output_gain},
-};
-#else
static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = {
.name = "PCM Playback Volume",
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -1022,6 +1012,7 @@ static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = {
.put = snd_echo_output_gain_put,
.tlv = {.p = db_scale_output_gain},
};
+
#endif
@@ -1997,9 +1988,9 @@ static int __devinit snd_echo_probe(struct pci_dev *pci,
DE_INIT(("Echoaudio driver starting...\n"));
i = 0;
- card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
- if (card == NULL)
- return -ENOMEM;
+ err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+ if (err < 0)
+ return err;
snd_card_set_dev(card, &pci->dev);
@@ -2037,8 +2028,6 @@ static int __devinit snd_echo_probe(struct pci_dev *pci,
#ifdef ECHOCARD_HAS_VMIXER
snd_echo_vmixer.count = num_pipes_out(chip) * num_busses_out(chip);
- if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_line_output_gain, chip))) < 0)
- goto ctl_error;
if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_vmixer, chip))) < 0)
goto ctl_error;
#else