Commit Graph

220 Commits

Author SHA1 Message Date
Al Viro 8c5330a505 caiaq endianness fix
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-21 16:56:00 -07:00
Takashi Iwai 9eb70e68f3 [ALSA] usb-audio - Fix race in reconnection
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 12:00:39 +02:00
Daniel Mack 6e9fc6bd5d [ALSA] snd_usb_caiaq: make high sample rates work with A8DJ
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 12:00:36 +02:00
Daniel Mack 6849d49c48 [ALSA] snd_usb_caiaq: correct input channel order
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 12:00:36 +02:00
Daniel Mack 8d048841e8 [ALSA] snd_usb_caiaq: fix potential lockups locking
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 12:00:35 +02:00
Pavel Machek 07f51a7274 [ALSA] sound/usb/usbaudio.c: coding style
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 12:00:34 +02:00
Pavel Machek 2a56f51bcc [ALSA] usb audio: make quirk handling more readable, and fix commented-out code
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 12:00:34 +02:00
Pavel Machek b9d43bcd06 [ALSA] usb audio: Fix another Dallas quirk
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 12:00:33 +02:00
Takashi Iwai 5a220c868e [ALSA] usb-audio - Add a proper error check
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 12:00:25 +02:00
Clemens Ladisch 25a47b6b01 [ALSA] usb-audio: sort quirks list
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-04-24 12:00:15 +02:00
Jim Meyering ff17e953cb USB: usbaudio: handle kcalloc failure
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-03-10 16:42:25 -07:00
Clemens Ladisch d513202efd [ALSA] usb-audio: add workaround for broken E-Mu frequency feedback
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-29 11:28:15 +01:00
Sam Ravnborg c598195a2d [ALSA] caiaq - fix section mismatch warning
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 14:20:09 -08:00
Takashi Iwai c0792e00bc [ALSA] race between disconnect and error handling in usbmidi
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-22 14:20:08 -08:00
Nick Piggin 2f98735c9c vm audit: add VM_DONTEXPAND to mmap for drivers that need it
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-02-04 07:55:38 -08:00
Daniel Mack 09189ac793 [ALSA] usb/caiaq: decrease period_bytes_min
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>
2008-01-31 17:30:14 +01:00
Randy Dunlap 599c3e76fe [ALSA] sound: fix caiaq section mismatches
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>
2008-01-31 17:30:01 +01:00
Takashi Iwai 9004acc70e [ALSA] Remove sound/driver.h
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>
2008-01-31 17:29:48 +01:00
Andrew Morton 93521d274b [ALSA] sound/usb/usbaudio.c: fix build with CONFIG_PM=n
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>
2008-01-31 17:29:44 +01:00
Clemens Ladisch 358ce0cf3f [ALSA] usb-audio: add UR-80 PCM quirk
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>
2008-01-31 17:29:43 +01:00
Oliver Neukum f85bf29c94 [ALSA] usb audio suspend support
This patch implements suspend/resume support for USB audio devices.
It works with the microphone in my camera.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:36 +01:00
Nick Piggin eb415b8f6d [ALSA] alsa: usx2y nopage
Convert alsa usx2y driver from nopage to fault.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:32 +01:00
Daniel Mack 7829d0eccb [ALSA] usb-caiaq - add support for Kore controller 2
Added support for Native Instrument's Kore controller 2. This device has
no audio but MIDI, input devices and ALSA controllers only.

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-01-31 17:29:29 +01:00
Takashi Iwai 7f6301cdfa [ALSA] caiaq - remove ifdef
Remove ifdef and fix Makefile for conditional builds.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:28 +01:00
Daniel Mack 8e3cd08ed8 [ALSA] caiaq - add control API and more input features
- added support for all input controllers on Native Instrument's 'Kore
   controller'.
 - added ALSA controls to switch LEDs on 'RigKontrol 2', 'RigKontrol3',
   'Audio Kontrol 1' and 'Kore controller'.
 - added ALSA controls to switch input mode, software lock and ground
   lift features on 'Audio 8 DJ'.

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-01-31 17:29:28 +01:00
Dmitry Torokhov e5f73e2ae8 [ALSA] caiaq - input device support must depend on CONFIG_INPUT
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:27 +01:00
Dmitry Torokhov b18b493f27 [ALSA] caiaq - misc input handling fixes
- link input device with its parent so that it placed in proper spot
   in sysfs hierarchy
 - drivers that allow changing their keymaps should use private copy
   of the keymap so that one instance of a device does not affect
   another instance
 - it is preferred for drivers to properly set up input_dev->phys to
   help userspace locate devices
 - drivers should use usb_to_input_id(), or perform endianess conversion,
   themselves, otherwise ID is not correct on big-endian boxes
 - whitespace and formatting cleanup
Acked-by: Daniel Mack <daniel@caiaq.de>

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:27 +01:00
Takashi Iwai ee6df2e184 [ALSA] caiaq - Fix indent in Kconfig
Fix indent of caiaq in Kconfig to the same level as others.
Just a tidy up.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:27 +01:00
Timofei Bondarenko 69b1f1e833 [ALSA] usb-audio - SB Live24-External better handling
This patch improves support for 'SB Live 24-bit Extarnal' USB card.
1) This card can go into muted state when a headphones connected or
disconnected. So notify mixer about changes in headphone jack.
2) Add LED controls and procfs support just as in similar Audigy 2 NX card.
3) Rename 'PCM Capture' conrol to 'Mic Capture' to reflect reality:
the card may adjust microphone input level only.

