Commit graph

17034 commits

Author SHA1 Message Date
Mark Brown 6a2972b363 Merge remote-tracking branch 'asoc/topic/si476x' into asoc-next 2013-11-08 10:43:35 +00:00
Mark Brown 87373ad1f3 Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next 2013-11-08 10:43:35 +00:00
Mark Brown 457eb9016b Merge remote-tracking branch 'asoc/topic/rt5640' into asoc-next 2013-11-08 10:43:34 +00:00
Mark Brown 9686e4b2a8 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next 2013-11-08 10:43:34 +00:00
Mark Brown 469cb9286e Merge remote-tracking branch 'asoc/topic/pxa' into asoc-next 2013-11-08 10:43:33 +00:00
Mark Brown df8aabe442 Merge remote-tracking branch 'asoc/topic/pcm1792a' into asoc-next 2013-11-08 10:43:33 +00:00
Mark Brown 97df0a0538 Merge remote-tracking branch 'asoc/topic/pcm1681' into asoc-next 2013-11-08 10:43:32 +00:00
Mark Brown 5ac452772f Merge remote-tracking branch 'asoc/topic/mxs' into asoc-next 2013-11-08 10:43:32 +00:00
Mark Brown 672922e975 Merge remote-tracking branch 'asoc/topic/ml26124' into asoc-next 2013-11-08 10:43:31 +00:00
Mark Brown efdf09add9 Merge remote-tracking branch 'asoc/topic/mc13783' into asoc-next 2013-11-08 10:43:31 +00:00
Mark Brown c462b1d8bb Merge remote-tracking branch 'asoc/topic/max9850' into asoc-next 2013-11-08 10:43:31 +00:00
Mark Brown b8a77af201 Merge remote-tracking branch 'asoc/topic/max98095' into asoc-next 2013-11-08 10:43:30 +00:00
Mark Brown 5f343663a2 Merge remote-tracking branch 'asoc/topic/max98088' into asoc-next 2013-11-08 10:43:30 +00:00
Mark Brown ca2b2252fc Merge remote-tracking branch 'asoc/topic/kirkwood' into asoc-next 2013-11-08 10:43:29 +00:00
Mark Brown ec7118e391 Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next 2013-11-08 10:43:29 +00:00
Mark Brown 3352b80075 Merge remote-tracking branch 'asoc/topic/ep93xx' into asoc-next 2013-11-08 10:43:28 +00:00
Mark Brown 99a0ea2d5b Merge remote-tracking branch 'asoc/topic/devm' into asoc-next 2013-11-08 10:43:27 +00:00
Mark Brown ac97d4e00a Merge remote-tracking branch 'asoc/topic/davinci' into asoc-next 2013-11-08 10:43:27 +00:00
Mark Brown 1d697db0ab Merge remote-tracking branch 'asoc/topic/cs42l73' into asoc-next 2013-11-08 10:43:26 +00:00
Mark Brown 2029ef2500 Merge remote-tracking branch 'asoc/topic/cs42l52' into asoc-next 2013-11-08 10:43:26 +00:00
Mark Brown 491f06b160 Merge remote-tracking branch 'asoc/topic/cs4271' into asoc-next 2013-11-08 10:43:25 +00:00
Mark Brown 477ce17dec Merge remote-tracking branch 'asoc/topic/cq93vc' into asoc-next 2013-11-08 10:43:25 +00:00
Mark Brown c6016bdeab Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2013-11-08 10:43:25 +00:00
Mark Brown d20b09f0c5 Merge remote-tracking branch 'asoc/topic/component' into asoc-next 2013-11-08 10:43:24 +00:00
Mark Brown 2fc175c4a3 Merge remote-tracking branch 'asoc/topic/bclk' into asoc-next 2013-11-08 10:43:24 +00:00
Mark Brown aff79f8282 Merge remote-tracking branch 'asoc/topic/atmel' into asoc-next 2013-11-08 10:43:23 +00:00
Mark Brown 642cba7528 Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next 2013-11-08 10:43:23 +00:00
Mark Brown 74858f23ca Merge remote-tracking branch 'asoc/topic/ak4642' into asoc-next 2013-11-08 10:43:22 +00:00
Mark Brown 5176dfcd47 Merge remote-tracking branch 'asoc/topic/ak4104' into asoc-next 2013-11-08 10:43:22 +00:00
Mark Brown 47973c6eb8 Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next 2013-11-08 10:43:21 +00:00
Mark Brown c241b6c786 Merge remote-tracking branch 'asoc/topic/adav80x' into asoc-next 2013-11-08 10:43:21 +00:00
Mark Brown 8c691c1ba6 Merge remote-tracking branch 'asoc/topic/adau1373' into asoc-next 2013-11-08 10:43:20 +00:00
Mark Brown 57ada4c5d6 Merge remote-tracking branch 'asoc/topic/ab8500' into asoc-next 2013-11-08 10:43:20 +00:00
Mark Brown 3d0be4a5c7 Merge remote-tracking branch 'asoc/topic/88pm860x' into asoc-next 2013-11-08 10:43:20 +00:00
Mark Brown 3fec948ed8 Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus 2013-11-08 10:43:19 +00:00
Mark Brown 5196e6ffc2 Merge remote-tracking branch 'asoc/fix/dma' into asoc-linus 2013-11-08 10:43:18 +00:00
Mark Brown 5365990776 Merge remote-tracking branch 'asoc/fix/ak4642' into asoc-linus 2013-11-08 10:43:18 +00:00
Dan Carpenter ea8e5e5918 ASoC: fsl: imx-wm8962: remove an unneeded check
"data->codec_clk" can't be an ERR_PTR here so I have removed the
superflous check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-08 10:22:07 +00:00
Fabio Estevam 10227a9487 ASoC: fsl: imx-pcm-fiq: Remove unused 'runtime' variable
Commit 68f9672b (ASoC: fsl: imx-pcm-fiq: remove bogus period delta calculation)
introduced the following build warning:

sound/soc/fsl/imx-pcm-fiq.c:53:26: warning: unused variable 'runtime' [-Wunused-variable]

Remove the unused 'runtime' variable.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Oskar Schirmer <oskar@scara.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-08 10:21:05 +00:00
Kailang Yang 380702192f ALSA: hda/realtek - Make fixup regs persist after resume
Upon suspend / resume, the fixup register settings are lost because
sending HDA_FIXUP_ACT_PRE_PROBE is not part of the resume path. Instead,
write our registers in response to the HDA_FIXUP_ACT_INIT, which happens
after initial probe and upon resume.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-08 07:43:45 +01:00
Joe Perches 3b70a67da0 ALSA: hda_intel: ratelimit "spurious response" message
dmesg here has a 100+ consecutive lines of:

[ 1464.219446] hda-intel 0000:00:14.2: spurious response 0x0:0x0, last cmd=0x170500
[ 1464.219451] hda-intel 0000:00:14.2: spurious response 0x0:0x0, last cmd=0x170500
[ 1464.219454] hda-intel 0000:00:14.2: spurious response 0x0:0x0, last cmd=0x170500
...

Ratelimit the message to reduce the dmesg log noise.

