aboutsummaryrefslogtreecommitdiff
path: root/sound/usb
AgeCommit message (Collapse)Author
2014-08-10ALSA: usb-audio: fix BOSS ME-25 MIDI regressionClemens Ladisch
The BOSS ME-25 turns out not to have any useful descriptors in its MIDI interface, so its needs a quirk entry after all. Reported-and-tested-by: Kees van Veen <kees.vanveen@gmail.com> Fixes: 8e5ced83dd1c ("ALSA: usb-audio: remove superfluous Roland quirks") Cc: <stable@vger.kernel.org> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-05ALSA: usb-audio: Whitespace cleanups for sound/usb/midi.*Adam Goode
Signed-off-by: Adam Goode <agoode@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-05ALSA: usb-audio: Respond to suspend and resume callbacks for MIDI inputAdam Goode
sound/usb/card.c registers USB suspend and resume but did not previously kill the input URBs. This means that USB MIDI devices left open across suspend/resume had non-functional input (output still usually worked, but it looks like that is another issue). Before this change, we would get ESHUTDOWN for each of the input URBs at suspend time, killing input. Signed-off-by: Adam Goode <agoode@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-04ALSA: usb-audio: Adjust Gamecom 780 volume levelPaul S McSpadden
Original patch fixed the original problem, but the sound was far too low for most users. This patch references a compare matrix to allow the volume levels to act normally. I personally tested this patch myself, and volume levels returned to normal. Please see this discussion for more details: https://bugzilla.kernel.org/show_bug.cgi?id=65251 Signed-off-by: Paul S McSpadden <fisch602@gmail.com> Cc: <stable@vger.kernel.org> [v3.14+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-04ALSA: usb-audio: improve dmesg source grepabilityMichał Mirosław
This improves messages from commit 80acefff3bc7bd53d46c16c683ab66c0ece20810. Cc: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-26ALSA: usb-audio: Fix races at disconnection and PCM closingTakashi Iwai
When a USB-audio device is disconnected while PCM is still running, we still see some race: the disconnect callback calls snd_usb_endpoint_free() that calls release_urbs() and then kfree() while a PCM stream would be closed at the same time and calls stop_endpoints() that leads to wait_clear_urbs(). That is, the EP object might be deallocated while a PCM stream is syncing with wait_clear_urbs() with the same EP. Basically calling multiple wait_clear_urbs() would work fine, also calling wait_clear_urbs() and release_urbs() would work, too, as wait_clear_urbs() just reads some fields in ep. The problem is the succeeding kfree() in snd_pcm_endpoint_free(). This patch moves out the EP deallocation into the later point, the destructor callback. At this stage, all PCMs must have been already closed, so it's safe to free the objects. Reported-by: Alan Stern <stern@rowland.harvard.edu> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-25ALSA: snd-usb: mixer: remove error messages on failed kmalloc()Daniel Mack
If kmalloc() fails, warnings will be loud enough. We can safely just return -ENOMEM in such cases. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-25ALSA: snd-usb: mixer: coding style fixupsDaniel Mack
Shorten some over-long lines, multi-line comments, spurious whitespaces, curly brakets etc. No functional change. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-05Merge branch 'for-linus' into for-nextTakashi Iwai
... for applying the further HDMI fixes.
2014-05-02ALSA: usb-audio: work around corrupted TEAC UD-H01 feedback dataClemens Ladisch
The TEAC UD-H01 firmware sends wrong feedback frequency values, thus causing the PC to send the samples at a wrong rate, which results in clicks and crackles in the output. Add a workaround to detect and fix the corruption. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> [mick37@gmx.de: use sender->udh01_fb_quirk rather than ep->udh01_fb_quirk in snd_usb_handle_sync_urb()] Reported-and-tested-by: Mick <mick37@gmx.de> Reported-and-tested-by: Andrea Messa <andr.messa@tiscali.it> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-02ALSA: usb-audio: Fix deadlocks at resumingTakashi Iwai
The recent addition of the USB audio mixer suspend/resume may lead to deadlocks when the driver tries to call usb_autopm_get_interface() recursively, since the function tries to sync with the finish of the other calls. For avoiding it, introduce a flag indicating the resume operation and avoids the recursive usb_autopm_get_interface() calls during the resume. Reported-and-tested-by: Bryan Quigley <gquigs@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-02ALSA: usb-audio: Save mixer status only once at suspendTakashi Iwai
The suspend callback of usb-audio driver may be called multiple times per suspend when multiple USB interfaces are bound to a single sound card instance. In such a case, it's superfluous to save the mixer values multiple times. This patch fixes it by checking the counter. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-02ALSA: usb-audio: Prevent printk ratelimiting from spamming kernel log while ↵Sander Eikelenboom
DEBUG not defined This (widely used) construction: if(printk_ratelimit()) dev_dbg() Causes the ratelimiting to spam the kernel log with the "callbacks suppressed" message below, even while the dev_dbg it is supposed to rate limit wouldn't print anything because DEBUG is not defined for this device. [ 533.803964] retire_playback_urb: 852 callbacks suppressed [ 538.807930] retire_playback_urb: 852 callbacks suppressed [ 543.811897] retire_playback_urb: 852 callbacks suppressed [ 548.815745] retire_playback_urb: 852 callbacks suppressed [ 553.819826] retire_playback_urb: 852 callbacks suppressed So use dev_dbg_ratelimited() instead of this construction. Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-28ALSA: usb-audio: Fix format string mismatch in mixer.cMasanari Iida
Fix format string mismatch in parse_audio_selector_unit(). Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-14Merge branch 'topic/usb-audio' into for-nextTakashi Iwai
2014-04-09ALSA: usb-audio: Suppress repetitive debug messages from retire_playback_urb()Tim Gardner
BugLink: http://bugs.launchpad.net/bugs/1305133 Malfunctioning or slow devices can cause a flood of dmesg SPAM. I've ignored checkpatch.pl complaints about the use of printk_ratelimit() in favour of prior art in sound/usb/pcm.c. WARNING: Prefer printk_ratelimited or pr_<level>_ratelimited to printk_ratelimit + if (printk_ratelimit() && Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Eldad Zack <eldad@fogrefinery.com> Cc: Daniel Mack <zonque@gmail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-07ALSA: MIDI driver for Behringer BCD2000 USB deviceMario Kicherer
This patch adds initial support for the Behringer BCD2000 USB DJ controller. At the moment, only the MIDI part of the device is working, i.e. knobs, buttons and LEDs. I also plan to add support for the audio part, but I assume that this will require more effort than the rather simple MIDI interface. Progress can be tracked at https://github.com/anyc/snd-usb-bcd2000. Signed-off-by: Mario Kicherer <dev@kicherer.org> Reviewed-by: Daniel Mack <daniel@zonque.org> Reviewed-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-13Merge tag 'asoc-v3.15' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.15 Quite a busy release for ASoC this time, more on janitorial work than exciting new features but welcome nontheless: - Lots of cleanups from Takashi for enumerations; the original API for these was error prone so he's refactored lots of code to use more modern APIs which avoid issues. - Elimination of the ASoC level wrappers for I2C and SPI moving us closer to converting to regmap completely and avoiding some randconfig hassle. - Provide both manually and transparently locked DAPM APIs rather than a mix of the two fixing some concurrency issues. - Start converting CODEC drivers to use separate bus interface drivers rather than having them all in one file helping avoid dependency issues. - DPCM support for Intel Haswell and Bay Trail platforms. - Lots of work on improvements for simple-card, DaVinci and the Renesas rcar drivers. - New drivers for Analog Devices ADAU1977, TI PCM512x and parts of the CSR SiRF SoC.
2014-03-05ALSA: usb-audio: Add quirk for Logitech Webcam C500Takashi Iwai
Logitech C500 (046d:0807) needs the same workaround like other Logitech Webcams. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-28Merge branch 'topic/cvt-dev-prints' into for-nextTakashi Iwai
This merges the bunch of changes over pci and usb sound drivers to convert to dev_err() and co.
2014-02-26ALSA: 6fire: Use standard printk helpersTakashi Iwai
Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-26ALSA: usb-audio: Use standard printk helpersTakashi Iwai
Convert with dev_err() and co from snd_printk(), etc. As there are too deep indirections (e.g. ep->chip->dev->dev), a few new local macros, usb_audio_err() & co, are introduced. Also, the device numbers in some messages are dropped, as they are shown in the prefix automatically. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-25Merge branch 'for-linus' into HEADTakashi Iwai
2014-02-17ALSA: usx2y: Don't peep the card internal objectTakashi Iwai
Avoid traversing the device object list of the card instance just for checking the PCM streams. The driver's private object already contains the array of substream pointers, so it can be simply looked through. The card internal may be restructured in future, thus better not to rely on it. Also, this fixes the possible deadlocks in PCM mutex. Instead of taking multiple PCM mutexes, just take the common mutex in all places. Along with it, rename prepare_mutex as pcm_mutex. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-17ALSA: usb-audio: work around KEF X300A firmware bugClemens Ladisch
When the driver tries to access Function Unit 10, the KEF X300A speakers' firmware apparently locks up, making even PCM streaming impossible. Work around this by ignoring this FU. Cc: <stable@vger.kernel.org> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-14ALSA: usb-audio: Use SNDRV_DEV_CODEC for mixer objectsTakashi Iwai
Instead of SNDRV_DEV_LOWLEVEL, use SNDRV_DEV_CODEC type for mixer objects so that they are managed in a proper release order. No functional change at this point. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-12ALSA: usb: Convert to snd_card_new() with a device pointerTakashi Iwai
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-03ALSA: usb-audio: Resume mixer values properlyTakashi Iwai
Implement reset_resume callback so that the mixer values are properly restored. Still no boot quirks are called, so it might not work well on some devices. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-03ALSA: usb-audio: Add missing kconfig dependecyTakashi Iwai
The commit 44dcbbb1cd61 introduced the usage of bitreverse helpers but forgot to add the dependency. This patch adds the selection for CONFIG_BITREVERSE. Fixes: 44dcbbb1cd61 ('ALSA: snd-usb: add support for bit-reversed byte formats') Reported-by: Fengguang Wu <fengguang.wu@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14ALSA: snd-usb: re-order some quirk entriesDaniel Mack
No code change, just a cosmetic cleanup to keep entries ordered by the device ID within a block of unique vendor IDs. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14ALSA: usb-audio: Fix Creative VF0420 ratePavel Hofman
Creative Live! Cam Vista IM (VF0420) reports rate of 16kHz while working at 8kHz. The patch adds its USB ID to the existing quirk. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14ALSA: usb-audio: Add support for Focusrite Saffire 6 USBEduard Gilmutdinov
Signed-off-by: Eduard Gilmutdinov <edgilmutdinov@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05Merge branch 'for-linus' into for-nextTakashi Iwai
2013-12-23ALSA: hiface: Fix typo in 352800 rate definitionMichael Trimarchi
The Vaughan device support the 352800 rate and not the 352000 Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-20ALSA: usb-audio: Add a quirk for Plantronics Gamecom 780Takashi Iwai
Plantronics Gamecom 780 headset has a firmware problem, and when the FU 0x09 volume is changed, it results in either too loud or silence except for a very narrow range. This patch provides a workaround, ignoring the node, initialize the volume in a sane value and keep untouched. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=65251 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-05ALSA: usb-audio: fix uninitialized variable compile warningMikulas Patocka
Fix the following warning when optimizing for size with gcc-4.6.4: sound/usb/mixer_quirks.c:1514:6: warning: 'err' may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-27ALSA: usb: use multiple packets per urb for Wireless USB inbound audioThomas Pugliese
For Wireless USB audio devices, use multiple isoc packets per URB for inbound endpoints with a datainterval < 5. This allows the WUSB host controller to take advantage of bursting to service endpoints whose logical polling interval is less than the 4ms minimum polling interval limit in WUSB. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-13ALSA: usb-audio: add front jack channel selector for EMU0204Vasily Khoruzhick
Add support for front jack channel selector which is present on EMU0204. It allows to get 4 channels out of this soundcard. Tested-by: Yury Bushmelev <jay@jay-tech.ru> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-11ALSA: usb: Fix wrong mapping of RLC and RRC channelsAnssi Hannula
According to USB Audio spec v2 bits 25 and 26 of bmChannelConfig are "Back Left of Center - BLC" and "Back Right of Center - BRC", respectively. They are currently assigned to ALSA channels BLC/BRC. However, the ALSA BLC/BRC are actually the rather nonsensical "bottom left center" and "bottom right center", so the channels will be assigned wrongly. The comments in the USB code are also similarly wrong, so this is not readily apparent without looking at the actual specification. Fix the channel mapping by mapping bits 25 and 26 to RLC (Rear Left Center) and RRC (Rear Right Center), respectively, instead. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05ALSA: usb - Don't trust the channel config if the channel count changedDavid Henningsson
In case the channel count of the input terminal is not the same as the channel count of the streaming descriptor, the channel config of the input terminal can not be trusted. Instead fall back to a default (guessed) channel map. This was found on a Logitech USB Headset. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05ALSA: usb - For class 2 devices, use channel map from altsettingsDavid Henningsson
The channel config from the streaming descriptor is probably a better indicator of the channel map than the input terminal. Use the input terminal's channel map as fallback only. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05ALSA: usb: supply channel maps even when wChannelConfig is unspecifiedDavid Henningsson
If wChannelconfig is given for some formats but not others, userspace might not be able to set the channel map. This is RFC because I'm not sure what the best behaviour is - to guess the channel map from the given number of channels (it's quite likely that one channel is MONO and two channels is FL FR), or just to supply UNKNOWN for all channels. But the complete lack of channel map for a format leads userspace to believe that the format is not available at all. Or am I misunderstanding how this should be used? Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29ALSA: 6fire: Fix probe of multiple cardsTakashi Iwai
The probe code of snd-usb-6fire driver overrides the devices[] pointer wrongly without checking whether it's already occupied or not. This would screw up the device disconnection later. Spotted by coverity CID 141423. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-25Merge tag 'asoc-v3.13' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.13 - Further work on the dmaengine helpers, including support for configuring the parameters for DMA by reading the capabilities of the DMA controller which removes some guesswork and magic numbers fromm drivers. - A refresh of the documentation. - Conversions of many drivers to direct regmap API usage in order to allow the ASoC level register I/O code to be removed, this will hopefully be completed by v3.14. - Support for using async register I/O in DAPM, reducing the time taken to implement power transitions on systems that support it.
2013-10-15ALSA: us122l: Fix pcm_usb_stream mmapping regressionTakashi Iwai
The pcm_usb_stream plugin requires the mremap explicitly for the read buffer, as it expands itself once after reading the required size. But the commit [314e51b9: mm: kill vma flag VM_RESERVED and mm->reserved_vm counter] converted blindly to a combination of VM_DONTEXPAND | VM_DONTDUMP like other normal drivers, and this resulted in the failure of mremap(). For fixing this regression, we need to remove VM_DONTEXPAND for the read-buffer mmap. Reported-and-tested-by: James Miller <jamesstewartmiller@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-09ALSA: usb-audio: Use module_usb_driverSachin Kamat
module_usb_driver makes code simpler by removing the boilerplate. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-08Merge branch 'for-linus' into for-nextTakashi Iwai
For updating the HDMI chmap fix. Conflicts: sound/pci/hda/patch_hdmi.c
2013-10-07ALSA: usb-audio: support wireless devices in snd_usb_parse_dataintervalThomas Pugliese
This patch adds support for dev speed USB_SPEED_WIRELESS in snd_usb_parse_datainterval which allows the usb sound core to create ISO urbs with the correct number and size of buffers. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-07ALSA: usb-audio: add support for wireless USB devicesThomas Pugliese
This patch updates snd_usb_audio_create also support devices whose speed == USB_SPEED_WIRELESS. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-07ALSA: usb-audio: remove unused endpoint flag EP_FLAG_ACTIVATEDEldad Zack
EP_FLAG_ACTIVATED is never tested for, remove it. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>