The Logitech QuickCam Pro 9000 does not appear to any product identification
strings in its USB device descriptor. Therefore it receives a device name of
"USB Device 0x46d:0x990". Th e attached patch below adds a USB quirk to
provide a more friendly name.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The snd-usb-caiaq driver causes Oops occasionally when accessing MIDI
devices. This patch fixes the Oops and invalid URB submission errors
as well.
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch extends 42a6e66f1e by using
usb_endpoint_xfer_control, usb_endpoint_xfer_isoc, usb_endpoint_xfer_bulk,
and usb_endpoint_xfer_int in the negated case as well.
This patch also rewrites some calls to usb_endpoint_dir_in as negated calls
to !usb_endpoint_dir_out, and vice versa, to better correspond to the
intent of the original code.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@ struct usb_endpoint_descriptor *epd; @@
- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ !usb_endpoint_xfer_control(epd)
@@ struct usb_endpoint_descriptor *epd; @@
- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_ISOC\|1\))
+ !usb_endpoint_xfer_isoc(epd)
@@ struct usb_endpoint_descriptor *epd; @@
- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_BULK\|2\))
+ !usb_endpoint_xfer_bulk(epd)
@@ struct usb_endpoint_descriptor *epd; @@
- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_INT\|3\))
+ !usb_endpoint_xfer_int(epd)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use the USB functions usb_get_intfdata and usb_set_intfdata instead of
dev_get_drvdata and dev_set_drvdata, respectively.
The semantic patch that makes this change for the usb_get_intfdata case is
as follows: (http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@header@
@@
#include <linux/usb.h>
@same depends on header@
position p;
@@
usb_get_intfdata@p(...) { ... }
@depends on header@
position _p!=same.p;
identifier _f;
struct usb_interface*intf;
@@
_f@_p(...) { <+...
- dev_get_drvdata(&intf->dev)
+ usb_get_intfdata(intf)
...+> }
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This set of patches introduces calls to the following set of functions:
usb_endpoint_dir_in(epd)
usb_endpoint_dir_out(epd)
usb_endpoint_is_bulk_in(epd)
usb_endpoint_is_bulk_out(epd)
usb_endpoint_is_int_in(epd)
usb_endpoint_is_int_out(epd)
usb_endpoint_num(epd)
usb_endpoint_type(epd)
usb_endpoint_xfer_bulk(epd)
usb_endpoint_xfer_control(epd)
usb_endpoint_xfer_int(epd)
usb_endpoint_xfer_isoc(epd)
In some cases, introducing one of these functions is not possible, and it
just replaces an explicit integer value by one of the following constants:
USB_ENDPOINT_XFER_BULK
USB_ENDPOINT_XFER_CONTROL
USB_ENDPOINT_XFER_INT
USB_ENDPOINT_XFER_ISOC
An extract of the semantic patch that makes these changes is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r1@ struct usb_endpoint_descriptor *epd; @@
- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ usb_endpoint_xfer_control(epd)
@r5@ struct usb_endpoint_descriptor *epd; @@
- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
- \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)
@inc@
@@
#include <linux/usb.h>
@depends on !inc && (r1||r5)@
@@
+ #include <linux/usb.h>
#include <linux/usb/...>
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Replace all tasklet_hi_schedule() callers with the normal
tasklet_schedule(). The former often causes troubles with
RT-kernels, and has actually no merit.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
snd-usb-caiaq: clean up the control adding code by moving dulpicate code
to a function.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added the quirk for UA-25EX advanced modes.
UA-25EX is almost compatible with UA-25.
Tested-by: Serge Perinsky <sergebass@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Should unlock us122l->mutex before returning VM_FAULT_SIGBUS.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The MIDI interfaces have to be detected dynamically for Edirol devices
ua-700, ua-25 and ua4-fx. This patch reverses the wrong changes made by
my other patch in uaxx-quirk.
Signed-off-by: Pedro Lopez-Cabanillas <pedro.lopez.cabanillas@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Renamed the old quirk function for ua-700/ua-25 to become more
generic, moving the MIDI interfaces to the quirk data header.
Added a new quirk for the Edirol UA-4FX.
Signed-off-by: Pedro Lopez-Cabanillas <pedro.lopez.cabanillas@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The endpoints should be released immediately at disconnection
rather than the delayed release. This could be a reason of Oops
at USB-audio device disconnection being used.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add support for the E-Mu "Tracker Pre" USB sound card, following
the example of the (very similar) E-Mu 0202 and E-Mu 0404 USB.
As with the 0202 and 0404 USB, functionality is very limited:
just a couple of sample rates, no volume/mute control, etc.
Signed-off-by: Eran Tromer <eran@tromer.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Added the ignore_ctl_error parameter to enable/disable the control-error
handling for mixer interfaces. It was a hard-coded ifdef, and now you
can change it more easily.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Kill snd_assert() in other places, either removed or replaced with
if () with snd_BUG_ON().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The support for the SB Extigy's remote seems to be broken in all
recent ALSA versions, including 1.0.17. The driver detects the event
correctly, then submits a URB to query the RC code. On the Extigy, the
URB is submitted with a length of 2 bytes. My hardware, however, only
replies with 1 byte, containing the correct RC button code. The
current implementation discards this as being too short. (line 1784 of
usbmixer.c)
This patch specifies a "minimum packet length" in the remote control
configuration. I've left the values for the Audigy 2/Live! the same as
the packet length, as I'm assuming the existing code works with them.
(I don't have the hardware to confirm) This fixes the Extigy RC
support, e.g. for use with Lirc.
Signed-off-by: Phillip Michael Jordan <phil@philjordan.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Added a new US122L usb-audio driver. This driver works together with a
dedicated alsa-lib plugin.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
We have to restrict the quirk to interface 0 because the second
interface is not MIDI but HID. Additionally, this product ID is used
by all four KX models, so it is better to read the product name from
the device.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
This patch is for the Yamaha USB MIDI controller KX49.
http://www.yamahasynth.com/products/kx/index.html
It has a 3-port MIDI interface and an HID interface (it has a tiny
keyboard subset).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Since USB_EHCI_SPLIT_ISO is now unconditionally enabled the
#ifndef CONFIG_USB_EHCI_SPLIT_ISO became wrong.
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added entry into usbquirks.h to recognize Roland SonicCell sound module by
mostly duplicating the entry for the Roland SH-201. USB MIDI works just fine,
though the USB audio is a little unreliable (but still works well enough).
Signed-off-by: Chris Mennie <camennie@alumni.uwaterloo.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix the race at reconnection of the device.
The disconnected usb_chip[] must be cleared before the next probe
call properly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch for snd_usb_caiaq makes sample rates higher dann 48KHz work
with devices which have more than 2 stereo input/output pairs.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch corrects the input channel order of hardware supported by
snd_usb_caiaq.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch fixes potential lockups in snd_usb_caiaq by refining the
locking mechanims and by using usb_kill_urb() in favor to
usb_unlink_urb().
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Putting space between ! and variable is a strange coding style, fix
that, also make it fit into 80 columns where that is easy.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
usb audio contains useful debugging code, protected by #if
0. Unfortunately, it will not compile because variable names changed;
fix it.
Dallas workaround is formatted in a way where it is not quite obvious
what is normal code and what is quirk. Reformat it to make it obvious.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Dallas USB speakers are buggy in more than one way. One of configs
they offer does not work at all.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a workaround for the feedback pipe of E-Mu 0202/0404 USB devices
that reports the number of samples per packet instead of the number of
samples per microframe.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix following warning:
WARNING: vmlinux.o(.text+0x11ec01a): Section mismatch in reference from the function setup_card() to the function .devinit.text:snd_usb_caiaq_control_init()
setup_card() are only used by init_card().
init_card() are only used by snd_probe()
snd_probe() are used for the .probe parameter in usb_driver.probe
Annotate them all __devinit to fix the warning.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The driver resubmits URBs from an error handler and schedules the error
handler from the URBs' completion handlers. To reliably kill the cycle
a flag must be used.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Drivers that register a ->fault handler, but do not range-check the
offset argument, must set VM_DONTEXPAND in the vm_flags in order to
prevent an expanding mremap from overflowing the resource.
I've audited the tree and attempted to fix these problems (usually by
adding VM_DONTEXPAND where it is not obvious).
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This patch decreases the snd_pcm_hardware->period_bytes_min field in the
caiaq/usb audio driver. The hardware can actually handle as few as 128
bytes, depending on the system. So it makes no sense to keep
applications from actually using such values.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Fix section mismatch in caiaq: these __devinit functions can be
called at any time so they should not be __devinit.
WARNING: vmlinux.o(.text+0x10a8dae): Section mismatch: reference to .init.text:snd_usb_caiaq_audio_init (between 'setup_card' and 'create_card')
WARNING: vmlinux.o(.text+0x10a8dd6): Section mismatch: reference to .init.text:snd_usb_caiaq_midi_init (between 'setup_card' and 'create_card')
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This header file exists only for some hacks to adapt alsa-driver
tree. It's useless for building in the kernel. Let's move a few
lines in it to sound/core.h and remove it.
With this patch, sound/driver.h isn't removed but has just a single
compile warning to include it. This should be really killed in
future.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
sound/usb/usbaudio.c: In function 'usb_audio_suspend':
sound/usb/usbaudio.c:3674: error: implicit declaration of function 'snd_pcm_sus\pend_all'
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add a quirk entry to handle Edirol UR-80 audio I/O.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>