firefly-linux-kernel-4.4.55.git
11 years agoALSA: compress_core: don't return -EBADFD from poll if paused
Richard Fitzgerald [Tue, 22 Oct 2013 10:26:48 +0000 (11:26 +0100)]
ALSA: compress_core: don't return -EBADFD from poll if paused

Pausing audio playback is not an illegal state so it doesn't
seem sensible for poll() to return -EBADFD on a paused stream.
There's also no reason to assume that we can't write more data
to the DSP while playback is paused. Remove the -EBADFD so that
a stream in paused state will still report the buffer
availability from poll(). It is up to the user process to
manage its state so that it knows whether it is paused or not.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Acked-by VInod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - hdmi: Fix wrong baseline length in ATI/AMD generated ELD
Anssi Hannula [Sun, 10 Nov 2013 20:57:42 +0000 (22:57 +0200)]
ALSA: hda - hdmi: Fix wrong baseline length in ATI/AMD generated ELD

According to the HDA specification the baseline ELD length is counted in
DW of 4 bytes instead of in bytes.

Fix the code accordingly.

Baseline length is not used by the kernel so only the ELD exported to
userspace was affected. No issues have been reported.

v2: Fixed so that eld_size is adjusted upwards accordingly as well.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - hdmi: Skip out-of-range latency values in AMD ELD generator
Anssi Hannula [Sun, 10 Nov 2013 18:56:11 +0000 (20:56 +0200)]
ALSA: hda - hdmi: Skip out-of-range latency values in AMD ELD generator

The ATI/AMD video/audio latencies are specified in apparent HDMI VSDB
format. In this format values above 251 are not valid (or stream
component is not supported - 255), but no checking is performed since
this was not mentioned in the AMD HDA verbs specification.

Check that the latencies are valid before using them, and add a comment
describing the formats.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - hdmi: Add error-checking to some codec reads
Anssi Hannula [Sun, 10 Nov 2013 18:56:10 +0000 (20:56 +0200)]
ALSA: hda - hdmi: Add error-checking to some codec reads

Add error checks to HBR status reads (both generic and ATI/AMD) and
ATI/AMD codec reads for ELD generation.

Unchecked errors in these just caused more errors later on (invalid
codec writes for the HBR ones and ELD parsing errors for the ATI/AMD ELD
ones), but it is better to catch them earlier.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: usb: Fix wrong mapping of RLC and RRC channels
Anssi Hannula [Sun, 10 Nov 2013 19:24:05 +0000 (21:24 +0200)]
ALSA: usb: Fix wrong mapping of RLC and RRC channels

According to USB Audio spec v2 bits 25 and 26 of bmChannelConfig are
"Back Left of Center - BLC" and "Back Right of Center - BRC",
respectively.

They are currently assigned to ALSA channels BLC/BRC. However, the ALSA
BLC/BRC are actually the rather nonsensical "bottom left center" and
"bottom right center", so the channels will be assigned wrongly. The
comments in the USB code are also similarly wrong, so this is not
readily apparent without looking at the actual specification.

Fix the channel mapping by mapping bits 25 and 26 to RLC (Rear Left
Center) and RRC (Rear Right Center), respectively, instead.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - hdmi: Use TFx channel positions instead of FxH
Anssi Hannula [Sun, 10 Nov 2013 19:24:04 +0000 (21:24 +0200)]
ALSA: hda - hdmi: Use TFx channel positions instead of FxH

Channel map positions FLH, FCH, FRH duplicate positions TFL, TFC, TFR.
Both are the speakers above the front speakers (CEA uses "high" and USB
audio uses "top" nomenclature).

