aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-01-28ALSA: line6: Use dev_err()Takashi Iwai1-1/+2
This is the last remaining snd_printk() usage in this driver. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Consolidate URB unlink and sync helpersTakashi Iwai5-133/+69
The codes to unlink and sync URBs are identical for both playback and capture streams. Consolidate to single helper functions. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Rearrange PCM structureTakashi Iwai4-208/+142
Introduce a new line6_pcm_stream structure and group individual fields of snd_line6_pcm struct to playback and capture groups. This patch itself just does rename and nothing else. More meaningful cleanups based on these fields shuffling will follow. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Drop voodoo workaroundsTakashi Iwai2-24/+0
If the problem still really remains, we should fix it instead of papering over it like this... Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Use incremental loopTakashi Iwai3-11/+11
Using a decremental loop without particular reasons worsens the readability a lot. Use incremental loops instead. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Drop superfluous spinlock for triggerTakashi Iwai2-22/+6
The trigger callback is already spinlocked, so we need no more lock here (even for the linked substreams). Let's drop it. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Fix the error recovery in line6_pcm_acquire()Takashi Iwai1-6/+6
line6_pcm_acquire() tries to restore the newly obtained resources at the error path. But some flags aren't recorded and released properly when the corresponding buffer is already present. These bits have to be cleared in the error recovery, too. Also, "flags_final" can be initialized to zero since we pass only the subset of "channels" bits. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Use logical ORTakashi Iwai1-2/+2
Fixed a few places using bits OR wrongly for condition checks. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Fix missing error handling in line6_pcm_acquire()Takashi Iwai1-1/+2
Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Reduce superfluous spinlock in midi.cTakashi Iwai2-18/+7
The midi_transmit_lock is used always inside the send_urb_lock, thus it doesn't play any role. Let's kill it. Also, rename "send_urb_lock" as a more simple name "lock" since this is the only lock for midi. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Remove unused line6_nop_read()Takashi Iwai2-12/+0
The function isn't used any longer after rewriting from sysfs to leds class in toneport.c. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Fix memory leak at probe error pathTakashi Iwai1-29/+30
Fix memory leak at probe error path by rearranging the call order in line6_destruct() so that the common destructor is always called. Also this simplifies the error path to a single goto label. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Minor refactoringTakashi Iwai1-45/+49
Split some codes in the lengthy line6_probe(). Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6/toneport: Implement LED controls via LED classTakashi Iwai2-74/+91
Instead of non-standard sysfs, reimplement the LED controls on TonePort as LED class devices. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6/toneport: Fix wrong argument for toneport_has_led()Takashi Iwai1-3/+1
Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Don't forget to call driver's destructor at error pathTakashi Iwai1-0/+2
Currently disconnect callback is used as a driver's destructor, and this has to be called not only at the disconnection time but also at the error paths during probe. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6/toneport: Move setup_timer() at the beginningTakashi Iwai1-4/+5
... so that timer_del_sync() in the destructor can be called safely at any time. Also move the mod_timer() call in toneport_setup(), which is a bit clearer place. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Remove superfluous NULL checks in each driverTakashi Iwai4-38/+8
The interface and driver objects are always set when callbacks are called. Drop such superfluous NULL checks in init and disconnect calls of each driver. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Abort if inconsistent usbdev is found at disconnectTakashi Iwai1-3/+3
It's utterly unsafe to proceed further the disconnect procedure if the assigned usbdev is inconsistent with the expected object. Better to put a WARN_ON() for more cautions and abort immediately. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Yet more cleanup of superfluous NULL checksTakashi Iwai1-11/+2
... in line6_disconnect() as well. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-26Merge branch 'for-linus' into for-nextTakashi Iwai1-0/+1
Sync with the latest 3.19-rc state for applying other ALSA sequencer core fixes.
2015-01-20Merge branch 'topic/timer-cleanup' into for-nextTakashi Iwai1-3/+2
2015-01-20Merge branch 'topic/line6' into for-nextTakashi Iwai26-1428/+946
2015-01-20ALSA: line6: Remove driver version from header commentChris Rorvick16-16/+16
The driver version string was removed in an ealier commit for being useless. These are equally useless. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Refer to manufacturer as "Line 6"Chris Rorvick18-50/+50
The correct spelling includes the space. Fix this in strings and comments that refer to the manufacturer. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Remove superfluous NULL checksChris Rorvick1-11/+1
Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Drop line6_send_program() and line6_transmit_parameter()Takashi Iwai2-62/+0
Both functions are used nowhere. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Make line6_send_raw_message() staticTakashi Iwai2-4/+2
It's used only locally. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Sync PCM stop at disconnectTakashi Iwai2-18/+3
Call line6_pcm_disconnect() at disconnect to make sure that all URBs are cleared. Also reduce the superfluous snd_pcm_stop() calls from the function (and remove the unused function) since the streams are guaranteed to be stopped at this point via snd_card_disconnect(). Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Remove superfluous disconnect call in suspend handlerTakashi Iwai1-1/+0
Calling line6_pcm_disconnect() at suspend callback is superfluous and rather confusing. Let's get rid of it. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Remove CHECK_RETURN macroTakashi Iwai3-14/+15
Such a macro doesn't improve readability. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Drop MISSING_CASE macroTakashi Iwai2-7/+0
Such a debug is needed in the core code, not in each lowlevel driver. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Remove driver version stringTakashi Iwai1-2/+0
This is rather useless for a driver that has been already merged into the official tree. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Reorganize card resource handlingTakashi Iwai12-355/+85
This is a fairly big rewrite regarding the card resource management in line6 drivers: - The card creation is moved into line6_probe(). This adds the global destructor to private_free, so that each driver doesn't have to call it any longer. - The USB disconnect callback handles the card release, thus each driver needs to concentrate on only its own resources. No need to snd_card_*() call in the destructor. - Fix the potential stall in disconnection by removing snd_card_free(). It's replaced with snd_card_free_when_closed() for asynchronous release. - The only remaining operation for the card in each driver is the call of snd_card_register(). All the rest are dealt in the common module by itself. - These ended up with removal of audio.[ch] as a result of a reduction of one layer. Each driver just needs to call line6_probe(). Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Drop superfluous irqsave/irqrestore in PCM trigger callbackTakashi Iwai1-7/+4
The PCM trigger callback is guaranteed to be called already in spinlock / irq-disabled context. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Don't handle PCM trigger for other cardsTakashi Iwai1-0/+2
Otherwise it oopses. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Remove superfluous out-of-memory error messagesTakashi Iwai5-18/+5
Kernel already shows the error in the common path. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Drop usb_device sysfs symlinkTakashi Iwai1-9/+0
It's non-standard and rather superfluous. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Drop invalid SNDRV_PCM_INFO_RESUME flagTakashi Iwai5-26/+0
The line6 drivers don't support the full resume although they set SNDRV_PCM_INFO_RESUME. These flags have to be dropped to inform properly to the user-space. Also, drop the CONFIG_PM in trigger callbacks, too, which are rather superfluous. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Drop superfluous snd_device for rawmidiTakashi Iwai1-42/+23
Like the previous fix for PCM, attach the card-specific resource into rawmidi->private_data instead of handling in a snd_device object. This simplifies the code and structure. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Drop superfluous snd_device for PCMTakashi Iwai1-34/+19
Instead of handling the card-specific resource in snd_device, attach it into pcm->private_data and release it directly in private_free. This simplifies the code and structure. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Handle impulse response via control APITakashi Iwai5-124/+75
Instead of sysfs and the conditional build with Kconfig, implement the handling of the impulse response controls via control API, and always enable the build. Two new controls, "Impulse Response Volume" and "Impulse Response Period" are added as a replacement for the former sysfs files. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Split to each driverTakashi Iwai18-727/+748
Split to each individual driver for POD, PODHD, TonePort and Variax with a core LINE6 helper module. The new modules follow the standard ALSA naming rule with snd prefix: snd-usb-pod, snd-usb-podhd, snd-usb-toneport and snd-usb-variax, together with the corresponding CONFIG_SND_USB_* Kconfig items. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-19ALSA: line6: Use setup_timer() and mod_timer()Takashi Iwai2-7/+4
No functional change, refactoring with the standard helpers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-19ALSA: usb-audio: Use setup_timer() and mod_timer()Takashi Iwai1-3/+2
No functional change, refactoring with the standard helpers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-18ALSA: usb-audio: Add mic volume fix quirk for Logitech Webcam C210Jason Lee Cragg1-0/+1
Signed-off-by: Jason Lee Cragg <jcragg@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-12Merge branch 'topic/line6' into for-nextTakashi Iwai29-1/+5780
2015-01-12ALSA: move line6 usb driver into sound/usbTakashi Iwai28-0/+5779
Promote line6 driver from staging to sound/usb/line6 directory, and maintain through sound subsystem tree. This commit just moves the code and adapts Makefile / Kconfig. The further renames and misc cleanups will follow. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-08ALSA: usb-audio: Add support for Akai MPC Element USB MIDI controllerPaul Bonser1-0/+22
The Akai MPC Element incorrectly reports its bInterfaceClass as 255, but otherwise implements the USB MIDI spec correctly. This adds a quirks-table.h entry which allows the device to be recognized as a standard USB MIDI device. Signed-off-by: Paul Bonser <misterpib@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-05ALSA: snd-usb-caiaq: fix stream count checkDaniel Mack1-1/+1
Commit 897c329bc ("ALSA: usb: caiaq: check for cdev->n_streams > 1") introduced a safety check to protect against bogus data provided by devices. However, the n_streams variable is already divided by CHANNELS_PER_STREAM, so the correct check is 'n_streams > 0'. Fix this to un-break support for stereo devices. Signed-off-by: Daniel Mack <daniel@zonque.org> Cc: stable@kernel.org [v3.18+] Signed-off-by: Takashi Iwai <tiwai@suse.de>