Takashi Iwai [Wed, 13 Nov 2013 08:39:08 +0000 (09:39 +0100)]
ALSA: hda - Don't turn off EAPD for headphone on Lenovo N100
The only EAPD on AD1986A is on NID 0x1b where usually the speaker.
But this doesn't control only the speaker amp but may influence on all
outputs, e.g. Lenovo N100 laptop seems to have this issue.
Takashi Iwai [Tue, 12 Nov 2013 10:36:00 +0000 (11:36 +0100)]
ALSA: hda - Check keep_eapd_on before inv_eapd
We don't change the EAPD bit in set_pin_eapd() if keep_eapd_on flag is
set by the codec driver and enable is false. But, we also apply the
flipping of enable value according to inv_eapd flag in the same
function, and this confused the former check, handled as if it's
turned ON. The inverted EAPD check must be applied after keep_eapd_on
check, instead.
ALSA: hda - Fix Line Out automute on Realtek multifunction jacks
In case there is both a multifunction headset jack and a Line Out
jack, automuting was not working properly from the Line Out jack.
This patch fixes that issue.
Cc: stable@vger.kernel.org (3.10+) BugLink: https://bugs.launchpad.net/bugs/1250377 Tested-by: Cyrus Lien <cyrus.lien@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 12 Nov 2013 07:06:20 +0000 (08:06 +0100)]
ALSA: msnd: Avoid duplicated driver name
msnd_pinnacle.c is used for both snd-msnd-pinnacle and
snd-msnd-classic drivers, and both should have different driver
names. Using the same driver name results in the sysfs warning for
duplicated entries like
kobject: 'msnd-pinnacle.7' (cec33408): kobject_release, parent (null) (delayed)
kobject: 'msnd-pinnacle' (cecd4980): kobject_release, parent cf3ad9b0 (delayed)
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:486 sysfs_warn_dup+0x7d/0xa0()
sysfs: cannot create duplicate filename '/bus/isa/drivers/msnd-pinnacle'
......
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.
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.
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.
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.
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.
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).
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>