Commit Graph

15853 Commits

Author SHA1 Message Date
Takashi Iwai 1801928e0f ALSA: hda - Add a fixup for Gateway LT27
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-16 08:17:05 +02:00
Takashi Iwai f85a6597a6 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJSDLDiAAoJELSic+t+oim9K0UP/3JXJsprPlUQ7r4OxoX/eYcq
 AMH3n84uTY1JqP2crTc8FwVtHyqxyj3nnhyPDZYtk9bfuAVpVohdSTuD8Ai+Cv8g
 R46cGqvYXnURl0K8lKlq9zaDXNca0ijbmj0ljQg+gON/Cl8HLDPZ94GgwbzyrBU4
 boGgam7WRJVhAl4Mt6S5wq6HoG6G+StJtjL7/P9LkQGx8USl8/TUZwJw43NnEmNP
 qJRwjY5Zk0jJHRzKFzqTtEmNcy6/zugjK5K6sFLqEwUxmoW4CeSD6eQ21GduQ2Gt
 w1dImWgBO3h0+BLGxy2ukTuTppyfUscliM6ohnZNdWoK5dlt55FXraS9ljQSgsEZ
 xQoXe3yMx1oq/kJriuKmDLD5LtLnidsuhsSEeSjNoq4c6Jt9hEkncYWMEIm2LTpT
 t+UxwqDtw4ZCVAHSX18hPsGq+QG2skxEca/JZ6T31CpmAf1lNA2ddH82XkQB9atK
 REz8+Nt+agBDEuitSmdz5mRuoDmngUm8SSrv5HImtvdVWMr52BKUtzUkjPvoHy/4
 1geIRond5ZLmOxZeo4LTEKC1FIQ9LVKmAoOyJehSAHWno8nQ6jG0gxX73eWCaAg1
 ImxyM2NB4hEm/nQ6r9rddhsrU8YTOrXRcQDw0YhwWMRlIu4KBPSaDgTOZCavPkHO
 iI+8rNQrgOQj/hwcW8IV
 =WWSS
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.11-rc5' of 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-15 20:43:46 +02:00
Mark Brown 44ffb69ec6 Merge remote-tracking branch 'asoc/fix/tegra' into asoc-linus 2013-08-15 11:37:54 +01:00
Mark Brown f6938bb360 Merge remote-tracking branch 'asoc/fix/sgtl5000' into asoc-linus 2013-08-15 11:37:53 +01:00
Mark Brown 14388a6934 Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2013-08-15 11:37:53 +01:00
Mark Brown c200d88816 Merge remote-tracking branch 'asoc/fix/cs42l52' into asoc-linus 2013-08-15 11:37:52 +01:00
Stephen Warren c90c0d7a96 ASoC: tegra: fix Tegra30 I2S capture parameter setup
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-15 11:07:53 +01:00
Maksim A. Boyko 140d37de62 ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam C525
Add the volume control quirk for avoiding the kernel warning
for the Logitech HD Webcam C525
as in the similar commit 36691e1be6
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-12 14:55:20 +02:00
Takashi Iwai f69910ddbd ALSA: hda - Fix missing mute controls for CX5051
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-12 11:42:39 +02:00
Clemens Ladisch aa773bfe8f ALSA: usb-audio: fix automatic Roland/Yamaha MIDI detection
Commit aafe77cc45 (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-12 11:42:28 +02:00
Torsten Schenk 4c2aee0032 ALSA: 6fire: make buffers DMA-able (midi)
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-12 11:42:28 +02:00
Torsten Schenk 5ece263f1d ALSA: 6fire: make buffers DMA-able (pcm)
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-12 11:42:28 +02:00
Takashi Iwai db8a38e506 ALSA: hda - Add pinfix for LG LW25 laptop
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-12 11:04:17 +02:00
Clemens Ladisch 57e6dae108 ALSA: usb-audio: do not trust too-big wMaxPacketSize values
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-08 11:37:34 +02:00
Jussi Kivilinna ddb6b5a964 ALSA: 6fire: fix DMA issues with URB transfer_buffer usage
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-07 16:04:27 +02:00
Brian Austin 8806d96db7 ASoC: cs42l52: Add new TLV for Beep Volume
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-06 19:38:57 +01:00
Brian Austin e2c98a8bba ASoC: cs42l52: Reorder Min/Max and update to SX_TLV for Beep Volume
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-06 19:38:19 +01:00
Takashi Iwai 697aebab78 ALSA: hda - Fix missing fixup for Mac Mini with STAC9221
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-02 08:16:52 +02:00
Lars-Peter Clausen fe58139114 ASoC: dapm: Fix empty list check in dapm_new_mux()
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-01 19:25:16 +01:00
Lothar Waßmann 65f2b22676 ASoC: sgtl5000: fix buggy 'Capture Attenuate Switch' control
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-01 14:48:20 +01:00
Lothar Waßmann f091f3f073 ASoC: sgtl5000: prevent playback to be muted when terminating concurrent capture
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-01 14:48:17 +01:00
Takashi Iwai 209fb1b7e2 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJR+iU1AAoJELSic+t+oim9vJcP/Ro/AhPccuGwTa7tyMFSGAYO
 3xQh4REis7TGgCWu018G+zA4bS5Inrqo7B0M61PFxCJoZ3R4QvIgKXHasQ9SNXmW
 +nUYqs05rgzl4U2uyEUNLoVelFa1ZbQLKQxuOUQt0+u9rvtBZczNd85KeNtn3IVp
 38LTc2scrxo2HmU7UE418euPuFYiz7PMWKSMGd/r5Ht2h6Tij8eQ/Vkm8IgKJ7n6
 kfMZCdMgTx0k/JC3Akz2colIIc0I8ioV2FWkZ1XAMaktFR0u585EbqBC2QJhiXRF
 RJREXCxp8SGI4H961m53GICk39xfWLC7d1/sprzWDWZ6XTM5T9rp8x3iJNw74AcG
 2ERMrDjlJKNVpedhnY7KgtegC+qT/9XcLa1qKpAR9Ym61HUvRvUVD9OsEJ4l5ISn
 m+EZFt1Z9BhXU/HlhLN9Nr6mw0A6OnpvyUwR8cR83gz9OHFCmg8MOxVP26sNQSuX
 1Ll7XRikSxC5n4AxG3APE8MLB7bcvUoL7benD4zekXG+pJhoefg5hmL7qvMCv+fy
 bkeFafc3QUSsaiuf2tQjfHF99wvJC/BWt4cx1hdRjLNMxqoJre5hpJE9/l4JLs7X
 Z6j6RTOD7/cXPZNMh67zK2w/V2NzcvK9I4U20HA9+IjfiYYugCc2XzCLaYrp1bwo
 6P8Y8EXhUC3thSti/WUZ
 =WtLE
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.11-rc3' of 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-08-01 11:12:10 +02:00
Mark Brown 3fef7f795f Merge remote-tracking branch 'asoc/fix/wm0010' into asoc-linus 2013-07-31 21:07:23 +01:00
Mark Brown 08d0a9757d Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2013-07-31 21:07:23 +01:00
Mark Brown 0d054318d5 Merge remote-tracking branch 'asoc/fix/blackfin' into asoc-linus 2013-07-31 21:07:22 +01:00
Dimitris Papastamos 4f8b19143d ASoC: wm0010: Fix resource leak
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-31 14:50:34 +01:00
Ralf Baechle d2ee88d0aa ASoC: au1x: Fix build
d8b51c11ff [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-31 10:06:04 +01:00
Lars-Peter Clausen 610d80eaa9 ASoC: bf5xx-ac97: Fix compile error with SND_BF5XX_HAVE_COLD_RESET
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-30 12:51:02 +01:00
Mark Brown 1deb57042f ASoC: bfin-ac97: Fix prototype error following AC'97 refactoring
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-29 17:57:00 +01:00
Vinod Koul a8d30608ea ALSA: compress: fix the return value for SNDRV_COMPRESS_VERSION
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-29 13:58:08 +02:00
Lars-Peter Clausen 56a6783442 ASoC: dapm: Fix return value of snd_soc_dapm_put_{volsw,enum_virt}()
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-24 14:55:04 +01:00
Takashi Iwai 43cbd286fb 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJR75+6AAoJELSic+t+oim9VnEP/10lLM7UeYCx60q4M7A3yHGP
 pLm3j+0eHOn97rOY+A2ZEBx7lesL4gXou60WxcEykv5naSAxX24z7t0m49dGmL+t
 jO+cSUb66qEjxH5SYx1A6c72dgd2EPTGi1J1ydi+O8u+29ijhu/HSrsCkYhOMo3L
 i7NPQd2J+0752hJyQmq+sBCiWzvNtXI8zncU0B8yQho+L5Qp6CcbMX7Rl9qHupz/
 UKqH0m0OBSuQN+5A2273JBM9H2549MMtg9p0HItINwAGjjaDqbmVn8IVapmzUQky
 /tG9y/PKVFjhnqn19jt0kBAAy1ieT2aCurfwK5UssAOe9vfJGoQTmJRH8c5TdVeq
 dJtzU5Kcg+dsyUHQOL2UUH69gK3o1Q1px8E/XqGYKF2GGNU5w6gJhv6KsSYwFCmO
 LkqP07tLa+yXKTc0v4Q9k1IY9xpZal7/3dG3FQVSH7P6oTKIy1fYvBO8XAqdJNfG
 tcw/N5mMbgL6GOB5zIRlCwt+Dj8lqR2B94w2rUqNxUF2jRGNNmbsgm+Pg5uQANrG
 lE3lNpgaNAY3gqbSlj2NUrqLA8YIEL+1SjxzfrxZ9a5qVN9M01NOi3z5aETPsQSV
 1PSHnJVYpzZQsZN3zbNF2FBw125wDmzrEkv5DKnFQ0R9mw0Dc8NoxpFoCuRHNGpn
 APGIbVqu5anjWAPifAsP
 =9lns
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.11-rc2' of 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-24 11:42:34 +02:00
Eldad Zack fee4b700a4 ALSA: hiface: return correct XRUN indication
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-24 10:51:37 +02:00
Mark Brown c5ae4dca11 Merge remote-tracking branch 'asoc/fix/tegra' into asoc-linus 2013-07-23 19:17:11 +01:00
Mark Brown eed097bd08 Merge remote-tracking branch 'asoc/fix/sgtl5000' into asoc-linus 2013-07-23 19:17:10 +01:00
Mark Brown a67061e2a9 Merge remote-tracking branch 'asoc/fix/max98088' into asoc-linus 2013-07-23 19:17:09 +01:00
Mark Brown 639f817fe8 Merge remote-tracking branch 'asoc/fix/ep93xx' into asoc-linus 2013-07-23 19:17:08 +01:00
Richard Zhao 647ab784c5 ASoC: tegra: correct playback_dma_data setup
The errors were caused by copy/paste mistake in below commit
since v3.10:
3489d50 ASoC: tegra: Use common DAI DMA data struct

It also corrects slave_id initialization in tegra20_ac97 driver.

Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: <stable@vger.kernel.org> # 3.10
2013-07-22 14:25:02 +01:00
Dan Carpenter b5c745fb75 ASoC: core: double free in snd_soc_add_platform()
There are three callers for this function, and none of them want it to
free platform for them.  It leads to a double free.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-22 11:00:05 +01:00
Eldad Zack be2f93a4c4 ALSA: usb-audio: 6fire: return correct XRUN indication
Return SNDRV_PCM_POS_XRUN (snd_pcm_uframes_t) instead of
SNDRV_PCM_STATE_XRUN (snd_pcm_state_t) from the pointer
function of 6fire, as expected by snd_pcm_update_hw_ptr0().

Caught by sparse.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-21 11:55:22 +02:00
H Hartley Sweeten 83e2e4eeb8 ASoC: ep93xx: fix build of ep93xx-ac97.c
Fix the build of this driver. It was broken by:

Commit 453807f300
ASoC: ep93xx: Use ep93xx_dma_params instead of ep93xx_pcm_dma_params

The removed struct ep93xx_pcm_dma_params use the member 'dma_port' to
select the dma channel. The struct ep93xx_dma_data uses the member
'port'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-19 19:53:45 +01:00
Takashi Iwai f3e351eef3 ALSA: hda - Remove NO_PRESENCE bit override for Dell 1420n Laptop
The quirk for Dell laptops with STAC9228 overrides the pin default
config of NID 0x0f to the value with AC_DEFCFG_MISC_NO_PRESENCE bit
on.  I'm not quite sure why this was done so, but can guess that this
was introduced for avoiding this to be muted by another headphone
plug.  Now, after transition to the generic parser, this workaround
rather causes a problem (notably as unexpected speaker mutes) because
the pin is seen as if it's always plugged in.

Since the generic parser can handle multiple headphone plugging
gracefully, we can get rid of this override now.

Reported-and-tested-by: Eric Shattow <lucent@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-19 08:11:41 +02:00
Takashi Iwai 1ea9a69d1a ALSA: hda - Fix EAPD GPIO control for Sigmatel codecs
The EAPD GPIO is dynamically turned on/off for some machines with
Sigmatel codecs, but this didn't work as expected, and it resulted in
spontaneous lost of speaker outputs per HP plugging or power-saving.

This patch fixes the bug by simply including spec->eapd_mask into
spec->gpio_mask and spec->gpio_data bits.

Reported-and-tested-by: Eric Shattow <lucent@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-19 07:58:02 +02:00
Takashi Iwai 256ca9c3ad ALSA: seq-oss: Initialize MIDI clients asynchronously
We've got bug reports that the module loading stuck on Debian system
with 3.10 kernel.  The debugging session revealed that the initial
registration of OSS sequencer clients stuck at module loading time,
which involves again with request_module() at the init phase.  This is
triggered only by special --install stuff Debian is using, but it's
still not good to have such loops.

As a workaround, call the registration part asynchronously.  This is a
better approach irrespective of the hang fix, in anyway.

Reported-and-tested-by: Philipp Matthias Hahn <pmhahn@pmhahn.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-17 09:19:24 +02:00
Shawn Guo 46a5905e1c ASoC: sgtl5000: defer the probe if clock is not found
It's not always the case that clock is already available when sgtl5000
get probed at the first time, e.g. the clock is provided by CPU DAI
which may be probed after sgtl5000.  So let's defer the probe when
devm_clk_get() call fails and give it chance to try later.

It fixes the regression on imx28 since commit 9e13f34 (ASoC: sgtl5000:
Let the codec acquire its clock).

[    1.927637] sgtl5000 0-000a: Failed to get mclock: -2
[    1.934280] sgtl5000: probe of 0-000a failed with error -2
[    1.945906] mxs-sgtl5000 sound.13: ASoC: CODEC (null) not registered
[    1.953787] mxs-sgtl5000 sound.13: snd_soc_register_card failed (-517)
[    1.960865] platform sound.13: Driver mxs-sgtl5000 requests probe deferral

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-16 18:52:03 +01:00
Aaron Plattner d52392b1a8 ALSA: hda - Add new GPU codec ID to snd-hda
Vendor ID 0x10de0060 is used by a yet-to-be-named GPU chip.

Reviewed-by: Andy Ritger <aritger@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-16 08:14:49 +02:00
Takashi Iwai 61be2b9a18 ASoC: s6000: Fix unlocked snd_pcm_stop() call
snd_pcm_stop() must be called in the PCM substream lock context.

Cc: <stable@vger.kernel.org>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-15 21:25:14 +02:00
Takashi Iwai 571185717f ASoC: atmel: Fix unlocked snd_pcm_stop() call
snd_pcm_stop() must be called in the PCM substream lock context.

Cc: <stable@vger.kernel.org>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-15 21:25:13 +02:00
Takashi Iwai 46f6c1aaf7 ALSA: pxa2xx: Fix unlocked snd_pcm_stop() call
snd_pcm_stop() must be called in the PCM substream lock context.

Cc: <stable@vger.kernel.org>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-15 21:25:13 +02:00
Takashi Iwai 5be1efb4c2 ALSA: usx2y: Fix unlocked snd_pcm_stop() call
snd_pcm_stop() must be called in the PCM substream lock context.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-15 21:25:13 +02:00