summaryrefslogtreecommitdiffstats
path: root/sound/usb
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: usb-audio - Fix invalid volume resolution on Logitech HD webcam c270Takashi Iwai2013-06-051-0/+1
| | | | | | | | | | | | | | | | USB audio driver spews an error message when probing Logitech HD webcam c270: ALSA mixer.c:1300 usb_audio: Warning! Unlikely big volume range (=6144), cval->res is probably wrong. ALSA mixer.c:1304 usb_audio: [5] FU [Mic Capture Volume] ch = 1, val = 1536/7680/1 Obviously the device needs a fixed volume resolution (cval->res = 384) like other Logitech devices. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=821735 Reported-and-tested-by: Cristian Rodríguez <crrodriguez@opensuse.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio - Apply Logitech QuickCam Pro 9000 quirk only to audio ifaceTakashi Iwai2013-06-041-1/+7
| | | | | | | | | ... instead of applying to all interfaces. Reference: http://forums.gentoo.org/viewtopic-p-6886404.html Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: fix Roland/Cakewalk UM-3G supportClemens Ladisch2013-06-031-1/+5
| | | | | | | | | | | Commit 927c9423dd5f2d1c0b93d5e694ab84b4a5559713 (ALSA: usb-audio: add Edirol UM-3G support) used a wrong quirk type, which would make the driver refuse to attach with the error message "MIDIStreaming interface descriptor not found". Cc: <stable@vger.kernel.org> # 3.3 and later Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-6fire: Modify firmware version checkTorsten Schenk2013-05-231-3/+3
| | | | | | | | | | Check only the uppermost 16 bits instead of the whole 32 bits of the version information. Do this because all firmware version tested with this version information worked correctly and the strict check causes problems for several users. Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: proc: use found syncmaxsize to determine feedback formatTorstein Hegge2013-05-171-11/+11
| | | | | | | | | | | | | | | | | | | freqshift is only set for the data endpoint and syncmaxsize is only set for the sync endpoint. This results in a syncmaxsize of zero used in the proc output feedback format calculation, which gives a feedback format incorrectly shown as 8.16 for UAC2 devices. As neither the data nor the sync endpoint gives all the relevant content, output the two combined. Also remove the sync_endpoint "packet size" which is always zero and the sync_endpoint "momentary freq" which is constant. Tested with UAC2 async and UAC1 adaptive, not tested with UAC1 async. Reported-by: B. Zhang <bb.zhang@free.fr> Signed-off-by: Torstein Hegge <hegge@resisty.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: caiaq: fix endianness bug in snd_usb_caiaq_maschine_dispatchEldad Zack2013-04-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | Current code does this: be16_to_cpu(buf[i * 2] << 8 | buf[(i * 2) + 1]) Which is effectively (neglecting the index): be16_to_cpu(be16_to_cpu(*((u16 *) buf))) This means the int16 in the buffer is not converted at all. Daniel Mack confirmed that the driver works on little endian CPUs, leading to the conclusion that the device-side structure is actually little endian. This changes the code to use le16_to_cpu(). Caught by sparse. Acked-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm_format_to_bits strong-typed conversionEldad Zack2013-04-293-5/+6
| | | | | | | | | | | Add a function to handle conversion from snd_pcm_format_t to bitwise with proper typing. Change such conversions to use this function and silence sparse warnings. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: USB: adjust for changed 3.8 USB APIClemens Ladisch2013-04-297-12/+3
| | | | | | | | | | | | | | The recent changes in the USB API ("implement new semantics for URB_ISO_ASAP") made the former meaning of the URB_ISO_ASAP flag the default, and changed this flag to mean that URBs can be delayed. This is not the behaviour wanted by any of the audio drivers because it leads to discontinuous playback with very small period sizes. Therefore, our URBs need to be submitted without this flag. Reported-by: Joe Rayhawk <jrayhawk@fairlystable.org> Cc: <stable@vger.kernel.org> # 3.8 only Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb - Avoid unnecessary sample rate changes on USB 2.0 clock sourcesDavid Henningsson2013-04-261-0/+2
| | | | | | | | | | The Scarlett 2i2 seems to take almost 500 ms to set the sample rate, even if the clock is currently set to that value. This patch speeds up prepare of the device, by avoiding setting the clock to something it already is. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: USB quirk for Yamaha THR10CTrulan Martin2013-04-251-0/+26
| | | | | | | This patch adds a USB quirk for the Yamaha THR10C amp. Signed-off-by: Trulan Martin <trulanm@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: USB quirk for Yamaha THR5ATrulan Martin2013-04-251-0/+26
| | | | | | | This patch adds a USB quirk for the Yamaha THR5A amp. Signed-off-by: Trulan Martin <trulanm@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: USB quirk for Yamaha THR10Trulan Martin2013-04-251-0/+26
| | | | | | | This patch adds a USB quirk for the Yamaha THR10 amp. Signed-off-by: Trulan Martin <trulanm@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Fix autopm error during probingTakashi Iwai2013-04-251-1/+3
| | | | | | | | | | | | | | | | | | | We've got strange errors in get_ctl_value() in mixer.c during probing, e.g. on Hercules RMX2 DJ Controller: ALSA mixer.c:352 cannot get ctl value: req = 0x83, wValue = 0x201, wIndex = 0xa00, type = 4 ALSA mixer.c:352 cannot get ctl value: req = 0x83, wValue = 0x200, wIndex = 0xa00, type = 4 .... It turned out that the culprit is autopm: snd_usb_autoresume() returns -ENODEV when called during card->probing = 1. Since the call itself during card->probing = 1 is valid, let's fix the return value of snd_usb_autoresume() as success. Reported-and-tested-by: Daniel Schürmann <daschuer@mixxx.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: snd-usb: try harder to find USB_DT_CS_ENDPOINTDaniel Mack2013-04-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | The USB_DT_CS_ENDPOINT class-specific endpoint descriptor is usually stuffed directly after the standard USB endpoint descriptor, and this is where the driver currently expects it to be. There are, however, devices in the wild that have it the other way around in their descriptor sets, so the USB_DT_CS_ENDPOINT comes *before* the standard enpoint. Devices known to implement it that way are "Sennheiser BTD-500" and Plantronics USB headsets. When the driver can't find the USB_DT_CS_ENDPOINT, it won't be able to change sample rates, as the bitmask for the validity of this command is storen in bmAttributes of that descriptor. Fix this by searching the entire interface instead of just the extra bytes of the first endpoint, in case the latter fails. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-and-tested-by: Torstein Hegge <hegge@resisty.net> Reported-and-tested-by: Yves G <alsa-user@vivigatt.com> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: snd-usb-audio: set the timeout for usb control set messages to 5000 msDaniel Schürmann2013-04-221-1/+9
| | | | | | | | | | | | | | | | | Set the timeout for USB control set messages according to the USB 2 spec, using the macros from include/linux/usb.h. The get timout becomes 5000 ms even though it is 500 ms in the spec. This patch is required to run the Hercules RMX2 which needs a timeout of 1240 ms. More notes from author: I still distinguish between set and get but as long both are 5000 ms GCC will remove it anyway. IMHO this is more easy read and there is no need to explain why we use a get timeout for set messages. Signed-off-by: Daniel Schürmann <daschuer@mixxx.org> Acked-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge tag 'asoc-v3.10-2' of ↵Takashi Iwai2013-04-182-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next 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.
| * ALSA: usb-audio: fix endianness bug in snd_nativeinstruments_*Eldad Zack2013-04-072-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ALSA: snd-usb: add quirks handler for DSD streamsDaniel Mack2013-04-183-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ALSA: snd-usb: add support for bit-reversed byte formatsDaniel Mack2013-04-182-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is quite some confusion around the bit-ordering in DSD samples, and no general agreement that defines whether hardware is supposed to expect the oldest sample in the MSB or the LSB of a byte. ALSA will hence set the rule that on the software API layer, bytes always carry the oldest bit in the most significant bit of a byte, and the driver has to translate that at runtime in order to match the hardware layout. This patch adds support for this by adding a boolean flag to the audio format struct. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: snd-usb: add support for DSD DOP stream transportDaniel Mack2013-04-183-11/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to provide a compatibility way for pushing DSD samples through ordinary PCM channels, the "DoP open Standard" was invented. See http://www.dsd-guide.com for the official document. The host is required to stuff DSD marker bytes (0x05, 0xfa, alternating) in the MSB of 24 bit wide samples on the bus, in addition to the 16 bits of actual DSD sample payload. To support this, the hardware and software stride logic in the driver has to be tweaked a bit, as we make the userspace believe we're operating on 16 bit samples, while we in fact push one more byte per channel down to the hardware. The DOP runtime information is stored in struct snd_usb_substream, so we can keep track of our state across multiple calls to prepare_playback_urb_dsd_dop(). Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: snd-usb: use ep->stride from urb callbacksDaniel Mack2013-04-181-7/+7
| | | | | | | | | | | | | | | | | | | | For normal PCM transfer, this change has no effect, as the endpoint's stride is always frame_bits/8. For DSD DOP streams, however, which is added later, the hardware stride differs from the software stride, and the endpoint has the correct information in these cases. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: disable autopm for MIDI devicesClemens Ladisch2013-04-151-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 88a8516a2128 (ALSA: usbaudio: implement USB autosuspend) introduced autopm for all USB audio/MIDI devices. However, many MIDI devices, such as synthesizers, do not merely transmit MIDI messages but use their MIDI inputs to control other functions. With autopm, these devices would get powered down as soon as the last MIDI port device is closed on the host. Even some plain MIDI interfaces could get broken: they automatically send Active Sensing messages while powered up, but as soon as these messages cease, the receiving device would interpret this as an accidental disconnection. Commit f5f165418cab (ALSA: usb-audio: Fix missing autopm for MIDI input) introduced another regression: some devices (e.g. the Roland GAIA SH-01) are self-powered but do a reset whenever the USB interface's power state changes. To work around all this, just disable autopm for all USB MIDI devices. Reported-by: Laurens Holst Cc: <stable@vger.kernel.org> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb: Add quirk for 192KHz recording on E-Mu devicesCalvin Owens2013-04-134-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ALSA: snd-usb: Playback Design: use usb_set_inferface quirk from more locationsDaniel Mack2013-04-104-6/+15
| | | | | | | | | | | | | | | | | | 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>
* | ALSA: usb-audio: UAC2: support read-only freq controlEldad Zack2013-04-041-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some clocks might be read-only, e.g., external clocks (see also UAC2 4.7.2.1). In this case, setting the sample frequency will always fail (even if the rate is equal to the current clock rate), therefore do not write, but read the value and compare to the requested rate. If the clock is read only, avoid reading it twice. If it doesn't match, return -ENXIO since the clock is invalid for this configuration. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: show err in set_sample_rate_v2 debugEldad Zack2013-04-041-4/+4
| | | | | | | | | | | | | | | | Show the error code returned from the USB subsystem in the debug messages. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: UAC2: auto clock selection module paramEldad Zack2013-04-043-1/+6
| | | | | | | | | | | | | | | | | | | | Add a module param to disable auto clock selection. This is provided for users that expect the audio stream to fail when the clock source is invalid (e.g., the word clock was unintentionally disconnected). Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: UAC2: try to find and switch to valid clockEldad Zack2013-04-041-3/+66
| | | | | | | | | | | | | | | | | | | | If a selector is available on a device, it may be pointing to a clock source which is currently invalid. If there is a valid clock source which can be selected, switch to it. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: UAC2: do clock validity check earlierEldad Zack2013-04-043-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the check that parse_audio_format_rates_v2() do after receiving the clock source entity ID directly into the find function and add a validation flag to the function. This patch does not introduce any logic flow change. It is provided to allow introducing automatic clock switching easier later. By moving this uac_clock_source_is_valid callsite, 2 additional callsites can be avoided. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: use endianness macrosEldad Zack2013-04-041-9/+6
| | | | | | | | | | | | | | | | Replace the endianness conversions with the kernel-wide swabbing macros in get/set_sample_rate_v2. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: spelling correctionEldad Zack2013-04-043-9/+9
| | | | | | | | | | | | | | | | Correct spelling of snd_usb_endpoint_implict_feedback_sink in all occurances. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: neaten EXPORT_SYMBOLS placementEldad Zack2013-04-041-4/+3
| | | | | | | | | | | | | | Put EXPORT_SYMBOLS directly under the exported function. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: neaten MODULE_DEVICE_TABLE placementEldad Zack2013-04-041-2/+1
| | | | | | | | | | | | | | Minor style fix, following a general code style in the kernel. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: convert list_for_each to entry variantEldad Zack2013-04-046-41/+21
| | | | | | | | | | | | | | | | Change occurances of list_for_each into list_for_each_entry where applicable. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: Clean up the code in set_sample_rate_v2()Takashi Iwai2013-04-031-24/+23
| | | | | | | | | | | | | | | | | | Just for cleaning up, introduce a new function get_sample_rate_v2() for replacing two identical calls in set_sample_rate_v2(). No functional change. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2013-04-031-10/+35
|\ \ | |/ | | | | | | Back-merge for cleaning up usb-audio code the recent commit modified, and further UAC2 autoclock patches.
| * ALSA: usb: Work around CM6631 sample rate change bugTorstein Hegge2013-04-031-10/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The C-Media CM6631 USB receiver doesn't respond to changes in sample rate while the interface is active. The same behavior is observed in other UAC2 hardware like the VIA VT1731. Reset the interface after setting the sampling frequency on sample rate changes, to ensure that the sample rate set by snd_usb_init_sample_rate() is used. Otherwise, the device will try to use the sample rate of the previous stream, causing distorted sound on sample rate changes. The reset is performed for all UAC2 devices, as it should not affect a standards compliant device, but it is only necessary for C-Media CM6631, VIA VT1731 and possibly others. Failure to read sample rate from the device is not handled as an error in set_sample_rate_v2(), as (permanent or intermittent) failure to read sample rate isn't essential for a successful sample rate set. Signed-off-by: Torstein Hegge <hegge@resisty.net> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2013-03-221-8/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | Merge back for-linus branch for the badness table adjustment for VIA codecs * for-linus: ALSA: hda - Fix DAC assignment for independent HP ALSA: hda - Fix abuse of snd_hda_lock_devices() for DSP loader ALSA: hda - Fix typo in checking IEC958 emphasis bit ALSA: snd-usb: mixer: ignore -EINVAL in snd_usb_mixer_controls() ALSA: snd-usb: mixer: propagate errors up the call chain ALSA: usb: Parse UAC2 extension unit like for UAC1 ALSA: hda - Fix yet missing GPIO/EAPD setup in cirrus driver
| * ALSA: snd-usb: mixer: ignore -EINVAL in snd_usb_mixer_controls()Daniel Mack2013-03-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creation of individual mixer controls may fail, but that shouldn't cause the entire mixer creation to fail. Even worse, if the mixer creation fails, that will error out the entire device probing. All the functions called by parse_audio_unit() should return -EINVAL if they find descriptors that are unsupported or believed to be malformed, so we can safely handle this error code as a non-fatal condition in snd_usb_mixer_controls(). That fixes a long standing bug which is commonly worked around by adding quirks which make the driver ignore entire interfaces. Some of them might now be unnecessary. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-and-tested-by: Rodolfo Thomazelli <pe.soberbo@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: snd-usb: mixer: propagate errors up the call chainDaniel Mack2013-03-201-4/+6
| | | | | | | | | | | | | | | | | | | | In check_input_term() and parse_audio_feature_unit(), propagate the error value that has been returned by a failing function instead of -EINVAL. That helps cleaning up the error pathes in the mixer. Signed-off-by: Daniel Mack <zonque@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: usb: Parse UAC2 extension unit like for UAC1Torstein Hegge2013-03-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | UAC2_EXTENSION_UNIT_V2 differs from UAC1_EXTENSION_UNIT, but can be handled in the same way when parsing the unit. Otherwise parse_audio_unit() fails when it sees an extension unit on a UAC2 device. UAC2_EXTENSION_UNIT_V2 is outside the range allocated by UAC1. Signed-off-by: Torstein Hegge <hegge@resisty.net> Acked-by: Daniel Mack <zonque@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2013-03-181-0/+15
|\ \ | |/ | | | | Back-merged for refactoring beep stuff.
| * ALSA: usb-audio: add a workaround for the NuForce UDH-100Clemens Ladisch2013-03-121-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The NuForce UDH-100 numbers its interfaces incorrectly, which makes the interface associations come out wrong, which results in the driver erroring out with the message "Audio class v2 interfaces need an interface association". Work around this by searching for the interface association descriptor also in some other place where it might have ended up. Reported-and-tested-by: Dave Helstroom <helstroom@google.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: snd-usb: add delay quirk for "Playback Design" productsDaniel Mack2013-03-181-0/+7
| | | | | | | | | | | | | | | | | | "Playback Design" products need a 50ms delay after setting the USB interface. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Andreas Koch <andreas@akdesigninc.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: snd-usb: handle raw data format of UAC2 devicesDaniel Mack2013-03-181-4/+7
| | | | | | | | | | | | | | | | | | | | UAC2 compliant audio devices may announce the capability to transport raw audio data on their endpoints. Catch this and handle it as 'special' stream on the ALSA side. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Andreas Koch <andreas@akdesigninc.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: snd-usb: handle the bmFormats field as unsigned intDaniel Mack2013-03-183-6/+7
| | | | | | | | | | | | | | | | | | This field may use up to 32 bits, so it should be handled as unsigned int. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Andreas Koch <andreas@akdesigninc.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: Trust fields given in the quirkMark Hills2013-03-182-5/+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>
* | ALSA: usb-audio: Playback and MIDI support for Novation Twitch DJ controllerMark Hills2013-03-182-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ALSA: snd-usb-caiaq: fix smatch warningsDaniel Mack2013-03-072-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix three smatch warnings recently introduced: sound/usb/caiaq/device.c:166 usb_ep1_command_reply_dispatch() warn: variable dereferenced before check 'cdev' (see line 163) sound/usb/caiaq/device.c:517 snd_disconnect() warn: variable dereferenced before check 'card' (see line 514) sound/usb/caiaq/input.c:510 snd_usb_caiaq_ep4_reply_dispatch() warn: variable dereferenced before check 'cdev' (see line 506) Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: snd-usb-caiaq: switch to dev_*() loggingDaniel Mack2013-03-046-56/+75
| | | | | | | | | | | | | | | | | | Get rid of the proprietary functions log() and debug() and use the generic dev_*() approach. A macro is needed to cast a cdev to a struct device *. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud