GitHub/LineageOS/android_kernel_motorola_exynos9610.git
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>
11 years agoALSA: lx6464es: Fix pointer cast compile warnings
Takashi Iwai [Wed, 6 Nov 2013 16:54:55 +0000 (17:54 +0100)]
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>
11 years agoALSA: cmi8328: Fix compile warnings without CONFIG_PM
Takashi Iwai [Wed, 6 Nov 2013 16:54:02 +0000 (17:54 +0100)]
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>
11 years agoALSA: HDA - Limit mic boost and add mute LED for an HP machine
David Henningsson [Wed, 6 Nov 2013 10:20:01 +0000 (11:20 +0100)]
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>
11 years agoALSA: hda - Make sure mute LEDs stay on during runtime suspend (Realtek)
David Henningsson [Wed, 6 Nov 2013 09:50:44 +0000 (10:50 +0100)]
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>
11 years agoALSA: pxa2xx: Replace BUG() with snd_BUG()
Takashi Iwai [Tue, 5 Nov 2013 14:33:40 +0000 (15:33 +0100)]
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>
11 years agoALSA: mips/ad1843: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 14:03:05 +0000 (15:03 +0100)]
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>
11 years agoALSA: sparc/cs4231: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 14:02:42 +0000 (15:02 +0100)]
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>
11 years agoALSA: ps3: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 14:01:47 +0000 (15:01 +0100)]
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>
11 years agoALSA: ctxfi: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 14:00:02 +0000 (15:00 +0100)]
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>
11 years agoALSA: intel8x0: Fix chmap application
Takashi Iwai [Wed, 6 Nov 2013 07:09:35 +0000 (08:09 +0100)]
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>
11 years agoALSA: hda - Apply GPIO setup for MacBooks with CS4208
Takashi Iwai [Tue, 5 Nov 2013 09:31:07 +0000 (10:31 +0100)]
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>
11 years agoALSA: hda - Name Haswell HDMI controllers better
Takashi Iwai [Tue, 5 Nov 2013 16:54:05 +0000 (17:54 +0100)]
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>
11 years agoALSA: hda - Force buffer alignment for Haswell HDMI controllers
Takashi Iwai [Tue, 5 Nov 2013 16:34:46 +0000 (17:34 +0100)]
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>
11 years agoALSA: atmel: remove dependency on <mach/gpio.h>
Linus Walleij [Tue, 5 Nov 2013 09:29:49 +0000 (10:29 +0100)]
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>
11 years agoALSA: hda - Enable Thinkpad mute/micmute LEDs for Realtek
David Henningsson [Tue, 5 Nov 2013 12:11:37 +0000 (13:11 +0100)]
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>
11 years agoALSA: hda: add device IDs for AMD Evergreen/Northern Islands HDMI
Clemens Ladisch [Tue, 5 Nov 2013 08:27:10 +0000 (09:27 +0100)]
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>
11 years agoALSA: hda - Introduce the bitmask for excluding output volume
Takashi Iwai [Mon, 4 Nov 2013 15:32:01 +0000 (16:32 +0100)]
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>
11 years agoALSA: hda - Add sanity check of vmaster slave dB steps
Takashi Iwai [Mon, 4 Nov 2013 14:51:00 +0000 (15:51 +0100)]
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>
11 years agoALSA: hda - Fix possible zero-division
Takashi Iwai [Mon, 4 Nov 2013 14:44:09 +0000 (15:44 +0100)]
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>
11 years agoALSA: usb - Don't trust the channel config if the channel count changed
David Henningsson [Tue, 5 Nov 2013 03:41:08 +0000 (04:41 +0100)]
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>
11 years agoALSA: usb - For class 2 devices, use channel map from altsettings
David Henningsson [Tue, 5 Nov 2013 03:41:07 +0000 (04:41 +0100)]
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>
11 years agoALSA: usb: supply channel maps even when wChannelConfig is unspecified
David Henningsson [Tue, 5 Nov 2013 03:41:06 +0000 (04:41 +0100)]
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>
11 years agoALSA: hda - Enable SPDIF for Acer TravelMate 6293
Takashi Iwai [Mon, 4 Nov 2013 17:21:08 +0000 (18:21 +0100)]
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>
11 years agoALSA: hda - Add Device IDs for Intel Wildcat Point-LP PCH
James Ralston [Mon, 4 Nov 2013 17:27:45 +0000 (09:27 -0800)]
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>
11 years agoALSA: hda - rename function not_share_unassigned_cvt()
Mengdong Lin [Mon, 4 Nov 2013 06:13:13 +0000 (01:13 -0500)]
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>
11 years agoALSA: hda - hdmi: Disallow unsupported 2ch remapping on NVIDIA codecs
Anssi Hannula [Sun, 3 Nov 2013 15:15:00 +0000 (17:15 +0200)]
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>
11 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Mon, 4 Nov 2013 09:10:02 +0000 (10:10 +0100)]
Merge branch 'for-linus' into for-next

