summaryrefslogtreecommitdiffstats
path: root/sound/usb (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: usb-audio: add native DSD support for JLsounds I2SoverUSBJurgen Kramer2015-06-081-2/+3
| | | | | | | | This patch adds native DSD support for the XMOS based JLsounds I2SoverUSB board Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+)Clemens Ladisch2015-06-031-6/+3
| | | | | | | | | | | | | | | | The driver worked around an error in the MAYA44 USB(+)'s mixer unit descriptor by aborting before parsing the missing field. However, aborting parsing too early prevented parsing of the other units connected to this unit, so the capture mixer controls would be missing. Fix this by moving the check for this descriptor error after the parsing of the unit's input pins. Reported-by: nightmixes <nightmixes@gmail.com> Tested-by: nightmixes <nightmixes@gmail.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: add MAYA44 USB+ mixer control namesClemens Ladisch2015-06-031-0/+5
| | | | | | | | | | Add mixer control names for the ESI Maya44 USB+ (which appears to be identical width the AudioTrak Maya44 USB). Reported-by: nightmixes <nightmixes@gmail.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: don't try to get Outlaw RR2150 sample rateEric Wong2015-05-301-0/+1
| | | | | | | | | | | | | | | This quirk allows us to avoid the noisy: current rate 0 is different from the runtime rate message every time playback starts. While USB DAC in the RR2150 supports reading the sample rate, it never returns a sample rate other than zero in my observation with common sample rates. Signed-off-by: Eric Wong <normalperson@yhbt.net> Cc: Joe Turner <joe@oampo.co.uk> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add mic volume fix quirk for Logitech Quickcam FusionWolfram Sang2015-05-291-0/+1
| | | | | | | | | | | | | Fix this from the logs: usb 7-1: New USB device found, idVendor=046d, idProduct=08ca ... usb 7-1: Warning! Unlikely big volume range (=3072), cval->res is probably wrong. usb 7-1: [5] FU [Mic Capture Volume] ch = 1, val = 4608/7680/1 Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add quirk for MS LifeCam HD-3000Vittorio G (VittGam)2015-05-241-0/+1
| | | | | | | | | | Microsoft LifeCam HD-3000 (045e:0779) needs a similar quirk for suppressing the unsupported sample rate inquiry. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98481 Cc: <stable@vger.kernel.org> Signed-off-by: Vittorio Gambaletta <linuxbugs@vittgam.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add quirk for MS LifeCam StudioTakashi Iwai2015-05-191-0/+1
| | | | | | | | | Microsoft LifeCam Studio (045e:0772) needs a similar quirk for suppressing the wrong sample rate inquiry. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98481 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Fix audio output on Roland SC-D70 sound moduleTakamichi Horikawa2015-04-212-29/+6
| | | | | | | | | | | | | | | | | | | | Roland SC-D70 reports its device class as vendor specific class and the quirk QUIRK_AUDIO_FIXED_ENDPOINT was used for audio output. In the quirks table the sampling rate was hard-coded to 44100 Hz and therefore not worked when the sound module was in 48000 Hz mode. In this change the quirk is changed to QUIRK_AUDIO_STANDARD_INTERFACE but as the sound module reports incorrect bSubframeSize in its descriptors, additional change is made in format.c to detect it and to override it (which uses the existing code for Edirol SD-90). Tested both when the sound module was in 44100 Hz mode and 48000 Hz mode and both audio input and output. MIDI related part of the driver is not touched. Signed-off-by: Takamichi Horikawa <takamichiho@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-next' into for-linusTakashi Iwai2015-04-131-23/+17
|\
| * Merge branch 'for-linus' into for-nextTakashi Iwai2015-04-081-2/+7
| |\ | | | | | | | | | | | | | | | | | | Back merge HD-audio quirks to for-next branch, so that we can apply a couple of more quirks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * \ Merge branch 'for-linus' into for-nextTakashi Iwai2015-03-161-0/+30
| |\ \
| * \ \ Merge branch 'for-linus' into for-nextTakashi Iwai2015-03-091-3/+3
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Merging the HD-audio fixes back to base devel branch for further working on it.
| * | | | ALSA: usb-audio: Check Marantz/Denon USB DACs in a single placeTakashi Iwai2015-03-041-23/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are three places doing the same check. Let's make them together. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | ALSA: usb-audio: Don't attempt to get Microsoft Lifecam Cinema sample rateAdam Honse2015-04-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds Microsoft LifeCam Cinema USB ID to the snd_usb_get_sample_rate_quirk list as the Lifecam Cinema does not appear to support getting the sample rate. Fixes the issue where the LifeCam Cinema would wait for USB timeout and log the message "cannot get freq at ep 0x82" when accessed. Addresses bug report https://bugzilla.kernel.org/show_bug.cgi?id=95961. Signed-off-by: Adam Honse <calcprogrammer1@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | ALSA: usb - Creative USB X-Fi Pro SB1095 volume knob supportDmitry M. Fedin2015-04-091-0/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds an entry for Creative USB X-Fi to the rc_config array in mixer_quirks.c to allow use of volume knob on the device. Adds support for newer X-Fi Pro card, known as "Model No. SB1095" with USB ID "041e:3237" Signed-off-by: Dmitry M. Fedin <dmitry.fedin@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | ALSA: usb-audio: don't try to get Benchmark DAC1 sample rateEric Wong2015-04-041-2/+7
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding this quirk allows us to avoid the noisy "cannot get freq at ep 0x1" message in dmesg output every time playback starts. This ought to affect other Benchmark DAC1 variations using the same "Microchip Technology, Inc." chip as well, but I have only tested with the "Pre" variant. Signed-off-by: Eric Wong <normalperson@yhbt.net> Cc: Joe Turner <joe@oampo.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: snd-usb: add quirks for Roland UA-22Daniel Mack2015-03-121-0/+30
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | The device complies to the UAC1 standard but hides that fact with proprietary descriptors. The autodetect quirk for Roland devices catches the audio interface but misses the MIDI part, so a specific quirk is needed. Signed-off-by: Daniel Mack <daniel@zonque.org> Reported-by: Rafa Lafuente <rafalafuente@gmail.com> Tested-by: Raphaƫl Doursenaud <raphael@doursenaud.fr> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: line6: Clamp values correctlyTakashi Iwai2015-03-051-3/+3
|/ | | | | | | | The usages of clamp() macro in sound/usb/line6/playback.c are just wrong, the low and high values are swapped. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb: Fix support for Denon DA-300USB DAC (ID 154e:1003)Frank C Guenther2015-02-171-0/+3
| | | | | | | | | | | | | | | | Fix problem where playback of Denon DA-300USB DAC sometimes does not start and leads to error messages like "clock source 41 is not valid, cannot use". Solution: Treat this device the same as other Denon/Marantz devices in sound/usb/quirks.c. Tested with both PCM and DSD formats. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=93261 Signed-off-by: Frank C Guenther <bugzilla.frnkcg@spamgourmet.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rateJoe Turner2015-02-173-0/+12
| | | | | | | | | | | Adds a quirk to disable the check that the sample rate has been set correctly, as the Lifecam does not support getting the sample rate. This means that we don't need to wait for the USB timeout when attempting to get the sample rate. Waiting for the timeout causes problems in some applications, which give up on the device acquisition process before it has had time to complete, resulting in no sound. [minor tidy up by tiwai] Signed-off-by: Joe Turner <joe@oampo.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: line6: Improve line6_read/write_data() interfacesChris Rorvick2015-02-122-8/+14
| | | | | | | | | | 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>
* ALSA: line6: toneport: Use explicit type for firmware versionChris Rorvick2015-02-111-1/+1
| | | | | | | | | The firmware version is a single byte so have the variable type agree. Since the address to this member is passed to the read function, using an int is not even portable. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: line6: Use explicit type for serial numberChris Rorvick2015-02-114-5/+5
| | | | | | | 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>
* ALSA: line6: Return EIO if read/write not successfulChris Rorvick2015-02-111-2/+2
| | | | | Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: line6: Return error if device not respondingChris Rorvick2015-02-111-6/+23
| | | | | | | | | Put an upper bound on how long we will wait for the device to respond to a read/write request (i.e., 100 milliseconds) and return an error if this is reached. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: line6: Add delay before reading statusChris Rorvick2015-02-111-0/+6
| | | | | | | | | | | | | The device indicates the result of a read/write operation by making the status available on a subsequent request from the driver. This is not ready immediately, though, so the driver is currently slamming the device with hundreds of pointless requests before getting the expected response. Add a two millisecond delay before each attempt. This is approximately the behavior observed with version 4.2.7.1 of the Windows driver. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb: update trigger timestamp on first non-zero URB submittedPierre-Louis Bossart2015-02-092-0/+11
| | | | | | | | | | | | | | | | The first URBs are submitted during the prepare stage. When .trigger is called, the ALSA core saves a trigger tstamp that doesn't correspond to the actual time when the samples are submitted. The trigger_tstamp is now updated when the first data are submitted to avoid any time offsets. A usb-specific trigger_tstamp_pending_update flag is used for now, at some point the flag would need to move to the ALSA core, USB is not the only interface where silent block transfers are programmed as part of the prepare stage, with actual data enabled when .trigger is called. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: line6: Pass driver name to line6_probe()Chris Rorvick2015-02-086-7/+7
| | | | | | | | | 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>
* ALSA: line6: Pass toneport pointer to toneport_has_led()Chris Rorvick2015-02-081-7/+12
| | | | | | | | | It is unlikely this function would ever be used in a context without a pointer to a `struct usb_line6_toneport', so grab the device type from it rather than having the caller do it. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: line6: Add toneport_has_source_select()Chris Rorvick2015-02-081-16/+16
| | | | | | | | Add a predicate for testing if the device supports source selection to make the conditional logic around this a bit cleaner. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: line6: Get rid of unused variable in pod.cTakashi Iwai2015-02-061-1/+0
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: line6: Create sysfs via snd_card_add_dev_attr()Takashi Iwai2015-02-061-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>
* ALSA: line6: fixup of line6_start_timer argument typeNicholas Mc Guire2015-02-032-2/+2
| | | | | | | | | 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>
* ALSA: line6: use msecs_to_jiffies for conversionNicholas Mc Guire2015-02-031-1/+1
| | | | | | | | This is only an API consolidation and should make things more readable it replaces var * HZ / 1000 by msecs_to_jiffies(var). Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: line6: Remove unused line6_midibuf_skip_message()Chris Rorvick2015-02-012-13/+0
| | | | | | | | | | | Use of this function ended with commits 3e58c868db1d ("staging: line6: drop midi_mask_receive") and af89d2897a71 ("staging: line6: drop midi_mask_transmit".) [Removed the corresponding line in midibuf.h, too -- tiwai] Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: line6: Remove unused line6_midibuf_status()Chris Rorvick2015-02-012-8/+0
| | | | | | | | | | This function has not been used since merging the driver into the kernel (and a good while before that.) [Removed the corresponding line in midibuf.h, too -- tiwai] Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/line6' into for-nextTakashi Iwai2015-01-3013-250/+114
|\
| * ALSA: line6: Remove snd_line6_ prefix of pcm property fieldsTakashi Iwai2015-01-286-20/+18
| | | | | | | | | | | | It's just superfluous and doesn't give any better readability. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: line6: Remove invalid capability bits for PODxt Live VariaxTakashi Iwai2015-01-281-3/+1
| | | | | | | | | | | | PODxt Live Variax doesn't have PCM and HWMON but only MIDI. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: line6: Remove struct usb_line6_podhdTakashi Iwai2015-01-281-6/+1
| | | | | | | | | | | | It's identical with struct usb_line6. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: line6: Move the contents of usbdefs.h into driver.hTakashi Iwai2015-01-289-34/+16
| | | | | | | | | | | | | | 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>
| * ALSA: line6: Remove revision.hTakashi Iwai2015-01-282-5/+0
| | | | | | | | | | | | The definition is no longer used. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: line6: Tidy up and typo fixes in commentsTakashi Iwai2015-01-288-174/+65
| | | | | | | | | | | | | | | | | | | | 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>
| * ALSA: line6: Fix volume calculation for big-endianTakashi Iwai2015-01-281-9/+14
| | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usx2y: Move UAPI definition into include/uapi/sound/usb_stream.hTakashi Iwai2015-01-281-74/+4
| | | | | | | | | | | | | | | | | | | | The user-space API definition for usb_stream stuff should be moved to include/uapi/sound to be exposed publicly. While we're at it, add the missing ifdef guard for double inclusion, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'topic/line6' into for-nextTakashi Iwai2015-01-2815-1105/+705
|\|
| * ALSA: line6: Handle error from line6_pcm_acquire()Takashi Iwai2015-01-282-6/+20
| | | | | | | | | | Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: line6: Make common PCM pointer callbackTakashi Iwai2015-01-284-20/+12
| | | | | | | | | | | | | | | | Both playback and capture callbacks are identical, so let's merge them. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: line6: Reorganize PCM stream handlingTakashi Iwai2015-01-287-425/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code deals with the stream start / stop solely via line6_pcm_acquire() and line6_pcm_release(). This was (supposedly) intended to avoid the races, but it doesn't work as expected. The concurrent acquire and release calls can be performed without proper protections, thus this might result in memory corruption. Furthermore, we can't take a mutex to protect the whole function because it can be called from the PCM trigger callback that is an atomic context. Also spinlock isn't appropriate because the function allocates with kmalloc with GFP_KERNEL. That is, these function just lead to singular problems. This is an attempt to reduce the existing races. First off, separate both the stream buffer management and the stream URB management. The former is protected via a newly introduced state_mutex while the latter is protected via each line6_pcm_stream lock. Secondly, the stream state are now managed in opened and running bit flags of each line6_pcm_stream. Not only this a bit clearer than previous combined bit flags, this also gives a better abstraction. These rewrites allows us to make common hw_params and hw_free callbacks for both playback and capture directions. For the monitor and impulse operations, still line6_pcm_acquire() and line6_pcm_release() are used. They call internally the corresponding functions for both playback and capture streams with proper lock or mutex. Unlike the previous versions, these function don't take the bit masks but the only single type value. Also they are supposed to be applied only as duplex operations. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: line6: Clear prev_fbuf and prev_fsize properlyTakashi Iwai2015-01-282-7/+7
| | | | | | | | | | | | | | | | | | | | | | Clearing prev_fsize in line6_pcm_acquire() is pretty racy. This can be called at any time while the stream is being played. Rather better to clear prev_fbuf and prev_fsize at the proper place like the stream stop for capture, and just after copying the monitor / impulse data inside the spinlock. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>