dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

344 Commits

Author SHA1 Message Date
Julia Lawall 42a6e66f1e ALSA: sound/usb: use USB API functions rather than constants
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>
2009-01-01 10:27:33 +01:00
Takashi Iwai 8afabfa74b Merge branch 'topic/convert-tasklet' into to-push 2008-12-25 11:40:27 +01:00
Takashi Iwai 1f04128a3d ALSA: hda - Convert from takslet_hi_schedule() to tasklet_schedule()
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-18 12:17:55 +01:00
Roel Kluin acc421656b ALSA: sound: Make static
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-12-10 07:55:59 +01:00
Daniel Mack 12666f050b ALSA: snd-usb-caiaq: clean up the control adding code
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-11-27 08:21:05 +01:00
Takashi Iwai e2736261b4 ALSA: usb - Add quirk for Edirol UA-25EX advanced modes
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-30 11:37:01 +01:00
Li Zefan 428ffb7151 ALSA: us122l: fix missing unlock in usb_stream_hwdep_vm_fault()
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-15 11:41:04 +02:00
Pedro Lopez-Cabanillas 59b3db6c69 ALSA: usb-audio: dynamic detection of MIDI interfaces in uaxx-quirk
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-10 13:41:57 +02:00
Pedro Lopez-Cabanillas 310e0dc01d ALSA: snd-usb-audio: support for Edirol UA-4FX device
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-10 13:41:48 +02:00
Takashi Iwai 7a17daae8e ALSA: usb - Fix possible Oops at USB-MIDI disconnection
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-10 13:41:48 +02:00
Eran Tromer 97c889a78b ALSA: usb-audio: add support for E-Mu Tracker Pre
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-10-10 13:41:37 +02:00
Randy Dunlap dc0abf9005 ALSA: us122l - Add missing dependency on CONFIG_SND_HWDEP
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-09-09 09:10:57 +02:00
Takashi Iwai 7a9b8063cf ALSA: usb-audio - Add ignore_ctl_error parameter
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-15 11:48:01 +02:00
Takashi Iwai 5e246b850d ALSA: Kill snd_assert() in other places
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-13 11:46:40 +02:00
Phillip Michael Jordan b9c196e145 ALSA: snd_usb_audio: fix SB Extigy IR Remote regression
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-06 15:40:19 +02:00
Karsten Wiese 030a07e441 ALSA: Add USB US122L driver
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-08-01 13:37:12 +02:00
Clemens Ladisch b38addb2da ALSA: usb-audio: add BOSS GT-10 support
Add a quirk entry for the BOSS GT-10.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-07-28 10:19:39 +02:00
Clemens Ladisch 83a1a3974f ALSA: usb-audio: add some Yamaha USB MIDI quirks
Add quirk entries for four Yamaha USB MIDI devices.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-07-10 11:05:42 +02:00
Clemens Ladisch c85ceac974 ALSA: usb-audio: fix Yamaha KX quirk
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-10 11:01:06 +02:00
Richard Chan bf41534506 ALSA: Add Yamaha KX49 (USB MIDI controller) to usbquirks.h
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-07-10 09:33:05 +02:00
Adrian Bunk 33b9cd8214 [ALSA] usbaudio.c: remove #ifndef CONFIG_USB_EHCI_SPLIT_ISO code
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-06-06 11:54:59 +02:00
Takashi Iwai 89fe511792 sound: Convert to menuconfig
Convert menu in sound Kconfig files to menuconfig and if.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-27 15:56:20 +02:00
Chris Mennie 62b1263153 [ALSA] usb-audio - Support for Roland SonicCell sound module
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-27 15:56:20 +02:00
Daniel Mack f3e9d5d1fd [ALSA] snd_usb_caiaq: add support for 'Session I/O' interface
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-19 13:19:15 +02:00
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
Thibault Le Meur cac19c3ba1 [ALSA] usb-audio - Fix AC3 with M-Audio Audiophile USB
Fixed AC3 interface in device_setup=0x00 mode thanks to Hakan
Lennestal and updated documentation

Signed-off-by: Thibault Le Meur <Thibault.LeMeur@supelec.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:52 +02:00
Thibault Le Meur f8c78b82b9 [ALSA] usb-audio - Fix audiophile-USB quirk for little-endian
Audiophile-usb fix (corrects little-endianness in 16bit
modes, resets interfaces at device initialization, and updates the
documentation).