Coalesce the format while at it.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07 21:22:23 +01:00
Nicolin Chen ca2b029515 ASoC: generic-dmaengine-pcm: Use SNDRV_DMA_TYPE_DEV_IRAM as default
When allocating memory space for DMA buffer, use on-chip internal SRAM
as default choice to save power. Since the core would allocate memory
from traditional external memory if iram allocation failed, we don't
need to worry about any side effect.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07 21:19:54 +01:00
Takashi Iwai bf4edea863 ASoC: dapm: Use WARN_ON() instead of BUG_ON()
Leaving BUG_ON() in a core layer like dapm is rather inappropriate as
it leads to panic(), even though sanity checks might be still useful
for debugging.
Instead, Use WARN_ON(), and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:59:53 +00:00
Takashi Iwai 6c452bdac7 ASoC: wm_adsp: Fix BUG_ON() and WARN_ON() usages
This patch does:
- Move the sanity check with WARN_ON() in wm_adsp_region_to_reg() and
  remove the checks in the callers,
- Fix wrong WARN_ON() usages, replaced with WARN(),
- Fix unreachable or wrong BUG_ON() usages and replace with WARN_ON().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:21 +00:00
Takashi Iwai a6ed0608bd ASoC: Replace BUG() with WARN()
BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation.  For that
purpose, it'd be more convenient to use WARN() instead with more
error information.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:21 +00:00
Takashi Iwai 9a743400a0 ASoC: wm_hubs: Replace BUG() with WARN()
BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation.  For that
purpose, it'd be more convenient to use WARN() instead with more
error information.

Cc: patches@opensource.wolfsonmicro.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:20 +00:00
Takashi Iwai d8e9a54414 ASoC: wm8996: Replace BUG() with WARN()
BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation.  For that
purpose, it'd be more convenient to use WARN() instead with more
error information.

Cc: patches@opensource.wolfsonmicro.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:20 +00:00
Takashi Iwai 69134367c3 ASoC: wm8962: Replace BUG() with WARN()
BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation.  For that
purpose, it'd be more convenient to use WARN() instead with more
error information.

Cc: patches@opensource.wolfsonmicro.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:20 +00:00
Takashi Iwai a845d59de6 ASoC: wm8958: Replace BUG() with WARN()
BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation.  For that
purpose, it'd be more convenient to use WARN() instead with more
error information.

Cc: patches@opensource.wolfsonmicro.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:19 +00:00
Takashi Iwai 8d8bb1ad1e ASoC: wm8904: Replace BUG() with WARN()
BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation.  For that
purpose, it'd be more convenient to use WARN() instead with more
error information.

Cc: patches@opensource.wolfsonmicro.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:19 +00:00
Takashi Iwai d9dea39671 ASoC: wm8900: Replace BUG() with WARN()
BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation.  For that
purpose, it'd be more convenient to use WARN() instead with more
error information.

Cc: patches@opensource.wolfsonmicro.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:18 +00:00
Takashi Iwai a361f4525d ASoC: wm8350: Replace BUG() with WARN()
BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation.  For that
purpose, it'd be more convenient to use WARN() instead with more
error information.

Cc: patches@opensource.wolfsonmicro.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:18 +00:00
Takashi Iwai cb1b10262f ASoC: txx9: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:17 +00:00
Takashi Iwai 5f29d44559 ASoC: sh: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:17 +00:00
Takashi Iwai 8b14719beb ASoC: rcar: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:16 +00:00
Takashi Iwai 4a318f1e6c ASoC: s6000: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:16 +00:00
Takashi Iwai 8a2e2c86e9 ASoC: pxa: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:15 +00:00
Takashi Iwai 96b61bc546 ASoC: omap: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:15 +00:00
Takashi Iwai 656a22a105 ASoC: mid-x86: Use WARN_ON() instead of BUG_ON()
BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 19:55:11 +00:00
Rob Herring b5480950c6 Merge remote-tracking branch 'grant/devicetree/next' into for-next 2013-11-07 10:34:46 -06:00
Takashi Iwai aff747ebbf ALSA: hda - Get rid of AMD HDMI exception in hdmi_present_sense()
Since the recent fake ELD patches, we can remove the check for AMD
HDMI in hdmi_present_sense() and decide the return value from
eld_valid value.

Suggested by Anssi Hannula.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07 16:39:37 +01:00
Takashi Iwai 512a4cb9e7 ALSA: ice1724: Fix compile warning with CONFIG_PROC_FS=n
Just added a missing ifdef:
  sound/pci/ice1712/quartet.c:210:14: warning: 'get_binary' defined but not used [-Wunused-function]

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07 15:44:11 +01:00
David Henningsson 464837a7bc ALSA: hda - block HDMI jack reports while repolling
This fixes a race condition in case several monitors are being
repolled in parallel.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07 14:03:33 +01:00
David Henningsson 0f568959de ALSA: hda - Add a block_report flag to jacks
If the jack should not be reported to userspace (e g, because it is
in some transitional state), one can set this flag.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07 14:03:17 +01:00
Takashi Iwai efe4710860 ALSA: hda - Delay HDMI presence reports while waiting for ELD information
There is a small gap between the jack detection unsolicited event and
the time the ELD is updated.  When user-space queries the HDMI ELD
immediately after receiving the notification, it might fail because of
this gap.

For avoiding such a problem, this patch tries to delay the HDMI jack
detect notification until ELD information is fully updated.  The
workaround is imperfect, but good enough as a starting point.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07 14:02:49 +01:00
Lee Jones a894bd7fb5 ASoC: generic-dmaengine-pcm: Clear slave_config memory
We currently assume that the DMA Slave Config will be fully populated
by the platform, however some DMA Engines make decisions based on zero
(default) flags such as DMA_SLAVE_BUSWIDTH_UNDEFINED and as this is a
static declaration we need to memset it to clear the data area.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-07 11:35:30 +00:00
Dan Carpenter bffbbc0a2c ALSA: sb16 - info leak in snd_sb_csp_ioctl()
There is a 2 byte hole after "info.func_nr" so we could leak unitialized
stack information to userspace.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07 10:17:18 +01:00
Vinod Koul f44f2a5417 ALSA: compress: fix drain calls blocking other compress functions (v6)
The drain and drain_notify callback were blocked by low level driver
until the draining was complete. Due to this being invoked with big
fat mutex held, others ops like reading timestamp, calling pause, drop
were blocked.

So to fix this we add a new snd_compr_drain_notify() API. This would
be required to be invoked by low level driver when drain or partial
drain has been completed by the DSP. Thus we make the drain and
partial_drain callback as non blocking and driver returns immediately
after notifying DSP.  The waiting is done while releasing the lock so
that other ops can go ahead.

[ The commit 917f4b5cba was wrongly applied from the preliminary
  patch.  This commit corrects to the final version.
  Sorry for inconvenience!  -- tiwai ]

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
CC: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07 10:12:27 +01:00
David Henningsson ad8ff99e6b ALSA: hda - Another Dell headset quirk
This machine has a multi-function headset jack.

BugLink: https://bugs.launchpad.net/bugs/1248856
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07 09:53:11 +01:00
Takashi Iwai 487a588d09 ALSA: hda - Add pincfg fixup for ASUS W5A
BIOS on ASUS W5A laptop with ALC880 codec doesn't provide any pin
configurations, so we have to set up all pins manually.

Reported-and-tested-by: nb <nb@dagami.org>
Cc: <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07 07:35:31 +01:00
Takashi Iwai 8f42d76987 ALSA: hda - Add support for CX20952
It's a superset of the existing CX2075x codecs, so we can reuse the
existing parser code.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07 07:35:26 +01:00
Takashi Iwai 293db84270 ALSA: lx6464es: Fix pointer cast compile warnings
The warnings are really harmless but annoying.  Since they are only
about debug prints, and it's at most 32bit DMA, let's just cast to
unsigned long.

  sound/pci/lx6464es/lx6464es.c:457:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  sound/pci/lx6464es/lx_core.c:1195:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 18:00:29 +01:00
