aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/line6/pod.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-01-03ALSA: line6: Constify snd_ratden definitionsTakashi Iwai1-1/+1
The snd_ratden definitions used in line6 drivers are all read-only, so they can be marked as const. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-51-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-08Merge tag 'asoc-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linusTakashi Iwai1-5/+1
ASoC: Updates for v5.3 This is a very big update, mainly thanks to Morimoto-san's refactoring work and some fairly large new drivers. - Lots more work on moving towards a component based framework from Morimoto-san. - Support for force disconnecting muxes from Jerome Brunet. - New drivers for Cirrus Logic CS47L35, CS47L85 and CS47L90, Conexant CX2072X, Realtek RT1011 and RT1308. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372Thomas Gleixner1-5/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation version 2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 135 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190531081036.435762997@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-28ALSA: line6: Use container_of()Takashi Iwai1-5/+7
... instead of unconditional cast. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-05-28ALSA: line6: pod: Rewrite complex timer & work combo with a delayed workTakashi Iwai1-69/+27
The POD driver had a complex staged startup procedure using both timer and work. This patch simplifies it via a single delayed work with the reduced stages. Now basically only two intermediate stages: - POD_STARTUP_VERSIONREQ: requesting the version information and the process_message callback triggers the next stage, - POD_STARTUP_SETUP: registering the actual card object. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-01-07ALSA: line6: fix check on snd_card_registerAditya Pakki1-1/+2
The fix checks if snd_card_register() fails, and if so logs the error via dev_err() consistent with other patches. Signed-off-by: Aditya Pakki <pakki001@umn.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-10-17ALSA: usb-audio: Convert timers to use timer_setup()Kees Cook1-6/+5
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-12ALSA: line6: constify snd_kcontrol_new structuresBhumika Goyal1-1/+1
Declare snd_kcontrol_new strcutures as const as they are only passed as an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having this property can be made const too. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct snd_kcontrol_new x@p={...}; @ok@ identifier r.x; position p; @@ snd_ctl_new1(&x@p,...) @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct snd_kcontrol_new x; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-19ALSA: line6: Distinguish device init (ctrl EP) and MIDI data transfer (int EP)Andrej Krutak1-1/+8
POD X3 can initialize similarly to older PODs, but it doesn't have the MIDI interface. Instead, configuration is done via proprietary bulk EP messages. Signed-off-by: Andrej Krutak <dev@andree.sk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-19ALSA: line6: Allow different channel numbers for in/outAndrej Krutak1-2/+1
Changes bytes_per_frame to bytes_per_channel. Signed-off-by: Andrej Krutak <dev@andree.sk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-08-22ALSA: line6: Fix POD sysfs attributes segfaultAndrej Krutak1-6/+6
The commit 02fc76f6a changed base of the sysfs attributes from device to card. The "show" callbacks dereferenced wrong objects because of this. Fixes: 02fc76f6a7db ('ALSA: line6: Create sysfs via snd_card_add_dev_attr()') Cc: <stable@vger.kernel.org> # v4.0+ Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Andrej Krutak <dev@andree.sk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-11ALSA: line6: Use explicit type for serial numberChris Rorvick1-2/+2
The serial number (aka ESN) is a 32-bit value. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-08ALSA: line6: Pass driver name to line6_probe()Chris Rorvick1-1/+1
Provide a unique name for each driver instead of using "line6usb" for all of them. This will allow for different configurations based on the driver type. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-06ALSA: line6: Get rid of unused variable in pod.cTakashi Iwai1-1/+0
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-06ALSA: line6: Create sysfs via snd_card_add_dev_attr()Takashi Iwai1-25/+13
Use the new helper function to create sysfs entries in the card more gracefully without races. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Remove snd_line6_ prefix of pcm property fieldsTakashi Iwai1-3/+3
It's just superfluous and doesn't give any better readability. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Move the contents of usbdefs.h into driver.hTakashi Iwai1-1/+0
Most of them are rather relevant with the definitions in driver.h, and there are only a few lines, so just rip it off. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Tidy up and typo fixes in commentsTakashi Iwai1-24/+8
Just reformatting the comments and typos fixed, no functional changes. Particularly, - avoid the kerneldoc marker "/**", - reduce multiple comment lines into single lines, - corrected wrongly referred function names Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Let snd_card_new() allocate private dataTakashi Iwai1-7/+2
Instead of allocating the private data individually in each driver's probe at first, let snd_card_new() allocate the data that is called in line6_probe(). This simplifies the primary probe functions. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Drop interface argument from private_init and disconnect callbacksTakashi Iwai1-7/+7
The interface argument is used just for retrieving the assigned device, which can be already found in line6->ifcdev. Drop them from the callbacks. Also, pass the usb id to private_init so that the driver can deal with it there. This is a preliminary work for the further cleanup to move the whole allocation into driver.c. 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 Iwai1-20/+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-20ALSA: line6: Remove driver version from header commentChris Rorvick1-1/+1
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 Rorvick1-3/+3
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 CHECK_RETURN macroTakashi Iwai1-3/+9
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: Reorganize card resource handlingTakashi Iwai1-51/+9
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 invalid SNDRV_PCM_INFO_RESUME flagTakashi Iwai1-6/+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: Split to each driverTakashi Iwai1-2/+222
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-12ALSA: move line6 usb driver into sound/usbTakashi Iwai1-0/+453
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>