aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-04-09ALSA: usb-audio: Suppress repetitive debug messages from retire_playback_urb()Tim Gardner1-1/+2
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-03-13Merge tag 'asoc-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai1-0/+1
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 Iwai1-0/+1
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 Iwai17-326/+411
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 Iwai6-72/+86
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 Iwai11-254/+325
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 Iwai1-0/+9
2014-02-17ALSA: usx2y: Don't peep the card internal objectTakashi Iwai4-79/+61
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 Ladisch1-0/+9
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 Iwai1-1/+1
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 Iwai7-29/+31
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 Iwai3-25/+99
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 Iwai1-0/+1
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 Mack1-86/+84
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 Hofman1-2/+4
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 Gilmutdinov2-4/+45
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 Iwai1-3/+3
2013-12-23ALSA: hiface: Fix typo in 352800 rate definitionMichael Trimarchi1-3/+3
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 Iwai2-0/+24
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 Patocka1-1/+1
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 Pugliese1-1/+15
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 Khoruzhick1-0/+90
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 Hannula1-2/+2
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 Henningsson1-2/+5
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 Henningsson1-1/+3
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 Henningsson1-5/+13
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 Iwai1-1/+1
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 git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai1-1/+3
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 Iwai1-1/+3
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 Kamat1-12/+1
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 Iwai2-25/+4
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 Pugliese1-0/+1
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 Pugliese1-0/+1
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 Zack1-3/+0
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>
2013-10-07ALSA: usb-audio: rename alt_idx to altsettingEldad Zack3-7/+7
As Clemens Ladisch kindly explained: "Please note that there are two methods to identify alternate settings: the number, which is the value in bAlternateSetting, and the index, which is the index in the descriptor array. There might be some wording in the USB spec that these two values must be the same, but in reality, [insert standard rant about firmware writers], bAlternateSetting must be treated as a random ID value." This patch changes the name to express the correct usage semantics. No functional change. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-07ALSA: usb-audio: clear SUBSTREAM_FLAG_SYNC_EP_STARTED on errorEldad Zack1-0/+1
If setting the interface fails, the SUBSTREAM_FLAG_SYNC_EP_STARTED should be cleared. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-07ALSA: usb-audio: void return type of snd_usb_endpoint_deactivate()Eldad Zack2-11/+6
The return value of snd_usb_endpoint_deactivate() is not used, make the function have no return value. Update the documentation to reflect what the function is actually doing. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-07ALSA: usb-audio: don't deactivate URBs on in-use EPEldad Zack1-3/+3
If an endpoint in use, its associated URBs should not be deactivated. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-07ALSA: usb-audio: remove deactivate_endpoints()Eldad Zack1-17/+2
The only call site for deactivate_endpoints() at snd_usb_hw_free(). The return value is not checked there, as it is irrelevant if it fails on hw_free. This patch moves the deactivation of the endpoints directly into snd_usb_hw_free(). Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-07ALSA: usb-audio: remove unused parameter from sync_ep_set_paramsEldad Zack1-3/+2
Since the format is not actually used in sync_ep_set_params(), there is no need to pass it down. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-02ALSA: snd-usb-usx2y: remove bogus frame checksDaniel Mack2-25/+4
The frame check in i_usX2Y_urb_complete() and i_usX2Y_usbpcm_urb_complete() is bogus and produces false positives as described in this LAU thread: http://linuxaudio.org/mailarchive/lau/2013/5/20/200177 This patch removes the check code entirely. Cc: fzu@wemgehoertderstaat.de Reported-by: Dr Nicholas J Bailey <nicholas.bailey@glasgow.ac.uk> Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Daniel Mack <zonque@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-09-30ALSA: snd-usb-caiaq: LED support for Maschine ControllerHannes Gräuler3-0/+122
This patch adds LED support for the Native Instruments Maschine Controller. It adds ALSA controls for dimming the LEDs of all buttons and the backlight of the two displays. Signed-off-by: Hannes Gräuler <hgraeule@uos.de> Acked-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-09-26ALSA: improve buffer size computations for USB PCM audioAlan Stern6-59/+82
This patch changes the way URBs are allocated and their sizes are determined for PCM playback in the snd-usb-audio driver. Currently the driver allocates too few URBs for endpoints that don't use implicit sync, making underruns more likely to occur. This may be a holdover from before I/O delays could be measured accurately; in any case, it is no longer necessary. The patch allocates as many URBs as possible, subject to four limitations: The total number of URBs for the endpoint is not allowed to exceed MAX_URBS (which the patch increases from 8 to 12). The total number of packets per URB is not allowed to exceed MAX_PACKS (or MAX_PACKS_HS for high-speed devices), which is decreased from 20 to 6. The total duration of queued data is not allowed to exceed MAX_QUEUE, which is decreased from 24 ms to 18 ms. The total number of ALSA frames in the output queue is not allowed to exceed the ALSA buffer size. The last requirement is the hardest to implement. Currently the number of URBs needed to fill a buffer cannot be determined in advance, because a buffer contains a fixed number of frames whereas the number of frames in an URB varies to match shifts in the device's clock rate. To solve this problem, the patch changes the logic for deciding how many packets an URB should contain. Rather than using as many as possible without exceeding an ALSA period boundary, now the driver uses only as many packets as needed to transfer a predetermined number of frames. As a result, unless the device's clock has an exceedingly variable rate, the number of URBs making up each period (and hence each buffer) will remain constant. The overall effect of the patch is that playback works better in low-latency settings. The user can still specify values for frames/period and periods/buffer that exceed the capabilities of the hardware, of course. But for values that are within those capabilities, the performance will be improved. For example, testing shows that a high-speed device can handle 32 frames/period and 3 periods/buffer at 48 KHz, whereas the current driver starts to get glitchy at 64 frames/period and 2 periods/buffer. A side effect of these changes is that the "nrpacks" module parameter is no longer used. The patch removes it. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: Clemens Ladisch <clemens@ladisch.de> Tested-by: Daniel Mack <zonque@gmail.com> Tested-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-09-26ALSA: Fix assignment of 0/1 to bool variablesPeter Senna Tschudin1-2/+2
Convert 0 to false and 1 to true when assigning values to bool variables. Inspired by commit 3db1cd5c05f35fb43eb134df6f321de4e63141f2. The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/): @@ bool b; @@ ( -b = 0 +b = false | -b = 1 +b = true ) Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-23Merge tag 'asoc-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai12-30/+129
ASoC: Updates for v3.12 - DAPM is now mandatory for CODEC drivers in order to avoid the repeated regressions in the special cases for non-DAPM CODECs and make it easier to integrate with other components on boards. All existing drivers have had some level of DAPM support added. - A lot of cleanups in DAPM plus support for maintaining controls in a specific state while a DAPM widget all contributed by Lars-Peter Clausen. - Core helpers for bitbanged AC'97 reset from Markus Pargmann. - New drivers and support for Analog Devices ADAU1702 and ADAU1401(a), Asahi Kasei Microdevices AK4554, Atmel AT91ASM9x5 and WM8904 based machines, Freescale S/PDIF and SSI AC'97, Renesas R-Car SoCs, Samsung Exynos5420 SoCs, Texas Instruments PCM1681 and PCM1792A and Wolfson Microelectronics WM8997. - Support for building drivers that can support it cross-platform for compile test.
2013-08-12ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam C525Maksim A. Boyko1-0/+1
Add the volume control quirk for avoiding the kernel warning for the Logitech HD Webcam C525 as in the similar commit 36691e1be6ec551eef4a5225f126a281f8c051c2 for the Logitech HD Webcam C310. Reported-by: Maksim Boyko <maksim.a.boyko@gmail.com> Tested-by: Maksim Boyko <maksim.a.boyko@gmail.com> Cc: <stable@vger.kernel.org> # 3.10.5+ Signed-off-by: Maksim Boyko <maksim.a.boyko@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-12ALSA: usb-audio: fix automatic Roland/Yamaha MIDI detectionClemens Ladisch1-3/+3
Commit aafe77cc45a5 (ALSA: usb-audio: add support for many Roland/Yamaha devices) had several logic errors that prevented create_auto_midi_quirk from enumerating any MIDI ports. Reported-by: Keith A. Milner <maillist@superlative.org> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-12ALSA: 6fire: make buffers DMA-able (midi)Torsten Schenk2-6/+16
Patch makes midi output buffer DMA-able by allocating it separately. Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-12ALSA: 6fire: make buffers DMA-able (pcm)Torsten Schenk2-2/+41
Patch makes pcm buffers DMA-able by allocating each one separately. Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-08ALSA: don't push static constants on stack for %*phAndy Shevchenko1-2/+2
There is no need to pass constants via stack. The width may be explicitly specified in the format. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>