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

35 Commits

Author SHA1 Message Date
Eldad Zack 83e3acd494 ALSA: usb-audio: M-Audio FT C400 skip packet quirk
Attain constant real-world latency by skipping 16 data packets.
The number of packets to be skipped was found by trial and error.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 10:06:03 +01:00
David Henningsson b98ae2729d ALSA: usb - fix race in creation of M-Audio Fast track pro driver
A patch in the 3.2 kernel caused regression with hotplugging the
M-Audio Fast track pro, or sound after suspend. I don't have the
device so I haven't done a full analysis, but it seems userspace
(both udev and pulseaudio) got confused when a card was created,
immediately destroyed, and then created again.

However, at least one person in the bug report (martin djfun)
reports that this patch resolves the issue for him. It also leaves
a message in the log:
"snd-usb-audio: probe of 1-1.1:1.1 failed with error -5" which is
a bit misleading. It is better than non-working audio, but maybe
there's a more elegant solution?

BugLink: https://bugs.launchpad.net/bugs/1095315
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 10:03:03 +01:00
Damien Zammit b7b435e81b ALSA: usb-audio: Fix kernel panic of Digidesign Mbox2 quirk
This patch is based on 3.8-rc1. It fixes two things:
1) A kernel panic caused by incorrect allocation of a u8 variable
   "bootresponse".
2) A noisy dmesg (urb status -32) caused by broken pipe to an
   invalid midi endpoint.

It is also a little cleaner because there is no need for a new
QUIRK_MIDI type as suggested by kernel developers, since the device
follows exactly the MIDIMAN protocol.

Signed-off-by: Damien Zammit <damien@zamaudio.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-04 09:53:17 +01:00
Linus Torvalds 03c850ec32 Sound fixes for 3.8-rc1
This update contains overall only driver-specific fixes.
 Slightly large LOC are seen in usb-audio driver for a couple of new
 device quirks and cs42l71 ASoC driver for enhanced features.
 The others are a few small (regression) fixes HD-audio, and yet other
 small / trival ASoC fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJQ0thSAAoJEGwxgFQ9KSmk/i8P+wcdjCcp5FdfZ5YP2h9siEw5
 7KJPwwk9eTa0PVB5olgabxSh6L5P+rM69OGiXnHSKF8RwsuZDRp/5pPcaoUVRzH/
 6uibGozfLApeLBuBAJZ96eJhRIigysoSrm5W4FQeNVAbwK67zpIjP/xGwKa0+qfO
 vsK/BtSn+nVsmFpgOfO6vXZ7gKBlfKGXHYdyFVXzHEhGYSHLdf1IDxnCapIXlh78
 0nXHD2FHgKlSM6y/S6W7wiUwyNqbgmnZHwh29iIyes1CrX0wVyvtos3qgwJHukrU
 WVY87E1TDxD6HLAWTUxqeOIvNyucSarUZ+kvtYg0i31gmRCY8QNXqYVp1wBybqVd
 Uwbwe4qWwSxXhXluodFsizNwcH9T+KA3IM4B5u6yCT1pFY759pCh/KpLoNfD+maL
 6atnBU6lvtTCMxoeSyJFSdAjdOQJUpylQ9TyQaI/PIr6jrEMVC2ki/i3UX+YpQGo
 oWJj5x8Nl58MUv7GhYGTo7vfm3ZqaUbxN/YugbCeVkrcV0McJNycvddotplD4iTd
 pqfep1fVpefW9X4pJnvsys2neo7R8e8a87Qg2CfVGXQ91ijevPCf+YAh4EmHShsT
 vwNcOP/gZ+qQp/bY40SigMj5SZtZ/ZQxT47yPo6OLI4FyhyD+WK4l1AAEK5B1uPA
 odsIcQg2F6/RjzkDSsSl
 =JoY5
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This update contains overall only driver-specific fixes.  Slightly
  large LOC are seen in usb-audio driver for a couple of new device
  quirks and cs42l71 ASoC driver for enhanced features.  The others are
  a few small (regression) fixes HD-audio, and yet other small / trival
  ASoC fixes."

* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: usb-audio: Support for Digidesign Mbox 2 USB sound card:
  ALSA: HDA: Fix sound resume hang
  ALSA: hda - bug fix for invalid connection list of Haswell HDMI codec pins
  ALSA: hda - Fix the wrong pincaps set in ALC861VD dallas/hp fixup
  ALSA: hda - Set codec->single_adc_amp flag for Realtek codecs
  ASoC: atmel-ssc: change disable to disable in dts node
  ASoC: Prevent pop_wait overwrite
  ALSA: usb-audio: ignore-quirk for HP Wireless Audio
  ALSA: hda - Always turn on pins for HDMI/DP
  ALSA: hda - Fix pin configuration of HP Pavilion dv7
  ASoC: core: Fix splitting of log messages
  ASoC: cs42l73: Change VSPIN/VSPOUT to VSPINOUT
  ASoC: cs42l73: Add DAPM events for power down.
  ASoC: cs42l73: Add DMIC's as DAPM inputs.
  ASoC: sigmadsp: Fix endianness conversion issue
  ASoC: tpa6130a2: Use devm_* APIs
2012-12-20 07:52:13 -08:00
Damien Zammit cb99864d40 ALSA: usb-audio: Support for Digidesign Mbox 2 USB sound card:
This patch is the result of a lot of trial and error, since there are no specs
available for the device.

Full duplex support is provided, i.e. playback and recording in stereo.
The format is hardcoded at 48000Hz @ 24 bit, which is the maximum that the
device supports.  Also, MIDI in and MIDI out both work.

Users will notice that the S/PDIF light also flashes when playback or recording
is active.  I believe this means that S/PDIF input/output is simultaneously
activated with the analogue i/o during use.
But this particular functionality remains untested.

Note that this particular version of the patch is so far untested on the
physical hardware because I have not compiled a full kernel with the changes.
However, extensive testing has been done by many users of the hardware
who believe other versions of my patch have worked since circa 2009.

[Modified to make a function static by tiwai]

Signed-off-by: Damien Zammit <damien@zamaudio.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-19 11:27:22 +01:00
Adam Buchbinder 48fc7f7e78 Fix misspellings of "whether" in comments.
"Whether" is misspelled in various comments across the tree; this
fixes them. No code changes.

Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-11-19 14:31:35 +01:00
Daniel Mack 2b58fd5b31 ALSA: snd-usb: Add quirks for Playback Designs devices
Playback Designs' USB devices have some hardware limitations on their
USB interface. In particular:

 - They need a 20ms delay after each class compliant request as the
   hardware ACKs the USB packets before the device is actually ready
   for the next command. Sending data immediately will result in buffer
   overflows in the hardware.
 - The devices send bogus feedback data at the start of each stream
   which confuse the feedback format auto-detection.

This patch introduces a new quirks hook that is called after each
control packet and which adds a delay for all devices that match
Playback Designs' USB VID for now.

In addition, it adds a counter to snd_usb_endpoint to drop received
packets on the floor. Another new quirks function that is called once
an endpoint is started initializes that counter for these devices on
their sync endpoint.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Andreas Koch <andreas@akdesigninc.com>
Supported-by: Demian Martin <demianm_1@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-04 11:31:14 +02:00
Xi Wang 8866f405ef ALSA: usb-audio: avoid integer overflow in create_fixed_stream_quirk()
A malicious USB device could feed in a large nr_rates value.  This would
cause the subsequent call to kmemdup() to allocate a smaller buffer than
expected, leading to out-of-bounds access.

