aboutsummaryrefslogtreecommitdiff
path: root/sound/usb
AgeCommit message (Collapse)Author
2009-02-16ALSA: usb-audio - Workaround for misdetected sample rate with CM6207Joris van Rantwijk
The CM6207 incorrectly advertises its 96 kHz playback setting as 48 kHz in its USB device descriptor. This patch extends an existing workaround in usbaudio.c to also cover the CM6207. This resolves issue 0004249 in the ALSA bug tracker. Signed-off-by: Joris van Rantwijk <jorispubl@xs4all.nl> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-16ALSA: usb-audio - Fix non-continuous rate detectionTakashi Iwai
The detection of non-continuous rates (given via rate tables) isn't processed properly (e.g. for type II). This patch fixes and simplifies the detection code. Tested-by: Joris van Rantwijk <jorispubl@xs4all.nl> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-16sound: usb-audio: fix uninitialized variable with M-Audio MIDI interfacesClemens Ladisch
Fix the snd_usbmidi_create_endpoints_midiman() function, which forgot to set the out_interval member of the endpoint info structure for Midiman/ M-Audio devices. Since kernel 2.6.24, any non-zero value makes the driver use interrupt transfers instead of bulk transfers. With EHCI controllers, these random interval values result in unbearably large latencies for output MIDI transfers. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Reported-by: David <devurandom@foobox.com> Tested-by: David <devurandom@foobox.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-06sound: usb-audio: handle wMaxPacketSize for FIXED_ENDPOINT devicesClemens Ladisch
For audio devices that do not have proper audio descriptors (e.g., Edirol UA-20), we use hardcoded parameters from our quirks list. However, we must still read the maximum packet size from the standard endpoint descriptor; otherwise, we might use packets that are too big and therefore rejected by the USB core. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-14ALSA: USB quirk for Logitech Quickcam Pro 9000 nameSigned-off-by: Peter Stokes
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>
2009-01-09ALSA: caiaq - Version 1.3.10Takashi Iwai
Increase the version number in module info to indicate the fixes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-08ALSA: caiaq - Fix Oops with MIDITakashi Iwai
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>
2009-01-06trivial: fix then -> than typos in comments and documentationFrederik Schwarzer
- (better, more, bigger ...) then -> (...) than Signed-off-by: Frederik Schwarzer <schwarzerf@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04ALSA: sound/usb: Use negated usb_endpoint_xfer_control, etcJulia Lawall
This patch extends 42a6e66f1e40a930d093c33ba0bb9d8d8e4555ed 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>
2009-01-02ALSA: Use usb_set/get_intfdataJulia Lawall
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>
2009-01-01ALSA: sound/usb: use USB API functions rather than constantsJulia Lawall
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>
2008-12-25Merge branch 'topic/convert-tasklet' into to-pushTakashi Iwai
2008-12-18ALSA: hda - Convert from takslet_hi_schedule() to tasklet_schedule()Takashi Iwai
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>
2008-12-10ALSA: sound: Make staticRoel Kluin
Sparse asked whether these could be static. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-27ALSA: snd-usb-caiaq: clean up the control adding codeDaniel Mack
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>
2008-10-30ALSA: usb - Add quirk for Edirol UA-25EX advanced modesTakashi Iwai
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>
2008-10-15ALSA: us122l: fix missing unlock in usb_stream_hwdep_vm_fault()Li Zefan
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>
2008-10-10ALSA: usb-audio: dynamic detection of MIDI interfaces in uaxx-quirkPedro Lopez-Cabanillas
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>
2008-10-10ALSA: snd-usb-audio: support for Edirol UA-4FX devicePedro Lopez-Cabanillas
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>
2008-10-10ALSA: usb - Fix possible Oops at USB-MIDI disconnectionTakashi Iwai
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>
2008-10-10ALSA: usb-audio: add support for E-Mu Tracker PreEran Tromer
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>
2008-09-09ALSA: us122l - Add missing dependency on CONFIG_SND_HWDEPRandy Dunlap
CONFIG_SND_USB_US122L uses snd_hwdep_new(), so SND_HWDEP needs to be enabled (selected). ERROR: "snd_hwdep_new" [sound/usb/usx2y/snd-usb-us122l.ko] undefined! 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>
2008-08-15ALSA: usb-audio - Add ignore_ctl_error parameterTakashi Iwai
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>
2008-08-13ALSA: Kill snd_assert() in other placesTakashi Iwai
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>
2008-08-06ALSA: snd_usb_audio: fix SB Extigy IR Remote regressionPhillip Michael Jordan
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>
2008-08-01ALSA: Add USB US122L driverKarsten Wiese
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>
2008-07-28ALSA: usb-audio: add BOSS GT-10 supportClemens Ladisch
Add a quirk entry for the BOSS GT-10. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-07-10ALSA: usb-audio: add some Yamaha USB MIDI quirksClemens Ladisch
Add quirk entries for four Yamaha USB MIDI devices. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-07-10ALSA: usb-audio: fix Yamaha KX quirkClemens Ladisch
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>
2008-07-10ALSA: Add Yamaha KX49 (USB MIDI controller) to usbquirks.hRichard Chan
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>
2008-06-06[ALSA] usbaudio.c: remove #ifndef CONFIG_USB_EHCI_SPLIT_ISO codeAdrian Bunk
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>
2008-05-27sound: Convert to menuconfigTakashi Iwai
Convert menu in sound Kconfig files to menuconfig and if. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-27[ALSA] usb-audio - Support for Roland SonicCell sound moduleChris Mennie
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>
2008-05-19[ALSA] snd_usb_caiaq: add support for 'Session I/O' interfaceDaniel Mack
This patch adds suport for Native Instruments new 'Guitar Rig Session I/O' audio hardware. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-21caiaq endianness fixAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-24[ALSA] usb-audio - Fix race in reconnectionTakashi Iwai
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>
2008-04-24[ALSA] snd_usb_caiaq: make high sample rates work with A8DJDaniel Mack
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>
2008-04-24[ALSA] snd_usb_caiaq: correct input channel orderDaniel Mack
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>
2008-04-24[ALSA] snd_usb_caiaq: fix potential lockups lockingDaniel Mack
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>
2008-04-24[ALSA] sound/usb/usbaudio.c: coding stylePavel Machek
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>
2008-04-24[ALSA] usb audio: make quirk handling more readable, and fix commented-out codePavel Machek
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>
2008-04-24[ALSA] usb audio: Fix another Dallas quirkPavel Machek
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>
2008-04-24[ALSA] usb-audio - Add a proper error checkTakashi Iwai
The error in check_hw_params_convention() has to be checked and handled properly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] usb-audio: sort quirks listClemens Ladisch
Move some entries to their proper position so that the list is again sorted by vendor/product ID. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-03-10USB: usbaudio: handle kcalloc failureJim Meyering
sound/usb/usbaudio.c (check_hw_params_convention): Handle kcalloc failure. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-29[ALSA] usb-audio: add workaround for broken E-Mu frequency feedbackClemens Ladisch
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>
2008-02-22[ALSA] caiaq - fix section mismatch warningSam Ravnborg
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>
2008-02-22[ALSA] race between disconnect and error handling in usbmidiTakashi Iwai
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>
2008-02-04vm audit: add VM_DONTEXPAND to mmap for drivers that need itNick Piggin
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>
2008-01-31[ALSA] usb/caiaq: decrease period_bytes_minDaniel Mack
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>