aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/quirks.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-02-17ALSA: usb: Fix support for Denon DA-300USB DAC (ID 154e:1003)Frank C Guenther1-0/+3
Fix problem where playback of Denon DA-300USB DAC sometimes does not start and leads to error messages like "clock source 41 is not valid, cannot use". Solution: Treat this device the same as other Denon/Marantz devices in sound/usb/quirks.c. Tested with both PCM and DSD formats. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=93261 Signed-off-by: Frank C Guenther <bugzilla.frnkcg@spamgourmet.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-17ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rateJoe Turner1-0/+5
Adds a quirk to disable the check that the sample rate has been set correctly, as the Lifecam does not support getting the sample rate. This means that we don't need to wait for the USB timeout when attempting to get the sample rate. Waiting for the timeout causes problems in some applications, which give up on the device acquisition process before it has had time to complete, resulting in no sound. [minor tidy up by tiwai] Signed-off-by: Joe Turner <joe@oampo.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-17ALSA: usb-audio: add native DSD support for Matrix Audio DACsJurgen Kramer1-2/+3
This patch adds native DSD support for two XMOS based DACs from Matrix Audio: - X-Sabre - Mini-i Pro Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-01ALSA: usb-audio: Add support for Zoom R16/24 capture and midi interfacesPanu Matilainen1-0/+8
This makes the midi interface and capture work out of the box with R16 (and presumably R24 too but untested). Playback stream would also seem to function fine except for one caveat: no sound is produced, so it is disabled for now. Mixer descriptors are garbage and will require further quirks to enable functionality, also disabled here. Signed-off-by: Panu Matilainen <pmatilai@laiskiainen.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-28Merge branch 'for-linus' into for-nextTakashi Iwai1-2/+2
The commit [7a2e9ddc: ALSA: usb-audio: Add native DSD support for Denon/Marantz DACs] requires the new format definition that has landed only in for-next branch.
2014-11-28ALSA: usb-audio: Add mode select quirk for Denon/Marantz DACsJurgen Kramer1-0/+38
Denon/Marantz USB DACs need a specific vendor command to switch between PCM and DSD mode. This patch adds a new quirk function to switch between the two modes using the specific USB vendor command. This patch applies to the following devices: - Marantz SA-14S1 - Marantz HD-DAC1 Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-28ALSA: usb-audio: Add native DSD support for Denon/Marantz DACsJurgen Kramer1-0/+11
This patch adds native DSD support for the following devices: - Marantz SA-14S1 - Marants HD-DAC1 Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-21ALSA: pcm: Add big-endian DSD sample formats and fix XMOS DSD sample formatJussi Laako1-2/+2
This patch fixes XMOS DSD sample format to DSD_U32_BE and also adds DSD_U16_BE and DSD_U32_BE sample formats. Signed-off-by: Jussi Laako <jussi@sonarnerd.net> Acked-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-20Merge branch 'for-linus' into test/usb-resumeTakashi Iwai1-0/+14
2014-11-16ALSA: usb-audio: Add ctrl message delay quirk for Marantz/Denon devicesJurgen Kramer1-0/+14
This patch adds a USB control message delay quirk for a few specific Marantz/Denon devices. Without the delay the DACs will not work properly and produces the following type of messages: Nov 15 10:09:21 orwell kernel: [ 91.342880] usb 3-13: clock source 41 is not valid, cannot use Nov 15 10:09:21 orwell kernel: [ 91.343775] usb 3-13: clock source 41 is not valid, cannot use There are likely other Marantz/Denon devices using the same USB module which exhibit the same problems. But as this cannot be verified I limited the patch to the devices I could test. The following two devices are covered by this path: - Marantz SA-14S1 - Marantz HD-DAC1 Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-10ALSA: usb-audio: Fix Oops by composite quirk enhancementTakashi Iwai1-3/+4
The quirk argument itself was used as iterator, so it cannot be taken back to the original value, obviously. Fixes: d4b8fc66f770 ('ALSA: usb-audio: Allow multiple entries for the same iface in composite quirk') Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-09ALSA: usb-audio: Allow multiple entries for the same iface in composite quirkTakashi Iwai1-1/+9
Currently the composite quirk doesn't work when multiple entries are assigned to the same interface because it marks the interface as claimed then checks whether the interface has been already claimed for the secondary entry. But, if you look at the code, you'll notice that multiple entries are allowed if the entry is the current interface; i.e. the current behavior is anyway inconsistent, and this is an unintended shortcoming. This patch fixes the problem by marking the relevant interfaces as claimed after applying the all composite entries. This fix will be needed for the upcoming enhancements for Digidesign Mbox 1 quirks. Reviewed-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-08ALSA: usb-audio: add native DSD support for XMOS based DACsJurgen Kramer1-0/+16
Add quirks for XMOS based DACs for native DSD playback support using the new DSD_U32_LE sample format. This version adds native DSD support for: - iFi Audio micro iDSD/nano iDSD (they use the same prod. id) - DIYINHK USB to I2S/DSD converter Changes from v2: - fix and simplify switch statement Changes from v1: - use specific product id and alt setting per XMOS based device [fixed a misc coding style issue by tiwai] Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-04ALSA: usb-audio: Adjust Gamecom 780 volume levelPaul S McSpadden1-1/+1
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-02-26ALSA: usb-audio: Use standard printk helpersTakashi Iwai1-24/+28
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-01-14ALSA: usb-audio: Add support for Focusrite Saffire 6 USBEduard Gilmutdinov1-4/+5
Signed-off-by: Eduard Gilmutdinov <edgilmutdinov@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-20ALSA: usb-audio: Add a quirk for Plantronics Gamecom 780Takashi Iwai1-0/+14
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-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-07-10ALSA: usb-audio: fix regression for fixed stream quirkEldad Zack1-0/+4
Commit 8f898e92aea2c24c7f379ee265d178f69ebb9c07 removed the redundant reads of bInterfaceProtocol from the descriptors, but introduced a regression to devices with quirks of type QUIRK_AUDIO_FIXED_ENDPOINT, since fp->protocol is not set in setup process. As a consequence, audio streams would not get initialized, as the following logs show: [ 48.923043] setting usb interface 3:1 [ 48.923056] Creating new capture data endpoint #81 [ 48.923484] 4:3:1: cannot set freq 48000 to ep 0x81 This patch sets fp->protocol in create_fixed_stream_quirk() and resolves the regression. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-27ALSA: usb-audio: claim autodetected PCM interfaces all at onceClemens Ladisch1-3/+37
snd_card_register() registers all devices newly added since the last call. However, the playback/capture streams are handled as one ALSA device, so the second /dev device will not be registered if the PCM streams are added in two steps. QUIRK_AUTODETECT caused the probe callback to be called once for each interface, which triggered this problem. Work around this by handling this like the composite quirk, i.e., autodetecting all other interfaces that might be used for PCM or MIDI. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-06-27ALSA: usb-audio: add support for many Roland/Yamaha devicesClemens Ladisch1-0/+175
Add quirks to detect the various vendor-specific descriptors used by Roland and Yamaha in most of their recent USB audio and MIDI devices. Together with the previous patch, this should add audio/MIDI support for the following USB devices: - Edirol motion dive .tokyo performance package - Roland MC-808 Synthesizer - Roland BK-7m Synthesizer - Roland VIMA JM-5/8 Synthesizer - Roland SP-555 Sequencer - Roland V-Synth GT Synthesizer - Roland Music Atelier AT-75/100/300/350C/500/800/900/900C Organ - Edirol V-Mixer M-200i/300/380/400/480/R-1000 - BOSS GT-10B Effects Processor - Roland Fantom G6/G7/G8 Keyboard - Cakewalk Sonar V-Studio 20/100/700 Audio Interface - Roland GW-8 Keyboard - Roland AX-Synth Keyboard - Roland JUNO-Di/STAGE/Gi Keyboard - Roland VB-99 Effects Processor - Cakewalk UM-2G MIDI Interface - Roland A-500S Keyboard - Roland SD-50 Synthesizer - Roland OCTAPAD SPD-30 Controller - Roland Lucina AX-09 Synthesizer - BOSS BR-800 Digital Recorder - Roland DUO/TRI-CAPTURE (EX) Audio Interface - BOSS RC-300 Loop Station - Roland JUPITER-50/80 Keyboard - Roland R-26 Recorder - Roland SPD-SX Controller - BOSS JS-10 Audio Player - Roland TD-11/15/30 Drum Module - Roland A-49/88 Keyboard - Roland INTEGRA-7 Synthesizer - Roland R-88 Recorder Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-04-18Merge tag 'asoc-v3.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai1-1/+1
ASoC: More updates for v3.10 The main additional change here is Lars-Peter's DMA work plus the platform conversions which have been tested - getting this in mainline will make life easier for development after the merge window. These factor a large chunk of code out of the drivers for the platforms using dmaengine, greatly simplifying development.
2013-04-18ALSA: snd-usb: add quirks handler for DSD streamsDaniel Mack1-0/+28
Unfortunately, none of the UAC standards provides a way to identify DSD (Direct Stream Digital) formats. Hence, this patch adds a quirks handler to identify USB interfaces that are capable of handling DSD. That quirks handler can augment the already parsed formats bit-field, by any of the new SNDRV_PCM_FMTBIT_DSD_{U8_U16} and setting the dsd_dop flag in the audio format, if the driver should take care for the DOP byte stuffing. The only devices that are known to work with this are the ones with a 'Playback Designs' vendor id. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-13ALSA: usb: Add quirk for 192KHz recording on E-Mu devicesCalvin Owens1-0/+1
When recording at 176.2KHz or 192Khz, the device adds a 32-bit length header to the capture packets, which obviously needs to be ignored for recording to work properly. Userspace expected: L0 L1 L2 R0 R1 R2 ...but actually got: R2 L0 L1 L2 R0 R1 Also, the last byte of the length header being interpreted as L0 of the first sample caused spikes every 0.5ms, resulting in a loud 16KHz tone (about the highest 'B' on a piano) being present throughout captures. Tested at all sample rates on an E-Mu 0404USB, and tested for regressions on a generic USB headset. Signed-off-by: Calvin Owens <jcalvinowens@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-10ALSA: snd-usb: Playback Design: use usb_set_inferface quirk from more locationsDaniel Mack1-0/+10
It turns out the devices from Playback Design need the delay quirk after usb_set_interface from clocks.c as well. Make it a proper quirks function and factor out the code to quirks.c. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-07ALSA: usb-audio: fix endianness bug in snd_nativeinstruments_*Eldad Zack1-1/+1
The usb_control_msg() function expects __u16 types and performs the endianness conversions by itself. However, in three places, a conversion is performed before it is handed over to usb_control_msg(), which leads to a double conversion (= no conversion): * snd_usb_nativeinstruments_boot_quirk() * snd_nativeinstruments_control_get() * snd_nativeinstruments_control_put() Caught by sparse: sound/usb/mixer_quirks.c:512:38: warning: incorrect type in argument 6 (different base types) sound/usb/mixer_quirks.c:512:38: expected unsigned short [unsigned] [usertype] index sound/usb/mixer_quirks.c:512:38: got restricted __le16 [usertype] <noident> sound/usb/mixer_quirks.c:543:35: warning: incorrect type in argument 5 (different base types) sound/usb/mixer_quirks.c:543:35: expected unsigned short [unsigned] [usertype] value sound/usb/mixer_quirks.c:543:35: got restricted __le16 [usertype] <noident> sound/usb/mixer_quirks.c:543:56: warning: incorrect type in argument 6 (different base types) sound/usb/mixer_quirks.c:543:56: expected unsigned short [unsigned] [usertype] index sound/usb/mixer_quirks.c:543:56: got restricted __le16 [usertype] <noident> sound/usb/quirks.c:502:35: warning: incorrect type in argument 5 (different base types) sound/usb/quirks.c:502:35: expected unsigned short [unsigned] [usertype] value sound/usb/quirks.c:502:35: got restricted __le16 [usertype] <noident> Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Acked-by: Daniel Mack <zonque@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-18ALSA: usb-audio: Trust fields given in the quirkMark Hills1-2/+4
The maxpacksize field is given in some quirks, but it gets ignored (in favour of wMaxPacketSize from the first endpoint.) This patch favours the one in the quirk. Digidesign Mbox and Mbox 2 are the only affected quirks and the devices are assumed to be working without this patch. So for safety against the values in the quirk being incorrect, remove them. The datainterval is also ignored but there are not currently any quirks which choose to override this. Cc: Damien Zammit <damien@zamaudio.com> Cc: Chris J Arges <christopherarges@gmail.com> Signed-off-by: Mark Hills <mark@xwax.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-18ALSA: usb-audio: Playback and MIDI support for Novation Twitch DJ controllerMark Hills1-0/+15
The hardware also has a PCM capture device which is not implemented in this patch. It may be possible to generalise this to Saffire 6 USB support and some of the other Focusrite interfaces, but as I don't have access to these devices we should wait until capture support is working first. Capture support is not implemented because the code assumes the endpoint to have its own interface (instead, it shares the interface with playback) and some thought will be needed to lift this limitation. Signed-off-by: Mark Hills <mark@xwax.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-17ALSA: usb/quirks, fix out-of-bounds accessJiri Slaby1-1/+1
bootresponse in snd_usb_mbox2_boot_quirk is only 12 (decimal) u8's long, but i9s passed to snd_usb_ctl_msg as it would be 0x12 (hexa) long. Fix that by having proper size of the array, i.e. 0x12. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-11ALSA: usb-audio: add support for M-Audio FT C600Matt Gruskin1-5/+6
Adds quirks and mixer support for the M-Audio Fast Track C600 USB audio interface. This device is very similar to the C400 - the C600 simply has some more inputs and outputs, so the existing C400 support is extended to support this device as well. Signed-off-by: Matt Gruskin <matthew.gruskin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14ALSA: usb-audio: M-Audio FT C400 skip packet quirkEldad Zack1-0/+11
Attain constant real-world latency by skipping 16 data packets. The number of packets to be skipped was found by trial and error. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14ALSA: usb - fix race in creation of M-Audio Fast track pro driverDavid Henningsson1-3/+5
A patch in the 3.2 kernel caused regression with hotplugging the M-Audio Fast track pro, or sound after suspend. I don't have the device so I haven't done a full analysis, but it seems userspace (both udev and pulseaudio) got confused when a card was created, immediately destroyed, and then created again. However, at least one person in the bug report (martin djfun) reports that this patch resolves the issue for him. It also leaves a message in the log: "snd-usb-audio: probe of 1-1.1:1.1 failed with error -5" which is a bit misleading. It is better than non-working audio, but maybe there's a more elegant solution? BugLink: https://bugs.launchpad.net/bugs/1095315 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-04ALSA: usb-audio: Fix kernel panic of Digidesign Mbox2 quirkDamien Zammit1-9/+7
This patch is based on 3.8-rc1. It fixes two things: 1) A kernel panic caused by incorrect allocation of a u8 variable "bootresponse". 2) A noisy dmesg (urb status -32) caused by broken pipe to an invalid midi endpoint. It is also a little cleaner because there is no need for a new QUIRK_MIDI type as suggested by kernel developers, since the device follows exactly the MIDIMAN protocol. Signed-off-by: Damien Zammit <damien@zamaudio.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-20Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/soundLinus Torvalds1-0/+91
Pull sound fixes from Takashi Iwai: "This update contains overall only driver-specific fixes. Slightly large LOC are seen in usb-audio driver for a couple of new device quirks and cs42l71 ASoC driver for enhanced features. The others are a few small (regression) fixes HD-audio, and yet other small / trival ASoC fixes." * tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Support for Digidesign Mbox 2 USB sound card: ALSA: HDA: Fix sound resume hang ALSA: hda - bug fix for invalid connection list of Haswell HDMI codec pins ALSA: hda - Fix the wrong pincaps set in ALC861VD dallas/hp fixup ALSA: hda - Set codec->single_adc_amp flag for Realtek codecs ASoC: atmel-ssc: change disable to disable in dts node ASoC: Prevent pop_wait overwrite ALSA: usb-audio: ignore-quirk for HP Wireless Audio ALSA: hda - Always turn on pins for HDMI/DP ALSA: hda - Fix pin configuration of HP Pavilion dv7 ASoC: core: Fix splitting of log messages ASoC: cs42l73: Change VSPIN/VSPOUT to VSPINOUT ASoC: cs42l73: Add DAPM events for power down. ASoC: cs42l73: Add DMIC's as DAPM inputs. ASoC: sigmadsp: Fix endianness conversion issue ASoC: tpa6130a2: Use devm_* APIs
2012-12-19ALSA: usb-audio: Support for Digidesign Mbox 2 USB sound card:Damien Zammit1-0/+91
This patch is the result of a lot of trial and error, since there are no specs available for the device. Full duplex support is provided, i.e. playback and recording in stereo. The format is hardcoded at 48000Hz @ 24 bit, which is the maximum that the device supports. Also, MIDI in and MIDI out both work. Users will notice that the S/PDIF light also flashes when playback or recording is active. I believe this means that S/PDIF input/output is simultaneously activated with the analogue i/o during use. But this particular functionality remains untested. Note that this particular version of the patch is so far untested on the physical hardware because I have not compiled a full kernel with the changes. However, extensive testing has been done by many users of the hardware who believe other versions of my patch have worked since circa 2009. [Modified to make a function static by tiwai] Signed-off-by: Damien Zammit <damien@zamaudio.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-19Fix misspellings of "whether" in comments.Adam Buchbinder1-1/+1
"Whether" is misspelled in various comments across the tree; this fixes them. No code changes. Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-04ALSA: snd-usb: Add quirks for Playback Designs devicesDaniel Mack1-0/+24
Playback Designs' USB devices have some hardware limitations on their USB interface. In particular: - They need a 20ms delay after each class compliant request as the hardware ACKs the USB packets before the device is actually ready for the next command. Sending data immediately will result in buffer overflows in the hardware. - The devices send bogus feedback data at the start of each stream which confuse the feedback format auto-detection. This patch introduces a new quirks hook that is called after each control packet and which adds a delay for all devices that match Playback Designs' USB VID for now. In addition, it adds a counter to snd_usb_endpoint to drop received packets on the floor. Another new quirks function that is called once an endpoint is started initializes that counter for these devices on their sync endpoint. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-and-tested-by: Andreas Koch <andreas@akdesigninc.com> Supported-by: Demian Martin <demianm_1@yahoo.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-15ALSA: usb-audio: avoid integer overflow in create_fixed_stream_quirk()Xi Wang1-1/+5
A malicious USB device could feed in a large nr_rates value. This would cause the subsequent call to kmemdup() to allocate a smaller buffer than expected, leading to out-of-bounds access. This patch validates the nr_rates value and reuses the limit introduced in commit 4fa0e81b ("ALSA: usb-audio: fix possible hang and overflow in parse_uac2_sample_rate_range()"). Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10ALSA: usb-audio: Use kmemdup rather than duplicating its implementationThomas Meyer1-4/+3
Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-27ALSA: usb-audio: increase control transfer timeoutClemens Ladisch1-4/+4
There are certain devices that are reportedly so slow that they need more than 100 ms to handle control transfers. Therefore, increase the timeout in mixer(_quirks).c to 1000 ms. The timeout parameter of snd_usb_ctl_msg() is now constant, so we can drop it. Reported-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-14ALSA: snd-usb: re-order codeDaniel Mack1-3/+4
Move code from endpoint.c into a new file called stream.c and rename functions so that their names actually reflect what they're doing. This way, endpoint.c will be available to functions that hold all the endpoint logic. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-26ALSA: usb-audio: add Starr Labs USB MIDI supportKristian Amlie1-0/+1
Add support for Starr Labs USB MIDI devices such as the Z7S, which are based on an FTDI serial UART chip. Based on a patch by Daniel Mack. Signed-off-by: Kristian Amlie <kristian@amlie.name> Acked-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-06ALSA: snd-usb: Fix uninitialized variable usageDaniel Mack1-1/+1
Purely cosmetic, but fixes the following build warning. CC [M] sound/usb/quirks.o sound/usb/quirks.c: In function ‘snd_usb_apply_boot_quirk’: sound/usb/quirks.c:429:6: warning: ‘err’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-12ALSA: usb-audio - Add quirks for M-Audio Fast Track Pro and QuattroGuillaume Pellerin1-25/+134
This patch gives M-Audio Fast Track Pro and M-Audio Quattro quirks and endpoints to boot and setup those devices with special options (digital inputs and outputs, 24 bits mode, etc...). M-Audio Audiophile quirks are just adapted to match the new global M-Audio parameters. Special configurations can be then loaded through a modprobe conf file. For example, to set the 24 bits mode on the Fast Track Pro add /etc/modprobe.d/fast_track_pro.conf : options snd_usb_audio vid=0x763 pid=0x2012 device_setup=0x08 Here is a list of the possibilities in this example : http://files.parisson.com/debian/fast-track-pro.conf Signed-off-by: Guillaume Pellerin <yomguy@parisson.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-03ALSA: usb - turn off de-emphasis in s/pdif for cm6206Eric Lammerts1-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>
2011-05-25ALSA: usb-audio: add new quirk type QUIRK_AUDIO_STANDARD_MIXERDaniel Mack1-1/+16
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>
2011-05-25ALSA: usb-audio: export snd_usb_feature_unit_ctlDaniel Mack1-0/+1
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>
2011-05-22Merge branch 'topic/misc' into for-linusTakashi Iwai1-0/+1
2011-05-18ALSA: usb-audio: remove invalid extra mixers for Komplete Audio 6Daniel Mack1-1/+1
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>
2011-04-28ALSA: usb-audio - Terratec Aureon 7.1 USB ID as C-Media cm6206 quirksWolfgang Breyha1-0/+1
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>