summaryrefslogtreecommitdiffstats
path: root/sound/usb
AgeCommit message (Collapse)Author
2013-04-04ALSA: usb-audio: neaten EXPORT_SYMBOLS placementEldad Zack
Put EXPORT_SYMBOLS directly under the exported function. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-04ALSA: usb-audio: neaten MODULE_DEVICE_TABLE placementEldad Zack
Minor style fix, following a general code style in the kernel. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-04ALSA: usb-audio: convert list_for_each to entry variantEldad Zack
Change occurances of list_for_each into list_for_each_entry where applicable. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-03ALSA: usb-audio: Clean up the code in set_sample_rate_v2()Takashi Iwai
Just for cleaning up, introduce a new function get_sample_rate_v2() for replacing two identical calls in set_sample_rate_v2(). No functional change. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-03Merge branch 'for-linus' into for-nextTakashi Iwai
Back-merge for cleaning up usb-audio code the recent commit modified, and further UAC2 autoclock patches.
2013-04-03ALSA: usb: Work around CM6631 sample rate change bugTorstein Hegge
The C-Media CM6631 USB receiver doesn't respond to changes in sample rate while the interface is active. The same behavior is observed in other UAC2 hardware like the VIA VT1731. Reset the interface after setting the sampling frequency on sample rate changes, to ensure that the sample rate set by snd_usb_init_sample_rate() is used. Otherwise, the device will try to use the sample rate of the previous stream, causing distorted sound on sample rate changes. The reset is performed for all UAC2 devices, as it should not affect a standards compliant device, but it is only necessary for C-Media CM6631, VIA VT1731 and possibly others. Failure to read sample rate from the device is not handled as an error in set_sample_rate_v2(), as (permanent or intermittent) failure to read sample rate isn't essential for a successful sample rate set. Signed-off-by: Torstein Hegge <hegge@resisty.net> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-22Merge branch 'for-linus' into for-nextTakashi Iwai
Merge back for-linus branch for the badness table adjustment for VIA codecs * for-linus: ALSA: hda - Fix DAC assignment for independent HP ALSA: hda - Fix abuse of snd_hda_lock_devices() for DSP loader ALSA: hda - Fix typo in checking IEC958 emphasis bit ALSA: snd-usb: mixer: ignore -EINVAL in snd_usb_mixer_controls() ALSA: snd-usb: mixer: propagate errors up the call chain ALSA: usb: Parse UAC2 extension unit like for UAC1 ALSA: hda - Fix yet missing GPIO/EAPD setup in cirrus driver
2013-03-20ALSA: snd-usb: mixer: ignore -EINVAL in snd_usb_mixer_controls()Daniel Mack
Creation of individual mixer controls may fail, but that shouldn't cause the entire mixer creation to fail. Even worse, if the mixer creation fails, that will error out the entire device probing. All the functions called by parse_audio_unit() should return -EINVAL if they find descriptors that are unsupported or believed to be malformed, so we can safely handle this error code as a non-fatal condition in snd_usb_mixer_controls(). That fixes a long standing bug which is commonly worked around by adding quirks which make the driver ignore entire interfaces. Some of them might now be unnecessary. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-and-tested-by: Rodolfo Thomazelli <pe.soberbo@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-20ALSA: snd-usb: mixer: propagate errors up the call chainDaniel Mack
In check_input_term() and parse_audio_feature_unit(), propagate the error value that has been returned by a failing function instead of -EINVAL. That helps cleaning up the error pathes in the mixer. Signed-off-by: Daniel Mack <zonque@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-20ALSA: usb: Parse UAC2 extension unit like for UAC1Torstein Hegge
UAC2_EXTENSION_UNIT_V2 differs from UAC1_EXTENSION_UNIT, but can be handled in the same way when parsing the unit. Otherwise parse_audio_unit() fails when it sees an extension unit on a UAC2 device. UAC2_EXTENSION_UNIT_V2 is outside the range allocated by UAC1. Signed-off-by: Torstein Hegge <hegge@resisty.net> Acked-by: Daniel Mack <zonque@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-18Merge branch 'for-linus' into for-nextTakashi Iwai
Back-merged for refactoring beep stuff.
2013-03-18ALSA: snd-usb: add delay quirk for "Playback Design" productsDaniel Mack
"Playback Design" products need a 50ms delay after setting the USB interface. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Andreas Koch <andreas@akdesigninc.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-18ALSA: snd-usb: handle raw data format of UAC2 devicesDaniel Mack
UAC2 compliant audio devices may announce the capability to transport raw audio data on their endpoints. Catch this and handle it as 'special' stream on the ALSA side. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Andreas Koch <andreas@akdesigninc.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-18ALSA: snd-usb: handle the bmFormats field as unsigned intDaniel Mack
This field may use up to 32 bits, so it should be handled as unsigned int. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Andreas Koch <andreas@akdesigninc.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-18ALSA: usb-audio: Trust fields given in the quirkMark Hills
The maxpacksize field is given in some quirks, but it gets ignored (in favour of wMaxPacketSize from the first endpoint.) This patch favours the one in the quirk. Digidesign Mbox and Mbox 2 are the only affected quirks and the devices are assumed to be working without this patch. So for safety against the values in the quirk being incorrect, remove them. The datainterval is also ignored but there are not currently any quirks which choose to override this. Cc: Damien Zammit <damien@zamaudio.com> Cc: Chris J Arges <christopherarges@gmail.com> Signed-off-by: Mark Hills <mark@xwax.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-18ALSA: usb-audio: Playback and MIDI support for Novation Twitch DJ controllerMark Hills
The hardware also has a PCM capture device which is not implemented in this patch. It may be possible to generalise this to Saffire 6 USB support and some of the other Focusrite interfaces, but as I don't have access to these devices we should wait until capture support is working first. Capture support is not implemented because the code assumes the endpoint to have its own interface (instead, it shares the interface with playback) and some thought will be needed to lift this limitation. Signed-off-by: Mark Hills <mark@xwax.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-12ALSA: usb-audio: add a workaround for the NuForce UDH-100Clemens Ladisch
The NuForce UDH-100 numbers its interfaces incorrectly, which makes the interface associations come out wrong, which results in the driver erroring out with the message "Audio class v2 interfaces need an interface association". Work around this by searching for the interface association descriptor also in some other place where it might have ended up. Reported-and-tested-by: Dave Helstroom <helstroom@google.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-07ALSA: snd-usb-caiaq: fix smatch warningsDaniel Mack
Fix three smatch warnings recently introduced: sound/usb/caiaq/device.c:166 usb_ep1_command_reply_dispatch() warn: variable dereferenced before check 'cdev' (see line 163) sound/usb/caiaq/device.c:517 snd_disconnect() warn: variable dereferenced before check 'card' (see line 514) sound/usb/caiaq/input.c:510 snd_usb_caiaq_ep4_reply_dispatch() warn: variable dereferenced before check 'cdev' (see line 506) Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-04ALSA: snd-usb-caiaq: switch to dev_*() loggingDaniel Mack
Get rid of the proprietary functions log() and debug() and use the generic dev_*() approach. A macro is needed to cast a cdev to a struct device *. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-04ALSA: snd-usb-caiaq: rename 'dev' to 'cdev'Daniel Mack
This is needed in order to make the device namespace cleaner, and will help when moving this driver over to dev_*() logging. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-17ALSA: usb/quirks, fix out-of-bounds accessJiri Slaby
bootresponse in snd_usb_mbox2_boot_quirk is only 12 (decimal) u8's long, but i9s passed to snd_usb_ctl_msg as it would be 0x12 (hexa) long. Fix that by having proper size of the array, i.e. 0x12. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-11ALSA: usb-audio: add support for M-Audio FT C600Matt Gruskin
Adds quirks and mixer support for the M-Audio Fast Track C600 USB audio interface. This device is very similar to the C400 - the C600 simply has some more inputs and outputs, so the existing C400 support is extended to support this device as well. Signed-off-by: Matt Gruskin <matthew.gruskin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-05Merge branch 'for-linus' into for-nextTakashi Iwai
Merge pending fixes that haven't pulled into 3.8.
2013-02-01Merge branch 'usb-audio-fix' of git://git.alsa-project.org/alsa-kprivate ↵Takashi Iwai
into for-linus
2013-01-31ALSA: usb-audio: fix Roland A-PRO supportClemens Ladisch
The quirk for the Roland/Cakewalk A-PRO keyboards accidentally used the wrong interface number, which prevented the driver from attaching to the device. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: 2.6.37+ <stable@vger.kernel.org>
2013-01-29ALSA: usb: cosmetics, remove a leading spaceAntonio Ospite
Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-29ALSA: caiaq: fix use of MODULE_SUPPORTED_DEVICES()Antonio Ospite
It looks like MODULE_SUPPORTED_DEVICES() is not implemented yet, but still, having the entries in the list consistently separated by commas and with balanced parenthesis won't hurt. Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com> Acked-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-27ALSA: usb-audio: fix invalid length check for RME and other UAC 2 devicesClemens Ladisch
Commit 23caaf19b11e (ALSA: usb-mixer: Add support for Audio Class v2.0) forgot to adjust the length check for UAC 2.0 feature unit descriptors. This would make the code abort on encountering a feature unit without per-channel controls, and thus prevented the driver to work with any device having such a unit, such as the RME Babyface or Fireface UCX. Reported-by: Florian Hanisch <fhanisch@uni-potsdam.de> Tested-by: Matthew Robbetts <wingfeathera@gmail.com> Tested-by: Michael Beer <beerml@sigma6audio.de> Cc: Daniel Mack <daniel@caiaq.de> Cc: 2.6.35+ <stable@vger.kernel.org> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-25ALSA: Make snd_printd() and snd_printdd() inlineTakashi Iwai
Because currently snd_printd() and snd_printdd() macros are expanded to empty when CONFIG_SND_DEBUG=n, a compile warning like below appears sometimes, and we had to covert it by ugly ifdefs: sound/pci/hda/patch_sigmatel.c: In function ‘stac92hd71bxx_fixup_hp’: sound/pci/hda/patch_sigmatel.c:2434:24: warning: unused variable ‘spec’ [-Wunused-variable] For "fixing" these issues better, this patch replaces snd_printd() and snd_printdd() definitions with empty inline functions instead of macros. This should have the same effect but shut up warnings like above. But since we had already put ifdefs, changing to inline functions would trigger compile errors. So, such ifdefs is removed in this patch. In addition, snd_pci_quirk name field is defined only when CONFIG_SND_DEBUG_VERBOSE is set, and the reference to it in snd_printdd() argument triggers the build errors, too. For avoiding these errors, introduce a new macro snd_pci_quirk_name() that is defined no matter how the debug option is set. Reported-by: Stratos Karafotis <stratosk@semaphore.gr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-23Merge branch 'for-linus' into for-nextTakashi Iwai
This is a preliminary merge before the upcoming merge of generic parser branch.
2013-01-14ALSA: usb-audio: selector map for M-Audio FT C400Eldad Zack
Add names of the clock sources for the M-Audio Fast Track C400. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14ALSA: usb-audio: M-Audio FT C400 skip packet quirkEldad Zack
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-14ALSA: usb-audio: correct M-Audio C400 clock source quirkEldad Zack
Taking another look at the C400 descriptors, I see now that there is a clock selector (0x80) for this device. Right now, the clock source points to the internal clock (0x81), which is also valid. When the external clock source (0x82) is selected in the mixer, and the rates mismatch (if it's free-running it is fixed to 48KHz), xruns will occur. Set the clock ID to the clock selector unit (0x81), which then allows the validation code to function correctly. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14ALSA: usb - fix race in creation of M-Audio Fast track pro driverDavid Henningsson
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-11ALSA: usb-audio: Fix NULL dereference by access to non-existing substreamTakashi Iwai
The commit [0d9741c0: ALSA: usb-audio: sync ep init fix for audioformat mismatch] introduced the correction of parameters to be set for sync EP. But since the new code assumes that the sync EP is always paired with the data EP of another direction, it triggers Oops when a device only with a single direction is used. This patch adds a proper check of sync EP type and the presence of the paired substream for avoiding the crash. Reported-and-tested-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-10ALSA: usb-audio: Make ebox44_table staticSachin Kamat
Fixes the following sparse warning: sound/usb/mixer_quirks.c:1209:23: warning: symbol 'ebox44_table' was not declared. Should it be static? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-04ALSA: usb-audio: Fix kernel panic of Digidesign Mbox2 quirkDamien Zammit
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-03ALSA: usb-audio: Add support for Creative BT-D1 via usb sound quirksAlexander Schremmer
Support the Creative BT-D1 Bluetooth USB audio device. Before this patch, Linux had trouble finding the correct USB descriptors and bailed out with these messages: no or invalid class specific endpoint descriptor Now it still prints these messages on hotplug: snd-usb-audio: probe of ...:1.0 failed with error -5 snd-usb-audio: probe of ...:1.2 failed with error -5 snd-usb-audio: probe of ...:1.3 failed with error -5 But the device works correctly, including the HID support. The patch is diff'ed against 3.8-rc1 but should apply to older kernels as well. Signed-off-by: Alexander Schremmer <alex@alexanderweb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-24ALSA: usb-audio: support delay calculation on capture streamsPierre-Louis Bossart
Enable delay report on capture path. The delay is reset when an URB is retired and increment at each call to .pointer based on frame counter changes. The precision of the delay information is limited to 1ms as in the playback case. This reverts commit 3f94fad09538ec988919ec3f371841182df71d04. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-20Merge tag 'sound-3.8' of ↵Linus Torvalds
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-19ALSA: usb-audio: Support for Digidesign Mbox 2 USB sound card:Damien Zammit
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-15ALSA: usb-audio: ignore-quirk for HP Wireless AudioEldad Zack
As Joe Cooper <swelljoe@gmail.com> reported, "On most HP Envy laptops the snd-usb-audio module causes the system to become unresponsive and Gnome Shell 3 to crash.". See also: http://mailman.alsa-project.org/pipermail/alsa-devel/2012-December/057729.html Add a quirk to ignore this device (for now) to solve the instability issue and allow other USB audio devices to be used. Reported-by: Joe Cooper <swelljoe@gmail.com> Tested-by: Isaac Smith <hunternet93@gmail.com> Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-13Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial branch from Jiri Kosina: "Usual stuff -- comment/printk typo fixes, documentation updates, dead code elimination." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) HOWTO: fix double words typo x86 mtrr: fix comment typo in mtrr_bp_init propagate name change to comments in kernel source doc: Update the name of profiling based on sysfs treewide: Fix typos in various drivers treewide: Fix typos in various Kconfig wireless: mwifiex: Fix typo in wireless/mwifiex driver messages: i2o: Fix typo in messages/i2o scripts/kernel-doc: check that non-void fcts describe their return value Kernel-doc: Convention: Use a "Return" section to describe return values radeon: Fix typo and copy/paste error in comments doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c various: Fix spelling of "asynchronous" in comments. Fix misspellings of "whether" in comments. eisa: Fix spelling of "asynchronous". various: Fix spelling of "registered" in comments. doc: fix quite a few typos within Documentation target: iscsi: fix comment typos in target/iscsi drivers treewide: fix typo of "suport" in various comments and Kconfig treewide: fix typo of "suppport" in various comments ...
2012-12-12ALSA: usb-audio: Enable S/PDIF on the ASUS Xonar U3Denis Washington
The only required change is to extend the existing Xonar U1 mixer quirks to the U3, which seems to be controlled the same way. Signed-off-by: Denis Washington <denisw@online.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-07ALSA: usb6fire: prevent driver panic state when stoppingJurgen Kramer
The patch below prevents the 6fire usb driver going into panic state when stopping playing. On some systems the urb in handler (usb6fire_pcm_in_urb_handler) is being called while urbs are being killed off, this causes the driver to set panic state and can result in the kernel warning 'URB %p submitted while active'. Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-07ALSA: snd-usb-caiaq: remove __dev* attributesBill Pemberton
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-07ALSA: snd-usb-6fire: remove __dev* attributesBill Pemberton
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-04ALSA: usb-audio: sync ep init fix for audioformat mismatchEldad Zack
Commit 947d299686aa9cc8aecf749d54e8475c6e498956 , "ALSA: snd-usb: properly initialize the sync endpoint", while correcting the initialization of the sync endpoint when opening just the data endpoint, prevents devices that has a sync endpoint, with a channel number different than that of the data endpoint, from functioning. Due to a different channel and period bytes count, attempting to initialize the sync endpoint will fail at the usb host driver. For example, when using xhci: cannot submit urb 0, error -90: internal error With this patch, if a sync endpoint has multiple audioformats, a matching audioformat is preferred. An audioformat must be found with at least one channel and support the requested sample rate and PCM format, otherwise the stream will not be opened. If the number of channels differ between the selected audioformat and the requested format, adjust the period bytes count accordingly. It is safe to perform the calculation on the basis of the channel count, since the requested PCM audio format and the rate must be supported by the selected audioformat. Cc: Jeffrey Barish <jeff_barish@earthlink.net> Cc: Daniel Mack <zonque@gmail.com> Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-04ALSA: usb-audio: Fix missing autopm for MIDI inputTakashi Iwai
The commit [88a8516a: ALSA: usbaudio: implement USB autosuspend] added the support of autopm for USB MIDI output, but it didn't take the MIDI input into account. This patch adds the following for fixing the autopm: - Manage the URB start at the first MIDI input stream open, instead of the time of instance creation - Move autopm code to the common substream_open() - Make snd_usbmidi_input_start/_stop() more robust and add the running state check Reviewd-by: Clemens Ladisch <clemens@ladisch.de> Tested-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-04ALSA: usb-audio: Avoid autopm calls after disconnectionTakashi Iwai
Add a similar protection against the disconnection race and the invalid use of usb instance after disconnection, as well as we've done for the USB audio PCM. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=51201 Reviewd-by: Clemens Ladisch <clemens@ladisch.de> Tested-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>