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

566 Commits

Author SHA1 Message Date
Clemens Ladisch 17d900c4a1 ALSA: usb-audio: increase control transfer timeout
There are certain devices that are reportedly so slow that they need
more than 100 ms to handle control transfers.  Therefore, increase the
timeout in mixer(_quirks).c to 1000 ms.

The timeout parameter of snd_usb_ctl_msg() is now constant, so we can
drop it.

Reported-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-27 09:21:48 +02:00
Andy Shevchenko 49957f3966 ALSA: 6fire: don't use custom hex_to_bin()
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-23 15:18:52 +02:00
Daniele Guerrieri 14515a0829 ALSA: usb-audio: Added support for Roland UM-ONE midi-usb interface
Roland UM-ONE midi usb interface differs from Roland UM-1.

Signed-off-by: Daniele Guerrieri <d.guerrieri@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-16 08:31:45 +02:00
Daniel Mack c731bc96ad ALSA: snd-usb: move code from urb.c to endpoint.c
No code altered at this point, simply preparing for upcoming
refactorizations.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-14 17:07:03 +02:00
Daniel Mack e8e8babf56 ALSA: snd-usb: re-order code
Move code from endpoint.c into a new file called stream.c and rename
functions so that their names actually reflect what they're doing.

This way, endpoint.c will be available to functions that hold all the
endpoint logic.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-14 17:07:02 +02:00
Daniel Mack 358e2bd4a9 ALSA: snd-usb: re-order the Makefile
Sort its entries in alphabetical order.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-14 17:07:01 +02:00
Pierre-Louis Bossart 294c4fb8ab ALSA: usb: refine delay information with USB frame counter
Existing code only updates the audio delay when URBs were
submitted/retired. This can introduce an uncertainty of 8ms
on the number of samples played out with the default settings,
and a lot more when URBs convey more packets to reduce the
interrupt rate and power consumption.

This patch relies on the USB frame counter to reduce the
uncertainty to less than 2ms worst-case. The delay information
essentially becomes independent of the URB size and number of
packets. This should help applications like PulseAudio which
require accurate audio timing. Clemens Ladisch reported
a decrease of mplayer's A-V difference from nrpacks down to at
most 1ms.

Thanks to Clemens for also pointing out that the implementation
of frame counters varies between different HCDs. Only the
8 lowest-bits are used to estimate the delay.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
[clemens: changed debug code]
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-12 10:30:20 +02:00
Kristian Amlie 1ef0e0a053 ALSA: usb-audio: add Starr Labs USB MIDI support
Add support for Starr Labs USB MIDI devices such as the Z7S, which are
based on an FTDI serial UART chip.

Based on a patch by Daniel Mack.

Signed-off-by: Kristian Amlie <kristian@amlie.name>
Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-26 14:12:34 +02:00
Takashi Iwai 9fcd0ab130 ALSA: usb-audio - Check the dB-range validity in the later read, too
When the initial check of dB-range failed due to the read error, try to
check again at the later read, too.  When an invalid dB range is found,
remove TLV flags and notify the mixer info change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-19 08:30:53 +02:00
Takashi Iwai 38b65190c6 ALSA: usb-audio - Fix missing mixer dB information
The recent fix for testing dB range at the mixer creation time seems
to cause regressions in some devices.  In such devices, reading the dB
info at probing time gives an error, thus both dBmin and dBmax are still
zero, and TLV flag isn't set although the later read of dB info succeeds.

This patch adds a workaround for such a case by assuming that the later
read will succeed.  In future, a similar test should be performed in a
case where a wrong dB range is seen even in the later read.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2011-08-19 07:55:10 +02:00
Daniel Mack da6094ea7d ALSA: snd_usb_caiaq: track submitted output urbs
The snd_usb_caiaq driver currently assumes that output urbs are serviced
in time and doesn't track when and whether they are given back by the
USB core. That usually works fine, but due to temporary limitations of
the XHCI stack, we faced that urbs were submitted more than once with
this approach.

As it's no good practice to fire and forget urbs anyway, this patch
introduces a proper bit mask to track which requests have been submitted
and given back.

That alone however doesn't make the driver work in case the host
controller is broken and doesn't give back urbs at all, and the output
stream will stop once all pre-allocated output urbs are consumed. But
it does prevent crashes of the controller stack in such cases.