11 years agoMerge tag 'asoc-v3.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Mon, 4 Nov 2013 09:05:07 +0000 (10:05 +0100)]
Merge tag 'asoc-v3.13-2' of git://git./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.

11 years agoMerge remote-tracking branch 'asoc/topic/wm8996' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:22 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/wm8996' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/wm8962' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:22 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/wm8962' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/wm0010' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:21 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/wm0010' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/samsung' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:20 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/rt5640' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:19 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/rt5640' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/rcar' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:19 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/ml26124' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:18 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/ml26124' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/kirkwood' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:17 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/kirkwood' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/fsl' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:17 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/dma' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:16 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/dma' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/cs42l52' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:16 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/cs42l52' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/core' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:15 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/core' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/arizona' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:14 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/adsp' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:14 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/ab8500' into asoc-next
Mark Brown [Mon, 4 Nov 2013 06:04:13 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/topic/ab8500' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus
Mark Brown [Mon, 4 Nov 2013 06:04:13 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus

11 years agoMerge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
Mark Brown [Mon, 4 Nov 2013 06:04:12 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus

11 years agoMerge remote-tracking branch 'asoc/fix/ak4642' into asoc-linus
Mark Brown [Mon, 4 Nov 2013 06:04:05 +0000 (22:04 -0800)]
Merge remote-tracking branch 'asoc/fix/ak4642' into asoc-linus

11 years agoASoC: wm8962: Add EQ coefficient support
Richard Fitzgerald [Fri, 1 Nov 2013 10:02:58 +0000 (10:02 +0000)]
ASoC: wm8962: Add EQ coefficient support

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoASoC: wm8962: Add ALC coefficient support
Richard Fitzgerald [Fri, 1 Nov 2013 10:02:10 +0000 (10:02 +0000)]
ASoC: wm8962: Add ALC coefficient support

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoASoC: wm_adsp: Print out the firmware version
Dimitris Papastamos [Fri, 1 Nov 2013 15:56:57 +0000 (15:56 +0000)]
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>
11 years agoASoC: wm_adsp: Remove and free algorithm regions for ADSP1
Dimitris Papastamos [Fri, 1 Nov 2013 15:56:56 +0000 (15:56 +0000)]
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>
11 years agoASoC: wm_adsp: Add debug info on get()/put() transfers
Dimitris Papastamos [Fri, 1 Nov 2013 15:56:55 +0000 (15:56 +0000)]
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>
11 years agoASoC: wm_adsp: Release firmware on memory allocation failure
Dimitris Papastamos [Fri, 1 Nov 2013 15:56:53 +0000 (15:56 +0000)]
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>
11 years agoASoC: wm_adsp: Print error when regmap reads/writes fail
Dimitris Papastamos [Fri, 1 Nov 2013 15:56:52 +0000 (15:56 +0000)]
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>
11 years agoALSA: hda - not choose assigned converters for unused pins of Valleyview
Mengdong Lin [Thu, 31 Oct 2013 22:31:51 +0000 (18:31 -0400)]
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>
11 years agoASoC: ak4642: prevent un-necessary changes to SG_SL1
Phil Edworthy [Fri, 1 Nov 2013 06:06:17 +0000 (23:06 -0700)]
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
11 years agoASoC: dpcm: improve robustness
Russell King - ARM Linux [Thu, 31 Oct 2013 15:09:20 +0000 (15:09 +0000)]
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>
11 years agoASoC: pcm: Check for ops before deferencing them
Mark Brown [Thu, 31 Oct 2013 00:47:39 +0000 (17:47 -0700)]
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>
11 years agoASoC: Use strlcpy() for copying in snd_soc_info_enum_double()
Takashi Iwai [Mon, 28 Oct 2013 13:21:46 +0000 (14:21 +0100)]
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>
11 years agoALSA: fix oops in snd_pcm_info() caused by ASoC DPCM
Russell King [Thu, 31 Oct 2013 15:01:37 +0000 (15:01 +0000)]
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>
11 years agoASoC: rcar: remove original filter from rsnd_dma_init()
Kuninori Morimoto [Tue, 29 Oct 2013 07:52:19 +0000 (00:52 -0700)]
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>
11 years agoASoC: ml26124: Fix negative array index read
Takashi Iwai [Wed, 30 Oct 2013 17:40:04 +0000 (18:40 +0100)]
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>
11 years agoMerge tag 'asoc-fix-v3.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broon...
Takashi Iwai [Wed, 30 Oct 2013 17:42:13 +0000 (18:42 +0100)]
Merge tag 'asoc-fix-v3.12-rc7' of git://git./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.

11 years agoMerge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus
Mark Brown [Wed, 30 Oct 2013 17:11:55 +0000 (10:11 -0700)]
Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus

11 years agoASoC: rt5640: Fix ignored error checks
Takashi Iwai [Wed, 30 Oct 2013 07:35:06 +0000 (08:35 +0100)]
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 10426571042658.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoASoC: wm8996: Fix negative array index read
Takashi Iwai [Wed, 30 Oct 2013 07:35:07 +0000 (08:35 +0100)]
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>
11 years agoALSA: hda - Add extra chmap for 2.1 outputs on ASUS laptops
Takashi Iwai [Wed, 30 Oct 2013 16:41:12 +0000 (17:41 +0100)]
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>
11 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Wed, 30 Oct 2013 16:40:54 +0000 (17:40 +0100)]
Merge branch 'for-linus' into for-next

11 years agoASoC: wm0010: Fix possible out-of-bounds array read
Takashi Iwai [Wed, 30 Oct 2013 07:35:03 +0000 (08:35 +0100)]
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>
11 years agoASoC: wm_hubs: Add missing break in hp_supply_event()
Takashi Iwai [Wed, 30 Oct 2013 07:35:02 +0000 (08:35 +0100)]
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
11 years agoASoC: ab8500: Fix invalid cast to long pointer
Takashi Iwai [Wed, 30 Oct 2013 07:35:01 +0000 (08:35 +0100)]
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>
11 years agoASoC: ab8500: Add missing of NULL check of devm_kzalloc()
Takashi Iwai [Wed, 30 Oct 2013 07:34:59 +0000 (08:34 +0100)]
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>
11 years agoALSA: hda - Add a fixup for ASUS N76VZ
Takashi Iwai [Wed, 30 Oct 2013 11:29:40 +0000 (12:29 +0100)]
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>
11 years agoALSA: hda - Disable AA-loopback on ALC283 Chromebook
Takashi Iwai [Wed, 30 Oct 2013 06:50:53 +0000 (07:50 +0100)]
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>
11 years agoASoC: wm8962: Fix null pointer pdata access in I2C probe()
Nicolin Chen [Tue, 29 Oct 2013 09:06:27 +0000 (17:06 +0800)]
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>
11 years agoALSA: lola: Fix uninitialized variable access in error message
Takashi Iwai [Tue, 29 Oct 2013 15:51:36 +0000 (16:51 +0100)]
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>
11 years agoALSA: ice1724: Fix uninitialized variable access
Takashi Iwai [Tue, 29 Oct 2013 15:45:34 +0000 (16:45 +0100)]
ALSA: ice1724: Fix uninitialized variable access

Spotted by coverity CIDs 751505 and 751506.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: ak4114: Fix wrong register array size
Takashi Iwai [Tue, 29 Oct 2013 15:37:11 +0000 (16:37 +0100)]
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>
11 years agoALSA: rme96: Return error code in PCM copy ops
Takashi Iwai [Tue, 29 Oct 2013 15:04:37 +0000 (16:04 +0100)]
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>
11 years agoALSA: ali5451: Drop unused variable
Takashi Iwai [Tue, 29 Oct 2013 14:42:29 +0000 (15:42 +0100)]
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>
11 years agoALSA: ad1889: Fix right attenuation proc output
Takashi Iwai [Tue, 29 Oct 2013 14:39:37 +0000 (15:39 +0100)]
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>
11 years agoALSA: Use strlcpy() instead of strncpy()
Takashi Iwai [Tue, 29 Oct 2013 14:26:12 +0000 (15:26 +0100)]
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>
11 years agoALSA: Limit the fallback card id string size
Takashi Iwai [Tue, 29 Oct 2013 14:20:06 +0000 (15:20 +0100)]
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>
11 years agoALSA: pcsp: Fix initialization with nopcm=1
Takashi Iwai [Tue, 29 Oct 2013 14:15:20 +0000 (15:15 +0100)]
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>
11 years agoALSA: opl3: Fix possible negative array index access
Takashi Iwai [Tue, 29 Oct 2013 14:07:19 +0000 (15:07 +0100)]
ALSA: opl3: Fix possible negative array index access

Spotted by coverity CID 115196.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: memalloc: NULL-initialize in snd_malloc_dev_iram()
Takashi Iwai [Tue, 29 Oct 2013 10:59:31 +0000 (11:59 +0100)]
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>
11 years agoALSA: memalloc: Make snd_{malloc|free}_dev_iram() static
Takashi Iwai [Tue, 29 Oct 2013 10:56:21 +0000 (11:56 +0100)]
ALSA: memalloc: Make snd_{malloc|free}_dev_iram() static

These are used only locally.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: Fix typo in documentation/alsa
Masanari Iida [Tue, 29 Oct 2013 03:05:02 +0000 (12:05 +0900)]
ALSA: Fix typo in documentation/alsa

Correct spelling typo in documentation/alsa

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: Optimize module name check
Takashi Iwai [Mon, 28 Oct 2013 11:54:52 +0000 (12:54 +0100)]
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>
11 years agoALSA: pcm: Add fallthru comments
Takashi Iwai [Mon, 28 Oct 2013 11:40:46 +0000 (12:40 +0100)]
ALSA: pcm: Add fallthru comments

Just to improve readability.
Spotted by coverity CID 115002 and 115003.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Remove locally dead codes
Takashi Iwai [Mon, 28 Oct 2013 11:00:35 +0000 (12:00 +0100)]
ALSA: hda - Remove locally dead codes

Reported by coverity.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Add a fallthru comment
Takashi Iwai [Mon, 28 Oct 2013 10:42:56 +0000 (11:42 +0100)]
ALSA: hda - Add a fallthru comment

... to improve the readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Fix possible NULL dereference in snd_hda_get_pin_label()
Takashi Iwai [Mon, 28 Oct 2013 10:39:23 +0000 (11:39 +0100)]
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>
11 years agoALSA: 6fire: Fix probe of multiple cards
Takashi Iwai [Mon, 28 Oct 2013 10:24:23 +0000 (11:24 +0100)]
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>
11 years agoASoC: dapm: Return -ENOMEM in snd_soc_dapm_new_dai_widgets()
Takashi Iwai [Mon, 28 Oct 2013 13:21:50 +0000 (14:21 +0100)]
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>
11 years agoASoC: dapm: Fix source list debugfs outputs
Takashi Iwai [Mon, 28 Oct 2013 13:21:49 +0000 (14:21 +0100)]
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
11 years agoALSA: memalloc: Yet another ifdef CONFIG_GENERIC_ALLOCATOR protection
Takashi Iwai [Mon, 28 Oct 2013 15:08:27 +0000 (16:08 +0100)]
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>
11 years agoALSA: pcm_dmaengine: Remove hardcoded PCM formats
Takashi Iwai [Fri, 25 Oct 2013 14:33:12 +0000 (16:33 +0200)]
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>
11 years agoLinux 3.12-rc7
Linus Torvalds [Sun, 27 Oct 2013 23:12:03 +0000 (16:12 -0700)]
Linux 3.12-rc7

11 years agoMerge branch 'parisc-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Sun, 27 Oct 2013 17:45:00 +0000 (10:45 -0700)]
Merge branch 'parisc-3.12' of git://git./linux/kernel/git/deller/parisc-linux

Pull parisc fix from Helge Deller:
 "This is a 2-line patch to save the CPU register which holds our task
  thread info pointer before calling a firmware function and then to
  restore it again afterwards.

  This is necessary because on some 64bit machines the high-order 32bits
  are being clobbered by the firmware call, and thus we failed to bring
  up secondary CPUs (and instead crashed the kernel) in some situations
  eg if we had more than 4GB RAM.  This patch fixes a bug which has been
  since ever in the parisc linux kernel and which prevented some people
  to use a 64bit kernel"

* 'parisc-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Do not crash 64bit SMP kernels on machines with >= 4GB RAM