aboutsummaryrefslogtreecommitdiff
path: root/sound/usb
AgeCommit message (Collapse)Author
2011-03-11ALSA: usbaudio: implement USB autosuspendOliver Neukum
Devices are autosuspended if no pcm nor midi channel is open Mixer devices may be opened. This way they are active when in use to play or record sound, but can be suspended while users have a mixer application running. [Small clean-ups using static inline by tiwai] Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11ALSA: usbaudio: fix suspend/resumeOliver Neukum
- ESHUTDOWN must be correctly handled - the optional interrupt endpoint's URB must be stopped and restarted Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11Merge branch 'fix/misc' into topic/miscTakashi Iwai
2011-03-10ALSA: usb-audio - Add "cval->res = 384" quirk for Logitech Webcam C600Alexey Fisher
One more affected devices: Logitech Webcam C600 (046d:0808) Volume range before quirk is 6400, after (also real) is 16. Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10ALSA: usb-audio - Add volume range check and warn if it too bigAlexey Fisher
Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23ALSA: usb-audio: fix oops due to cleanup race when disconnectingTakashi Iwai
When a USB audio device is disconnected, snd_usb_audio_disconnect() kills all audio URBs. At the same time, the application, after being notified of the disconnection, might close the device, in which case ALSA calls the .hw_free callback, which should free the URBs too. Commit de1b8b93a0ba "[ALSA] Fix hang-up at disconnection of usb-audio" prevented snd_usb_hw_free() from freeing the URBs to avoid a hang that resulted from this race, but this introduced another race because the URB callbacks could now be executed after snd_usb_hw_free() has returned, and try to access already freed data. Fix the first race by introducing a mutex to serialize the disconnect callback and all PCM callbacks that manage URBs (hw_free and hw_params). Reported-and-tested-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com> Cc: <stable@kernel.org> [CL: also serialize hw_params callback] Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14ALSA: caiaq - Fix possible string-buffer overflowTakashi Iwai
Use strlcpy() to assure not to overflow the string array sizes by too long USB device name string. Reported-by: Rafa <rafa@mwrinfosecurity.com> Cc: stable <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14ALSA: usb-audio: reconstruct some dispatcher functions to use switch-caseDaniel Mack
The number of cases has increased so use switch-case rather than if-statements. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14ALSA: usb-audio: add support for Native Instruments MK2 devicesDaniel Mack
The MK2 generation of Native Instruments' sound cards are in fact compliant to the USB audio standard of version 2 and other approved USB standards. However, they come up as vendor-specific device when first connected but can be told to come up with a new set of descriptors upon their next enumeration. The interfaces announced by the new descriptors will be handled by the kernel's class drivers. This is done by issuing a vendor specific device request and sending the device to reset. There are also some vendor-specific USB requests for some mixer elements that can't be exported in a standard compliant way. The driver now supports them with quirks handling mechanisms. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14ALSA: snd-usb-caiaq: Add support for Traktor Audio 2Daniel Mack
Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-08ALSA: usbaudio - Enable the E-MU 0204 USBJoseph Teichman
Signed-off-by: Joseph Teichman <josteich@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-07ALSA: USB: 6fire: signedness bug in usb6fire_pcm_prepare()Dan Carpenter
rt->rate is an unsigned char so it's never equal to -1. It's not a huge problem because the invalid rate is caught inside the call to usb6fire_pcm_set_rate() which returns -EINVAL. But if we fix the test then it prints out the correct error message so that's good. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-24ALSA: usb/6fire - Driver for TerraTec DMX 6Fire USBTorsten Schenk
What is working: Everything except SPDIF - Hardware Master volume - PCM 44-192kHz@24 bits, 6 channels out, 4 channels in (analog) - MIDI in/out - firmware loading after cold start - phono/line switching Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-11ALSA: snd-usb-us122l: Fix missing NULL checksKarsten Wiese
Fix missing NULL checks in usb_stream_hwdep_poll() and usb_stream_hwdep_ioctl(). Wake up poll waiters before returning from usb_stream_hwdep_ioctl(). Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-11ALSA: snd-usb-us122l: Fix MIDI outputKarsten Wiese
The US-122L always reads 9 bytes per urb unless they are set to 0xFD. Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10ALSA: usb-audio: add Edirol SD-90 PCM supportClemens Ladisch
Add support for the 24-bit audio I/Os of the Edirol SD-90 interface. Reported-any-tested-by: Jim Grusendorf <alsa-user@grusendorf.ca> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10ALSA: usb-audio: use enum control info helperClemens Ladisch
Simplify info callbacks by using the snd_ctl_enum_info() helper function. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-02ALSA: usb-audio - Support for Power/Status LED on Creative USB X-Fi S51Mandar Joshi
This patch adds support for Power/Status LED on Creative USB X-Fi S51. There is just one LED on the device. The LED can either be On or it can be set to Blink. There doesn't seem to be a way to switch it off. The control message to change LED status is similar to that of audigy2nx except that the index is to be set to 0 and value is 1 for Blink and 0 for On. The 'Power LED' control in alsamixer when muted will cause the LED to Blink continuously. When unmuted the LED will stay On. The Creative driver under Windows sets the LED to blink whenever audio is muted. This LED can be treated as the CMSS LED but I figured since there is just one LED, it should be treated as the Power LED. Is that alright? I've also changed the comment "Usb X-Fi" to "Usb X-Fi S51" as there are other external X-Fi devices from Creative like Usb X-Fi Go and Xmod. The volume knob and LED support patch doesn't apply to them. Signed-off-by: Mandar Joshi <emailmandar@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-01ALSA: usb - driver neglects kmalloc return value check and may deref NULLJesper Juhl
sound/usb/pcm.c::snd_usb_pcm_check_knot() fails to check the return value from kmalloc() and may end up dereferencing a null pointer. The patch below (compile tested only) should take care of that little problem. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-27ALSA: usb-audio: automatically detect feedback formatClemens Ladisch
There are two USB Audio Class specifications (v1 and v2), but neither of them clearly defines the feedback format for high-speed UAC v1 devices. Add to this whatever the Creative and M-Audio firmware writers have been smoking, and it becomes impossible to predict the exact feedback format used by a particular device. Therefore, automatically detect the feedback format by looking at the magnitude of the first received feedback value. Also, this allows us to get rid of some special cases for E-Mu devices. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-24ALSA: usb - Creative USB X-Fi volume knob supportMandar Joshi
Adds an entry for Creative USB X-Fi to the rc_config array in mixer_quirks.c to allow use of volume knob on the device. The action of the volume knob is received by lirc when its using the alsa_usb driver. Signed-off-by: Mandar Joshi <emailmandar@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-22ALSA: usb-audio: add Novation Launchpad supportClemens Ladisch
Add a quirk entry for the Novation Launchpad USB MIDI controller. QUIRK_MIDI_FASTLANE gets renamed to *_RAW_BYTES because this quirk type is now shared by different devices. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Tested-by: Jakob Flierl <jakob.flierl@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-17sound: fixed typosAndrea Gelmini
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-11ALSA: sound/usb/usx2y: simplify conditionalNicolas Kaiser
Simplify conditional: (a || (!a && b)) => (a || b) Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-05ALSA: usb-audio: add more Yamaha USB MIDI devicesClemens Ladisch
Add quirks for more devices (according to driver V.3.0.4-2). Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16ALSA: usb/mixer: remove bogus castDan Carpenter
"uinfo->value.enumerated.item" is an unsigned int. If it's negative when we do the comparison: if ((int)uinfo->value.enumerated.item >= cval->max) then we would read past the end of the array on the next line. I also changed the strcpy() to strlcpy() out of paranoia. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16ALSA: usb-audio - Fix an unused-variable compile warningTakashi Iwai
Used only when CONFIG_SND_DEBUG=y sound/usb/mixer.c: In function 'get_min_max': sound/usb/mixer.c:762: warning: unused variable 'chip' Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-10ALSA: snd-usb-caiaq: Add support for Traktor Kontrol S4Daniel Mack
This patch adds support for the new Traktor Kontrol S4 by Native Instruments. It features a new audio data streaming model, MIDI in and out ports, a huge number of 174 dimmable LEDs, 96 buttons and 46 absolute encoder axis, including some rotary encoders. All features are supported by the driver now. Did some code refactoring along the way. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-10ALSA: snd-usb-caiaq: drop version numberDaniel Mack
Let git do the job. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09Merge branch 'fix/misc' into topic/miscTakashi Iwai
2010-09-08ALSA: usb - Release capture substream URBs properlyTakashi Iwai
Due to the wrong "return" in the loop, a capture substream won't be released at disconnection properly if the device is capture only and has no playback substream. This caused Oops occasionally at the device reconnection. Reported-by: Kim Minhyoung <minhyoung.kim@lge.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-03Merge branch 'fix/misc' into topic/miscTakashi Iwai
2010-09-03ALSA: usb-audio: fix detection of vendor-specific device protocol settingsClemens Ladisch
The Audio Class v2 support code in 2.6.35 added checks for the bInterfaceProtocol field. However, there are devices (usually those detected by vendor-specific quirks) that do not have one of the predefined values in this field, which made the driver reject them. To fix this regression, restore the old behaviour, i.e., assume that a device with an unknown bInterfaceProtocol field (other than UAC_VERSION_2) has more or less UAC-v1-compatible descriptors. [compile warning fixes by tiwai] Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: Daniel Mack <daniel@caiaq.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-03ALSA: usb-audio: add BOSS ME-25 supportClemens Ladisch
Add a quirk to make the BOSS ME-25 work. Many thanks to Kees van Veen. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-03ALSA: usb-audio: add Roland A-PRO supportClemens Ladisch
Add a quirk for the Roland/Cakewalk A-300PRO/A-500PRO/A-800PRO keyboards. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-03ALSA: usb-audio: add Edirol PCR-1 PCM supportClemens Ladisch
Add a quirk for the other logical device of the PCR-1 so that not only the MIDI interface but also the audio interface works. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-02ALSA: usb-audio: Assume first control interface is for audioDaniel Mack
For devices with more than one control interface, let's assume the first one contains the audio controls. Unfortunately, there is no field in any of the descriptors to tell us whether a control interface is for audio or MIDI controls, so a better check is not easy to implement. On a composite device with audio and MIDI functions, for example, the code currently overwrites chip->ctrl_intf, causing operations on the control interface to fail if they are issued after the device probe. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-02ALSA: usb-audio: fix Fast Track Ultra (8R) 44.1 sample ratesClemens Ladisch
The M-Audio Fast Track Ultra series devices did not play sound correctly at 44.1/88.2 kHz. Changing the output endpoint attribute to adaptive fixes this. Signed-off-by: Felix Homann <fexpop@web.de> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-18Merge branch 'fix/misc' into topic/miscTakashi Iwai
2010-08-18Merge branch 'topic/isa' into topic/miscTakashi Iwai
2010-08-15Merge branch 'for-linus' of ↵Linus Torvalds
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: ALSA: sound/usb/format: silence uninitialized variable warnings MAINTAINERS: Add Ian Lartey as comaintaner for Wolfson devices MAINTAINERS: Make Wolfson entry also cover CODEC drivers ASoC: Only tweak WM8994 chip configuration on devices up to rev D ASoC: Optimise DSP performance for WM8994 ALSA: hda - Fix dynamic ADC change working again ALSA: hda - Restrict PCM parameters per ELD information over HDMI sound: oss: sh_dac_audio.c removed duplicated #include
2010-08-15ALSA: sound/usb/format: silence uninitialized variable warningsDan Carpenter
Gcc complains that ret might be used uninitialized: sound/usb/format.c: In function ‘snd_usb_parse_audio_format’: sound/usb/format.c:354: warning: ‘ret’ may be used uninitialized in this function sound/usb/format.c:354: note: ‘ret’ was declared here sound/usb/format.c:414: warning: ‘ret’ may be used uninitialized in this function sound/usb/format.c:414: note: ‘ret’ was declared here I suppose it could be uninitialized if there is ever a UAC_VERSION_3 released. Anyway this patch is worthwhile if only to silence the gcc warning. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-14ALSA: usb: USB3 SuperSpeed sound supportPaul Zimmerman
This is V2 of the patch, after feedback from Clemens and Daniel. This patch adds SuperSpeed support to the USB drivers under sound/. It adds tests for USB_SPEED_SUPER to the appropriate places that check for the USB speed. This patch has been tested with our SS USB3 device emulating a set of Yamaha speakers and a Logitech microphone, but with the descriptors modified to add USB3 support. It has also been tested with the real speakers and microphone, to make sure that USB2 devices still work. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Daniel Mack <daniel@caiaq.de> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-07Merge branch 'for-linus' of ↵Linus Torvalds
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: (214 commits) ALSA: hda - Add pin-fix for HP dc5750 ALSA: als4000: Fix potentially invalid DMA mode setup ALSA: als4000: enable burst mode ALSA: hda - Fix initial capsrc selection in patch_alc269() ASoC: TWL4030: Capture route runtime DAPM ordering fix ALSA: hda - Add PC-beep whitelist for an Intel board ALSA: hda - More relax for pending period handling ALSA: hda - Define AC_FMT_* constants ALSA: hda - Fix beep frequency on IDT 92HD73xx and 92HD71Bxx codecs ALSA: hda - Add support for HDMI HBR passthrough ALSA: hda - Set Stream Type in Stream Format according to AES0 ALSA: hda - Fix Thinkpad X300 so SPDIF is not exposed ALSA: hda - FIX to not expose SPDIF on Thinkpad X301, since it does not have the ability to use SPDIF ASoC: wm9081: fix resource reclaim in wm9081_register error path ASoC: wm8978: fix a memory leak if a wm8978_register fail ASoC: wm8974: fix a memory leak if another WM8974 is registered ASoC: wm8961: fix resource reclaim in wm8961_register error path ASoC: wm8955: fix resource reclaim in wm8955_register error path ASoC: wm8940: fix a memory leak if wm8940_register return error ASoC: wm8904: fix resource reclaim in wm8904_register error path ...
2010-08-04Merge branch 'master' into for-nextJiri Kosina
2010-08-02ALSA: usb - Correct audio problem for Hauppage HVR-850 and others rel. to ↵John S Gruber
urb data align Match usb ids in usb/quirks-table.h for some Hauppage HVR-950Q models and for the HVR850 model to those ids at the end of au0828-cards.c Thanks to nhJm449 for pointing out the problem. Signed-off-by: John S Gruber <JohnSGruber@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-12fix comnment/printk typos concerning "empty"Uwe Kleine-König
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-07-09ALSA: usb-audio: silence a superfluous warningClemens Ladisch
It is not advisable to print a warning when a device does not support setting the sample rate because this is perfectly valid for devices with a single rate or where rates are implicitly changed by selecting another alternate setting. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-24ALSA: usb - Fix compile error with CONFIG_SND_DEBUG_VERBOSE=yTakashi Iwai
Replaced the forgotten cval->mixer->ctrlif. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-23ALSA: usb-audio: simplify control interface accessDaniel Mack
As the control interface is now carried in struct snd_usb_audio, we can simplify the API a little and also drop the private ctrlif field from struct usb_mixer_interface. Also remove a left-over function prototype in pcm.h. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>