Commit Graph

92 Commits

Author SHA1 Message Date
Vladis Dronov 836b34a935 ALSA: usb-audio: Fix double-free in error paths after snd_usb_add_audio_stream() call
create_fixed_stream_quirk(), snd_usb_parse_audio_interface() and
create_uaxx_quirk() functions allocate the audioformat object by themselves
and free it upon error before returning. However, once the object is linked
to a stream, it's freed again in snd_usb_audio_pcm_free(), thus it'll be
double-freed, eventually resulting in a memory corruption.

This patch fixes these failures in the error paths by unlinking the audioformat
object before freeing it.

Based on a patch by Takashi Iwai <tiwai@suse.de>

[Note for stable backports:
 this patch requires the commit 902eb7fd1e ('ALSA: usb-audio: Minor
 code cleanup in create_fixed_stream_quirk()')]

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1283358
Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
Cc: <stable@vger.kernel.org> # see the note above
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-31 18:07:31 +02:00
Victor Clément 0ef21100ae ALSA: usb-audio: add Microsoft HD-5001 to quirks
The Microsoft HD-5001 webcam microphone does not support sample rate
reading as the HD-5000 one.
This results in dmesg errors and sound hanging with pulseaudio.

Signed-off-by: Victor Clément <victor.clement@openmailbox.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-20 09:03:49 +01:00
Takashi Iwai 902eb7fd1e ALSA: usb-audio: Minor code cleanup in create_fixed_stream_quirk()
Just a minor code cleanup: unify the error paths.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-16 12:43:27 +01:00
Takashi Iwai 0f886ca127 ALSA: usb-audio: Fix NULL dereference in create_fixed_stream_quirk()
create_fixed_stream_quirk() may cause a NULL-pointer dereference by
accessing the non-existing endpoint when a USB device with a malformed
USB descriptor is used.

This patch avoids it simply by adding a sanity check of bNumEndpoints
before the accesses.

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=971125
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-16 12:42:16 +01:00
Takashi Iwai 6defb60ae4 Merge branch 'for-linus' into for-next
Resolved the conflicts with the latest HDA HDMI fixes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-04 08:41:41 +01:00
Dennis Kadioglu 17e2df4613 ALSA: usb-audio: Add a quirk for Plantronics DA45
Plantronics DA45 does not support reading the sample rate which leads
to many lines of "cannot get freq at ep 0x4" and "cannot get freq at
ep 0x84". This patch adds the USB ID of the DA45 to quirks.c and
avoids those error messages.

Signed-off-by: Dennis Kadioglu <denk@post.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-01 14:40:52 +01:00
Takashi Iwai c9e9daccc7 Merge branch 'topic/core-fixes' into for-next 2016-02-08 08:16:55 +01:00
Lev Lybin 1b3c993a69 ALSA: usb-audio: Add quirk for Microsoft LifeCam HD-6000
Microsoft LifeCam HD-6000 (045e:076f) requires the similar quirk for
avoiding the stall due to the invalid sample rate reads.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111491
Signed-off-by: Lev Lybin <lev.lybin@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-01-29 17:25:39 +01:00
Jurgen Kramer ad678b4ccd ALSA: usb-audio: Add native DSD support for PS Audio NuWave DAC
This patch adds native DSD support for the PS Audio NuWave DAC.

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-01-29 15:32:23 +01:00
Jurgen Kramer 5327d6ba97 ALSA: usb-audio: Fix OPPO HA-1 vendor ID
In my patch adding native DSD support for the Oppo HA-1, the wrong vendor ID got
through. This patch fixes the vendor ID and aligns the comment.

Fixes: a4eae3a506 ('ALSA: usb: Add native DSD support for Oppo HA-1')
Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-01-29 15:31:17 +01:00
Takashi Iwai 79289e2419 ALSA: usb-audio: Refer to chip->usb_id for quirks and MIDI creation
This is a preliminary patch for the later change to allow a better
quirk ID management.  In the current USB-audio code, there are a few
places looking at usb_device idVendor and idProduct fields directly
even though we have already a static member in snd_usb_audio.usb_id.
This patch modifies such codes to refer to the latter field.

For achieving this, two slightly intensive changes have been done:
- The snd_usb_audio object is set/reset via dev_getdrv() for the given
  USB device; it's needed for minimizing the changes for some existing
  quirks that take only usb_device object.

- __snd_usbmidi_create() is introduced to receive the pre-given usb_id
  argument.  The exported snd_usbmidi_create() is unchanged by calling
  this new function internally.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-01-29 07:36:10 +01:00
Guillaume Fougnies 5a4ff9ec8d ALSA: usb-audio: Fix TEAC UD-501/UD-503/NT-503 usb delay
TEAC UD-501/UD-503/NT-503 fail to switch properly between different
rate/format. Similar to 'Playback Design', this patch corrects the
invalid clock source error for TEAC products and avoids complete
freeze of the usb interface of 503 series.

Signed-off-by: Guillaume Fougnies <guillaume@eulerian.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-01-26 06:58:57 +01:00
Jurgen Kramer a4eae3a506 ALSA: usb: Add native DSD support for Oppo HA-1
This patch adds native DSD support for the Oppo HA-1. It uses a XMOS chipset
but they use their own vendor ID.

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-01-11 09:55:58 +01:00
Anssi Hannula 12a6116e66 ALSA: usb-audio: Add sample rate inquiry quirk for AudioQuest DragonFly
Avoid getting sample rate on AudioQuest DragonFly as it is unsupported
and causes noisy "cannot get freq at ep 0x1" messages when playback
starts.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-12-14 10:13:17 +01:00
Clemens Ladisch 1ca8b20130 ALSA: usb-audio: prevent CH345 multiport output SysEx corruption
The CH345 USB MIDI chip has two output ports.  However, they are
multiplexed through one pin, and the number of ports cannot be reduced
even for hardware that implements only one connector, so for those
devices, data sent to either port ends up on the same hardware output.
This becomes a problem when both ports are used at the same time, as
longer MIDI commands (such as SysEx messages) are likely to be
interrupted by messages from the other port, and thus to get lost.

It would not be possible for the driver to detect how many ports the
device actually has, except that in practice, _all_ devices built with
the CH345 have only one port.  So we can just ignore the device's
descriptors, and hardcode one output port.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-11-16 08:59:24 +01:00
Jurgen Kramer 16771c7c70 ALSA: usb: Add native DSD support for Aune X1S
This patch adds native DSD support for the Aune X1S 32BIT/384 DSD DAC

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-11-09 14:14:47 +01:00
Ricard Wanderlof e057044677 ALSA: USB-audio: Add quirk for Zoom R16/24 playback
The Zoom R16/24 have a nonstandard playback format where each isochronous
packet contains a length descriptor in the first four bytes. (Curiously,
capture data does not contain this and requires no quirk.)

The quirk involves adding the extra length descriptor whenever outgoing
isochronous packets are generated, both in pcm.c (outgoing audio) and
endpoint.c (silent data).

In order to make the quirk as unintrusive as possible, for
pcm.c:prepare_playback_urb(), the isochronous packet descriptors are
initially set up in the same way no matter if the quirk is enabled or not.
Once it is time to actually copy the data into the outgoing packet buffer
(together with the added length descriptors) the isochronous descriptors
are adjusted in order take the increased payload length into account.

For endpoint.c:prepare_silent_urb() it makes more sense to modify the
actual function, partly because the function is less complex to start with
and partly because it is not as time-critical as prepare_playback_urb()
(whose bulk is run with interrupts disabled), so the (minute) additional
time spent in the non-quirk case is motivated by the simplicity of having
a single function for all cases.

The quirk is controlled by the new tx_length_quirk member in struct
snd_usb_substream and struct snd_usb_audio, which is conveyed to pcm.c
and endpoint.c from quirks.c in a similar manner to the txfr_quirk member
in the same structs.

In contrast to txfr_quirk however, the quirk is enabled directly in
quirks.c:create_standard_audio_quirk() by checking the USB ID in that
function. Another option would be to introduce a new
QUIRK_AUDIO_ZOOM_INTERFACE or somesuch, which would have made the quirk
very plain to see in the quirk table, but it was felt that the additional
code needed to implement it this way would just make the implementation
more complex with no real gain.

Tested with a Zoom R16, both by doing capture and playback separately
using arecord and aplay (8 channel capture and 2 channel playback,
respectively), as well as capture and playback together using Ardour, as
well as Audacity and Qtractor together with jackd.

The R24 is reportedly compatible with the R16 when used as an audio
interface. Both devices share the same USB ID and have the same number of
inputs (8) and outputs (2). Therefore "R16/24" is mentioned throughout the
patch.

Regression tested using an Edirol UA-5 in both class compliant (16-bit)
and "advanced" (24 bit, forces the use of quirks) modes.

Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
Tested-by: Panu Matilainen <pmatilai@laiskiainen.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-19 12:38:09 +02:00
Jurgen Kramer 9544f8b6e2 ALSA: usb: Add native DSD support for Gustard DAC-X20U
This patch adds native DSD support for the Gustard DAC-X20U.

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-21 10:27:35 +02:00
Jurgen Kramer 3b7e5c7e36 ALSA: usb-audio: add native DSD support for JLsounds I2SoverUSB
This patch adds native DSD support for the XMOS based JLsounds I2SoverUSB board

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-06-08 11:22:21 +02:00
Eric Wong 2f80b2958a ALSA: usb-audio: don't try to get Outlaw RR2150 sample rate
This quirk allows us to avoid the noisy:

	current rate 0 is different from the runtime rate

message every time playback starts.  While USB DAC in the RR2150
supports reading the sample rate, it never returns a sample rate
other than zero in my observation with common sample rates.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Cc: Joe Turner <joe@oampo.co.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-30 14:14:40 +02:00
Vittorio G (VittGam) ae425bb2a0 ALSA: usb-audio: Add quirk for MS LifeCam HD-3000
Microsoft LifeCam HD-3000 (045e:0779) needs a similar quirk for
suppressing the unsupported sample rate inquiry.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98481
Cc: <stable@vger.kernel.org>
Signed-off-by: Vittorio Gambaletta <linuxbugs@vittgam.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-24 08:26:55 +02:00
Takashi Iwai fa94b0d725 ALSA: usb-audio: Add quirk for MS LifeCam Studio
Microsoft LifeCam Studio (045e:0772) needs a similar quirk for
suppressing the wrong sample rate inquiry.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98481
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-19 10:46:49 +02:00
Takashi Iwai 9a4f35865f Merge branch 'for-next' into for-linus 2015-04-13 10:23:18 +02:00
Adam Honse eef0342cf3 ALSA: usb-audio: Don't attempt to get Microsoft Lifecam Cinema sample rate
Adds Microsoft LifeCam Cinema USB ID to the snd_usb_get_sample_rate_quirk list as the Lifecam Cinema does not appear to support getting the sample rate.

Fixes the issue where the LifeCam Cinema would wait for USB timeout and log the message "cannot get freq at ep 0x82" when accessed.

Addresses bug report https://bugzilla.kernel.org/show_bug.cgi?id=95961.

Signed-off-by: Adam Honse <calcprogrammer1@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-12 09:08:42 +02:00
Takashi Iwai 0a59983873 Merge branch 'for-linus' into for-next
Back merge HD-audio quirks to for-next branch, so that we can apply
a couple of more quirks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08 11:30:49 +02:00
Eric Wong 9fc88ad6fd ALSA: usb-audio: don't try to get Benchmark DAC1 sample rate
Adding this quirk allows us to avoid the noisy
"cannot get freq at ep 0x1" message in dmesg output every time
playback starts.

This ought to affect other Benchmark DAC1 variations using the same
"Microchip Technology, Inc." chip as well, but I have only tested
with the "Pre" variant.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Cc: Joe Turner <joe@oampo.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-04 14:07:56 +02:00
Takashi Iwai 8b28c93fe5 ALSA: usb-audio: Check Marantz/Denon USB DACs in a single place
There are three places doing the same check.  Let's make them
together.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-04 16:37:46 +01:00
Frank C Guenther 3cd1ce0420 ALSA: usb: Fix support for Denon DA-300USB DAC (ID 154e:1003)
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-17 22:14:18 +01:00
Joe Turner b62b998010 ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rate
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>
2015-02-17 07:20:04 +01:00
Jurgen Kramer 38f74d5b82 ALSA: usb-audio: add native DSD support for Matrix Audio DACs
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-17 17:55:20 +01:00
Panu Matilainen dacacb0aa0 ALSA: usb-audio: Add support for Zoom R16/24 capture and midi interfaces
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-12-01 17:38:03 +01:00
Takashi Iwai 5031466387 Merge branch 'for-linus' into for-next
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-28 18:30:19 +01:00
Jurgen Kramer 6874daad4b ALSA: usb-audio: Add mode select quirk for Denon/Marantz DACs
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-28 18:02:35 +01:00
Jurgen Kramer 7a2e9ddc90 ALSA: usb-audio: Add native DSD support for Denon/Marantz DACs
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-28 18:00:50 +01:00
Jussi Laako d42472ecff ALSA: pcm: Add big-endian DSD sample formats and fix XMOS DSD sample format
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-21 15:13:28 +01:00
Takashi Iwai a69862d8d0 Merge branch 'for-linus' into test/usb-resume 2014-11-20 21:46:04 +01:00
Jurgen Kramer 6e84a8d7ac ALSA: usb-audio: Add ctrl message delay quirk for Marantz/Denon devices
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-16 09:48:34 +01:00
Takashi Iwai 85a8181329 ALSA: usb-audio: Fix Oops by composite quirk enhancement
The quirk argument itself was used as iterator, so it cannot be taken
back to the original value, obviously.

Fixes: d4b8fc66f7 ('ALSA: usb-audio: Allow multiple entries for the same iface in composite quirk')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-10 07:44:47 +01:00
Takashi Iwai d4b8fc66f7 ALSA: usb-audio: Allow multiple entries for the same iface in composite quirk
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-11-09 18:21:23 +01:00
Jurgen Kramer 848f3a82df ALSA: usb-audio: add native DSD support for XMOS based DACs
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-09-08 17:11:39 +02:00
Paul S McSpadden 542baf94ec ALSA: usb-audio: Adjust Gamecom 780 volume level
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-04 11:19:04 +02:00
Takashi Iwai 0ba41d917e ALSA: usb-audio: Use standard printk helpers
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-26 16:45:34 +01:00
Eduard Gilmutdinov 11e424e88b ALSA: usb-audio: Add support for Focusrite Saffire 6 USB
Signed-off-by: Eduard Gilmutdinov <edgilmutdinov@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 13:56:31 +01:00
Takashi Iwai 19570d7477 ALSA: usb-audio: Add a quirk for Plantronics Gamecom 780
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-20 16:37:02 +01:00
Clemens Ladisch aa773bfe8f ALSA: usb-audio: fix automatic Roland/Yamaha MIDI detection
Commit aafe77cc45 (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-12 11:42:28 +02:00
Eldad Zack 42d4ab832d ALSA: usb-audio: fix regression for fixed stream quirk
Commit 8f898e92ae 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-07-10 17:52:14 +02:00
Clemens Ladisch b1ce7ba619 ALSA: usb-audio: claim autodetected PCM interfaces all at once
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-27 21:59:49 +02:00
Clemens Ladisch aafe77cc45 ALSA: usb-audio: add support for many Roland/Yamaha devices
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-06-27 21:59:48 +02:00
Takashi Iwai 8dd2b66d1a 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRb/60AAoJELSic+t+oim9vL8P+wfaXRBGDtxhzMnTCf/cR2sc
 vlRnmSjA4s14vCoPffQJI0zaGLwDT5FnQtg6DAkP/8vXRoUz4Hgb0UwwDPiQNGED
 6Wmqm7mU+XGWgo4bPBA1e3Bt/9phVVO62rNPMNEnNqcp/Fa3RrdFAfxy4EUz9sKa
 lX4KJETCbIvLpOJmgq3H/WGtgYEnULHSCCNUQQ+fEY/VRQLsMtY5+tnZIJilMez0
 Ff6B084kE5oQpMsxdf89q8O5Uqc8lB0Xleluh0yQ1YZK3lxELMgr1Z7BkitysaJh
 uid+Ze8Vj2n5duI87OZcHN1Z2SibgTzqUwsd6YGCUKK3D3KVcSYgaYNn3zY09KNG
 tYlckAOJgVXqe1jedsfyuKTraz2JBY+jWYcIf8cRbwxxZpItG4Oj3idIBAKw+FrE
 /0DGqW7U9wXKx8pg7BH3dE6J6WVZ5uryaQX9d+nC8CGGjpcCla5L5jl/8stgGniW
 StTk4ETB6PP6iApv11p/7CXaTqXi+9UHmlcHFo11oQKiJFx4kG21DKQCXS0ycocM
 j0/gRGesWrVawYwJ86dhciUJjWlTHwproE/75i1JsTd3eRX6ybjBeNTTAI2ll/BJ
 BFDTS7tbX7GVcNbwXCvxW6pKOPpqV9jh0yMgpaB4jtkXOTKV/Z73ThPEql5w27c5
 OTBtONmiYeBcZGvgKQ3r
 =MXrq
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.10-2' of 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.
2013-04-18 16:24:31 +02:00
Daniel Mack 126825e7ea ALSA: snd-usb: add quirks handler for DSD streams
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-18 10:03:53 +02:00