Takashi Iwai 77ed16cc6c ALSA: cmi8328: Fix compile warnings without CONFIG_PM
Just add an ifdef CONFIG_PM to shut up the warnings:

  sound/isa/cmi8328.c:129:13: warning: ‘snd_cmi8328_cfg_save’ defined but not used [-Wunused-function]
  sound/isa/cmi8328.c:136:13: warning: ‘snd_cmi8328_cfg_restore’ defined but not used [-Wunused-function]

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 17:57:22 +01:00
David Henningsson 8e35cd4ac9 ALSA: HDA - Limit mic boost and add mute LED for an HP machine
This machine has a mute LED as well as a noisy internal mic. Hence it needs
quirks for both limiting the mic boost as well as enabling the LED.

BugLink: https://bugs.launchpad.net/bugs/1248476
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 12:11:16 +01:00
Kuninori Morimoto a2b4f8a473 ASoC: rcar: remove un-needed select from Kconfig
config RCAR_CLK_ADG is not exist

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:54:29 +00:00
Takashi Iwai fb2e3e7019 ASoC: wm9713: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:27:03 +00:00
Takashi Iwai 4c8d620ac9 ASoC: wm8904: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:59 +00:00
Takashi Iwai 246e884b82 ASoC: wm8900: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:57 +00:00
Takashi Iwai 22a7038c39 ASoC: wm8776: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:53 +00:00
Takashi Iwai 95ff71e938 ASoC: wm5100: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:36 +00:00
Takashi Iwai 4a9e0f919c ASoC: wm8580: Use WARN() instead of BUG_ON()
Use WARN() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:28 +00:00
Takashi Iwai bf90e895b5 ASoC: wm2000: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:25 +00:00
Takashi Iwai f5b3a56394 ASoC: wm0010: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:21 +00:00
Takashi Iwai 773392b25c ASoC: tpa6130a2: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:18 +00:00
Takashi Iwai a922cd7151 ASoC: max98095: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:16 +00:00
Takashi Iwai bee026d0fe ASoC: max98088: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:14 +00:00
Takashi Iwai ddb146da23 ASoC: blackfin: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:09 +00:00
David Henningsson d5b6b65e75 ALSA: hda - Make sure mute LEDs stay on during runtime suspend (Realtek)
Some HP machines with Realtek codecs have mute LEDs connected to VREF pins.
However when these go into runtime suspend, the pin powers down and its
pin control is disabled, thus disabling the LED too.

This patch fixes that issue by making sure that the pin stays in D0 with
correct pin control.

Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/1248465
Tested-by: Franz Hsieh <franz.hsieh@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 11:08:12 +01:00
Oskar Schirmer 68f9672b13 ASoC: fsl: imx-pcm-fiq: remove bogus period delta calculation
Originally snd_hrtimer_callback() used iprtd->period_time for
some jiffies based estimation to determine the right moment
to call snd_pcm_period_elapsed(). As timer drifts may well be a
problem, this was changed in commit b4e82b5b78 to be based
on buffer transmission progress, using iprtd->offset and
runtime->buffer_size to calculate the amount of data since last
period had elapsed.

Unfortunately, iprtd->offset counts in bytes, while
runtime->buffer_size counts frames, so adding these to find some
delta is like comparing apples and oranges, and eventually results
in negative delta values every now and then. This is no big harm,
because it simply causes snd_pcm_period_elapsed() being called
more often than necessary, as negative delta is taken for a
large unsigned value by implicit conversion rule.
Nonetheless, the calculation is broken, so one would replace
the runtime->buffer_size by its equivalent in bytes.

But then, there are chances snd_pcm_period_elapsed() is called
late, because calculating the moment for the elapsed period
into delta is based against the iprtd->last_offset, which is not
necessarily the first byte of the period in question, but some
random byte which the FIQ handler left us with in r8/r9 by
accident. Again, negative impact is low, as there are plenty of
periods already prefilled with data, and snd_pcm_period_elapsed()
will probably be called latest when the following period is
reached. However, the calculation is conceptually broken, and we
are best off removing the clever stuff altogether.

snd_pcm_period_elapsed() is now simply called once everytime
snd_hrtimer_callback() is run, which may not be most accurate,
but at least this way we are quite sure we dont miss an end of
period. There is not much extra effort wasted by superfluous
calls to snd_pcm_period_elapsed(), as the timer frequency
closely matches the period size anyway.

Signed-off-by: Oskar Schirmer <oskar@scara.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 09:41:57 +00:00
Takashi Iwai 88ec7ae82d ALSA: pxa2xx: Replace BUG() with snd_BUG()
BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation.  For that
purpose, it'd be more convenient to use snd_BUG() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 08:35:28 +01:00
Takashi Iwai c3cd1badc8 ALSA: mips/ad1843: Use WARN_ON() instead of BUG_ON()
BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 08:35:16 +01:00
Takashi Iwai 5a19b178d7 ALSA: sparc/cs4231: Use WARN_ON() instead of BUG_ON()
BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 08:35:07 +01:00
Takashi Iwai 025be74c1d ALSA: ps3: Use WARN_ON() instead of BUG_ON()
BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 08:34:58 +01:00
Takashi Iwai 29fa957804 ALSA: ctxfi: Use WARN_ON() instead of BUG_ON()
BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 08:34:49 +01:00
Takashi Iwai 791b3f596e ALSA: intel8x0: Fix chmap application
The playback chmap for multi-channel stream hasn't been properly added
to intel8x0 devices due to the wrong condition.

