summaryrefslogtreecommitdiffstats
path: root/sound/usb
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: 6fire - Fix signedness bugTorsten Schenk2011-06-161-2/+2
| | | | | | | | | | Fixed remaining issues of the signedness bug discovered by Dan Carpenter. A check was remaining that tests if unsigned rt->rate is >= 0. Changed that so that rt->rate now consistently uses ARRAY_SIZE(rates) as invalid rate value and not -1. Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: 6fire: Fix double-free bug in usb6fire_fw_ezusb_upload()Jesper Juhl2011-06-141-1/+0
| | | | | | | | | | | We have a double-free bug in sound/usb/6fire/firmware.c::usb6fire_fw_ezusb_upload(). We already call release_firmware(fw) on line 258, so when we then do it again after usb6fire_fw_ezusb_write() returns <0, we have a double-free. Easily fixed by just removing the last call to release_firmware(). Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb - turn off de-emphasis in s/pdif for cm6206Eric Lammerts2011-06-031-1/+1
| | | | | | | CM6206: Turn off de-emphasis channel status bit in S/PDIF output. Signed-off-by: Eric Lammerts <eric@lammerts.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: 6fire: Don't leak firmware in error pathJesper Juhl2011-06-021-0/+1
| | | | | | | | | | One of the error paths in sound/usb/6fire/firmware.c::usb6fire_fw_ezusb_upload() neglects to free the memory allocated for the firmware before returning, thus leaking the memory. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: more control quirks for M-Audio FastTrack devicesDaniel Mack2011-05-252-2/+72
| | | | | | | | | | Make use of the freshly introduced methods to re-use standard mixer handling and add some controls that are hidden but implemented in a standard conform way on M-Audio's FastTrack devices. Signed-off-by: Daniel Mack <zonque@gmail.com> Original-code-by: Felix Homann <linuxaudio@showlabor.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: add new quirk type QUIRK_AUDIO_STANDARD_MIXERDaniel Mack2011-05-252-1/+17
| | | | | | | | | This quirk type will let the driver assume that there is a standard mixer on a given interface, or that a specific mixer quirks will handle the device. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: export snd_usb_feature_unit_ctlDaniel Mack2011-05-254-11/+15
| | | | | | | | | | | | In order to allow quirks functions to hook up to the standard feature unit op tables, this patch exports a pointer to the struct that is used internally. That way, all the code handling the control can be kept private, and external code can reference the symbol to re-use it. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: rework add_control_to_empty()Daniel Mack2011-05-252-9/+13
| | | | | | | | | | | | This patch renames add_control_to_empty() to snd_usb_mixer_add_control() and exports it, so the quirks functions can make use of it. Also, as "struct mixer_build" is private to mixer.c, rewrite the function to take an argument of type "struct usb_mixer_interface" instead. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: move assignment of chip->ctrl_intfDaniel Mack2011-05-251-8/+8
| | | | | | | This is needed for upcoming changes to the quirks mechanism. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/misc' into for-linusTakashi Iwai2011-05-2212-113/+273
|\
| * ALSA: usb-audio - Add support for USB X-Fi S51 ProMathieu Bouffard2011-05-181-0/+12
| | | | | | | | | | | | | | | | USB X-Fi S51 Pro volume and mute from the volume knob on the unit. Compiled and tested with 2.6.39-rc7-git12 Signed-off-by: Mathieu Bouffard <mbouffard@strangequarks.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: usb-audio: handle "Fast Track Ultra" with USB_DEVICE_VENDOR_SPEC()Daniel Mack2011-05-181-2/+2
| | | | | | | | | | | | | | | | That way, the class compliant MIDI interface is also handled. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-and-tested-by: Grant Diffey <gdiffey@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: usb-audio: assume valid clockDaniel Mack2011-05-181-1/+10
| | | | | | | | | | | | | | | | | | If the interface can't report a clock's validity, assume that it's valid. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Vicente Joel <vicentejoel@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: usb-audio: add quirks for Roland GR-55Daniel Mack2011-05-181-0/+26
| | | | | | | | | | | | Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Jeffrey Scott Flesher <jeffrey.scott.flesher@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: usb-audio: Add quirk for KORG PANDORA PX5D MIDI interfaceDaniel Mack2011-05-181-0/+11
| | | | | | | | | | | | Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-and-tested-by: Frédéric Jaume <frederic.jaume@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: usb-audio: remove invalid extra mixers for Komplete Audio 6Daniel Mack2011-05-183-19/+2
| | | | | | | | | | | | | | | | | | | | This was a flaw in the reading of the spec tables - Native Instrument's "Komplete Audio 6" device has no such extra controls. This patch also fixes the device name in two comments. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: usb-audio: include format.h in format.cDaniel Mack2011-05-181-0/+1
| | | | | | | | | | | | | | | | Just in case a prototype changes, we'll be warned. This also fixes a sparse warning. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: usb-audio: make hwc_debug a noop in case HW_CONST_DEBUG is not setDaniel Mack2011-05-181-1/+1
| | | | | | | | | | | | | | | | | | Just defining it to nothing is dangerous as it can alter the code execution flow, for example when used in as only function in a conditional code block. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: usb-audio - Don't expose broken dB rangesTakashi Iwai2011-04-281-4/+6
| | | | | | | | | | | | | | | | | | Some crappy USB-audio devices give broken dB ranges, e.g. both min and max are 0dB. This confuses the volume control that prefers dB expression such as alsactl or PulseAudio. In such a case, it's much better not to expose the broken dB information. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: 6fire: use the kernel's built-in bit reverse tableDaniel Mack2011-04-262-27/+3
| | | | | | | | | | | | Signed-off-by: Daniel Mack <zonque@gmail.com> Cc: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: usb-audio: Add quirks for Audio Kontrol 6Daniel Mack2011-04-143-0/+24
| | | | | | | | | | | | | | | | | | | | | | This new device by Native Instruments is also compliant to the USB standard v2.0, but hides this detail at when connected. It needs the same boot quirks than other models, and also has two non-class-compliant mixer controls. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: 6fire - Add support of digital-thru mixerTorsten Schenk2011-04-043-47/+137
| | | | | | | | | | | | | | Digital Thru mixer element added (device can act as converter optical<->coax) Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: 6fire - Improve firmware loaderTorsten Schenk2011-04-041-13/+31
| | | | | | | | | | | | | | | | | | Firmware loader: magical device bytes check updated (accepts all device versions now and accepts possibly loaded firmware, if it is knowing to be working) Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: 6fire - Add support for S32_LE formatTorsten Schenk2011-04-041-4/+18
| | | | | | | | | | | | | | Added support for sample format s32_le. Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: 6fire - Fix pcm rate assignmentTorsten Schenk2011-04-041-8/+5
| | | | | | | | | | | | | | | | Completion of signedness bug for pcm_runtime.rate: variable will never get assigned a negative value now. Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: 6fire - Update kernel configurationTorsten Schenk2011-04-041-6/+3
| | | | | | | | | | | | | | | | | | Kernel configuration updated: - experimental dependency removed - description updated Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio - Terratec Aureon 7.1 USB ID as C-Media cm6206 quirksWolfgang Breyha2011-04-282-1/+4
| | | | | | | | | | | | | | | | This patch adds support for the Terratec Aureon 7.1 USB which uses a C-Media cm6206 and needs all the quirks already found in the past. Signed-off-by: Wolfgang Breyha <wbreyha@gmx.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-linus' of ↵Linus Torvalds2011-04-101-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: hda - Don't query connections for widgets have no connections ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E) ALSA: hda - HDMI: Fix MCP7x audio infoframe checksums ALSA: usb-audio: define another USB ID for a buggy USB MIDI cable ALSA: HDA: Fix dock mic for Lenovo X220-tablet ASoC: format_register_str: Don't clip register values ASoC: PXA: Fix oops in __pxa2xx_pcm_prepare ASoC: zylonite: set .codec_dai_name in initializer
| * | ALSA: usb-audio: define another USB ID for a buggy USB MIDI cableTarek Soliman2011-04-061-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | There are many USB MIDI cables out there that have buggy firmware that reports it can do more than 4 bytes in a packet when they can only properly handle 4 This patch adds the ID of yet another one of those cables Signed-off-by: Tarek Soliman <tarek@bashasoliman.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Fix common misspellingsLucas De Marchi2011-03-314-6/+6
|/ | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* ALSA: usb-audio - Support for Boss JS-8 Jam StationKeith A. Milner2011-03-231-0/+27
| | | | | Signed-off-by: Keith A. Milner <maillist@superlative.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: add Cakewalk UM-1G supportClemens Ladisch2011-03-231-0/+13
| | | | | | | | Add a quirk for the Cakewalk UM-1G USB MIDI interface in "advanced driver" mode. (It already works in standard mode.) Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb - Remove trailing spaces from USB card name stringsTakashi Iwai2011-03-211-4/+18
| | | | | | | | | Some USB devices give trailing spaces in strings returned from usb_string(). This confuses the automatic card-id creation, resulting always in "default". This patch fixes the behavior by removing trailing spaces. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usbaudio: implement USB autosuspendOliver Neukum2011-03-116-22/+118
| | | | | | | | | | | | 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>
* ALSA: usbaudio: fix suspend/resumeOliver Neukum2011-03-113-3/+34
| | | | | | | | - 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>
* Merge branch 'fix/misc' into topic/miscTakashi Iwai2011-03-118-7/+23
|\
| * ALSA: usb-audio: fix oops due to cleanup race when disconnectingTakashi Iwai2011-02-233-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ALSA: caiaq - Fix possible string-buffer overflowTakashi Iwai2011-02-142-2/+2
| | | | | | | | | | | | | | | | | | 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>
| * ALSA: usbaudio - Enable the E-MU 0204 USBJoseph Teichman2011-02-083-3/+11
| | | | | | | | | | Signed-off-by: Joseph Teichman <josteich@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio - Add "cval->res = 384" quirk for Logitech Webcam C600Alexey Fisher2011-03-101-0/+1
| | | | | | | | | | | | | | | | | | 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>
* | ALSA: usb-audio - Add volume range check and warn if it too bigAlexey Fisher2011-03-101-0/+16
| | | | | | | | | | Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: reconstruct some dispatcher functions to use switch-caseDaniel Mack2011-02-142-37/+33
| | | | | | | | | | | | | | | | 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>
* | ALSA: usb-audio: add support for Native Instruments MK2 devicesDaniel Mack2011-02-143-0/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ALSA: snd-usb-caiaq: Add support for Traktor Audio 2Daniel Mack2011-02-144-0/+9
| | | | | | | | | | Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: USB: 6fire: signedness bug in usb6fire_pcm_prepare()Dan Carpenter2011-02-071-2/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | ALSA: usb/6fire - Driver for TerraTec DMX 6Fire USBTorsten Schenk2011-01-2416-1/+2313
|/ | | | | | | | | | | | 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>
* ALSA: snd-usb-us122l: Fix missing NULL checksKarsten Wiese2011-01-111-21/+20
| | | | | | | | | 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>
* ALSA: snd-usb-us122l: Fix MIDI outputKarsten Wiese2011-01-111-2/+9
| | | | | | | | 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>
* ALSA: usb-audio: add Edirol SD-90 PCM supportClemens Ladisch2011-01-102-3/+6
| | | | | | | | 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>
* ALSA: usb-audio: use enum control info helperClemens Ladisch2011-01-102-16/+3
| | | | | | | 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>
OpenPOWER on IntegriCloud