summaryrefslogtreecommitdiff
path: root/sound/usb
AgeCommit message (Collapse)Author
2012-05-31ALSA: usb-audio: fix rate_list memory leakClemens Ladisch
The array of sample rates is reallocated every time when opening the PCM device, but was freed only once when unplugging the device. Reported-by: "Alexander E. Patrakov" <patrakov@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-21ALSA: snd-usb: fix stream info output in /procDaniel Mack
Set some substream struct members to make the proc interface code work again. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Felix Homann <linuxaudio@showlabor.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15ALSA: usb-audio - Call get_min_max_*() after determining the name stringTakashi Iwai
get_min_max_with_quirks() must be called after the control id name string is determined, but the current code changes the id name string after calling the function. Reported-by: Christian Melki <christian.melki@ericsson.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-11ALSA: usb-audio: Fix commentMark Hills
Explained by Takashi in <s5hfwbtmz0q.wl%tiwai@suse.de> > The reason is because get_min_max*() isn't called in the place you > created these controls, and get_min_max() would be called only for > integer volumes later even if uninitialized. A short cut for booleans. Signed-off-by: Mark Hills <mark@pogo.org.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-24ALSA: snd-usb: fix some typos in endpoint.c documentationDaniel Mack
Also be more specific about some details while at it. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-24ALSA: usb-audio: sound/usb/endpoint.c: suppress warningAndrew Morton
sound/usb/endpoint.c: In function 'queue_pending_output_urbs': sound/usb/endpoint.c:298: warning: 'packet' may be used uninitialized in this function Cc: Daniel Mack <zonque@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-24ALSA: usb-audio: Add missing error checks in snd_ebox44_create_mixer()Takashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-24ALSA: usb-audio: M-Audio Fast Track Ultra: Add effect controlsFelix Homann
This adds controls for the effects section on the FTU devices. Some of these controls need volume quirks. They are added to mixer.c. [fixed missing break by tiwai] Signed-off-by: Felix Homann <linuxaudio@showlabor.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-24ALSA: usb-audio: Rename Fast Track Ultra mixer quirk functionsFelix Homann
This is in preparation for more FTU controls to come. Should help keeping names a bit shorter. Signed-off-by: Felix Homann <linuxaudio@showlabor.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-24ALSA: usb-audio: Add TLV to M-Audio Fast Track Ultra controlsFelix Homann
This adds db gain information to M-Audio Fast Track Ultra (8R) devices. Signed-off-by: Felix Homann <linuxaudio@showlabor.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-24ALSA: usb-audio: Rename and export mixer_vol_tlvFelix Homann
Rename mixer_vol_tlv to snd_usb_mixer_vol_tlv and export it to make it reuseable in mixer_quirks.c. Signed-off-by: Felix Homann <linuxaudio@showlabor.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-24ALSA: usb-audio: Unify M-Audio Fast Track Ultra and Ebox-44 mixer quirks.Felix Homann
Merge snd_maudio_ftu_create_ctl() and snd_ebox44_create_ctl() into snd_create_std_mono_ctl(). As opposed to the ftu and ebox-44 specific functions, a TLV callback can be specified for controls created by snd_create_std_mono_ctl(). [fixed minor checkpatch.pl warnings by tiwai] Signed-off-by: Felix Homann <linuxaudio@showlabor.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-21ALSA: snd-usb: remove refactorization left-oversDaniel Mack
Drop some struct members and definitions that became obsolete during the refactorization of the driver. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-18Merge branch 'topic/usb-endpoint' into topic/miscTakashi Iwai
2012-04-15ALSA: snd-usb-audio: Replace mixer for Electrix Ebox-44Mark Hills
The mixer units from the firmware are corrupt, and even where they are valid they presents mono controls as L and R channels of stereo. Signed-off-by: Mark Hills <mark@pogo.org.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-15ALSA: snd-usb-audio: Skip un-parseable mixer units instead of erroringMark Hills
Some interfaces reference endpoints which do not exists. To accomodate these, do not fail completely, but skip over them. This allows the Electrix Ebox-44 with earlier firmware to be detected and used for audio. Signed-off-by: Mark Hills <mark@pogo.org.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-13ALSA: usb: Remove obsoleted fields from struct snd_usb_substreamTakashi Iwai
Many fields have been moved to struct snd_usb_endpoint. Also fix the proc output to correspond to the new structure. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-13ALSA: usb: Fix fill_max flag setTakashi Iwai
ep->fill_max is a 1 bit flag, thus it has to be boolean. sound/usb/endpoint.c: In function 'snd_usb_endpoint_set_params': sound/usb/endpoint.c:785: warning: overflow in implicit constant conversion Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-13ALSA: usb: Remove unused variableTakashi Iwai
sound/usb/endpoint.c: In function ‘deactivate_urbs’: sound/usb/endpoint.c:520:16: warning: unused variable ‘flags’ [-Wunused-variable] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-13ALSA: snd-usb: add some documentationDaniel Mack
Document the new streaming code and some of the functions so that contributers can catch up easier. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-13ALSA: snd-usb: add support for implicit feedbackDaniel Mack
Implicit feedback is a streaming mode that does not rely on dedicated sync endpoints but uses the information provided by record streams to clock output streams. Now that the streaming logic is decoupled from the PCM streams, this is easy to implement. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-13ALSA: snd-usb: remove old streaming logicDaniel Mack
Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-13ALSA: snd-usb: switch over to new endpoint streaming logicDaniel Mack
With the previous commit that added the new streaming model, all endpoint and streaming related code is now in endpoint.c, and pcm.c only acts as a wrapper for handling the packet's payload. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-13ALSA: snd-usb: implement new endpoint streaming modelDaniel Mack
This patch adds a new generic streaming logic for audio over USB. It defines a model (snd_usb_endpoint) that handles everything that is related to an USB endpoint and its streaming. There are functions to activate and deactivate an endpoint (which call usb_set_interface()), and to start and stop its URBs. It also has function pointers to be called when data was received or is about to be sent, and pointer to a sync slave (another snd_usb_endpoint) that is informed when data has been received. A snd_usb_endpoint knows about its state and implements a refcounting, so only the first user will actually start the URBs and only the last one to stop it will tear them down again. With this sort of abstraction, the actual streaming is decoupled from the pcm handling, which makes the "implicit feedback" mechanisms easy to implement. In order to split changes properly, this patch only adds the new implementation but leaves the old one around, so the the driver doesn't change its behaviour. The switch to actually use the new code is submitted separately. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-13ALSA: snd-usb: add snd_usb_audio-wide mutexDaniel Mack
This is needed for new card-wide list operations. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-18Merge branch 'topic/misc' into for-linusTakashi Iwai
2012-03-15ALSA: usb-audio - Fix build error by consitification of rate listTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-25ALSA: snd-usb-6fire: Select missing SND_VMASTER option in KconfigTorsten Schenk
Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-22ALSA: snd-usb-6fire: add analog input volume controlTorsten Schenk
Add a stereo volume control for analog input channel pair 1/2. Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-22ALSA: snd-usb-6fire: add mute control for analog outputsTorsten Schenk
Add a mute control for every analog output channel. Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-22ALSA: snd-usb-6fire: add individual volume control for analog channelsTorsten Schenk
Add a stereo volume control for every analog output pair 1/2, 3/4, 5/6. Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-22ALSA: snd-usb-6fire: add tlv to controlsTorsten Schenk
Remove the soft log-conversion and add a dB scale according to the DAC documentation instead. Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-22ALSA: snd-usb-6fire: remove driver version informationTorsten Schenk
Remove unused driver version information from the individual files. Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-22ALSA: snd-usb-caiaq: Fix the return of XRUNMark Hills
Commit 3702b08 added a lock, but did not account for the case of SNDRV_PCM_POS_XRUN, which would get immediately overwritten. This could be bundled into one if-else-if statement, but the goto helps to clarify the 'exceptional' case. Thanks to Andreas Pape for spotting this. Signed-off-by: Mark Hills <mark@pogo.org.uk> Acked-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-15ALSA: usb-audio: avoid integer overflow in create_fixed_stream_quirk()Xi Wang
A malicious USB device could feed in a large nr_rates value. This would cause the subsequent call to kmemdup() to allocate a smaller buffer than expected, leading to out-of-bounds access. This patch validates the nr_rates value and reuses the limit introduced in commit 4fa0e81b ("ALSA: usb-audio: fix possible hang and overflow in parse_uac2_sample_rate_range()"). Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-15ALSA: usx2y: Fix typo in usbusx2yaudio.c and usx2yhwdeppcm.cMasanari Iida
Correct spelling "propably" to "probably" and "activ" to "active" in sound/usb/usx2y/usbusx2yaudio.c and usx2yhwdeppcm.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-08ALSA: usb-audio: add Edirol UM-3G supportClemens Ladisch
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-12Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (526 commits) ASoC: twl6040 - Add method to query optimum PDM_DL1 gain ALSA: hda - Fix the lost power-setup of seconary pins after PM resume ALSA: usb-audio: add Yamaha MOX6/MOX8 support ALSA: virtuoso: add S/PDIF input support for all Xonars ALSA: ice1724 - Support for ooAoo SQ210a ALSA: ice1724 - Allow card info based on model only ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations ALSA: hdspm - Provide unique driver id based on card serial ASoC: Dynamically allocate the rtd device for a non-empty release() ASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSC ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs ALSA: hda - Use auto-parser for HP laptops with cx20459 codec ALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info() ALSA: hdsp - Fix potential Oops in snd_hdsp_info_pref_sync_ref() ALSA: hda/cirrus - support for iMac12,2 model ASoC: cx20442: add bias control over a platform provided regulator ALSA: usb-audio - Avoid flood of frame-active debug messages ALSA: snd-usb-us122l: Delete calls to preempt_disable mfd: Put WM8994 into cache only mode when suspending ... Fix up trivial conflicts in: - arch/arm/mach-s3c64xx/mach-crag6410.c: renamed speyside_wm8962 to tobermory, added littlemill right next to it - drivers/base/regmap/{regcache.c,regmap.c}: duplicate diff that had already come in with other changes in the regmap tree
2012-01-11ALSA: usb-audio: add Yamaha MOX6/MOX8 supportClemens Ladisch
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-09ALSA: usb-audio - Avoid flood of frame-active debug messagesTakashi Iwai
With some buggy devices, the usb-audio driver may give "frame xxx active" kernel messages too often. Better to keep it as debug-only using snd_printdd(), and also add the rate-limit for avoiding floods. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=738681 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-09ALSA: snd-usb-us122l: Delete calls to preempt_disableKarsten Wiese
They are not needed here. Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08ALSA: usb-audio: fix possible hang and overflow in ↵Xi Wang
parse_uac2_sample_rate_range() A malicious USB device may feed in carefully crafted min/max/res values, so that the inner loop in parse_uac2_sample_rate_range() could run for a long time or even never terminate, e.g., given max = INT_MAX. Also nr_rates could be a large integer, which causes an integer overflow in the subsequent call to kmalloc() in parse_audio_format_rates_v2(). Thus, kmalloc() would allocate a smaller buffer than expected, leading to a memory corruption. To exploit the two vulnerabilities, an attacker needs physical access to the machine to plug in a malicious USB device. This patch makes two changes. 1) The type of "rate" is changed to unsigned int, so that the loop could stop once "rate" is larger than INT_MAX. 2) Limit nr_rates to 1024. Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-06Merge branch 'driver-core-next' into Linux 3.2Greg Kroah-Hartman
This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file, and it fixes the build error in the arch/x86/kernel/microcode_core.c file, that the merge did not catch. The microcode_core.c patch was provided by Stephen Rothwell <sfr@canb.auug.org.au> who was invaluable in the merge issues involved with the large sysdev removal process in the driver-core tree. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-19ALSA: module_param: make bool parameters really boolRusty Russell
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-12ALSA: snd-usb: added VOX ToneLab ST midi handlingSergiusz Urbaniak
Signed-off-by: Sergiusz Urbaniak <sergiusz.urbaniak@googlemail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-29ALSA: usb-audio - Support for Roland GAIA SH-01 SynthesizerJohn F Leach
Added table quirks entry for Roland GAIA SH-01 Synthesizer based upon Roland SH-201 table entry as template. USB MIDI and audio was tested with Muse and Audacity. Signed-off-by: John F Leach <jfleach@jfleach.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-18USB: convert sound/* to use module_usb_driver()Greg Kroah-Hartman
This converts the drivers in sound/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Daniel Mack <zonque@gmail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Torsten Schenk <torsten.schenk@zoho.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Karsten Wiese <fzu@wemgehoertderstaat.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-10ALSA: usb-audio: Use kmemdup rather than duplicating its implementationThomas Meyer
Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09ALSA: snd_usb_audio: add Logitech HD Webcam c510 to quirk-384Alexey Fisher
Logitech HD Webcam c510 provide wrong mixer resolution. Add it to "res = 384" quirk. Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08ALSA: usb-audio - Fix the missing volume quirks at delayed initTakashi Iwai
In the recent usb-audio driver, the initialization of volume ranges may be delayed when the device doesn't respond well at the probing time. But the volume quirks for certain devices are applied only in mixer_ctl_feature_info() thus only at the very first probe and will be missing when the volume range is initialized later. This patch moves the volume quirk code to be always called from the volume-range extraction (get_min_max()), so that the quirks are properly applied in the later init time. Reported-and-tested-by: Alexey Fisher <bug-track@fisher-privat.net> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>