Signed-off-by: Thibault Le Meur <Thibault.LeMeur@supelec.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:50 +02:00
Ritesh Raj Sarraf cfc24ec89b [ALSA] USB ID for intergrated quickcam on dell xps m1210
This patch adds Logitech QuickCam USB ID for Dell's
XPS M1210 notebooks.

Signed-off-by: Ritesh Raj Sarraf <rrs@researchut.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:49 +02:00
George Shapovalov c34532da91 [ALSA] usb-audio: another Logitech camera/microphone ID match
From: George Shapovalov <george@gentoo.org>
Another case of ALSA ticket #3040: we need an explicit USB ID match for
another Logitech camera/microphone device.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:48 +02:00
Takashi Iwai f167684a64 [ALSA] usbaudio - Add quirk for Roland EXR series
Added a quirk for Roland EXR series.  Reported by Andre Coetzee.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:47 +02:00
Claudio Matsuoka 95093a23b9 [ALSA] usb-audio - Add quirk for Roland Juno-G
Added a quirk for Roland Juno-G.  It's simply a copy of Fantom-X with the
IDs changed.
From: Claudio Matsuoka <cmatsuoka@gmail.com>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:40 +02:00
Carlo Beccaria 87823090a8 [ALSA] usb-audio: add Roland SH-201 support
Add quirks to detect the Roland SH-201.

Signed-off-by: Carlo Beccaria <carlo@beccaria.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:40 +02:00
Richard Knutsson c111b8de97 [ALSA] usbusx2yaudio: kfree(NULL) is valid
if (!x) kfree(x); is not needed since kfree(NULL) is valid.

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:14 +02:00
Daniel Drake 500bec3d2b [ALSA] usb-audio: another Logitech QuickCam ID
This patch adds the ID for another quickcam microphone, reported by freqmod
on ALSA ticket #0003040
I'm going to submit a USB patch separately to provide a macro to simplify these
entries, as suggested by Alan Stern. We could switch to using that in future.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:14 +02:00
Thomas Reitmayr a04395ead6 [ALSA] usbaudio - Coping with short replies in usbmixer
This patch makes sure that short USB replies are treated as an
error when requesting the value of a certain mixer control.

Signed-off-by: Thomas Reitmayr <thomas@devbase.at>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-16 12:23:20 +02:00
Daniel Drake d417045e7d [ALSA] usb-audio: another Logitech QuickCam ID
This patch adds the ID for another quickcam microphone, reported by freqmod
on ALSA ticket #0003040
I'm going to submit a USB patch separately to provide a macro to simplify these
entries, as suggested by Alan Stern. We could switch to using that in future.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-16 11:45:28 +02:00
Clemens Ladisch 490cbd92ed [ALSA] usb-audio: work around wrong wMaxPacketSize on ESI M4U
Add a workaround for the ESI M4U that claims to support 32-byte packets
but ignores the remaining bytes of packets bigger than four bytes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:56:17 +02:00
Clemens Ladisch d05cc10432 [ALSA] usb-audio: work around broken M-Audio MidiSport Uno firmware
The firmware of the M-Audio USB Uno MIDI Interface has, at least in
hardware revision 1.25, a bug that garbles its USB output.  When it
receives a Note On MIDI message that uses running status, the resulting
USB MIDI packet has a wrong CIN (4 instead of 9) and a wrong length
(2 bytes, the status byte is still missing).
This patch adds a workaround to track the CINs and the MIDI messages of
received USB MIDI packets to detect whether a packet with CIN 4 is a
correct SysEx packet or a buggy running status packet.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:56:17 +02:00
Daniel Drake a91214589e [ALSA] usb-audio: explicitly match Logitech QuickCam
Commit 93c8bf45e0 modified the USB device
matching behaviour to ignore interface class matches if the device class
is vendor-specific.
This patch adds explicit ID matches for Logitech QuickCam devices, which
have a vendor specific device class (but standards-compliant audio
interfaces).
This fixes a 2.6.20 regression where the audio component of these
devices was no longer usable.
http://bugs.gentoo.org/show_bug.cgi?id=175715
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/93822
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3040
Based on a patch from sergiom

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:56:17 +02:00
Takashi Iwai 81c4899f7e [ALSA] usbaudio - Revert the minimal period size fix patch
The last patch didn't really work (false report).
Although the hardware supports 125us minimum period, the current
usb-audio driver code assumes the 1ms period in many places.
Rollback the change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:56:14 +02:00
Takashi Iwai 6b9fa70a73 [ALSA] usb-audio - Fix the minimum period size per transfer mode
The minimal period size is 125us for high-speed mode while
1ms for full-speed mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:56:13 +02:00
Karsten Wiese a971c3d425 [ALSA] snd-usb-caiaq: Make playback work
some typo fixes.

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-05-11 16:55:55 +02:00
Daniel Mack 523f1dce37 [ALSA] Add Native Instrument usb audio device support
Add snd-usb-caiaq driver to support caiaq usb-audio devices from
Native Instrument:
	* Native Instruments RigKontrol2
	* Native Instruments Kore Controller
	* Native Instruments Audio Kontrol 1
	* Native Instruments Audio 8 DJ