Signed-off-by: Timofei Bondarenko <tim@ipi.ac.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:14 +01:00
Dawid Wrobel 31127f2eb9 [ALSA] usb-audio: Another USB mic quirk for Logitech Communicator webcam
The patch adds the USB microphone quirk for Logitech Communicator
(046d:08f5 Logitech, Inc.) webcam.

Signed-off-by: Dawid Wrobel <dawid@klej.net>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-23 08:07:55 +02:00
Jiri Slaby 7b19ada2ed get rid of input BIT* duplicate defines
get rid of input BIT* duplicate defines

use newly global defined macros for input layer. Also remove includes of
input.h from non-input sources only for BIT macro definiton. Define the
macro temporarily in local manner, all those local definitons will be
removed further in this patchset (to not break bisecting).
BIT macro will be globally defined (1<<x)

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <dtor@mail.ru>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Cc: <lenb@kernel.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Cc: <perex@suse.cz>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: <vernux@us.ibm.com>
Cc: <malattia@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 11:53:42 -07:00
Takashi Iwai ea045ee4d3 [ALSA] usb-audio - Fix double comment
Remove superfluous comment line (maybe a merge failure).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-16 16:51:21 +02:00
James Courtier-Dutton 1e74190bc0 [ALSA] snd-usb-audio: Add basic support for E-Mu USB devices.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:51:06 +02:00
Daniel Mack ad1e34b565 [ALSA] caiaq - support for Native Instrument's RigKontrol3
This patch adds support for Native Instrument's upcoming
RigKontrol3 sound interface.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:50:46 +02:00
Clemens Ladisch 2ea547dcdd [ALSA] usb-audio: add Ozone Academic support
Add a quirk to detect the MIDI port on the M-Audio Ozone Academic.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:50:26 +02:00
Mark Hills 3a7788b751 [ALSA] usb-audio: update quirk for Rane SL 1 (aka. Serato Scratch Live)
Allow the interface's mixer to be used, and give the interface its
correct name.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:40 +02:00
Oliver Neukum 5149fe2c15 [ALSA] missing error check in usb sound driver
usb_set_interface() can fail, even for altsetting 0

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:36 +02:00
Clemens Ladisch 15944806e2 [ALSA] usb-audio: add quirk for Serato Scratch Live DJ Box
Add a quirk to detect the Serato Scratch Live DJ Box.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:35 +02:00
Clemens Ladisch 56162aabb2 [ALSA] usb-audio: add workaround for ESI MIDI Mate/RomIO II
Force low speed USB MIDI devices like the ESI MIDI Mate and RomIO II to
use interrupt transfers because the USB core would not be happy about
low speed bulk transfers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:19 +02:00
Clemens Ladisch 076639f6ac [ALSA] usb-audio: allow low speed MIDI devices
Allow low speed MIDI devices because newer devices from ESI do not
support full speed.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:19 +02:00
Clemens Ladisch a6a712aeb1 [ALSA] usb-audio: allow output interrupt transfers for MIDI
Allow output interrupt transfers for some MIDI devices that require
them.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:18 +02:00
Clemens Ladisch 61870aed22 [ALSA] usb-audio: fix parsing of SysEx messages from CME keyboards
When CME keyboards send a SysEx message (e.g. master volume), the USB
packet uses a format different from the standard format.  Parsing this
packet according to the specification corrupts the SysEx message itself
and can cause the following MIDI messages to be misinterpreted, too.
This patch adds a workaround for this case.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:01 +02:00
Clemens Ladisch 918f3a0e8c [ALSA] pcm: add snd_pcm_rate_to_rate_bit() helper
Add a snd_pcm_rate_to_rate_bit() function to factor out common code used
by several drivers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:54 +02:00
Takashi Iwai 9b0d39be53 [ALSA] usb-audio - Add advanced mode support for Edirol UA-1EX
Add the quirk to support Advanced mode of Edirol UA-1EX.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:39 +02:00
Mark Hills 0f28ecd332 [ALSA] This patch is a USB quirk to ensure the Stanton Scratchamp v1 is detected
(bugtrack #2932). The interface is two USB devices in the same physical
box. Note that this is the USB ScratchAmp v1 and not the later v2
(firewire) model.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:34 +02:00
Russ Cox 38977e96cb [ALSA] fix selector unit bug affecting some USB speakerphones
Following the suggestion in this thread:
https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/26683
the correct upper bound on desc[0] is 5 + num_ins not 6 + num_ins,
because the index used later is 5+i, not 6+i.
This change makes my Vosky Chatterbox speakerphone work.
Apparently it also helps with the Minivox MV100.

Signed-off-by: Russ Cox <rsc@swtch.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:26 +02:00
Karsten Wiese 01ade528d4 [ALSA] snd_usb_caiaq_input_free() fix
input_free_device()'s comment says:
input_free_device() should only be used if input_register_device() was
not called yet or if it failed. Once device was registered
use input_unregister_device() and memory will be freed once last
refrence to the device is dropped.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:06 +02:00
Takashi Iwai a5ce88909d [ALSA] Clean up with common snd_ctl_boolean_*_info callbacks
Clean up codes using the new common snd_ctl_boolean_*_info() callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:57:45 +02:00
Al Viro b4482a4b2e more trivial signedness fixes in drivers
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-14 12:41:52 -07:00
Jaroslav Kysela perex@suse.cz 1f6268e982 [ALSA] remove duplicate Logitech Quickcam USB ID in usbquirks.h
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:12:00 +02:00