summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2013-10-20ALSA: dice: optimize reading of consecutive registersClemens Ladisch
Instead of reading two consecutive register with two quadlet requests, use one block read request. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20ALSA: dice: support dual-wire stream format at 192 kHzClemens Ladisch
Change the AMDTP streaming code to handle the non-standard stream format that DICE devices use at sample rates greater than 96 kHz. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20ALSA: dice: fix device detection for other vendorsClemens Ladisch
DICE devices do not have a unique specifier ID in their unit directory (it's always the same as the device vendor's ID), so rely on just the version ID for driver loading, and use a heuristic in the probe callback to detect actual DICE devices. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20ALSA: dice: reorganize interface definitionsClemens Ladisch
Move the DICE interface symbols into a separate header file, and add more documentation. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20ALSA: firewire: introduce amdtp_out_stream_running()Clemens Ladisch
Introduce the helper function amdtp_out_stream_running(). This makes many checks in amdtp.c clearer and frees the device drivers from having to track this with a separate variable. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20ALSA: dice: clear device lock when closing hwdep deviceClemens Ladisch
Ensure that misbehaving or aborted userspace programs do not accidentally keep the lock. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20ALSA: dice: implement hwdep deviceClemens Ladisch
Implement the hwdep locking and notification mechanisms. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20ALSA: dice: fix hang when unplugging a running deviceClemens Ladisch
When aborting a PCM stream, the xrun is signaled only if the stream is running. When disconnecting a PCM stream, calling snd_card_disconnect() too early would change the stream into a non-running state and thus prevent the xrun from being noticed by user space. To prevent this, move the snd_card_disconnect() call after the xrun. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20ALSA: dice, firewire-lib: add blocking modeClemens Ladisch
Allow AMDTP output streams to use blocking mode. Use it for DICE devices, because the old DICE-II chip will in some cases not be able to lock to non-blocking streams (erratum E7). Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20ALSA: dice: reduce noisy loggingClemens Ladisch
The notification bits are not of general interest; log them only when debugging. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20ALSA: dice: allow all sample ratesClemens Ladisch
Instead of forcing a constant 44.1 kHz, read the current sample rate from the device when opening the PCM device. Actually changing the sample rate requires some separate controller application. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20ALSA: dice: optimize bus reset handlingClemens Ladisch
After a bus reset, do not stop the stream completely to avoid having to reconfigure the device when restarting the stream. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-17ALSA: add DICE driverClemens Ladisch
As a start point for further development, this is an incomplete driver for DICE devices: - only playback (so no clock source except the bus clock) - only 44.1 kHz - no MIDI - recovery after bus reset is slow - hwdep device is created, but not actually implemented Contains compilation fixes by Stefan Richter. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-08-28ALSA: opti9xx: Fix conflicting driver object nameTakashi Iwai
The recent commit to delay the release of kobject triggered NULL dereferences of opti9xx drivers. The cause is that all snd-opti92x-ad1848, snd-opti92x-cs4231 and snd-opti93x drivers register the PnP card driver with the very same name, and also snd-opti92x-ad1848 and -cs4231 drivers register the ISA driver with the same name, too. When these drivers are built in, quick "register-release-and-re-register" actions occur, and this results in Oops because of the same name is assigned to the kobject. The fix is simply to assign individual names. As a bonus, by using KBUILD_MODNAME, the patch reduces more lines than it adds. The fix is based on the suggestion by Russell King. Reported-and-tested-by: Fengguang Wu <fengguang.wu@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-22ALSA: hda - Fix NULL dereference with CONFIG_SND_DYNAMIC_MINORS=nTakashi Iwai
Without the dynamic minor assignment, HDMI codec may have less PCM instances than the number of pins, which eventually leads to Oops. Reported-by: Stratos Karafotis <stratosk@semaphore.gr> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-19ALSA: hda - Add inverted digital mic fixup for Acer Aspire OneTakashi Iwai
Yet another entry, just use the existing fixup for this machine, too. Reported-by: "Nathanael D. Noblet" <nathanael@gnat.ca> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-16ALSA: hda - Add a fixup for Gateway LT27Takashi Iwai
Gateway LT27 needs a fixup for the inverted digital mic. Reported-by: "Nathanael D. Noblet" <nathanael@gnat.ca> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-15Merge tag 'asoc-v3.11-rc5' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v3.11 A few driver specific fixes here plus one core fix for a memory corruption issue in DAPM initialisation which could lead to crashes.
2013-08-15Merge remote-tracking branch 'asoc/fix/tegra' into asoc-linusMark Brown
2013-08-15Merge remote-tracking branch 'asoc/fix/sgtl5000' into asoc-linusMark Brown
2013-08-15Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linusMark Brown
2013-08-15Merge remote-tracking branch 'asoc/fix/cs42l52' into asoc-linusMark Brown
2013-08-15ASoC: tegra: fix Tegra30 I2S capture parameter setupStephen Warren
The Tegra30 I2S driver was writing the AHUB interface parameters to the playback path register rather than the capture path register. This caused the capture parameters not to be configured at all, so if capturing using non-HW-default parameters (e.g. 16-bit stereo rather than 8-bit mono) the audio would be corrupted. With this fixed, audio capture from an analog microphone works correctly on the Cardhu board. Cc: stable@vger.kernel.org Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-12ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam C525Maksim A. Boyko
Add the volume control quirk for avoiding the kernel warning for the Logitech HD Webcam C525 as in the similar commit 36691e1be6ec551eef4a5225f126a281f8c051c2 for the Logitech HD Webcam C310. Reported-by: Maksim Boyko <maksim.a.boyko@gmail.com> Tested-by: Maksim Boyko <maksim.a.boyko@gmail.com> Cc: <stable@vger.kernel.org> # 3.10.5+ Signed-off-by: Maksim Boyko <maksim.a.boyko@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-12ALSA: hda - Fix missing mute controls for CX5051Takashi Iwai
We've added a fake mute control (setting the amp volume to zero) for CX5051 at commit [3868137e: ALSA: hda - Add a fake mute feature], but this feature was overlooked in the generic parser implementation. Now the driver lacks of mute controls on these codecs. The fix is just to check both AC_AMPCAP_MUTE and AC_AMPCAP_MIN_MUTE bits in each place checking the amp capabilities. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59001 Cc: <stable@vger.kernel.org> [v3.9+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-12ALSA: usb-audio: fix automatic Roland/Yamaha MIDI detectionClemens Ladisch
Commit aafe77cc45a5 (ALSA: usb-audio: add support for many Roland/Yamaha devices) had several logic errors that prevented create_auto_midi_quirk from enumerating any MIDI ports. Reported-by: Keith A. Milner <maillist@superlative.org> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-12ALSA: 6fire: make buffers DMA-able (midi)Torsten Schenk
Patch makes midi output buffer DMA-able by allocating it separately. Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-12ALSA: 6fire: make buffers DMA-able (pcm)Torsten Schenk
Patch makes pcm buffers DMA-able by allocating each one separately. Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-12ALSA: hda - Add pinfix for LG LW25 laptopTakashi Iwai
Correct the pins for a line-in and a headphone on LG LW25 laptop with ALC880 codec. Other pins seem fine. Reported-and-tested-by: Joonas Saarinen <jonskunator@gmail.com> Cc: <stable@vger.kernel.org> [v3.9+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-08ALSA: usb-audio: do not trust too-big wMaxPacketSize valuesClemens Ladisch
The driver used to assume that the streaming endpoint's wMaxPacketSize value would be an indication of how much data the endpoint expects or sends, and compute the number of packets per URB using this value. However, the Focusrite Scarlett 2i4 declares a value of 1024 bytes, while only about 88 or 44 bytes are be actually used. This discrepancy would result in URBs with far too few packets, which would not work correctly on the EHCI driver. To get correct URBs, use wMaxPacketSize only as an upper limit on the packet size. Reported-by: James Stone <jamesmstone@gmail.com> Tested-by: James Stone <jamesmstone@gmail.com> Cc: <stable@vger.kernel.org> # 2.6.35+ Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-07ALSA: 6fire: fix DMA issues with URB transfer_buffer usageJussi Kivilinna
Patch fixes 6fire not to use stack as URB transfer_buffer. URB buffers need to be DMA-able, which stack is not. Furthermore, transfer_buffer should not be allocated as part of larger device structure because DMA coherency issues and patch fixes this issue too. Cc: stable@vger.kernel.org Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi> Tested-by: Torsten Schenk <torsten.schenk@zoho.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-06ASoC: cs42l52: Add new TLV for Beep VolumeBrian Austin
CS42L52 Beep control uses 2dB scale from -56dB Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-06ASoC: cs42l52: Reorder Min/Max and update to SX_TLV for Beep VolumeBrian Austin
Beep Volume Min/Max was backwards. Change to SOC_SONGLE_SX_TLV for correct volume representation Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@kernel.org
2013-08-02ALSA: hda - Fix missing fixup for Mac Mini with STAC9221Takashi Iwai
A fixup for Apple Mac Mini was lost during the adaption to the generic parser because the fallback for the generic ID 8384:7680 was dropped, and it resulted in the silence output (and maybe other problems). Unfortunately, just adding the missing subsystem ID wasn't enough, in this case. The subsystem ID of this machine is 0000:0100 (what Apple thought...?), and since snd_hda_pick_fixup() doesn't take the vendor id zero into account, the driver ignored this entry. Now it's fixed to regard the vendor id zero as a valid value. Reported-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: <stable@vger.kernel.org> [v3.9+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-01ASoC: dapm: Fix empty list check in dapm_new_mux()Lars-Peter Clausen
list_first_entry() will always return a valid pointer, even if the list is empty. So the check whether path is NULL will always be false. So we end up calling dapm_create_or_share_mixmux_kcontrol() with a path struct that points right in the middle of the widget struct and by trying to modify the path the widgets memory will become corrupted. Fix this by using list_emtpy() to check if the widget doesn't have any paths. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2013-08-01ASoC: sgtl5000: fix buggy 'Capture Attenuate Switch' controlLothar Waßmann
The SGTL5000 Capture Attenuate Switch (or "ADC Volume Range Reduction" as it is called in the manual) is single bit only. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-01ASoC: sgtl5000: prevent playback to be muted when terminating concurrent captureLothar Waßmann
When a sound capture/playback is terminated while a playback/capture is running, power_vag_event() will clear SGTL5000_CHIP_ANA_POWER in the SND_SOC_DAPM_PRE_PMD event, thus muting the respective other channel. Don't clear SGTL5000_CHIP_ANA_POWER when both DAC and ADC are active to prevent this. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-01Merge tag 'asoc-v3.11-rc3' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v3.11 A fix to make sure userspace knows when control writes have caused a change in value, fixing some UIs, plus a few few driver fixes mainly cleaning up issues from recent refactorings on less mainstream platforms.
2013-07-31Merge remote-tracking branch 'asoc/fix/wm0010' into asoc-linusMark Brown
2013-07-31Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linusMark Brown
2013-07-31Merge remote-tracking branch 'asoc/fix/blackfin' into asoc-linusMark Brown
2013-07-31ASoC: wm0010: Fix resource leakDimitris Papastamos
If kzalloc() fails for `img' then we are going to leak the memory for `out'. We are freeing the memory of all the tx/rx transfers but the tx/rx buf pointers will be NULL if we drop out earlier. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-31ASoC: au1x: Fix buildRalf Baechle
d8b51c11ff5a70244753ba60abfd47088cf4dcd4 [ASoC: ac97c: Use module_platform_driver()] broke the build: CC sound/soc/au1x/ac97c.o /home/ralf/src/linux/upstream-sfr/sound/soc/au1x/ac97c.c:344:1: error: expected identifier or ‘(’ before ‘&’ token /home/ralf/src/linux/upstream-sfr/sound/soc/au1x/ac97c.c:344:1: error: pasting "__initcall_" and "&" does not give a valid preprocessing token /home/ralf/src/linux/upstream-sfr/sound/soc/au1x/ac97c.c:344:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token /home/ralf/src/linux/upstream-sfr/sound/soc/au1x/ac97c.c:344:1: error: expected identifier or ‘(’ before ‘&’ token /home/ralf/src/linux/upstream-sfr/sound/soc/au1x/ac97c.c:344:1: error: pasting "__exitcall_" and "&" does not give a valid preprocessing token /home/ralf/src/linux/upstream-sfr/sound/soc/au1x/ac97c.c:344:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token /home/ralf/src/linux/upstream-sfr/sound/soc/au1x/ac97c.c:334:31: warning: ‘au1xac97c_driver’ defined but not used [-Wunused-variable] make[5]: *** [sound/soc/au1x/ac97c.o] Error 1 make[4]: *** [sound/soc/au1x] Error 2 make[3]: *** [sound/soc] Error 2 Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-30ASoC: bf5xx-ac97: Fix compile error with SND_BF5XX_HAVE_COLD_RESETLars-Peter Clausen
If CONFIG_SND_BF5XX_HAVE_COLD_RESET is enabled building the blackfin ac97 driver fails with the following compile error: sound/soc/blackfin/bf5xx-ac97.c: In function ‘asoc_bfin_ac97_probe’: sound/soc/blackfin/bf5xx-ac97.c:297: error: expected ‘;’ before ‘{’ token sound/soc/blackfin/bf5xx-ac97.c:302: error: label ‘gpio_err’ used but not defined The issue was introduced in commit 6dab2fd7 ("ASoC: bf5xx-ac97: Convert to devm_gpio_request_one()"). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-29ASoC: bfin-ac97: Fix prototype error following AC'97 refactoringMark Brown
As part of the multiplatform refactoring for AC'97 the AC'97 bus ops were staticised meaning that the prototype (which was never needed) conflicts with the declaration causing build failures. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-07-29ALSA: compress: fix the return value for SNDRV_COMPRESS_VERSIONVinod Koul
the return value of SNDRV_COMPRESS_VERSION always return default -ENOTTY as the return value was never updated for this call assign return value from put_user() Reported-by: Haynes <hgeorge@codeaurora.org> CC: stable@vger.kernel.org Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-24ASoC: dapm: Fix return value of snd_soc_dapm_put_{volsw,enum_virt}()Lars-Peter Clausen
The ALSA core expect the put callback of a control to return 1 if the value of the control changed and 0 if it did not. Both snd_soc_dapm_put_volsw() and snd_soc_dapm_put_enum_virt() currently always returns 0. For both functions we already have a 'change' variable which either contains 1 or 0 depending on whether the value has changed or not, so just return that. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-24Merge tag 'asoc-v3.11-rc2' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v3.11 A few small updates again, the sgtl5000 one fixes some newly triggered issues due to some probe ordering changes which were introduced in the last merge window.
2013-07-24ALSA: hiface: return correct XRUN indicationEldad Zack
Return SNDRV_PCM_POS_XRUN (snd_pcm_uframes_t) instead of SNDRV_PCM_STATE_XRUN (snd_pcm_state_t) from the pointer function of hiface, as expected by snd_pcm_update_hw_ptr0(). Caught by sparse. Cc: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-23Merge remote-tracking branch 'asoc/fix/tegra' into asoc-linusMark Brown