Signed-off-by: Daniel Mack <daniel@caiaq.org>
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-05-11 16:55:53 +02:00
Clemens Ladisch f38cc317c0 [ALSA] usb-audio: add PCR-A PCM support
Add support for the PCM interfaces of the Edirol PCR-A.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-14 08:38:25 +01:00
Jiri Kosina 596f967f50 [ALSA] usbaudio - remove urb->bandwidth reference
Recent changes in usbcore removed the bandwidth field from struct urb.
Remove the occurence in usbaudio.c

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-14 08:38:23 +01:00
Bjoern Fay d0b0fac14e [ALSA] usbaudio - Add support for Edirol UA-101
Added support for the Edirol UA-101 (only in high-speed mode) by taking
the quirks for the UA-1000 and change them accordingly. Changes were
made in 'usbaudio.c', 'usbaudio.h', and 'usbquirks.h'
MIDI and recording seem to work perfectly (with JACK), but playback
gives some few glitches. I think that's the mentioned
synchronizing-problem in the UA-1000 quirk ('FIXME: playback must be
synchronized to capture'), so I didn't change that.
ToDo: Adding Mixer-Support for the built-in
control-panel/patch-bay/router.

Signed-off-by: Bjoern Fay <mail@bfay.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:03:53 +01:00
Takashi Iwai 8fec560d9b [ALSA] usbaudio - Fix Oops with unconventional sample rates
The patch fixes the memory corruption by the support of unconventional
sample rates.  Also, it avoids the too restrictive constraints if
any of usb descriptions contain continuous rates.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:03:29 +01:00
Gregor Jasny beb60119bc [ALSA] usbaudio - Fix Oops with broken usb descriptors
This is a patch for ALSA Bug #2724. Some webcams provide bogus
settings with no valid rates. With this patch those are skipped.

Signed-off-by: Gregor Jasny <gjasny@web.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:03:26 +01:00
John Daiker 88518275e3 [ALSA] usbaudio.c: remove unneeded casts
Went rummaging through usbaudio.c and found some castings that
aren't needed as far as I can see.  Part of the KernelJanitors
TODO list.

Signed-off-by: John Daiker <daikerjohn@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:47 +01:00
Clemens Ladisch e4f8e656d8 [ALSA] usb-audio: allow pausing
Add pause capabilities for both USB playback and capture streams.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:00:02 +01:00
Clemens Ladisch 1700f3080d [ALSA] usb-audio: merge playback/capture hardware information structs
The hardware information structures for playback and capture streams,
respectively, are the same, so we can use just one structure for both
streams.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:00:00 +01:00
Karsten Wiese bc6191b100 [ALSA] Repair snd-usb-usx2y over OHCI
The previous patch 'Repair snd-usb-usx2y for usb 2.6.18' assumed
urb->start_frame roll over beyond MAX_INT for both UHCI & OHCI.
This isn't true until now (kernel 2.6.20).
Fix this by only looking at the common between OHCI & UHCI Frame number
range.
This is for mainline and stable kernels >= 2.6.18.

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-01-23 09:23:36 +01:00
Takashi Iwai 2a2a5dddec [ALSA] usbaudio - Fix kobject_add() error at reconnection
Fixed the error from kobject_add() at reconnection the usb audio device.
This happens when an app keeps opening a device while the device is
replugged, due to the confliction of the internal bookkept index and
the really empty slot.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-01-09 09:14:15 +01:00
Mariusz Kozlowski 7fbe3ca571 [ALSA] usb: usbmixer error path fix
Without the patch below namelist[0] will not be freed in case
of kmalloc error.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-01-09 09:06:19 +01:00
Clemens Ladisch 987411b7d8 [ALSA] usb-audio: work around wrong frequency in CM6501 descriptors
The C-Media CM6501 chip's descriptors say that altsetting 5 supports
48 kHz, but it actually plays at 96 kHz.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-01-09 09:06:15 +01:00
Tobias Klauser cf78bbc4b1 [ALSA] sound/usb/usbaudio: Handle return value of usb_register()
Handle the return value of usb_register() in the module_init function.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 08:55:31 +01:00
Nick Piggin cd54e7e543 [PATCH] mm: incorrect VM_FAULT_OOM returns from drivers
Some drivers are returning OOM when it is not in response to a memory
shortage.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:20 -08:00
Mariusz Kozlowski 68df9de1d0 usb: usbmixer free kill urb cleanup
- usb_free_urb() cleanup
- usb_kill_urb() cleanup

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:23:35 -08:00
Mariusz Kozlowski f5e135af87 usb: usbmidi kill urb cleanup
- usb_kill_urb() cleanup

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:23:35 -08:00
Takashi Iwai de1b8b93a0 [ALSA] Fix hang-up at disconnection of usb-audio
Fix hang-up at disconnection of usb-audio devices while accessing PCM.
Don't handle PCM operations any more after shutdown flag is set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-11-28 13:46:38 +01:00
Karsten Wiese 635bbb355e [ALSA] Repair snd-usb-usx2y for usb 2.6.18
urb->start_frame rolls over beyond MAX_INT now.
This is for stable kernel and stable alsa.

Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-10-06 20:23:02 +02:00
Karsten Wiese 9b08c2aa54 [ALSA] Fix bug in snd-usb-usx2y's usX2Y_pcms_lock_check()
Fix bug in snd-usb-usx2y's usX2Y_pcms_lock_check()
substream can be NULL......
in mainline, bug was introduced by:
2006-06-22  [ALSA] Add O_APPEND flag support to PCM

Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-10-06 20:23:01 +02:00
David Howells 7d12e780e0 IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 15:10:12 +01:00
Alexey Dobriyan 52978be636 [PATCH] kmemdup: some users
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:19 -07:00
Pete Zaitcev 38e2bfc94e USB: Dealias -110 code (more complete)
The purpose of this patch is to split off the case when a device does
not reply on the lower level (which is reported by HC hardware), and
a case when the device accepted the request, but does not reply at
upper level. This redefinition allows to diagnose issues easier,
without asking the user if the -110 happened "immediately".

The usbmon splits such cases already thanks to its timestamp, but
it's not always available.

I adjusted all drivers which I found affected (by searching for "urb").
Out of tree drivers may suffer a little bit, but I do not expect much
breakage. At worst they may print a few messages.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:59:00 -07:00
Clemens Ladisch fef8a0c03d [ALSA] usb-audio: add mixer control names for the Aureon 5.1 MkII
Add a mixer name map for the TerraTec Aureon 5.1 MkII USB.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:48:30 +02:00
Clemens Ladisch 92b9ac78f9 [ALSA] usb-audio: increase number of packets per URB
To decrease the USB interrupts rate, increase both the default and the
maximum number of packets per URB.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:48:17 +02:00
Luke Ross a79eee8d3d [ALSA] Support for non-standard rates in USB audio driver
There's at least one USB audio chipset out there which supports only one
non-standard rate (ID 0e6a:0310 supports 46875Hz). There's a few other
patches for this card which are unsatisfactory because they attempt to
map this rate to 44.1k leading to sound distortion.
The patch below uses SNDRV_PCM_RATE_KNOT to properly support the
non-standard rates where they are available.

Signed-off-by: Luke Ross <luke@lukeross.name>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:58 +02:00
Takashi Iwai 727f317a10 [ALSA] usb-audio - Fix a typo of CONFIG_PROC_FS
Fixed a typo of CONFIG_PROC_FS in usbaudio.c.
The stream proc file appears again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:40:04 +02:00
Clemens Ladisch f1265391ea [ALSA] usb-audio: add more Yamaha devices
Add some quirks for some unknown Yamaha USB MIDI devices.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:38:22 +02:00
Takashi Iwai 7bc5ba7e02 [ALSA] Add TLV support to snd-usb-audio driver
Added TLV-read support to snd-usb-audio driver for passing
the volume dB scale information to user-space.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:37:54 +02:00
Takashi Iwai c461482c80 [ALSA] Unregister device files at disconnection
Orignally proposed by Sam Revitch <sam.revitch@gmail.com>.
Unregister device files at disconnection to avoid the futher accesses.
Also, the dev_unregister callback is removed and replaced with the
combination of disconnect + free.
A new function snd_card_free_when_closed() is introduced, which is
used in USB disconnect callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:36:58 +02:00
Panagiotis Issaris 59feddb25f [ALSA] Conversions from kmalloc+memset to k(z|c)alloc
sound: Conversions from kmalloc+memset to k(c|z)alloc.

Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-08-03 15:21:18 +02:00
Sam Revitch e217e30c35 [ALSA] usb-audio support for Turtle Beach Roadie
From: Sam Revitch <sam.revitch@gmail.com>Recently a Turtle Beach Audio Advantage Roadie device ended up in my
possession.  It seems to work with the snd-usb-audio driver, but only
using the headphone jack in 2-channel mode.  The device has a DIN
connector carrying six more channels that are otherwise silent.
C-Media has freely available documentation for the CM106 chip around
which this device is based, and enabling 8-channel output, or
6-channel output with the headphone jack following the front pair is a
matter of setting one of its registers.
Attached is a patch to try to enable 5.1 output mode at probe time.
It seems to work correctly with my device.  There is quite list of
other configurables for this device that might deserve controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-06-28 19:30:39 +02:00
Ben Williamson c4a87ef4de [ALSA] USB midi: Remove duplicate CS_AUDIO_* #defines
Removed the CS_AUDIO_* #defines, which were duplicates of the
class-specific USB_DT_CS_* #defines in <linux/usb_ch9.h>.

Signed-off-by: Ben Williamson <ben.williamson@greyinnovation.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:34:31 +02:00
Takashi Iwai f8c7579051 [ALSA] usbaudio - Fix a typo
Fix a typo introduced by the last fix.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:50 +02:00
Clemens Ladisch faf8d11743 [ALSA] usb-audio: add workaround for CSR Bluetooth Headphones (Saitek A-250)
Some devices don't have the required class-specific endpoint descriptors.
Instead of making this case an error, this patch makes the driver guess the
endpoint attributes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-06-22 21:33:47 +02:00
Raimonds Cicans 4d1a70dad0 [ALSA] add support for SB Live! 24-Bit External remote control
This patch rewrites the remote control code to use a table for
the peculiarities of the various SB models, and adds support
for a third model.

Signed-off-by: Raimonds Cicans <ray@vardes.lv>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-06-22 21:33:30 +02:00
Clemens Ladisch a7b928ac5f [ALSA] rawmidi: add get_port_info callback for sequencer information flags
Add a get_port_info callback to the snd_rawmidi_global_ops structure to
allow the USB MIDI driver to supply information flags for the sequencer
ports created by seq_midi.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-06-22 21:33:20 +02:00
Takashi Iwai 0df63e44c3 [ALSA] Add O_APPEND flag support to PCM
Added O_APPEND flag support to PCM to enable shared substreams
among multiple processes.  This mechanism is used by dmix and
dsnoop plugins.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:13 +02:00
Takashi Iwai bf850204a7 [ALSA] Remove unneeded read/write_size fields in proc text ops
Remove unneeded read/write_size fields in proc text ops.
snd_info_set_text_ops() is fixed, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:09 +02:00
Clemens Ladisch bc56eff127 [ALSA] add another Phase 26 quirk
Add a quirk entry for the TerraTec Phase 26 with yet another product ID.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-04-27 21:10:04 +02:00
Takashi Iwai 14790f1c73 [ALSA] Test volume resolution of usb audio at initialization
Test the volume of usb audio whether actually it works and adjusts
the resolution value according to it.

Some USB audio devices report a lower resolution than it reacts.
The only possible check is to write and read a volume value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-31 17:59:00 +02:00
Alexey Dobriyan 7f927fcc2f [PATCH] Typo fixes
Fix a lot of typos.  Eyeballed by jmc@ in OpenBSD.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-28 09:16:08 -08:00
Jesper Juhl 878b478919 [ALSA] fix resource leak in usbmixer
Modules: USB generic driver

We may leak 'namelist' in sound/usb/usbmixer.c::parse_audio_selector_unit()

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:39:28 +01:00
Clemens Ladisch c7a93b852b [ALSA] usb-audio: add Maya44 mixer control names
Modules: USB generic driver

Add mixer control names for the AudioTrak Maya44 USB.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-03-22 10:39:11 +01:00
Clemens Ladisch 9808dc962f [ALSA] usb-audio: add Casio PL-40R support
Modules: USB generic driver

Add a quirk entry for the Casio PL-40R.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-03-22 10:39:07 +01:00
Clemens Ladisch 4ccb4a4387 [ALSA] usb-audio: add MDP-5/EZ-J24 support
Modules: USB generic driver

Add support for the Yamaha MDP-5 and EZ-J24.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-03-22 10:38:41 +01:00
Thibault LE MEUR e311334ee6 [ALSA] Fixes audiophile usb analog capture with the new device_setup parameter
Modules: Documentation,USB generic driver

The patch adds the 'device_setup' module parameter and a specific
quirk to correctly initialize the audiophile usb device: this fixes
the distorted sound bug on the Analog capture port. Backward
compatibility is achieved by simply omitting the new parameter.

Signed-off-by: Thibault LE MEUR <Thibault.LeMeur@supelec.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:38:38 +01:00
Clemens Ladisch 3e964432f5 [ALSA] usb-audio: add error message about missing split iso support
Modules: USB generic driver

Add an error message for -ENOSYS for situations when split iso support
is needed but not enabled.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-03-22 10:38:20 +01:00
Clemens Ladisch 318d27f8b4 [ALSA] usb-audio: change Casio quirk product name
Modules: USB generic driver

Use a generic name for USB device 0x07cf:0x6802 because this ID is used
by several devices without a product ID.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-03-22 10:36:53 +01:00
Clemens Ladisch 32e19e882c [ALSA] usb-audio: show USB error descriptions
Modules: USB generic driver

When usb_submit_urb() fails, show an error description instead of just
the error code.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-03-22 10:36:37 +01:00
Clemens Ladisch 0243ef71ac [ALSA] usb-audio: add Casio AP-80R support
Modules: USB generic driver

Add a quirk for the Casio AP-80R.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-03-22 10:36:29 +01:00
Dave Jones a2df813bea [ALSA] fix usbmixer double kfree
Modules: USB generic driver

snd_ctl_add() kfree's the kcontrol already if we fail there,
so this driver is currently doing a double kfree.

Coverity bug #959

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:35:19 +01:00
Clemens Ladisch 62f09c3d32 [ALSA] usb-audio: optimize snd_usbmidi_count_bits()
Modules: USB generic driver

Reduce the code size of the snd_usbmidi_count_bits() function by using
simpler operations.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-03-22 10:31:19 +01:00
Jesper Juhl 9c4be3d334 [ALSA] no need to check pointers passed to vfree() for NULL
Modules: Digigram VX core,USB generic driver

There's no need to check pointers passed to vfree() for NULL.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:29:21 +01:00
Clemens Ladisch b2b8229dde [ALSA] usb-audio: add Miditech Play'n Roll support
Modules: USB generic driver

Add a quirk entry for the Miditech Play'n Roll.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-03-22 10:28:31 +01:00
Clemens Ladisch cc7a59bd8d [ALSA] usb-audio: rename QUIRK_MIDI_MIDITECH to QUIRK_MIDI_CME
Modules: USB generic driver

Rename QUIRK_MIDI_MIDITECH to QUIRK_MIDI_CME because Miditech keyboards
are built by CME and use the same protocol, and don't force a Miditech
product name for the USB ID used by both Miditech and CME UF-x
keyboards.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-03-22 10:28:22 +01:00
Clemens Ladisch 119c4ff52e [ALSA] usb-audio: add UM-1EX/UM-2EX information
Modules: USB generic driver

Add comments with information about UM-1EX/UM-2EX devices.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-03-22 10:27:14 +01:00
Clemens Ladisch 05422575d4 [ALSA] usb-audio: fix number of G-70 ports
Modules: USB generic driver

The G-70 has one MIDI port in each direction, no two.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-03-22 10:27:10 +01:00
Jaroslav Kysela 3f72a30ccf [ALSA] snd_pcm_format_name() is no longer exported
Modules: PCM Midlevel,USB generic driver

Because snd_pcm_format_name() function is used only for informational
purposes, it is no longer exported from the PCM midlevel to reduce
space and dependency. usbaudio module shows only numeric value for format.

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-03-22 10:27:05 +01:00