aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
Commit message (Collapse)AuthorAge
* Merge branch 'topic/usb' into for-linusTakashi Iwai2010-05-20
|\
| * ALSA: sound/usb: add preliminary support for UAC2 interruptsDaniel Mack2010-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For both UAC1 and UAC2, interrupt endpoint messages are now parsed with structs rather that with anonymous buffer array accesses. For UAC2, only CUR interrupt notifications are supported for now. snd_usb_mixer_status_complete() was renamed to snd_usb_mixer_interrupt(). Fixed one indentation flaw on the way. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: sound/usb: fix UAC1 regressionDaniel Mack2010-05-08
| | | | | | | | | | | | | | | | | | | | | | Commit 23caaf19b ("ALSA: usb-mixer: Add support for Audio Class v2.0") broke support for Class1 devices due to two faulty changes. This patch fixes it. Signed-off-by: Daniel Mack <daniel@caiaq.de> Reported-and-Tested-by: The Source <thesourcehim@gmail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb/mixer - use get_iface_desc() rather than direct structureJaroslav Kysela2010-04-16
| | | | | | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* | Merge branch 'topic/usb' of ↵Jaroslav Kysela2010-04-16
|\| | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into devel
| * Merge branch 'fix/misc' into topic/usbTakashi Iwai2010-04-10
| |\
| | * ALSA: usb - Fix Oops after usb-midi disconnectionTakashi Iwai2010-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usb-midi causes sometimes Oops at snd_usbmidi_output_drain() after disconnection. This is due to the access to the endpoints which have been already released at disconnection while the files are still alive. This patch fixes the problem by checking disconnection state at snd_usbmidi_output_drain() and by releasing urbs but keeping the endpoint instances until really all freed. Tested-by: Tvrtko Ursulin <tvrtko@ursulin.net> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usb - update gfp/slab.h includesTejun Heo2010-03-29
| | | | | | | | | | | | | | | | | | | | | | | | Implicit slab.h inclusion via percpu.h is about to go away. Make sure gfp.h or slab.h is included as necessary. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usb pcm: use of kmalloc requires the include of slab.hStephen Rothwell2010-03-29
| | | | | | | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usb - use of kmalloc/kfree requires the include of slab.hStephen Rothwell2010-03-29
| | | | | | | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usbaudio: Add basic support for M-Audio Fast Track Ultra seriesFelix Homann2010-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds basic support for M-Audio's Fast Track Ultra series of USB audio interfaces. It is a refactored version of the patch Clemens Ladisch posted some time ago. Neither playback nor capturing work properly at 44100 Hz (don't know why). The other sampling rates work properly. There's no support for the DSP mixer, yet. Signed-off-by: Felix Homann <fexpop@web.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | Merge remote branch 'alsa/devel' into topic/usbTakashi Iwai2010-03-23
| |\ \
| | * | ALSA: ua101: remove experimental statusClemens Ladisch2010-03-23
| | |/ | | | | | | | | | | | | | | | | | | | | | Now that the EHCI driver copes with small iso packets without blowing up, take the snd-ua101 driver out of the alpha-test stage. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
| * | ALSA: usb: fix usb build error when PM is not enabledRandy Dunlap2010-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build errors when CONFIG_PM is not enabled: sound/usb/card.c:629: error: 'usb_audio_suspend' undeclared here (not in a function) sound/usb/card.c:630: error: 'usb_audio_resume' undeclared here (not in a function) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | Merge branch 'topic/misc' into topic/usbTakashi Iwai2010-03-22
| |\ \
| | * | ALSA: usb/caiaq: Add support for Traktor Kontrol X1Daniel Mack2010-03-22
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device does not have audio controllers and backlit buttons only. Input data is handled over a dedicated USB endpoint. All functions are supported by the driver now. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usb-mixer: Add support for Audio Class v2.0Daniel Mack2010-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USB Audio Class v2.0 compliant devices have different descriptors and a different way of setting/getting min/max/res/cur properties. This patch adds support for them. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usb-mixer: parse descriptors with structsDaniel Mack2010-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a number of new structs for mixer, selector, feature and processing units and some static inline helpers to access fields which have dynamic offsets. Use them in mixer.c to parse the descriptors. This is necessary for the upcoming audio v2 parsers. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usbmixer: rename usbmixer.[ch] -> mixer.[ch]Daniel Mack2010-03-12
| | | | | | | | | | | | | | | | | | | | | | | | For clearer namespace, also rename usbmixer_maps.c -> mixer_maps.c Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usb-mixer: factor out quirksDaniel Mack2010-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move all non-standard mixer controls and vendor-specific extensions to a separate file. Some structs need to be exported now. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usb-mixer: use defines from audio.hDaniel Mack2010-03-12
| | | | | | | | | | | | | | | | | | | | | | | | No need for the private enum. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | linux/usb/audio.h: split headerDaniel Mack2010-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Split the audio.h file in two to clearly denote the differences between the standards. - Add many more defines to audio-v2.h. Most of them are not currently used. - Replaced a magic value with a proper define Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usb-audio: add support for samplerate setting on v2 devicesDaniel Mack2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Sample rate setting is done with a 4-byte long class request that addresses the interface. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usb-audio: support multiple formats with audio class v2 devicesClemens Ladisch2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | Change the parser to correctly handle v2 descriptors with multiple format bits set. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usb-audio: use a format bitmask per alternate settingClemens Ladisch2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | In preparation for USB audio 2.0 support, change the audioformat structure so that it uses a bitmask to specify possible formats. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usb-audio: rename substream format field to altset_idxClemens Ladisch2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | The snd_usb_substream::format field actually contains the index of the current alternate setting, so rename it to altset_idx to avoid confusion. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usb-audio: refactor codeDaniel Mack2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: usb-audio: header file cleanupsDaniel Mack2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename snd-usb-lib to snd-usbmidi-lib as MIDI functions are the only thing it actually contains. Introduce a new header file to only declare these functions. Introduced usbmixer.h for all functions exported by usbmixer.c. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: usb-audio: move ua101 driverDaniel Mack2010-03-05
| |/ | | | | | | | | | | | | | | | | As part of the USB audio code cleanup, move the non-standard ua101 driver out of the way. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* / include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-30
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* ALSA: usbaudio - remove debug "SAMPLE BYTES" printk lineJaroslav Kysela2010-03-03
| | | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usbaudio: Fix wrong bitrate for Creative Creative VF0470 Live CamArseniy Lartsev2010-03-02
| | | | | | | | | This patch works around misbehaviour of Creative Creative VF0470 Live Cam which reports 16 kHz sample rate for audio capture while actually producing 8 kHz stream. Signed-off-by: Arseniy Lartsev <arseniy@fizlesh.ru> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge remote branch 'alsa/devel' into topic/miscTakashi Iwai2010-03-02
|\ | | | | | | | | Conflicts: sound/usb/usbaudio.c
| * ALSA: ua101: removing debugging codeClemens Ladisch2010-03-02
| | | | | | | | | | | | | | | | Remove some code that is no longer needed now that the relevant parts of the driver have been tested. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
| * ALSA: ua101: add Edirol UA-1000 supportClemens Ladisch2010-03-01
| | | | | | | | | | | | | | | | | | | | Add support for the Edirol UA-1000 to the UA-101 driver. Both devices behave the same, so we just have to shuffle around some interface numbers and name strings. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* | ALSA: sound/usb/caiaq/midi.h: Checkpatch cleanupAndrea Gelmini2010-03-02
| | | | | | | | | | | | | | | | sound/usb/caiaq/midi.h:6: ERROR: "foo* bar" should be "foo *bar" Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Acked-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usbaudio: consolidate header filesDaniel Mack2010-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the definitions from linux/usb/audio.h all over the ALSA USB audio driver and add some missing definitions there as well. Use the endpoint attribute macros from linux/usb/ch9 and remove the own things from sound/usb/usbaudio.h. Now things are also nicely prefixed which makes understanding the code easier. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usbmixer: bail out early when parsing audio class v2 descriptorsDaniel Mack2010-02-23
| | | | | | | | | | | | | | | | | | | | This is just a quick hack that needs to be removed once the new units defined by the audio class v2.0 standard are supported. However, it allows using these devices for now, without mixer support. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usbaudio: implement basic set of class v2.0 parserDaniel Mack2010-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a number of parsers for audio class v2.0. In particular, the following internals are different and now handled by the code: * the number of streaming interfaces is now reported by an interface association descriptor. The old approach using a proprietary descriptor is deprecated. * The number of channels per interface is now stored in the AS_GENERAL descriptor (used to be part of the FORMAT_TYPE descriptor). * The list of supported sample rates is no longer stored in a variable length appendix of the format_type descriptor but is retrieved from the device using a class specific GET_RANGE command. * Supported sample formats are now reported as 32bit bitmap rather than a fixed value. For now, this is worked around by choosing just one of them. * A devices needs to have at least one CLOCK_SOURCE descriptor which denotes a clockID that is needed im the class request command. * Many descriptors (format_type, ...) have changed their layout. Handle this by casting the descriptors to the appropriate structs. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usbaudio: introduce new types for audio class v2Daniel Mack2010-02-23
| | | | | | | | | | | | | | | | | | | | | | This patch adds some definitions for audio class v2. Unfortunately, the UNIT types PROCESSING_UNIT and EXTENSION_UNIT have different numerical representations in both standards, so there is need for a _V1 add-on now. usbmixer.c is changed accordingly. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usbaudio: parse USB descriptors with structsDaniel Mack2010-02-23
| | | | | | | | | | | | | | | | | | | | | | | | In preparation of support for v2.0 audio class, use the structs from linux/usb/audio.h and add some new ones to describe the fields that are actually parsed by the descriptor decoders. Also, factor out code from usb_create_streams(). This makes it easier to adopt the new iteration logic needed for v2.0. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usbaudio Mbox support, output onlyChris J Arges2010-02-22
| | | | | | | | | | Signed-off-by: Chris J Arges <christopherarges@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'fix/misc' into topic/miscTakashi Iwai2010-02-17
|\ \ | |/ |/| | | | | Conflicts: sound/pci/hda/patch_realtek.c
| * Merge remote branch 'alsa/fixes' into fix/miscTakashi Iwai2010-02-17
| |\
| * | ALSA: usb-audio - Avoid Oops after disconnectTakashi Iwai2009-12-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the release of substreams may be done asynchronously from the disconnection, close callback needs to check the shutdown flag before actually accessing the usb interface. Reference: Novell bnc#505027 http://bugzilla.novell.com/show_bug.cgi?id=565027 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: usbmixer - use MAX_ID_ELEMS where possibleJaroslav Kysela2010-02-16
| | | | | | | | | | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* | | ALSA: usbmixer - add usb_id value to usbmixer proc fileJaroslav Kysela2010-02-16
| | | | | | | | | | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* | | ALSA: usbmixer - introduce /proc/asound/card#/usbmixer fileJaroslav Kysela2010-02-16
| | | | | | | | | | | | | | | | | | | | | | | | The usbmixer proc file contains mapping between ALSA control API and USB mixer control units. The purpose of this file is for debugging and a problem diagnostics. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* | | Merge branch 'topic/misc' of ↵Jaroslav Kysela2010-02-16
|\ \ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into devel
| * \ \ Merge remote branch 'alsa/devel' into topic/miscTakashi Iwai2010-02-12
| |\ \ \