aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/midi.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-01-04ALSA: usb-audio: Fix kernel panic of Digidesign Mbox2 quirkDamien Zammit1-4/+0
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-19ALSA: usb-audio: Support for Digidesign Mbox 2 USB sound card:Damien Zammit1-0/+4
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-12-04ALSA: usb-audio: Fix missing autopm for MIDI inputTakashi Iwai1-42/+46
The commit [88a8516a: ALSA: usbaudio: implement USB autosuspend] added the support of autopm for USB MIDI output, but it didn't take the MIDI input into account. This patch adds the following for fixing the autopm: - Manage the URB start at the first MIDI input stream open, instead of the time of instance creation - Move autopm code to the common substream_open() - Make snd_usbmidi_input_start/_stop() more robust and add the running state check Reviewd-by: Clemens Ladisch <clemens@ladisch.de> Tested-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-04ALSA: usb-audio: Avoid autopm calls after disconnectionTakashi Iwai1-1/+22
Add a similar protection against the disconnection race and the invalid use of usb instance after disconnection, as well as we've done for the USB audio PCM. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=51201 Reviewd-by: Clemens Ladisch <clemens@ladisch.de> Tested-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-18ALSA: ua101, usx2y: fix broken MIDI outputClemens Ladisch1-2/+6
Commit 88a8516a2128 (ALSA: usbaudio: implement USB autosuspend) added autosuspend code to all files making up the snd-usb-audio driver. However, midi.c is part of snd-usb-lib and is also used by other drivers, not all of which support autosuspend. Thus, calls to usb_autopm_get_interface() could fail, and this unexpected error would result in the MIDI output being completely unusable. Make it work by ignoring the error that is expected with drivers that do not support autosuspend. Reported-by: Colin Fletcher <colin.m.fletcher@googlemail.com> Reported-by: Devin Venable <venable.devin@gmail.com> Reported-by: Dr Nick Bailey <nicholas.bailey@glasgow.ac.uk> Reported-by: Jannis Achstetter <jannis_achstetter@web.de> Reported-by: Rui Nuno Capela <rncbc@rncbc.org> Cc: Oliver Neukum <oliver@neukum.org> Cc: 2.6.39+ <stable@vger.kernel.org> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-10-31sound: Add module.h to the previously silent sound usersPaul Gortmaker1-0/+1
Lots of sound drivers were getting module.h via the implicit presence of it in <linux/device.h> but we are going to clean that up. So fix up those users now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-08-26ALSA: usb-audio: add Starr Labs USB MIDI supportKristian Amlie1-0/+27
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-04-06ALSA: usb-audio: define another USB ID for a buggy USB MIDI cableTarek Soliman1-0/+1
There are many USB MIDI cables out there that have buggy firmware that reports it can do more than 4 bytes in a packet when they can only properly handle 4 This patch adds the ID of yet another one of those cables Signed-off-by: Tarek Soliman <tarek@bashasoliman.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11ALSA: usbaudio: implement USB autosuspendOliver Neukum1-0/+8
Devices are autosuspended if no pcm nor midi channel is open Mixer devices may be opened. This way they are active when in use to play or record sound, but can be suspended while users have a mixer application running. [Small clean-ups using static inline by tiwai] Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-11ALSA: snd-usb-us122l: Fix MIDI outputKarsten Wiese1-2/+9
The US-122L always reads 9 bytes per urb unless they are set to 0xFD. Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10ALSA: usb-audio: use enum control info helperClemens Ladisch1-7/+1
Simplify info callbacks by using the snd_ctl_enum_info() helper function. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-22ALSA: usb-audio: add Novation Launchpad supportClemens Ladisch1-3/+4
Add a quirk entry for the Novation Launchpad USB MIDI controller. QUIRK_MIDI_FASTLANE gets renamed to *_RAW_BYTES because this quirk type is now shared by different devices. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Tested-by: Jakob Flierl <jakob.flierl@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-14ALSA: usb: USB3 SuperSpeed sound supportPaul Zimmerman1-1/+8
This is V2 of the patch, after feedback from Clemens and Daniel. This patch adds SuperSpeed support to the USB drivers under sound/. It adds tests for USB_SPEED_SUPER to the appropriate places that check for the USB speed. This patch has been tested with our SS USB3 device emulating a set of Yamaha speakers and a Logitech microphone, but with the descriptors modified to add USB3 support. It has also been tested with the real speakers and microphone, to make sure that USB2 devices still work. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Daniel Mack <daniel@caiaq.de> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-23ALSA: usb-midi: whitespace fixesDaniel Mack1-7/+7
Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-26Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6Linus Torvalds1-0/+110
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: emu10k1: allow high-resolution mixer controls ALSA: pcm: fix delta calculation at boundary wraparound ALSA: hda_intel: fix handling of non-completion stream interrupts ALSA: usb/caiaq: fix Traktor Kontrol X1 ABS_HAT2X axis ALSA: hda: Fix model quirk for Dell M1730 ALSA: hda - iMac9,1 sound fixes ALSA: hda: Use LPIB for Toshiba A100-259 ALSA: hda: Use LPIB for Acer Aspire 5110 ALSA: aw2-alsa.c: use pci_ids.h defines and fix checkpatch.pl noise ALSA: usb-audio: add support for Akai MPD16 ALSA: pcm: fix the fix of the runtime->boundary calculation
2010-05-21ALSA: usb-audio: add support for Akai MPD16Krzysztof Foltman1-0/+110
The decoding/encoding is based on own reverse-engineering. Both control and data ports are handled. Writing to control port supports SysEx events only, as this is the only type of messages that MPD16 recognizes. Signed-off-by: Krzysztof Foltman <wdev@foltman.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds1-7/+7
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits) USB: remove unused usb_buffer_alloc and usb_buffer_free macros usb: musb: update gfp/slab.h includes USB: ftdi_sio: fix legacy SIO-device header USB: kl5usb105: reimplement using generic framework USB: kl5usb105: minor clean ups USB: kl5usb105: fix memory leak USB: io_ti: use kfifo to implement write buffering USB: io_ti: remove unsused private counter USB: ti_usb: use kfifo to implement write buffering USB: ir-usb: fix incorrect write-buffer length USB: aircable: fix incorrect write-buffer length USB: safe_serial: straighten out read processing USB: safe_serial: reimplement read using generic framework USB: safe_serial: reimplement write using generic framework usb-storage: always print quirks USB: usb-storage: trivial debug improvements USB: oti6858: use port write fifo USB: oti6858: use kfifo to implement write buffering USB: cypress_m8: use kfifo to implement write buffering USB: cypress_m8: remove unused drain define ... Fix up conflicts (due to usb_buffer_alloc/free renaming) in drivers/input/tablet/acecad.c drivers/input/tablet/kbtab.c drivers/input/tablet/wacom_sys.c drivers/media/video/gspca/gspca.c sound/usb/usbaudio.c
2010-04-10Merge branch 'fix/misc' into topic/usbTakashi Iwai1-6/+18
2010-03-05ALSA: usb-audio: refactor codeDaniel Mack1-0/+2069
Clean up the usb audio driver by factoring out a lot of functions to separate files. Code for procfs, quirks, urbs, format parsers etc all got a new home now. Moved almost all special quirk handling to quirks.c and introduced new generic functions to handle them, so the exceptions do not pollute the whole driver. Renamed usbaudio.c to card.c because this is what it actually does now. Renamed usbmidi.c to midi.c for namespace clarity. Removed more things from usbaudio.h. The non-standard drivers were adopted accordingly. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>