See http://bugzilla.kernel.org/show_bug.cgi?id=40702 for more details.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Matej Laitl <matej@laitl.cz>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-14 18:10:43 +02:00
Daniel Mack 15439bde3a ALSA: snd-usb-caiaq: Correct offset fields of outbound iso_frame_desc
This fixes faulty outbount packets in case the inbound packets
received from the hardware are fragmented and contain bogus input
iso frames. The bug has been there for ages, but for some strange
reasons, it was only triggered by newer machines in 64bit mode.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: William Light <wrl@illest.net>
Reported-by: Pedro Ribeiro <pedrib@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-10 20:05:47 +02:00
Kazutomo Yoshii c9c9e4e425 ALSA: usb-audio - Add quirk for BOSS Micro BR-80
Signed-off-by: Kazutomo Yoshii <kazutomo.yoshii@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-10 08:18:57 +02:00
Daniel Mack f4389489b5 ALSA: snd-usb-caiaq: Fix keymap for RigKontrol3
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Renato <naretobh@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-06 10:23:36 +02:00
Daniel Mack dac8f847c4 ALSA: snd-usb: Fix uninitialized variable usage
Purely cosmetic, but fixes the following build warning.

  CC [M]  sound/usb/quirks.o
sound/usb/quirks.c: In function ‘snd_usb_apply_boot_quirk’:
sound/usb/quirks.c:429:6: warning: ‘err’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-06 10:22:58 +02:00
Miller Puckette 02651d1a97 ALSA: usb-audio - add quirk for Keith McMillen StringPort
Signed-off-by: Miller Puckette <msp@ucsd.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-05 08:27:02 +02:00
Daniel Mack 1faa5d07a9 ALSA: snd-usb: operate on given mixer interface only
When creating the mixers for an USB audio device, the current code looks
at the host interface stored in mixer->chip->ctrl_if. Change this and
rather keep a local pointer to the interface that was given when
snd_usb_create_mixer() was called.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Nicolai Krakowiak <nicolai.krakowiak@gmail.com>
Reported-by: Lean-Yves LENHOF <jean-yves@lenhof.eu.org>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-04 16:24:10 +02:00
Nicolai Krakowiak 60c961a9e1 ALSA: snd-usb: avoid dividing by zero on invalid input
Signed-off-by: Nicolai Krakowiak <nicolai.krakowiak@gmail.com>
Acked-by: Daniel Mack <zonque@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-04 16:24:06 +02:00
Clemens Ladisch 824818b148 ALSA: snd-usb: Accept UAC2 FORMAT_TYPE descriptors with bLength > 6
The Focusrite Scarlett 18i6 USB has them that way, which is probably a
bug. Anyway, the driver should simply ignore this fact.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Nicolai Krakowiak <nicolai.krakowiak@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-04 16:23:47 +02:00
David G Turner 6a6d822e12 ALSA: usb-audio - Add quirk for Roland / BOSS BR-800
Add support for Roland/BOSS BR-800 (0582:011e) to snd-usb-audio driver.

This allows playback and recording, which has been tested and found to
work. The third interface should be MIDI (MTC/SMPTE?) for DAW interface
and is set as per ME-25, but this has not been tested. SDHC card access
is already supported by usb-storage for Backup/Rhythm Editor/Wave
Convertor mode which should not conflict with this.

Signed-off-by: David G Turner <dgturner@iee.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-21 19:00:57 +02:00
Guillaume Pellerin 0f5733b0c8 ALSA: usb-audio - Add quirks for M-Audio Fast Track Pro and Quattro
This patch gives M-Audio Fast Track Pro and M-Audio Quattro quirks and
endpoints to boot and setup those devices with special options (digital
inputs and outputs, 24 bits mode, etc...). M-Audio Audiophile quirks are
just adapted to match the new global M-Audio parameters.

Special configurations can be then loaded through a modprobe conf file.
For example, to set the 24 bits mode on the Fast Track Pro add
/etc/modprobe.d/fast_track_pro.conf :

    options snd_usb_audio   vid=0x763 pid=0x2012 device_setup=0x08

Here is a list of the possibilities in this example :
http://files.parisson.com/debian/fast-track-pro.conf

