aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-28ALSA: line6: Yet more cleanup of superfluous NULL checksTakashi Iwai1-11/+2
... in line6_disconnect() as well. Tested-by: Chris Rorvick <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-20ALSA: line6: Remove superfluous NULL checksChris Rorvick1-11/+1
Signed-off-by: Chris Rorvick <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-20ALSA: line6: Make line6_send_raw_message() staticTakashi Iwai2-4/+2
It's used only locally. Tested-by: Chris Rorvick <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-20ALSA: line6: Remove CHECK_RETURN macroTakashi Iwai3-14/+15
Such a macro doesn't improve readability. Tested-by: Chris Rorvick <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-20ALSA: line6: Don't handle PCM trigger for other cardsTakashi Iwai1-0/+2
Otherwise it oopses. Tested-by: Chris Rorvick <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-20ALSA: line6: Drop usb_device sysfs symlinkTakashi Iwai1-9/+0
It's non-standard and rather superfluous. Tested-by: Chris Rorvick <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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 <[email protected]>
2015-01-12ALSA: move line6 usb driver into sound/usbTakashi Iwai30-3/+3
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 <[email protected]>
2015-01-12staging: line6: Make *_disconnect() functions staticChris Rorvick8-96/+94
Remove declarations from the header and move the definitions up in the source so they need not be forward declared. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Call *_disconnect() via pointerChris Rorvick6-42/+8
Which *_disconnect() to call on disconnect is known at initialization. Add a function pointer to the `usb_line6' struct and use to call into the appropriate logic instead of evaluating the conditional logic. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Call *_process_message() via pointerChris Rorvick6-35/+10
Which *_process_message() function (if any) to call when data is received is known at initialization. Add a function pointer to the `usb_line6' struct and use to call into the appropriate logic instead of evaluating the conditional logic for each message. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Pass *_process_message() `usb_line6' pointersChris Rorvick5-13/+10
Casting the `struct usb_line6' pointer at the call point makes the code difficult to read. This is substantially cleaned up by moving the cast into the callees. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Pass *_init() `usb_line6' pointersChris Rorvick9-33/+24
Casting the `struct usb_line6' pointer at the call point makes the code difficult to read. This is substantially cleaned up by moving the cast into the callees. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Move audio endpoints to propertiesChris Rorvick6-64/+52
The device type can now be used to determine the addresses of the audio endpoints for the interface. Drop the conditional logic and make these values properties. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Remove stale Pocket POD PCM endpointsChris Rorvick1-5/+0
Commit 1027f476f507 (staging: line6: sync with upstream) removed PCM from the Pocket POD capabilities but left the endpoint configuration. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Move control endpoints to propertiesChris Rorvick3-40/+48
The device type can now be used to determine the addresses of the control endpoints for the interface. Drop the conditional logic and make these values properties. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Move altsetting to propertiesChris Rorvick2-51/+25
The device type can now be used to determine the altsetting for the interface. Drop the conditional logic and make this value a property. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Filter on UX2 interfacesChris Rorvick1-16/+4
The driver only supports interface 0 of the TonePort UX2 and POD Studio UX2 devices. Use the device table to filter on this. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Filter on Pocket POD interfaceChris Rorvick1-10/+2
The driver only supports interface 1 of the Pocket POD. Use the device table to filter on this. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Split out POD HD500 interfacesChris Rorvick3-19/+28
The driver uses a different altsetting depending on the interface. Add device type entries for each of these. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Split out PODxt Live interfacesChris Rorvick4-81/+48
The PODxt Live device has both a POD and a Variax interface. Add device type entries for each of these. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: List out capabilities individuallyChris Rorvick2-22/+36
The `LINE6_CAP_CTRL_PCM_HW' macro combines three capabilities to save horizontal space when defining the properties entries. Now that these are no longer limited to single lines this is not such a concern. Specify capabilities individually when defining each property for better clarity. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Use explicit indexes when defining propertiesChris Rorvick1-22/+90
Specify the index of the properties entry explicitly to define this structure more robustly. Also, drop the `L6PROP' macro in favor of initializing each member explicitly on its own line since horizontal space is limited and more attributes will be added later. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Rename capability macrosChris Rorvick6-14/+14
Including "BIT" in the macro name is pointless. Replace with "CAP" to provide some context for what its value represents. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Remove useless commentsChris Rorvick1-2/+0
Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Remove idVendor and idProduct macrosChris Rorvick2-61/+19
These are now only used to build the device table. Each entry in this table is already clearly documented as to what device it maps to so the macros become unnecessary indirection. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Key off of device typeChris Rorvick4-143/+144
The driver currently uses the device's idProduct as input to several switch statements. In some cases this is not sufficiently granular and the interface number must be taken into account. Store the device type in `usb_line6' and key off of it instead. New types can then be added that map to specific interfaces on the device so that this conditional logic can be flattened out. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Index properties array with device typeChris Rorvick1-15/+2
The current logic uses the index of the matched entry from the device table as an offset to the corresponding properties entry. The values of the new `line6_device_type' enum are ordered such that they can be used as an index into either of these arrays. Drop the device entry lookup logic and use the device type (via the .driver_info member) instead. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Define a device type enumChris Rorvick2-18/+57
Define an enum containing the supported devices and associate each entry in the device table to the respective value. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Cleanup device tableChris Rorvick1-19/+21
Wrap USB_DEVICE to avoid repeating the Line 6 vendor ID. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Remove unsupported X3 devicesChris Rorvick3-30/+0
Support for these devices appears to have never been completed. Remove them from the device table along with a minimal amount of supporting code. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Remove line6_pod_transmit_paramter()Chris Rorvick2-11/+0
This function was no longer used as of commit 2807904441d4 (staging: line6: drop MIDI parameter sysfs attrs). Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>