Since the USB audio code has used the TFx positions since v3.8
(04324ccc75f96, "ALSA: usb-audio: add channel map support") but the HDMI
code only just started using FxH in a5b7d510b2220cccb ("ALSA: hda -
hdmi: Fix channel maps with less common speakers") which is not yet in
any released kernel, standardize on TFx instead.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: sparc: fix missing unlock on error in snd_cs4231_playback_prepare()
Wei Yongjun [Mon, 11 Nov 2013 14:21:33 +0000 (22:21 +0800)]
ALSA: sparc: fix missing unlock on error in snd_cs4231_playback_prepare()

Add the missing unlock before return from function
snd_cs4231_playback_prepare() in the error handling
case.

Fixes: 5a19b178d7b4 ('ALSA: sparc/cs4231: Use WARN_ON() instead of BUG_ON()')
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Control SPDIF out pin on MacBookPro 11,2
Takashi Iwai [Fri, 8 Nov 2013 12:03:57 +0000 (13:03 +0100)]
ALSA: hda - Control SPDIF out pin on MacBookPro 11,2

The SPDIF output MBP11,2 requires the pin control to be set/cleared
for turning on/off the optical SPDIF.  The red light turns off only
when the corresponding pin control is cleared (or powered to D3).

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64401
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoMerge tag 'asoc-v3.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Fri, 8 Nov 2013 15:45:38 +0000 (16:45 +0100)]
Merge tag 'asoc-v3.13-fixes' of git://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v3.13

Some additional fixes for v3.13, the majority of which are removals and
downgrades of BUG()s from Takashi.

11 years agoALSA: hda/realtek - Add new codec ALC255/ALC3234 UAJ supported
Kailang Yang [Fri, 8 Nov 2013 07:54:49 +0000 (15:54 +0800)]
ALSA: hda/realtek - Add new codec ALC255/ALC3234 UAJ supported

New codec ALC255/ALC3234 support multifunction jacks.
It used for menual select the input device.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Apply MacBook fixups for CS4208 correctly
Takashi Iwai [Fri, 8 Nov 2013 11:50:31 +0000 (12:50 +0100)]
ALSA: hda - Apply MacBook fixups for CS4208 correctly

The commit [8fe7b65ab465: ALSA: hda - Apply GPIO setup for MacBooks
with CS4208] added a fixup entry matching with the vendor id 0x106b.
This broke the fixups for previous MBA6,1 and 6,2, since the PCI SSID
vendor id matches before evaluating the codec SSIDs.

We had a similar issue on Mac with Sigmatel codecs, and solve this
problem again similarly, by introducing a skeleton entry matching with
the all MacBooks, then remap to the right one.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64401
Fixes: 8fe7b65ab465 ('ALSA: hda - Apply GPIO setup for MacBooks with CS4208')
Cc: <stable@vger.kernel.org> [v3.12+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoMerge remote-tracking branch 'asoc/topic/wm8996' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:43 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/wm8996' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/wm8962' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:42 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/wm8962' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/wm8400' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:42 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/wm8400' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/wm0010' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:41 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/wm0010' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/warn' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:41 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/warn' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/twl6040' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:40 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/twl6040' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/twl4030' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:40 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/twl4030' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/tpa6130a2' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:40 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/tpa6130a2' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/tlv320aic3x' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:39 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/tlv320aic3x' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/tlv320aic32x4' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:39 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/tlv320aic32x4' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/tlv320aic26' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:38 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/tlv320aic26' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/tlv320aic23' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:38 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/tlv320aic23' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/tegra' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:37 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/tegra' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/tas5086' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:37 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/tas5086' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/spear' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:36 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/spear' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/sn95031' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:36 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/sn95031' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/simple' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:35 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/simple' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/si476x' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:35 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/si476x' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/samsung' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:35 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/rt5640' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:34 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/rt5640' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/rcar' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:34 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/pxa' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:33 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/pxa' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/pcm1792a' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:33 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/pcm1792a' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/pcm1681' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:32 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/pcm1681' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/mxs' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:32 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/mxs' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/ml26124' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:31 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/ml26124' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/mc13783' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:31 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/mc13783' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/max9850' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:31 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/max9850' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/max98095' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:30 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/max98095' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/max98088' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:30 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/max98088' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/kirkwood' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:29 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/kirkwood' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/fsl' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:29 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/ep93xx' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:28 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/ep93xx' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/doc' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:28 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/doc' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/devm' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:27 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/devm' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/davinci' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:27 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/davinci' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/cs42l73' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:26 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/cs42l73' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/cs42l52' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:26 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/cs42l52' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/cs4271' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:25 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/cs4271' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/cq93vc' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:25 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/cq93vc' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/core' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:25 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/core' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/component' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:24 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/component' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/bclk' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:24 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/bclk' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/atmel' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:23 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/atmel' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/arizona' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:23 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/ak4642' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:22 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/ak4642' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/ak4104' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:22 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/ak4104' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/adsp' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:21 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/adav80x' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:21 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/adav80x' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/adau1373' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:20 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/adau1373' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/ab8500' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:20 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/ab8500' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/88pm860x' into asoc-next
Mark Brown [Fri, 8 Nov 2013 10:43:20 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/topic/88pm860x' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/fix/fsl' into asoc-linus
Mark Brown [Fri, 8 Nov 2013 10:43:19 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus

11 years agoMerge remote-tracking branch 'asoc/fix/dma' into asoc-linus
Mark Brown [Fri, 8 Nov 2013 10:43:18 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/fix/dma' into asoc-linus

11 years agoMerge remote-tracking branch 'asoc/fix/ak4642' into asoc-linus
Mark Brown [Fri, 8 Nov 2013 10:43:18 +0000 (10:43 +0000)]
Merge remote-tracking branch 'asoc/fix/ak4642' into asoc-linus

11 years agoASoC: fsl: imx-wm8962: remove an unneeded check
Dan Carpenter [Fri, 8 Nov 2013 09:54:44 +0000 (12:54 +0300)]
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>
11 years agoASoC: fsl: imx-pcm-fiq: Remove unused 'runtime' variable
Fabio Estevam [Fri, 8 Nov 2013 02:55:00 +0000 (00:55 -0200)]
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>
11 years agoALSA: hda/realtek - Make fixup regs persist after resume
Kailang Yang [Fri, 1 Nov 2013 07:57:35 +0000 (15:57 +0800)]
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>
11 years agoALSA: hda_intel: ratelimit "spurious response" message
Joe Perches [Thu, 7 Nov 2013 19:55:15 +0000 (11:55 -0800)]
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>
11 years agoASoC: generic-dmaengine-pcm: Use SNDRV_DMA_TYPE_DEV_IRAM as default
Nicolin Chen [Thu, 7 Nov 2013 06:45:16 +0000 (14:45 +0800)]
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>
11 years agoASoC: dapm: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Thu, 7 Nov 2013 17:38:47 +0000 (18:38 +0100)]
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>
11 years agoASoC: wm_adsp: Fix BUG_ON() and WARN_ON() usages
Takashi Iwai [Tue, 5 Nov 2013 17:40:00 +0000 (18:40 +0100)]
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>
11 years agoASoC: Replace BUG() with WARN()
Takashi Iwai [Wed, 6 Nov 2013 10:07:19 +0000 (11:07 +0100)]
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>
11 years agoASoC: wm_hubs: Replace BUG() with WARN()
Takashi Iwai [Wed, 6 Nov 2013 10:07:18 +0000 (11:07 +0100)]
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>
11 years agoASoC: wm8996: Replace BUG() with WARN()
Takashi Iwai [Wed, 6 Nov 2013 10:07:17 +0000 (11:07 +0100)]
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>
11 years agoASoC: wm8962: Replace BUG() with WARN()
Takashi Iwai [Wed, 6 Nov 2013 10:07:16 +0000 (11:07 +0100)]
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>
11 years agoASoC: wm8958: Replace BUG() with WARN()
Takashi Iwai [Wed, 6 Nov 2013 10:07:15 +0000 (11:07 +0100)]
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>
11 years agoASoC: wm8904: Replace BUG() with WARN()
Takashi Iwai [Wed, 6 Nov 2013 10:07:14 +0000 (11:07 +0100)]
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>
11 years agoASoC: wm8900: Replace BUG() with WARN()
Takashi Iwai [Wed, 6 Nov 2013 10:07:13 +0000 (11:07 +0100)]
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>
11 years agoASoC: wm8350: Replace BUG() with WARN()
Takashi Iwai [Wed, 6 Nov 2013 10:07:12 +0000 (11:07 +0100)]
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>
11 years agoASoC: txx9: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:40:07 +0000 (18:40 +0100)]
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>
11 years agoASoC: sh: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:40:06 +0000 (18:40 +0100)]
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>
11 years agoASoC: rcar: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:40:05 +0000 (18:40 +0100)]
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>
11 years agoASoC: s6000: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:40:04 +0000 (18:40 +0100)]
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>
11 years agoASoC: pxa: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:40:03 +0000 (18:40 +0100)]
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>
11 years agoASoC: omap: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:40:02 +0000 (18:40 +0100)]
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>
11 years agoASoC: mid-x86: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:40:01 +0000 (18:40 +0100)]
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>
11 years agoALSA: hda - Get rid of AMD HDMI exception in hdmi_present_sense()
Takashi Iwai [Thu, 7 Nov 2013 15:39:37 +0000 (16:39 +0100)]
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>
11 years agoALSA: ice1724: Fix compile warning with CONFIG_PROC_FS=n
Takashi Iwai [Thu, 7 Nov 2013 14:44:11 +0000 (15:44 +0100)]
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>
11 years agoALSA: hda - block HDMI jack reports while repolling
David Henningsson [Thu, 7 Nov 2013 12:38:25 +0000 (13:38 +0100)]
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>
11 years agoALSA: hda - Add a block_report flag to jacks
David Henningsson [Thu, 7 Nov 2013 12:38:24 +0000 (13:38 +0100)]
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>
11 years agoALSA: hda - Delay HDMI presence reports while waiting for ELD information
Takashi Iwai [Thu, 7 Nov 2013 12:38:23 +0000 (13:38 +0100)]
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>
11 years agoASoC: generic-dmaengine-pcm: Clear slave_config memory
Lee Jones [Wed, 6 Nov 2013 10:16:20 +0000 (10:16 +0000)]
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>
11 years agoALSA: include/uapi/sound/firewire.h: use "_UAPI" instead of "UAPI"
Chen Gang [Thu, 7 Nov 2013 03:14:29 +0000 (11:14 +0800)]
ALSA: include/uapi/sound/firewire.h: use "_UAPI" instead of "UAPI"

When installing, "scripts/headers_install.sh" will strip guard macro'
"_UAPI" to prevent from appearing it to users. And also, all another
files which need uapi prefix always use "_UAPI", not "UAPI".

So use "_UAPI" instead of "UAPI" on the guard macro, and also give a
comment for "#endif".

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: sb16 - info leak in snd_sb_csp_ioctl()
Dan Carpenter [Thu, 7 Nov 2013 08:09:54 +0000 (11:09 +0300)]
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>
11 years agoALSA: compress: fix drain calls blocking other compress functions (v6)
Vinod Koul [Thu, 7 Nov 2013 09:08:22 +0000 (10:08 +0100)]
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 917f4b5cba78 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>
11 years agoALSA: hda - Another Dell headset quirk
David Henningsson [Thu, 7 Nov 2013 08:28:59 +0000 (09:28 +0100)]
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>
11 years agoALSA: hda - Add pincfg fixup for ASUS W5A
Takashi Iwai [Thu, 7 Nov 2013 06:29:30 +0000 (07:29 +0100)]
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>
11 years agoALSA: hda - Add support for CX20952
Takashi Iwai [Wed, 6 Nov 2013 17:47:42 +0000 (18:47 +0100)]
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>