Reported-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 08:14:21 +01:00
Takashi Iwai 8fe7b65ab4 ALSA: hda - Apply GPIO setup for MacBooks with CS4208
Apply the existing GPIO0 fixup as default for MacBooks with CS4208
codec.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64401
Cc: <stable@vger.kernel.org> [v3.12+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 08:08:53 +01:00
Takashi Iwai fab1285a51 ALSA: hda - Name Haswell HDMI controllers better
"HDA Intel MID" is no correct name for Haswell HDMI controllers.
Give them a better name, "HDA Intel HDMI".

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 17:54:05 +01:00
Takashi Iwai 33499a15c2 ALSA: hda - Force buffer alignment for Haswell HDMI controllers
Haswell HDMI audio controllers seem to get stuck when unaligned buffer
size is used.  Let's enable the buffer alignment for the corresponding
entries.

Since AZX_DCAPS_INTEL_PCH contains AZX_DCAPS_BUFSIZE that disables the
buffer alignment forcibly, define AZX_DCAPS_INTEL_HASWELL and put the
necessary AZX_DCAPS bits there.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=60769
Reported-by: Alexander E. Patrakov <patrakov@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 17:38:20 +01:00
Linus Walleij a1c22cdc77 ALSA: atmel: remove dependency on <mach/gpio.h>
This include is completely unused since the AT91 sound driver
actually uses gpiolib properly.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 13:43:25 +01:00
David Henningsson b67ae3f1c9 ALSA: hda - Enable Thinkpad mute/micmute LEDs for Realtek
Same as we already have for Conexant. Right now it's only enabled
for one machine.

Tested-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 13:42:21 +01:00
Clemens Ladisch bbaa0d6665 ALSA: hda: add device IDs for AMD Evergreen/Northern Islands HDMI
The device IDs of the AMD Cypress/Juniper/Redwood/Cedar/Cayman/Antilles/
Barts/Turks/Caicos HDMI HDA controllers weren't added explicitly
because the generic entry works, but it made the device appearing as
"Generic", and people are confused as if it's no proper HDMI
controller.  Add them so that the name shows up properly as "ATI HDMI"
instead of "Generic".

According to Takashi's tests and the lack of complaints, these devices
work fine without disabling snooping.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 10:26:56 +01:00
Takashi Iwai a1114a8c68 ALSA: hda - Introduce the bitmask for excluding output volume
Add a bitmask to hda_gen_spec indicating NIDs to exclude from the
possible volume controls.  That is, when the bit is set, the NID
corresponding to the bit won't be picked as an output volume control
any longer.

Basically this is just a band-aid for working around the issue found
with CS4208 codec, where only the headphone pin has a volume AMP with
different dB steps.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=60811
Cc: <stable@vger.kernel.org> [v3.12+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 07:49:41 +01:00
Takashi Iwai 485e3e0cdf ALSA: hda - Add sanity check of vmaster slave dB steps
Check whether all vmaster slaves have the same dB steps.  Otherwise
the behavior would become inconsistent.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 07:48:04 +01:00
Takashi Iwai a4e7a12168 ALSA: hda - Fix possible zero-division
Check the TLV db scale result before actually dividing in vmaster
slave init code.  Also mask TLV_DB_SCALE_MUTE bit so that the right
value is obtained even if this bit is set by the codec driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 07:47:52 +01:00
David Henningsson 504333df8b ALSA: usb - Don't trust the channel config if the channel count changed
In case the channel count of the input terminal is not the same as
the channel count of the streaming descriptor, the channel config of
the input terminal can not be trusted. Instead fall back to a default
(guessed) channel map.

This was found on a Logitech USB Headset.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 07:46:48 +01:00
David Henningsson e3e35f750f ALSA: usb - For class 2 devices, use channel map from altsettings
The channel config from the streaming descriptor is probably a
better indicator of the channel map than the input terminal.
Use the input terminal's channel map as fallback only.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 07:46:38 +01:00
David Henningsson 0dca01c37a ALSA: usb: supply channel maps even when wChannelConfig is unspecified
If wChannelconfig is given for some formats but not others, userspace
might not be able to set the channel map.

This is RFC because I'm not sure what the best behaviour is - to guess
the channel map from the given number of channels (it's quite likely
that one channel is MONO and two channels is FL FR), or just to supply
UNKNOWN for all channels.

But the complete lack of channel map for a format leads userspace to
believe that the format is not available at all. Or am I
misunderstanding how this should be used?

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 07:46:15 +01:00
Takashi Iwai 24eff328f6 ALSA: hda - Enable SPDIF for Acer TravelMate 6293
BIOS on Acer TravelMate 6293 doesn't set up the SPDIF output pin
correctly as default, so enable it via a fixup entry.

Reported-and-tested-by: Hagen Heiduck <heiduck.suse@fmail.postpro.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-04 21:11:04 +01:00
James Ralston 4eeca499be ALSA: hda - Add Device IDs for Intel Wildcat Point-LP PCH
This patch adds the HD Audio Device IDs for the Intel Wildcat Point-LP PCH.

Signed-off-by: James Ralston <james.d.ralston@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-04 18:31:54 +01:00
Nicolin Chen 988e8cc41e ASoC: Add pinctrl PM to components of active DAIs
It's quite popular that more drivers are using pinctrl PM, for example:
(Documentation/devicetree/bindings/arm/primecell.txt). Just like what
runtime PM does, it would deactivate and activate pin group depending
on whether it's being used or not.

And this pinctrl PM might be also beneficial to cpu dai drivers because
they might have actual pinctrl so as to sleep their pins and wake them
up as needed.

To achieve this goal, this patch sets pins to the default state during
resume or startup; While during suspend and shutdown, it would set pins
to the sleep state.

As pinctrl PM would return zero if there is no such pinctrl sleep state
settings, this patch would not break current ASoC subsystem directly.

[ However, there is still an exception that the patch can not handle,
that is, when cpu dai driver does not have pinctrl property but another
device has it. (The AUDMUX <-> SSI on Freescale i.MX6 series for example.
SSI as a cpu dai doesn't contain pinctrl property while AUDMUX, an Audio
Multiplexer, has it). In this case, this kind of cpu dai driver needs to
find a way to obtain the pinctrl property as its own, by moving property
from AUDMUX to SSI, or creating a pins link/dependency between these two
devices, or using a more decent way after we figure it out. ]

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-04 09:08:59 -08:00
Fabio Estevam 9c1fc20913 ASoC: fsl: fsl_spdif: No need to check the return value of platform_get_resource()
When using devm_ioremap_resource(), we do not need to check the return value of
platform_get_resource(), so just remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-04 08:59:40 -08:00
Nariman Poushin c01422a4a1 ASoC: wm_adsp: Interpret ADSP memory region lengths as 32 bit words
Pad the ADSP word (3 bytes) to 4 bytes in the kernel and calculate
lengths based on padded ADSP words instead of treating them as bytes

Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com>
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-11-04 08:57:25 -08:00
Mengdong Lin 300016b960 ALSA: hda - rename function not_share_unassigned_cvt()
The function name not_share_unassigned_cvt() is opposite to what it does.
This patch renames it to intel_not_share_assigned_cvt(), and addes comments
to explain why some Intel display codecs need this workaround.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-04 14:22:08 +01:00
Anssi Hannula 611885bc96 ALSA: hda - hdmi: Disallow unsupported 2ch remapping on NVIDIA codecs
NVIDIA HDMI codecs do not seem to follow the Audio Sample Packet (ASP)
channel mapping (as set by verb F32h per HDA specification 7.3.3.41)
when playing back 2-channel audio (CEA CA 0x00).

Basically this means that specifying swapped channels for stereo audio
(FR,FL) does not take effect, and e.g. this command plays back on the
wrong channel:
speaker-test -c2 -Dhdmi:CARD=NVidia,DEV=0 -m FR,FL -s1

Multichannel audio is not affected.

This issue has been confirmed to exist on codec 0x10de0015 by me and on
0x10de0040 by Juho Teperi.

Disable 2ch FL/FR channel swapping on all NVIDIA HDMI codecs that use
the standard HDA channel mapping system. Since this is a very minor
functionality loss, we err on the side of disabling it for newer codecs
as well until any future testing confirms that this issue has been
fixed.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Helped-by: Juho Teperi <juho.teperi@iki.fi>
Cc: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-04 10:10:28 +01:00
Takashi Iwai fce762ed9f Merge branch 'for-linus' into for-next 2013-11-04 10:10:02 +01:00
Takashi Iwai ebfe1068f9 ASoC: Final updates for v3.13
A few final updates for v3.13, all driver updates apart from some DPCM
 and Coverity fixes which should have minor impact on practical systems.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSdzlPAAoJELSic+t+oim9sn0QAJJuPBcCq2pJZE0nhacNeqx0
 YaDIEoNmSOutY7zdQ0/xtWazZOmn1CvxB6/vYPwhrXVqUSZPEuWWFeNsGoDNtOLJ
 9x+b7RfY+wN7P2CNgQaEx4kFix4TeGDTZ5eaViuqSFqgDYkSSmOHNh5G2DNT2yuu
 Jm1OzFfArSE+s29ezMK7Gn6FhfXUbtSOpOrewqFrua68E4B4zppD7b0PnTB4kOZ5
 LHBwarpE30VDt9e6jcJIxjtGVqV7xau50RBcsnKvCdtdh/UPmOW4VF9RqkeeYHIb
 dgqAEswE2i2g4QtK/ZxUrLgcGT/sBGuYMHRATlUuo052izFtXNNjgfHtz/Qr9Uxd
 N5d0Vf2HklTlS6VXNystvqSH7Tld3DFMEsGEk/PK4zPqHI8j4+3EpxlQLpUvipUV
 bLo2XubRXDcJ0Ej+0yi38lAQQVfKzdMJD+m6NdA2xrjX1nyCXPhINu+okIEdcY5K
 xqrSpx8DOGxJMTXR2RXa99JfmyhrJbAse9eSaEe/2hr04yafb+kRy3tLtjgv/zUo
 L/Z/oJPnC1dBE7sINwnHiLjJwQgEy91o9tWgioIa1MGg3Za3aQ3dMhBS5gXq3Zu+
 4dZM44RbyxVWq17TH8DQeaSaFg+nu/j/yOsB5Z33Z1M1Q1SjwaSbpZD2rccGb9kL
 95vxch8WBLIyPSvLN9A4
 =EOnb
 -----END PGP SIGNATURE-----

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

ASoC: Final updates for v3.13

A few final updates for v3.13, all driver updates apart from some DPCM
and Coverity fixes which should have minor impact on practical systems.
2013-11-04 10:05:07 +01:00
Mark Brown 71d0c3a876 Merge remote-tracking branch 'asoc/topic/wm8996' into asoc-next 2013-11-03 22:04:22 -08:00
Mark Brown f027ac7a72 Merge remote-tracking branch 'asoc/topic/wm8962' into asoc-next 2013-11-03 22:04:22 -08:00
Mark Brown 1c2fa548bf Merge remote-tracking branch 'asoc/topic/wm0010' into asoc-next 2013-11-03 22:04:21 -08:00
Mark Brown d092232793 Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next 2013-11-03 22:04:20 -08:00
Mark Brown 4cf9159e2a Merge remote-tracking branch 'asoc/topic/rt5640' into asoc-next 2013-11-03 22:04:19 -08:00
Mark Brown 97fa413305 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next 2013-11-03 22:04:19 -08:00
Mark Brown 07ad822c21 Merge remote-tracking branch 'asoc/topic/ml26124' into asoc-next 2013-11-03 22:04:18 -08:00
Mark Brown fc10c6db77 Merge remote-tracking branch 'asoc/topic/kirkwood' into asoc-next 2013-11-03 22:04:17 -08:00
Mark Brown 6caa9892c3 Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next 2013-11-03 22:04:17 -08:00
Mark Brown 911885542a Merge remote-tracking branch 'asoc/topic/dma' into asoc-next 2013-11-03 22:04:16 -08:00
Mark Brown 05e48b5064 Merge remote-tracking branch 'asoc/topic/cs42l52' into asoc-next 2013-11-03 22:04:16 -08:00
Mark Brown e814e3936e Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2013-11-03 22:04:15 -08:00
Mark Brown 6367771fb6 Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next 2013-11-03 22:04:14 -08:00
Mark Brown 425c5a8582 Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next 2013-11-03 22:04:14 -08:00
Mark Brown 14d907742c Merge remote-tracking branch 'asoc/topic/ab8500' into asoc-next 2013-11-03 22:04:13 -08:00
Mark Brown b199b0fcde Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus 2013-11-03 22:04:13 -08:00
Mark Brown 41caa41634 Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2013-11-03 22:04:12 -08:00
Mark Brown ca89bc248e Merge remote-tracking branch 'asoc/fix/ak4642' into asoc-linus 2013-11-03 22:04:05 -08:00
Richard Fitzgerald ae2ff9f6c5 ASoC: wm8962: Add EQ coefficient support
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-01 10:52:17 -07:00
Richard Fitzgerald dea0c74ff9 ASoC: wm8962: Add ALC coefficient support
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-01 10:52:16 -07:00
Dimitris Papastamos 3626992a21 ASoC: wm_adsp: Print out the firmware version
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-01 10:48:39 -07:00
Dimitris Papastamos b0101b4f14 ASoC: wm_adsp: Remove and free algorithm regions for ADSP1
Do it in a similar fashion as we do for ADSP2.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-01 10:48:37 -07:00
Dimitris Papastamos 562c5e6f52 ASoC: wm_adsp: Add debug info on get()/put() transfers
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-01 10:48:36 -07:00
Dimitris Papastamos 7328823d00 ASoC: wm_adsp: Release firmware on memory allocation failure
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-01 10:48:35 -07:00
Dimitris Papastamos 43bc3bf64b ASoC: wm_adsp: Print error when regmap reads/writes fail
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-01 10:48:34 -07:00
Mengdong Lin 023838542d ALSA: hda - not choose assigned converters for unused pins of Valleyview
For Valleyview display codec, if an unused pin chooses an assgined converter
selected by a used pin, playback on the unused pin can also give sound to the
output device of the used pin. It's because data flows from the same convertor
to the display port of the used pin. This issue is same as Haswell.

So this patch avoids using assinged convertors for unused pins.
The related function haswell_config_cvts() is renamed for code reuse.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-01 10:47:16 +01:00
Phil Edworthy 7b5bfb8288 ASoC: ak4642: prevent un-necessary changes to SG_SL1
If you record the sound during playback,
the playback sound becomes silent.
Modify so that the codec driver does not clear
SG_SL1::DACL bit which is controlled under widget

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-10-31 23:45:33 -07:00
Russell King - ARM Linux 2062b4c5d2 ASoC: dpcm: improve robustness
Avoid oopsing if there is no backend stream associated with a front end
stream.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-31 10:57:47 -07:00
Mark Brown c5914b0aae ASoC: pcm: Check for ops before deferencing them
Ensure that we always check that an ops structure is present before we
try to use it, improving the robustness of the system.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-31 10:57:47 -07:00
Takashi Iwai a19685cb72 ASoC: Use strlcpy() for copying in snd_soc_info_enum_double()
The provided texts aren't guaranteed to be in the fixed size.
Spotted by coverity CID 139318.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-31 10:57:47 -07:00
Russell King a4461f41b9 ALSA: fix oops in snd_pcm_info() caused by ASoC DPCM
Unable to handle kernel NULL pointer dereference at virtual address 00000008
pgd = d5300000
[00000008] *pgd=0d265831, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT ARM
CPU: 0 PID: 2295 Comm: vlc Not tainted 3.11.0+ #755
task: dee74800 ti: e213c000 task.ti: e213c000
PC is at snd_pcm_info+0xc8/0xd8
LR is at 0x30232065
pc : [<c031b52c>]    lr : [<30232065>]    psr: a0070013
sp : e213dea8  ip : d81cb0d0  fp : c05f7678
r10: c05f7770  r9 : fffffdfd  r8 : 00000000
r7 : d8a968a8  r6 : d8a96800  r5 : d8a96200  r4 : d81cb000
r3 : 00000000  r2 : d81cb000  r1 : 00000001  r0 : d8a96200
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5387d  Table: 15300019  DAC: 00000015
Process vlc (pid: 2295, stack limit = 0xe213c248)
[<c031b52c>] (snd_pcm_info) from [<c031b570>] (snd_pcm_info_user+0x34/0x9c)
[<c031b570>] (snd_pcm_info_user) from [<c03164a4>] (snd_pcm_control_ioctl+0x274/0x280)
[<c03164a4>] (snd_pcm_control_ioctl) from [<c0311458>] (snd_ctl_ioctl+0xc0/0x55c)
[<c0311458>] (snd_ctl_ioctl) from [<c00eca84>] (do_vfs_ioctl+0x80/0x31c)
[<c00eca84>] (do_vfs_ioctl) from [<c00ecd5c>] (SyS_ioctl+0x3c/0x60)
[<c00ecd5c>] (SyS_ioctl) from [<c000e500>] (ret_fast_syscall+0x0/0x48)
Code: e1a00005 e59530dc e3a01001 e1a02004 (e5933008)
---[ end trace cb3d9bdb8dfefb3c ]---

This is provoked when the ASoC front end is open along with its backend,
(which causes the backend to have a runtime assigned to it) and then the
SNDRV_CTL_IOCTL_PCM_INFO is requested for the (visible) backend device.

Resolve this by ensuring that ASoC internal backend devices are not
visible to userspace, just as the commentry for snd_pcm_new_internal()
says it should be.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Mark Brown <broonie@linaro.org>
Cc: <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-31 17:36:47 +01:00
Kuninori Morimoto 9ade09d6c6 ASoC: rcar: remove original filter from rsnd_dma_init()
Remove original filter from rsnd_dma_init(),
and use SH-DMA suitable filter.
This new style can be used from Device Tree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-31 08:26:30 -07:00
Russell King c9bd5e690a DMA-API: sound: fix dma mask handling in a lot of drivers
This code sequence is unsafe in modules:

static u64 mask = DMA_BIT_MASK(something);
...
	if (!dev->dma_mask)
		dev->dma_mask = &mask;

as if a module is reloaded, the mask will be pointing at the original
module's mask address, and this can lead to oopses.  Moreover, they
all follow this with:

	if (!dev->coherent_dma_mask)
		dev->coherent_dma_mask = mask;

where 'mask' is the same value as the statically defined mask, and this
bypasses the architecture's check on whether the DMA mask is possible.

Fix these issues by using the new dma_coerce_coherent_and_mask()
function.

Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-10-31 14:48:47 +00:00
Takashi Iwai 8b4b30365c ASoC: ml26124: Fix negative array index read
get_coeff() may return an error.

Spotted by coverity CID 703394.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-30 14:33:08 -07:00
Takashi Iwai c4a4ddaefb ASoC: Fixes for v3.12
A few of the Coverity fixes from Takashi, one of which (the wm_hubs one)
 is particularly noticable.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJScUA0AAoJELSic+t+oim9Yu8P/Rve++VdhWT/NPrhRvHLhnt7
 CXaXdAKt2tS8mZCrvho/G2b22ZGJML1RseCF4ORIPYaLAnk86G6mqNldFWGiBy1D
 ainPIQKahc0Pxu9TlFuj27r6M+S/t3JXxgX9R8rJr8yz4JRVzCucrRMlrFPXXPNW
 PDu9djCf6Mv3X9M/tpnZUQo2gpkmfzWmrF6/TSb/91TT7ZhYouzC+pkydHvyvXU7
 Ah3MhNPe7rXXNZsdxn8jSPwN4g+vHgkLYg+OrrCtfOppG0XLQPzmq1xWEeqSltLi
 hiVv36VHzzCAymqn29B8kUidRlYcRQiQliv50B4zUCKj78LsEr6/bO3PLpiJkmtm
 DQTckVHT6i2teQdFsBoJ9GDZhkIphk3wVFivG47DhmAK7W1vB2pX67DF4lKrsz8w
 wSwtcUj9lPVoEK/stxTEAU+UNvIrwhbEKxwDi9F4K4eQkaf4CtmTq37cE2QR4uFY
 lxqqYU8oCUypzCEtWXZ28N2+BBCoH+Fjw9LgM0eIYrw6UgmtmhY6Az05/T9ZjagP
 PYC9I+ootacB2ApBF6E2wM+3zT7tookNCa2S3pd0kYrYXXqo0P79h2JUyfhQwCHn
 CY29c0YassHjL5lTv0rBW9lbNAZg8wFAMsguOMqXFi/msFKhcpH2aLZ5+R7mUl0s
 QPIzGI3OMMFMx6PDQ3KS
 =J0sP
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v3.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v3.12

A few of the Coverity fixes from Takashi, one of which (the wm_hubs one)
is particularly noticable.
2013-10-30 18:42:13 +01:00
Mark Brown 8723b795aa Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus 2013-10-30 10:11:55 -07:00
Takashi Iwai 5a7615cf1f ASoC: rt5640: Fix ignored error checks
The negative error value returned from get_sdp_info() is ignored
because it's assigned to unsigned variables.

Spotted by coverity CIDs 1042657, 1042658.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-30 10:11:25 -07:00
Takashi Iwai fe329a1a92 ASoC: wm8996: Fix negative array index read
Spotted by coverity CID 146355.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-30 09:50:21 -07:00
Takashi Iwai 8e38395360 ALSA: hda - Add extra chmap for 2.1 outputs on ASUS laptops
ASUS N56VZ and N76VZ laptops have a bass speaker but its output comes
only from the right channel.  This patch adds the extra chmap specific
to these models.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=846531
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-30 17:41:12 +01:00
Takashi Iwai 8d684b430b Merge branch 'for-linus' into for-next 2013-10-30 17:40:54 +01:00
Takashi Iwai c36c89096c ASoC: wm0010: Fix possible out-of-bounds array read
Spotted by coverity CID 744701.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-30 09:38:21 -07:00
Takashi Iwai 268ff14525 ASoC: wm_hubs: Add missing break in hp_supply_event()
Spotted by coverity CID 115170.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-10-30 09:35:22 -07:00
Takashi Iwai 166a34d27f ASoC: ab8500: Fix invalid cast to long pointer
Don't cast to long pointers blindly just for using find_first_bit()
and co.  This is certainly not portable at all.

Reimplement the code with ffs() and fls() instead.  This is a slight
optimization, too.

Spotted by coverity CID 1056484 and 1056485.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-30 09:33:30 -07:00
Takashi Iwai 00ecdd93a8 ASoC: ab8500: Add missing of NULL check of devm_kzalloc()
Spotted by coverity CID 712316.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-30 09:33:30 -07:00
Takashi Iwai 6fc16e58ad ALSA: hda - Add a fixup for ASUS N76VZ
ASUS N76VZ needs the same fixup as N56VZ for supporting the boost
speaker.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=846529
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-30 12:31:35 +01:00
Takashi Iwai d2e92709e8 ALSA: hda - Disable AA-loopback on ALC283 Chromebook
ALC283-based Chromebook suffers from occasional white noise, and it
turned out that this comes from AA-loopback.  Disable this output path
by just clearing mixer_nid, then the generic parser will skip the
creation of AA-loopback path.

Reported-and-tested-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-30 07:52:44 +01:00
Nicolin Chen b5ef3f2a80 ASoC: wm8962: Fix null pointer pdata access in I2C probe()
When using DT binding to pass private data, there would be Kernel panic
occuring due to NULL pointer access in wm8962_i2c_probe(). Thus fix it.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-29 09:33:51 -07:00
Takashi Iwai 9cd5ab9c3c ALSA: lola: Fix uninitialized variable access in error message
The FUNCTION_TYPE parameter isn't associated with any NID, thus
showing the uninitialized nid in the error message is simply
nonsense.

Spotted by coverity CID 145068.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 16:51:36 +01:00
Takashi Iwai 4c88b7f287 ALSA: ice1724: Fix uninitialized variable access
Spotted by coverity CIDs 751505 and 751506.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 16:46:36 +01:00
Takashi Iwai e12483e0f3 ALSA: ak4114: Fix wrong register array size
The size of the register cache array is actually 6 instead of 7,
as it caches up to AK4114_REG_INT1_MASK.  This resulted in unexpected
access out of array range, although most of them aren't so serious
(just reading one more byte on the stack at snd_ak4114_create()).

Also, the check of cache size was wrongly done by checking with
sizeof() instead of ARRAY_SIZE().  Fixed this together.

(And yes, hardcoded numbers are bad, but I keep the coding style as is
 for making it clear what this patch actually does.)

Spotted by coverity among several CIDs, e.g. 711621.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 16:42:36 +01:00
Takashi Iwai 2026d24ef2 ALSA: rme96: Return error code in PCM copy ops
Just pass the error code returned from copy_from_user_toio() and
copy_to_user_fromio() helpers.

Spotted by coverity CID 114119.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 16:04:37 +01:00
Takashi Iwai 329bbd9ba7 ALSA: ali5451: Drop unused variable
The variable runtime is never used, and this might be even a source of
NULL-dereference.  Nothing better than killing it.

Spotted by coverity CID 100862.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 15:42:29 +01:00
Takashi Iwai 9bd0f5c042 ALSA: ad1889: Fix right attenuation proc output
The right attenuation bits aren't needed to be shifted.

Spotted by coverity CID 11427.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 15:39:37 +01:00
Takashi Iwai 57a4451d26 ALSA: Use strlcpy() instead of strncpy()
We tend to make stupid mistakes with strncpy().  Let's take a safer
one, strlcpy().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 15:26:12 +01:00
Takashi Iwai 97f44f56ca ALSA: Limit the fallback card id string size
When no proper id string is given, the driver tries to fall back to
copy the proc_root name string via strcpy(), but this might overflow
the fixed string size.  Let's use strlcpy().

Spotted by coverity CID 139008.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 15:20:06 +01:00
Takashi Iwai 75415df8ff ALSA: pcsp: Fix initialization with nopcm=1
When nopcm=1 is set, some initializations based on hrtimer resolution
might be bogus because the driver checks the resolution only when
nopcm=0.  Simply get the resolution always at first for fixing the
bug.

Spotted by coverity CID 139740.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 15:15:20 +01:00
Takashi Iwai a8d09e3a6d ALSA: opl3: Fix possible negative array index access
Spotted by coverity CID 115196.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 15:07:19 +01:00
Takashi Iwai a40a393722 ALSA: memalloc: NULL-initialize in snd_malloc_dev_iram()
dmab->area and addr fields should be cleared at the head of
snd_malloc_dev_iram() as especially dmab->area is used to indicate the
allocation failure / fallback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 11:59:31 +01:00
Takashi Iwai 9f694bc793 ALSA: memalloc: Make snd_{malloc|free}_dev_iram() static
These are used only locally.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 11:56:21 +01:00
Takashi Iwai 60f6fef877 ALSA: Optimize module name check
module->name is a fixed array, so we can check the empty contents
straightforwardly in module_slot_match().

Spotted by coverity CID 1056786.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 11:37:42 +01:00
Takashi Iwai 1f96153bc6 ALSA: pcm: Add fallthru comments
Just to improve readability.
Spotted by coverity CID 115002 and 115003.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 11:37:35 +01:00
Takashi Iwai ca16ec02e1 ALSA: hda - Remove locally dead codes
Reported by coverity.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 11:37:30 +01:00
Takashi Iwai 57d8ff617f ALSA: hda - Add a fallthru comment
... to improve the readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 11:37:23 +01:00
Takashi Iwai 728deecdd4 ALSA: hda - Fix possible NULL dereference in snd_hda_get_pin_label()
Fix a possible NULL access of indexp in fill_audio_out_name() called
from snd_hda_get_pin_label().

Spotted by coverity CID 402035.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 11:37:19 +01:00
Takashi Iwai 9b389a8a02 ALSA: 6fire: Fix probe of multiple cards
The probe code of snd-usb-6fire driver overrides the devices[] pointer
wrongly without checking whether it's already occupied or not.  This
would screw up the device disconnection later.

Spotted by coverity CID 141423.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 11:37:11 +01:00
Olof Johansson 43d93947a5 Via Paul Walmsley <paul@pwsan.com>:
Move some of the OMAP2+ CM and System Control Module direct
 register accesses into CM- and System Control
 Module-specific "drivers" underneath arch/arm/mach-omap2/.  This
 is a prerequisite for moving this code out of arch/arm/mach-omap2/ into
 drivers/.
 
 Basic test logs are available here:
 
 http://www.pwsan.com/omap/testlogs/cm_scm_cleanup_a_v3.13/20131019101809/
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSZAZXAAoJEBvUPslcq6VzCWQQAKH4Rj0izwbbLkgBAeeaQz5K
 oJgPJ6UPLOJ2uLIUauCKUSR6+nktrCTfV8P+J4DhCc6OiGrKBXJhSETPgaTbWsNw
 Bd577pmuvXSfNFXUaLwCgkSmafJ1pi6d7kEx/7ZW3TziVE/aUxyeHkrMtWJHrjTP
 28tJVieOxLlO5iK06DfmGcCpLUBKJKtgGRo0h/oqMhLAaN5S8//lyVYgdsto7oCN
 /bes6OpuVVdKiSr78V4rCVtR5Lij5+lVrT8HDiw2BA0V3bYcI7+CVlWBPZ3mYkuy
 oAJDcn9whNyfWS+SsaTIjy6nHsgQkhEJnhrQW3k2skVZobRtWDv7U5LiTjsUhb3o
 pjyWD8zZ7jqrkgyLsai6dm1zsljMQXsIQwH5h++HdCRhtNOXd6bVQZy0KqkpLu0y
 Bhpt8/edh4Bdc305oB05/Y9Uxr7Gr8M377chVZx+JD3rxIDjRRyOJcRIhd27WZEf
 HSMLpO/ayUXWdDuTlKW0IEnImx3PrxT913cnjIY589FhfdahfGQoft4sWDeiQLAX
 +zVYZljeY+GxbUWO6aY4m2PfVN9p/Hwal58NZZgj59wq9iHUuJErK11X7rj+2vwN
 +20IS8sikz6Iym84iC0T+omUeFVY0Zo004DVvpPB+D1C2LpwdI1c6kTz4DYT1EBP
 pvs8Wihkk7xQxQn0rBGP
 =L37r
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.13/cm-scm-cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup

From Paul Walmsley <paul@pwsan.com> via Tony Lindgren:

Move some of the OMAP2+ CM and System Control Module direct
register accesses into CM- and System Control
Module-specific "drivers" underneath arch/arm/mach-omap2/.  This
is a prerequisite for moving this code out of arch/arm/mach-omap2/ into
drivers/.

Basic test logs are available here:

http://www.pwsan.com/omap/testlogs/cm_scm_cleanup_a_v3.13/20131019101809/

* tag 'omap-for-v3.13/cm-scm-cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP3: control: add API for setting IVA bootmode
  ARM: OMAP3: CM/control: move CM scratchpad save to CM driver
  ARM: OMAP3: McBSP: do not access CM register directly
  ARM: OMAP3: clock: add API to enable/disable autoidle for a single clock
  ARM: OMAP2: CM/PM: remove direct register accesses outside CM code
  + Linux 3.12-rc4

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 14:39:03 -07:00
Takashi Iwai 298402a385 ASoC: dapm: Return -ENOMEM in snd_soc_dapm_new_dai_widgets()
... instead of NULL dereferences.

Spotted by coverity CID 402004.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-28 09:33:10 -07:00
Takashi Iwai ff18620c21 ASoC: dapm: Fix source list debugfs outputs
... due to a copy & paste error.

Spotted by coverity CID 710923.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-10-28 09:32:57 -07:00
Takashi Iwai 63437313da ALSA: memalloc: Yet another ifdef CONFIG_GENERIC_ALLOCATOR protection
I obviously forgot to merge the right version...

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-28 16:08:27 +01:00
Takashi Iwai a655f75c75 ALSA: pcm_dmaengine: Remove hardcoded PCM formats
Use the standard PCM helper function to figure out the sample bytes
instead of hardcodec PCM format checks in
snd_hwparams_to_dma_slave_config().

The patch also extends the format check for 8 bytes formats although
no one should match so far.

Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-28 10:18:09 +01:00
Wei Yongjun 3d8f7318f9 ASoC: fsl_spdif: fix return value check in fsl_spdif_probe()
In case of error, the function platform_get_resource() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-26 21:32:29 +01:00
Charles Keepax a9c9cafdde ASoC: wm5110: Add missing routes for AEC Loopback
Reported-by: Nariman Poushin <nariman.poushin@wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-26 21:31:27 +01:00
Takashi Iwai afb5a77931 ALSA: hda - Sync EAPD with vmaster on AD1984A Thinkpads
As EAPD on NID 0x12 (speaker pin) is used as the master amp on
Thinkpads with AD1984A codec, we can hook this to vmaster for saving a
bit more power at master mute state.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-26 00:33:58 +02:00
Takashi Iwai d601b66616 Merge branch 'for-linus' into for-next 2013-10-26 00:33:02 +02:00
Takashi Iwai 1ac3293095 ALSA: hda - Fix silent headphone on Thinkpads with AD1984A codec
AD1984A codec has a couple of pins with EAPD controls, and the generic
codec driver tries to turn each of them on/off depending on the pin
active state.  However, Thinkpads seem to use EAPD of the speaker pin
as a master EAPD for controlling the mute of all outputs, including
the headphone.  This results in the dead headphone output via the
headphone plugging because it mutes the speaker and turns off EAPD.

The fix is to simply add spec->gen.keep_on_eapd flag.

[This is a regression fix on 3.12 where we moved the AD codec parser
 to the generic parser.  3.11 and earlier didn't show this problem
 because still static quirks have been used.]

Reported-and-tested-by: Vito Caputo <vcaputo@gnugeneration.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-26 00:30:32 +02:00
Takashi Iwai b63eae0a6c ALSA: hda - Add missing initial vmaster hook at build_controls callback
The generic parser has a support of vmaster hook, but this is
initialized only in the init callback with the check of the presence
of the corresponding kctl.  However, since kctl is NULL at the very
first init callback that is called before build_controls callback, the
vmaster hook sync is skipped there.  Eventually this leads to the
uninitialized state depending on the hook implementation.

This patch adds a simple workaround, just calling the sync function
explicitly at build_controls callback.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-25 23:43:10 +02:00
Brian Austin aab554ede9 ASoC: cs42l52: increase MAX_REGISTER for regmap_register_patch
regmap_register_patch fails without the MAX_REGISTER set to highest
register written to. Increase to register 0x47

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 21:23:16 +01:00
Takashi Iwai f82bf8e2c8 ASoC: dmaengine: Use SNDRV_PCM_STREAM_LAST for array size
... to make the meaning more obvious.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 21:14:26 +01:00
Brian Austin e5f03af644 ASoC: cs42l52: Add chip rev id message
This patch adds a print message at bootup for the CODEC Rev ID

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 16:37:58 +01:00
Brian Austin 153723f6f1 ASoC: cs42l52: convert pdata config to regmap_update_bits
Moving platform data to bus probe and convert to regmap_update_bits.
This will work nicer when converted to device tree instead of having it
split into multiple probes

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 16:37:58 +01:00
Brian Austin 6dd1775792 ASoC: cs42l52: Add platform data for reset gpio
This patch adds platform data support for a reset GPIO.
Also uses reset_gpio to toggle reset of the CODEC

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 16:37:58 +01:00
Takashi Iwai 6913a9dbf1 ASoC: Updates for v3.13
- Further work on the dmaengine helpers, including support for
    configuring the parameters for DMA by reading the capabilities of the
    DMA controller which removes some guesswork and magic numbers fromm
    drivers.
  - A refresh of the documentation.
  - Conversions of many drivers to direct regmap API usage in order to
    allow the ASoC level register I/O code to be removed, this will
    hopefully be completed by v3.14.
  - Support for using async register I/O in DAPM, reducing the time taken
    to implement power transitions on systems that support it.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJSajLdAAoJELSic+t+oim9MVEQAJ3t7df5K9R/OynjhKiEFxpP
 cBWo306CegZ5oO17UqG+SReJkOWgUI8zIUkNC818suTjtgyhv4WUBx1QgXG8akO5
 arHZEQGyReLxgWbnO5ScP7BJt5ZYldfQWN+NPnNlzwvVA8R4xChvAwuHL+kUSSYW
 DrOb0ag/Gtn2jQo3o9GbZb5c3UhZqoMg/pQSoVtnvG/O8N/xR0yoeXGsdJv1su6g
 OKhCJTRWU8v3FONatR2wWXnSrCBOeJ2Ec7YUJil1FQQdENYZfV3AOsFHxmqsyG2O
 Xj2P7CioY0JY7dtFcKjrXgsnjvgZmVdVsdegTJPWS9RjunjyupvSyhMhZYkoA60j
 V7RxyIbHAx7hILQqCYYhlOczYHom4MSwAGGt7y7T3oKt0432RvIjE2fP7sTGaqD8
 wzuVYuVl4km03xX9g9abF6xjyDE6e+4wun+d8kSvOosvd/nF47gkXUXEvPZh0Ley
 013e5fHNDaNF4uaSVXE169JyVxVnHP6nXJDRWZakXsryGXGUpn0quIzobf6fb6XE
 fY5Q3QoyP5rHdSMIvGN5Gi76KsHF5CWILWqcWLEVPLnaf9gJmrp3IypmF1c8i7VE
 CrcTim5mhNePEX56skRaHhpYHmsxYApSAzxNAA/t3cJ2rtwb87jMM4jOcjHi/war
 emSVe5lXkcwv/lU/Pa0N
 =rVsK
 -----END PGP SIGNATURE-----

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

ASoC: Updates for v3.13

 - Further work on the dmaengine helpers, including support for
   configuring the parameters for DMA by reading the capabilities of the
   DMA controller which removes some guesswork and magic numbers fromm
   drivers.
 - A refresh of the documentation.
 - Conversions of many drivers to direct regmap API usage in order to
   allow the ASoC level register I/O code to be removed, this will
   hopefully be completed by v3.14.
 - Support for using async register I/O in DAPM, reducing the time taken
   to implement power transitions on systems that support it.
2013-10-25 11:43:47 +02:00
Wei Yongjun 29ca9c73e5 ASoC: samsung: fix return value check in i2s_alloc_dai()
In case of error, the function platform_device_alloc() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 10:25:51 +01:00
Jean-Francois Moine 99d8d3ba51 ASoC: kirkwood: Fix compile error due to patch 'add S/PDIF support'
This patch fixes the compilation error of kirkwood-i2s.c introduced
by the commit 75b9b65ee5 'ASoC: kirkwood: add S/PDIF support'.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 09:12:39 +01:00