aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/line6/driver.h
AgeCommit message (Collapse)Author
2021-11-26ALSA: line6: fix control and interrupt message timeoutsJohan Hovold
commit f4000b58b64344871d7b27c05e73932f137cfef6 upstream. USB control and interrupt message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ. Fixes: 705ececd1c60 ("Staging: add line6 usb driver") Cc: stable@vger.kernel.org # 2.6.30 Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20211025121142.6531-3-johan@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-20ALSA: line6: remove unnecessary initialization to PODHD500XHans P. Möller Ebner
Remove Initialization from POD HD500X because it's not needed. Every time the device is connected dmesg gives the following output: "receive length failed (error -11)". To solve this problem, another flags is introduced (LINE6_CAP_CONTROL_INFO) and it is only used for PODX3 in: sysfs entries, call podhd_startup_finalize(pod) and disconnection. With this patch the error disappear. Signed-off-by: Hans P. Moller <hmoller@uc.cl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-29ALSA: line6: Claim pod x3 usb data interfaceAndrej Krutak
Userspace apps have to claim USB interfaces before using endpoints in them (drivers/usb/core/devio.c:checkintf()). It's a lock mechanism so that two "drivers" don't steal data from each other. Kernel drivers don't have to claim interfaces to work - but they should, to lock out userspace. While there, fix line6_properties struct to match checkpatch.pl. Signed-off-by: Andrej Krutak <dev@andree.sk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-19ALSA: line6: Add hwdep interface to access the POD control messagesAndrej Krutak
We must do it this way, because e.g. POD X3 won't play any sound unless the host listens on the bulk EP, so we cannot export it only via libusb. The driver currently doesn't use the bulk EP messages in other way, in future it could e.g. sense/modify volume(s). Signed-off-by: Andrej Krutak <dev@andree.sk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-19ALSA: line6: Allow processing of raw incoming messagesAndrej Krutak
Not all PODs use MIDI via USB data interface, thus allow avoiding that code and instead using direct processing. Signed-off-by: Andrej Krutak <dev@andree.sk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-19ALSA: line6: Distinguish device init (ctrl EP) and MIDI data transfer (int EP)Andrej Krutak
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: Add LINE6_CAP_IN_NEEDS_OUT, a void playback stream during captureAndrej Krutak
E.g. POD X3 seems to require playback data to be sent to it to generate capture data. Otherwise the device stalls and doesn't send any more capture data until it's reset. 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 Krutak
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-09-19ALSA: line6: Add high-speed USB supportAndrej Krutak
This has two parts: * intervals_per_second setup (high speed needs 8000, instead of 1000) * iso_buffers setup (count of iso buffers depends on USB speed, 2 is not enough for high speed) Signed-off-by: Andrej Krutak <dev@andree.sk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-19ALSA: line6: Enable different number of URBs for frame transfersAndrej Krutak
This basically changes LINE6_ISO_BUFFERS constant to a configurable iso_buffers property. Signed-off-by: Andrej Krutak <dev@andree.sk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-12ALSA: line6: Improve line6_read/write_data() interfacesChris Rorvick
The address cannot be negative so make it unsigned. Also, an unsigned int is always sufficient for the length, so no need to overdo it with a size_t. Finally, add in range checks to see if the values passed in actually fit where they are used. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-11ALSA: line6: Use explicit type for serial numberChris Rorvick
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 Rorvick
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-03ALSA: line6: fixup of line6_start_timer argument typeNicholas Mc Guire
line6_start_timer passes an unsigned int as argument to be used in mod_timer which is then used by mod_timer as unsigned long, this just fixes up the argument type. This change helps make static code checkers happy. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: line6: Move the contents of usbdefs.h into driver.hTakashi Iwai
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 Iwai
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 Iwai
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 Iwai
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 unused line6_nop_read()Takashi Iwai
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-20ALSA: line6: Remove driver version from header commentChris Rorvick
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 Rorvick
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: Drop line6_send_program() and line6_transmit_parameter()Takashi Iwai
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 Iwai
It's used only locally. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20ALSA: line6: Remove CHECK_RETURN macroTakashi Iwai
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 Iwai
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: Split to each driverTakashi Iwai
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 Iwai
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>