Signed-off-by: Guillaume Pellerin <yomguy@parisson.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-12 18:15:45 +02:00
Pavel Roskin 81b85b6bd9 ALSA: usb-audio: replace "void *" with more specific pointers
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-08 10:10:25 +02:00
Takashi Iwai 3409fcd1f7 Merge branch 'fix/hda' into topic/misc 2011-06-17 14:54:47 +02:00
Clemens Ladisch f4b1e98aa9 ALSA: firewire-speakers, oxygen, ua101: allow > 10 s periods
Since commit f2b3614cef (Don't check DMA time-out too shortly),
drivers need no longer restrict their PCM period length to be shorter
than 10 seconds.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-17 11:36:30 +02:00
Torsten Schenk 0ec5258d68 ALSA: 6fire - Fix signedness bug
Fixed remaining issues of the signedness bug discovered by Dan Carpenter.
A check was remaining that tests if unsigned rt->rate is >= 0.
Changed that so that rt->rate now consistently uses ARRAY_SIZE(rates)
as invalid rate value and not -1.

Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-16 21:31:33 +02:00
Jesper Juhl 37f7ec38ea ALSA: 6fire: Fix double-free bug in usb6fire_fw_ezusb_upload()
We have a double-free bug in
sound/usb/6fire/firmware.c::usb6fire_fw_ezusb_upload().
We already call release_firmware(fw) on line 258, so when we then do it
again after usb6fire_fw_ezusb_write() returns <0, we have a double-free.
Easily fixed by just removing the last call to release_firmware().

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-14 07:27:26 +02:00
Eric Lammerts 157186bc18 ALSA: usb - turn off de-emphasis in s/pdif for cm6206
CM6206: Turn off de-emphasis channel status bit in S/PDIF output.

Signed-off-by: Eric Lammerts <eric@lammerts.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-03 18:22:56 +02:00
Jesper Juhl bf0be0e951 ALSA: 6fire: Don't leak firmware in error path
One of the error paths in
sound/usb/6fire/firmware.c::usb6fire_fw_ezusb_upload() neglects to free
the memory allocated for the firmware before returning, thus leaking the
memory.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-02 19:56:31 +02:00
Daniel Mack d5a0bf6cc5 ALSA: usb-audio: more control quirks for M-Audio FastTrack devices
Make use of the freshly introduced methods to re-use standard mixer
handling and add some controls that are hidden but implemented in a
standard conform way on M-Audio's FastTrack devices.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Original-code-by: Felix Homann <linuxaudio@showlabor.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 09:37:08 +02:00
Daniel Mack 014950b013 ALSA: usb-audio: add new quirk type QUIRK_AUDIO_STANDARD_MIXER
This quirk type will let the driver assume that there is a standard
mixer on a given interface, or that a specific mixer quirks will handle
the device.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 09:36:59 +02:00
Daniel Mack 9e38658f70 ALSA: usb-audio: export snd_usb_feature_unit_ctl
In order to allow quirks functions to hook up to the standard feature
unit op tables, this patch exports a pointer to the struct that is used
internally.

That way, all the code handling the control can be kept private, and
external code can reference the symbol to re-use it.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 09:36:20 +02:00
Daniel Mack ef9d597089 ALSA: usb-audio: rework add_control_to_empty()
This patch renames add_control_to_empty() to snd_usb_mixer_add_control()
and exports it, so the quirks functions can make use of it.

Also, as "struct mixer_build" is private to mixer.c, rewrite the
function to take an argument of type "struct usb_mixer_interface"
instead.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 09:34:34 +02:00
Daniel Mack 5875c2cb76 ALSA: usb-audio: move assignment of chip->ctrl_intf
This is needed for upcoming changes to the quirks mechanism.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 09:34:19 +02:00
Takashi Iwai 02e5fbf622 Merge branch 'topic/misc' into for-linus 2011-05-22 10:01:29 +02:00
Mathieu Bouffard 7cdd8d7313 ALSA: usb-audio - Add support for USB X-Fi S51 Pro
USB X-Fi S51 Pro volume and mute from the volume knob on the unit.
Compiled and tested with 2.6.39-rc7-git12

Signed-off-by: Mathieu Bouffard <mbouffard@strangequarks.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 17:09:17 +02:00
Daniel Mack c91d9cda55 ALSA: usb-audio: handle "Fast Track Ultra" with USB_DEVICE_VENDOR_SPEC()
That way, the class compliant MIDI interface is also handled.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Grant Diffey <gdiffey@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:44:45 +02:00
Daniel Mack 3bc6fbc743 ALSA: usb-audio: assume valid clock
If the interface can't report a clock's validity, assume that it's
valid.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Vicente Joel <vicentejoel@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:44:44 +02:00
Daniel Mack 0ef283247a ALSA: usb-audio: add quirks for Roland GR-55
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Jeffrey Scott Flesher <jeffrey.scott.flesher@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:44:43 +02:00
Daniel Mack 56a9eb1f30 ALSA: usb-audio: Add quirk for KORG PANDORA PX5D MIDI interface
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Frédéric Jaume <frederic.jaume@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:44:42 +02:00
Daniel Mack 759e890f5c ALSA: usb-audio: remove invalid extra mixers for Komplete Audio 6
This was a flaw in the reading of the spec tables - Native Instrument's
"Komplete Audio 6" device has no such extra controls.

This patch also fixes the device name in two comments.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:44:42 +02:00
Daniel Mack ee95cb6121 ALSA: usb-audio: include format.h in format.c
Just in case a prototype changes, we'll be warned. This also fixes a
sparse warning.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:44:41 +02:00
Daniel Mack 60ed286a61 ALSA: usb-audio: make hwc_debug a noop in case HW_CONST_DEBUG is not set
Just defining it to nothing is dangerous as it can alter the code
execution flow, for example when used in as only function in a
conditional code block.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:44:35 +02:00
Wolfgang Breyha 8129e79ed7 ALSA: usb-audio - Terratec Aureon 7.1 USB ID as C-Media cm6206 quirks
This patch adds support for the Terratec Aureon 7.1 USB which uses a
C-Media cm6206 and needs all the quirks already found in the past.

Signed-off-by: Wolfgang Breyha <wbreyha@gmx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 18:22:41 +02:00
Takashi Iwai 59bb7f0eeb ALSA: usb-audio - Don't expose broken dB ranges
Some crappy USB-audio devices give broken dB ranges, e.g. both min and max
are 0dB.  This confuses the volume control that prefers dB expression such
as alsactl or PulseAudio.  In such a case, it's much better not to expose
the broken dB information.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 09:58:43 +02:00
Daniel Mack 8ae9572b5b ALSA: 6fire: use the kernel's built-in bit reverse table
Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Torsten Schenk <torsten.schenk@zoho.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-26 12:26:12 +02:00
Daniel Mack 9cdc352936 ALSA: usb-audio: Add quirks for Audio Kontrol 6
This new device by Native Instruments is also compliant to the USB
standard v2.0, but hides this detail at when connected.

It needs the same boot quirks than other models, and also has two
non-class-compliant mixer controls.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-14 12:06:02 +02:00
Linus Torvalds 4263a2f1da Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Don't query connections for widgets have no connections
  ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E)
  ALSA: hda - HDMI: Fix MCP7x audio infoframe checksums
  ALSA: usb-audio: define another USB ID for a buggy USB MIDI cable
  ALSA: HDA: Fix dock mic for Lenovo X220-tablet
  ASoC: format_register_str: Don't clip register values
  ASoC: PXA: Fix oops in __pxa2xx_pcm_prepare
  ASoC: zylonite: set .codec_dai_name in initializer
2011-04-10 09:56:10 -07:00
Tarek Soliman 49c039f071 ALSA: usb-audio: define another USB ID for a buggy USB MIDI cable
There are many USB MIDI cables out there that have buggy
firmware that reports it can do more than 4 bytes in a
packet when they can only properly handle 4

This patch adds the ID of yet another one of those cables

Signed-off-by: Tarek Soliman <tarek@bashasoliman.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-06 08:05:30 +02:00
Torsten Schenk 2475b0d407 ALSA: 6fire - Add support of digital-thru mixer
Digital Thru mixer element added (device can act as converter optical<->coax)

Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-04 12:26:21 +02:00
Torsten Schenk b84610b95f ALSA: 6fire - Improve firmware loader
Firmware loader: magical device bytes check updated (accepts all device
versions now and accepts possibly loaded firmware, if it is knowing to
be working)

Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-04 12:25:50 +02:00