This patch validates the nr_rates value and reuses the limit introduced
in commit 4fa0e81b ("ALSA: usb-audio: fix possible hang and overflow
in parse_uac2_sample_rate_range()").

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-15 14:58:15 +01:00
Thomas Meyer 43df2a57b7 ALSA: usb-audio: Use kmemdup rather than duplicating its implementation
Use kmemdup rather than duplicating its implementation

The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10 19:51:45 +01:00
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
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
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
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
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
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
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
Takashi Iwai 02e5fbf622 Merge branch 'topic/misc' into for-linus 2011-05-22 10:01:29 +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
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
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
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Takashi Iwai cc99a0861f Merge branch 'fix/misc' into topic/misc 2011-03-11 14:48:09 +01:00
Daniel Mack 3347b26cab ALSA: usb-audio: reconstruct some dispatcher functions to use switch-case
The number of cases has increased so use switch-case rather than
if-statements.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:11:12 +01:00
Daniel Mack 54a8c500d5 ALSA: usb-audio: add support for Native Instruments MK2 devices
The MK2 generation of Native Instruments' sound cards are in fact
compliant to the USB audio standard of version 2 and other approved USB
standards. However, they come up as vendor-specific device when first
connected but can be told to come up with a new set of descriptors
upon their next enumeration. The interfaces announced by the new
descriptors will be handled by the kernel's class drivers. This is done
by issuing a vendor specific device request and sending the device to
reset.

There are also some vendor-specific USB requests for some mixer elements
that can't be exported in a standard compliant way. The driver now
supports them with quirks handling mechanisms.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:10:57 +01:00
Joseph Teichman 1cdfa9f34a ALSA: usbaudio - Enable the E-MU 0204 USB
Signed-off-by: Joseph Teichman <josteich@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-08 08:36:04 +01:00
Clemens Ladisch c7f572168f ALSA: usb-audio: add Novation Launchpad support
Add a quirk entry for the Novation Launchpad USB MIDI controller.

QUIRK_MIDI_FASTLANE gets renamed to *_RAW_BYTES because this quirk type
is now shared by different devices.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Jakob Flierl <jakob.flierl@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-22 18:48:40 +02:00
Daniel Mack 3d8d4dcfd4 ALSA: usb-audio: simplify control interface access
As the control interface is now carried in struct snd_usb_audio, we can
simplify the API a little and also drop the private ctrlif field from
struct usb_mixer_interface.

Also remove a left-over function prototype in pcm.h.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-23 16:10:23 +02:00
Krzysztof Foltman 4434ade8c9 ALSA: usb-audio: add support for Akai MPD16
The decoding/encoding is based on own reverse-engineering. Both control and
data ports are handled. Writing to control port supports SysEx events only,
as this is the only type of messages that MPD16 recognizes.

Signed-off-by: Krzysztof Foltman <wdev@foltman.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-21 17:12:30 +02:00
Stephen Rothwell 36db045658 ALSA: usb - use of kmalloc/kfree requires the include of slab.h
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-29 08:23:27 +02:00
Daniel Mack f0b5e634ff ALSA: usbmixer: rename usbmixer.[ch] -> mixer.[ch]
For clearer namespace, also rename usbmixer_maps.c -> mixer_maps.c

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-12 12:20:49 +01:00
Daniel Mack 7b1eda223d ALSA: usb-mixer: factor out quirks
Move all non-standard mixer controls and vendor-specific extensions to a
separate file. Some structs need to be exported now.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-12 12:20:26 +01:00
Daniel Mack 767d75ad1c ALSA: usb-audio: add support for samplerate setting on v2 devices
Sample rate setting is done with a 4-byte long class request that
addresses the interface.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-05 08:19:17 +01:00
Clemens Ladisch 015eb0b081 ALSA: usb-audio: use a format bitmask per alternate setting
In preparation for USB audio 2.0 support, change the audioformat
structure so that it uses a bitmask to specify possible formats.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-05 08:18:32 +01:00
Daniel Mack e5779998bf ALSA: usb-audio: refactor code
Clean up the usb audio driver by factoring out a lot of functions to
separate files. Code for procfs, quirks, urbs, format parsers etc all
got a new home now.

Moved almost all special quirk handling to quirks.c and introduced new
generic functions to handle them, so the exceptions do not pollute the
whole driver.

Renamed usbaudio.c to card.c because this is what it actually does now.
Renamed usbmidi.c to midi.c for namespace clarity.
Removed more things from usbaudio.h.

The non-standard drivers were adopted accordingly.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-05 08:17:14 +01:00