Commit graph

21351 commits

Author SHA1 Message Date
Takashi Iwai
e79d74ab25 ALSA: control: Fix breakage of user ctl element addition
In the commit [2225e79b9b: 'ALSA: core: reduce stack usage related
to snd_ctl_new()'], the id field of the newly added kctl is untouched,
thus all attribute like name string remain empty.  The fix is just to
add the forgotten memcpy of the id field.

Fixes: 2225e79b9b ('ALSA: core: reduce stack usage related to snd_ctl_new()')
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-13 07:21:51 +01:00
Takashi Iwai
e6826ef145 Merge branch 'for-linus' into for-next 2015-03-12 07:38:46 +01:00
Takashi Iwai
be3bb8236d ALSA: control: Add sanity checks for user ctl id name string
There was no check about the id string of user control elements, so we
accepted even a control element with an empty string, which is
obviously bogus.  This patch adds more sanity checks of id strings.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-12 07:36:38 +01:00
Takashi Iwai
ddb6ca75b5 ALSA: hda - Fix built-in mic on Compaq Presario CQ60
Compaq Presario CQ60 laptop with CX20561 gives a wrong pin for the
built-in mic NID 0x17 instead of NID 0x1d, and it results in the
non-working mic.  This patch just remaps the pin correctly via fixup.

Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=920604
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-11 16:05:19 +01:00
Takashi Iwai
4945f1fdc1 ALSA: seq: Fix init order of snd_seq_device stuff
When the sequencer driver is built in kernel, it may panic at boot
because of the uninitialized snd_seq_bus_type.  Initialize it properly
via subsys_initcall() instead of module_init() to assure that the bus
is registered beforehand.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Fixes: 7c37ae5c62 ('ALSA: seq: Rewrite sequencer device binding with standard bus')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-11 12:53:52 +01:00
Takashi Iwai
ec0e9937aa ALSA: core: Drop superfluous error/debug messages after malloc failures
The kernel memory allocators already report the errors when the
requested allocation fails, thus we don't need to warn it again in
each caller side.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-10 15:42:14 +01:00
Takashi Iwai
24db8bbaa3 ALSA: seq: Drop superfluous error/debug messages after malloc failures
The kernel memory allocators already report the errors when the
requested allocation fails, thus we don't need to warn it again in
each caller side.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-10 15:41:18 +01:00
Takashi Iwai
8d98a0673f ALSA: seq_oss: Drop superfluous error/debug messages after malloc failures
The kernel memory allocators already report the errors when the
requested allocation fails, thus we don't need to warn it again in
each caller side.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-10 15:39:55 +01:00
Takashi Sakamoto
2225e79b9b ALSA: core: reduce stack usage related to snd_ctl_new()
The callers of snd_ctl_new() need to have 'struct snd_kcontrol' data,
and pass the data as template. Then, the function allocates the structure
data again and copy from the template. This is a waste of resources.
Especially, the callers use large stack for the template.

This commit removes a need of template for the function, thus, changes
the prototype of snd_ctl_new(). Furthermore, this commit changes
the code of callers, snd_ctl_new1() and snd_ctl_elem_add() for better
shape.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-10 15:29:59 +01:00
Takashi Sakamoto
4ed56666b7 ALSA: core: use precomputed table to check userspace control params
The parameters can be decided in compile time.

This commit adds precomputed table to reduce calculating time.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-10 15:27:57 +01:00
Takashi Sakamoto
59294a01d7 ALSA: firewire-lib: leave unit reference counting completely
With previous commit, this module managed to leave the counting to each
drivers, but the isochronous resources functionality still increment/decrement
the count.

This commit purge such codes to leave the responsibility to each drivers.

Fix: c6f224dc20 ('ALSA: firewire-lib: remove reference counting')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-10 15:27:19 +01:00
Takashi Sakamoto
5b1274efe2 Revert "ALSA: dice: fix wrong offsets for Dice interface"
This reverts commit 8cdebf7109.

The reverted commit breaks out-stream functionality of Dice driver.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-10 15:26:25 +01:00
Yannick Guerrini
ce99198131 ALSA: firewire: Fix trivial typos in comments
Change 'propper' to 'proper'
Change 'paramters' to 'parameters'
Change 'SYT_INTEVAL' to 'SYT_INTERVAL'
Change 'aligh'/'alighed' to 'align'/'aligned'

Signed-off-by: Yannick Guerrini <yguerrini@tomshardware.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-10 12:40:30 +01:00
Takashi Iwai
4aa01c408b Merge branch 'for-linus' into for-next
Merging the HD-audio fixes back to base devel branch for further
working on it.
2015-03-09 08:42:00 +01:00
Takashi Iwai
a1f3f1ca66 ALSA: hda - Fix regression of HD-audio controller fallback modes
The commit [63e51fd708: ALSA: hda - Don't take unresponsive D3
transition too serious] introduced a conditional fallback behavior to
the HD-audio controller depending on the flag set.  However, it
introduced a silly bug, too, that the flag was evaluated in a reverse
way.  This resulted in a regression of HD-audio controller driver
where it can't go to the fallback mode at communication errors.

Unfortunately (or fortunately?) this didn't come up until recently
because the affected code path is an error handling that happens only
on an unstable hardware chip.  Most of recent chips work stably, thus
they didn't hit this problem.  Now, we've got a regression report with
a VIA chip, and this seems indeed requiring the fallback to the
polling mode, and finally the bug was revealed.

The fix is a oneliner to remove the wrong logical NOT in the check.
(Lesson learned - be careful about double negation.)

The bug should be backported to stable, but the patch won't be
applicable to 3.13 or earlier because of the code splits.  The stable
fix patches for earlier kernels will be posted later manually.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94021
Fixes: 63e51fd708 ('ALSA: hda - Don't take unresponsive D3 transition too serious')
Cc: <stable@vger.kernel.org> # v3.14+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-09 08:41:13 +01:00
Fabio Estevam
5371fc0ecd ALSA: ac97: ac97_patch: Simplify patch_vt1613_specific()
We can simplify the code by returning patch_build_controls() directly.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-06 17:47:27 +01:00
Maciej S. Szmigiero
d6482288aa ALSA: ac97: Add VT1613 AC97 codec support
Patch to add an VT1613 AC97 codec support.

This codec has additional DC offset removal control,
headphone output and no video input.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-06 17:01:30 +01:00
Takashi Iwai
a52afea68f ASoC: Changes for v4.1
A selection of changes for v4.1 so far.  The main things are:
 
  - Move of jack registration to the card where it belongs.
  - Support for DAPM routes specified by both the machine driver and DT.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJU960DAAoJECTWi3JdVIfQkKIH/RDvxRn8dvKOPF5U9Uix3chH
 JWKkzqfsMP0EpmQTzCQPp0ShAyYcWSbYsopicynPxUem5vS4Z8+UmOgEEgkj59pK
 USbF6v1jCQXA6BcbKyUcRRBD9FtRkfVDc7mYbRs2CcwQz2CGCgee41cvPM+2BT+z
 QdNC9UJARSweGvE1IUJSfpfYOly+BJ2s0/28RaQ0PGt+I0auoYx7IMFgMSDjv2p6
 PY0kyQiwm3Kyj2uNXPZ5gEuPxlw/t8n4fbQNrBYAvxzN+EF5NrGdKE3N7MI1xRV/
 EkFhzy+uM3X9c37tb2lT2fgPFlBc9rgPuLPSyoQ6nxa5ghCqAlgRhzpxRem8hhU=
 =VlCw
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Changes for v4.1

A selection of changes for v4.1 so far.  The main things are:

 - Move of jack registration to the card where it belongs.
 - Support for DAPM routes specified by both the machine driver and DT.
2015-03-06 14:25:27 +01:00
Takashi Iwai
4fda87df09 ASoC: Fixes for v4.0
A few driver specific fixes here, none of them earth shattering in
 themselves, that have accumliated since the opening of the merge window.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJU96stAAoJECTWi3JdVIfQLfUH/jBYQqxrPp8qm7Lt9LOuwC4U
 SOi0ERIVhLSKZMo7G4wHmbEapx2FBgH+wxqh9kNLaISvOIH4odFS4Fr1XYE70cY9
 97M46uzLqdaKCDgvkXdx1NLA0zubEGWLOtdVYlrMAzin0FXNH+KYhxkRQbJ6f0LE
 yKmNemnHHtJ4gDl/kMED7bc+mkYSOpwUE/8HLOEA8bcE3luDnj7rvQwOhPIYq0Tz
 Ij4GM8HSfWPp/k3YmZVcF8GA6icN3LG5Jg7DOu6S19fMYimTDaHQDCw0AoLfiIOQ
 DykyHg7ay/I3B6zUz4JikLIW5KjFxZfeQ818YE0GQ4PgePfb0GSIFt0LnNmq4Oo=
 =GIb7
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v4.0

A few driver specific fixes here, none of them earth shattering in
themselves, that have accumliated since the opening of the merge window.
2015-03-06 14:24:21 +01:00
Hui Wang
70658b9949 ALSA: hda - One more Dell macine needs DELL1_MIC_NO_PRESENCE quirk
Cc: <stable@vger.kernel.org>
BugLink: https://bugs.launchpad.net/bugs/1428947
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-06 13:04:58 +01:00
Dan Carpenter
d124380674 ALSA: opl3: small array underflow
There is a missing lower bound check on "pitchbend" so it means we can
read up to 6 elements before the start of the opl3_note_table[] array.

Thanks to Clemens Ladisch for his help with this patch.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-06 13:04:42 +01:00
Takashi Iwai
f44f07cf39 ALSA: line6: Clamp values correctly
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>
2015-03-05 13:03:28 +01:00
Dan Carpenter
096a020a9e ALSA: msnd: add some missing curly braces
There were some curly braces intended here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-05 13:02:10 +01:00
Mark Brown
d7e3281b52 Merge remote-tracking branch 'asoc/topic/wm8804' into asoc-next 2015-03-05 01:07:27 +00:00
Mark Brown
3a9486367b Merge remote-tracking branches 'asoc/topic/rt5670', 'asoc/topic/rt5677', 'asoc/topic/simple', 'asoc/topic/tegra' and 'asoc/topic/wm-adsp' into asoc-next 2015-03-05 01:07:25 +00:00
Mark Brown
256fca9247 Merge remote-tracking branches 'asoc/topic/jack', 'asoc/topic/max98357a', 'asoc/topic/omap' and 'asoc/topic/rt286' into asoc-next 2015-03-05 01:07:23 +00:00
Mark Brown
4a7e041570 Merge remote-tracking branches 'asoc/topic/atmel', 'asoc/topic/davinci', 'asoc/topic/gpiod' and 'asoc/topic/intel' into asoc-next 2015-03-05 01:07:21 +00:00
Mark Brown
6a93dd249b Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-next 2015-03-05 01:07:20 +00:00
Mark Brown
0af1327ba0 Merge remote-tracking branch 'asoc/topic/dapm-dt' into asoc-next 2015-03-05 01:07:20 +00:00
Charles Keepax
6f2c934809 ASoC: wm8804: Merge CODEC probe and bus probe
All of the things in the CODEC probe, such as getting the regulators and
verifying the chip ID, are better done in bus probe. It is better to
fail during bus probe if this is the wrong chip and all resource
allocation should be done in the bus probe anyway. This patch merges
the CODEC probe into bus probe.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-05 01:05:54 +00:00
Charles Keepax
bbed297d37 ASoC: wm8804: Split out bus drivers
Simplify dependencies by using new style split out bus interfaces.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-05 01:05:54 +00:00
Mark Brown
3b8f4a70b8 Merge remote-tracking branch 'asoc/fix/sta32x' into asoc-linus 2015-03-04 20:42:43 +00:00
Mark Brown
2824ef9b81 Merge remote-tracking branch 'asoc/fix/simple' into asoc-linus 2015-03-04 20:42:43 +00:00
Mark Brown
95d67c7fc2 Merge remote-tracking branch 'asoc/fix/samsung' into asoc-linus 2015-03-04 20:42:43 +00:00
Mark Brown
c6eb1fa4a7 Merge remote-tracking branch 'asoc/fix/rt5677' into asoc-linus 2015-03-04 20:42:42 +00:00
Mark Brown
159c6fc0bb Merge remote-tracking branch 'asoc/fix/rt5670' into asoc-linus 2015-03-04 20:42:42 +00:00
Mark Brown
e0427428db Merge remote-tracking branch 'asoc/fix/rsnd' into asoc-linus 2015-03-04 20:42:41 +00:00
Mark Brown
a9ca2a3cf4 Merge remote-tracking branch 'asoc/fix/omap' into asoc-linus 2015-03-04 20:42:40 +00:00
Mark Brown
465de977ee Merge remote-tracking branch 'asoc/fix/max98357a' into asoc-linus 2015-03-04 20:42:40 +00:00
Mark Brown
09269e4eef Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2015-03-04 20:42:39 +00:00
Mark Brown
9d22fd3ca7 Merge remote-tracking branch 'asoc/fix/fsl-ssi' into asoc-linus 2015-03-04 20:42:38 +00:00
Mark Brown
ed87e2974e Merge remote-tracking branch 'asoc/fix/cirrus' into asoc-linus 2015-03-04 20:42:37 +00:00
Mark Brown
64a071331a Merge remote-tracking branch 'asoc/fix/atmel-build' into asoc-linus 2015-03-04 20:42:37 +00:00
Bard Liao
2bf9eba143 ASoC: rt5670: Fix the speaker mono output issue
We need to set left/right control for the speaker amp to get stereo
output on speaker.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:29:46 +00:00
Jyri Sarha
6742e15cf9 ASoC: omap-pcm: Allow only formats with 1, 2, and 4 byte physical size
sDMA support only transfer elements with 1, 2, and 4 byte physical
size. Initialize the pcm driver accordingly.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:28:51 +00:00
Peter Ujfalusi
4da4608c91 ASoC: davinci: Remove unused davinci-pcm platform driver
All DAI drivers has been converted to use edma-pcm instead of davinci-pcm
and the driver can be removed from the tree.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:26:28 +00:00
Peter Ujfalusi
9759e7ef53 ASoC: davinci-mcasp: Deprecate the use of davinci-pcm in favor of edma-pcm
The edma-pcm performs as good as the old davinci-pcm and it's use does not
require the 'ping-pong' mode of davinci-pcm, which was introduced to
overcome under/over flow issues when using davinci-pcm.

Keep the SND_DAVINCI_SOC config option to select the SND_EDMA_SOC to avoid
regression in audio support.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:26:28 +00:00
Peter Ujfalusi
62731d33c4 ASoC: davinci-vcif: Convert to use edma-pcm
The edma-pcm can replace the old davinci-pcm as platform driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:26:28 +00:00
Peter Ujfalusi
257ade78b6 ASoC: davinci-i2s: Convert to use edma-pcm
The edma-pcm can replace the old davinci-pcm as platform driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:26:28 +00:00
Peter Ujfalusi
4c03a5ebc7 ASoC: davinci: Select SND_EDMA_SOC when SND_DAVINCI_SOC is enabled
edma-pcm going to replace davinci-pcm as platform driver for daVinci
platform.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:26:28 +00:00