GitHub/moto-9609/android_kernel_motorola_exynos9610.git
9 years agoMerge tag 'asoc-v4.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Mon, 31 Aug 2015 14:25:22 +0000 (16:25 +0200)]
Merge tag 'asoc-v4.2-rc8' of git://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v4.3

Not many updates to the core here, but an awful lot of driver updates
this time round:

 - Factoring out of AC'97 reset code into the core
 - New drivers for Cirrus CS4349, GTM601, InvenSense ICS43432, Realtek
   RT298 and ST STI controllers.
 - Machine drivers for Rockchip systems with MAX98090 and RT5645 and
   RT5650.
 - Initial driver support for Intel Skylake devices.
 - A large number of cleanups for Lars-Peter Clausen and Axel Lin.

9 years agoMerge remote-tracking branches 'asoc/topic/wm8996', 'asoc/topic/xtensa' and 'asoc...
Mark Brown [Sun, 30 Aug 2015 14:59:18 +0000 (15:59 +0100)]
Merge remote-tracking branches 'asoc/topic/wm8996', 'asoc/topic/xtensa' and 'asoc/topic/zx296702' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/wm8741', 'asoc/topic/wm8753', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:58:56 +0000 (15:58 +0100)]
Merge remote-tracking branches 'asoc/topic/wm8741', 'asoc/topic/wm8753', 'asoc/topic/wm8904', 'asoc/topic/wm8960' and 'asoc/topic/wm8983' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/wm0010', 'asoc/topic/wm5100', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:58:36 +0000 (15:58 +0100)]
Merge remote-tracking branches 'asoc/topic/wm0010', 'asoc/topic/wm5100', 'asoc/topic/wm5110', 'asoc/topic/wm8004' and 'asoc/topic/wm8731' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/txx9', 'asoc/topic/uda134x', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:58:18 +0000 (15:58 +0100)]
Merge remote-tracking branches 'asoc/topic/txx9', 'asoc/topic/uda134x', 'asoc/topic/ux500' and 'asoc/topic/width' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', 'asoc...
Mark Brown [Sun, 30 Aug 2015 14:57:34 +0000 (15:57 +0100)]
Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', 'asoc/topic/tegra', 'asoc/topic/tlv' and 'asoc/topic/topology' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/ssm2518', 'asoc/topic/sta529', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:57:13 +0000 (15:57 +0100)]
Merge remote-tracking branches 'asoc/topic/ssm2518', 'asoc/topic/sta529', 'asoc/topic/sti' and 'asoc/topic/sti-sas' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/sh', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:56:44 +0000 (15:56 +0100)]
Merge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/sh', 'asoc/topic/simple', 'asoc/topic/sirf-codec' and 'asoc/topic/spear' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/rt298', 'asoc/topic/rt5640', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:56:27 +0000 (15:56 +0100)]
Merge remote-tracking branches 'asoc/topic/rt298', 'asoc/topic/rt5640', 'asoc/topic/rt5651' and 'asoc/topic/rt5670' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', 'asoc...
Mark Brown [Sun, 30 Aug 2015 14:55:54 +0000 (15:55 +0100)]
Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', 'asoc/topic/rl6231', 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/pm-ops', 'asoc/topic/pxa' and 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:55:41 +0000 (15:55 +0100)]
Merge remote-tracking branches 'asoc/topic/pm-ops', 'asoc/topic/pxa' and 'asoc/topic/qcom' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/mediatek', 'asoc/topic/mtk', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:55:21 +0000 (15:55 +0100)]
Merge remote-tracking branches 'asoc/topic/mediatek', 'asoc/topic/mtk', 'asoc/topic/nuc900', 'asoc/topic/of-name' and 'asoc/topic/omap' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/max98090', 'asoc/topic/max98095', 'asoc...
Mark Brown [Sun, 30 Aug 2015 14:54:57 +0000 (15:54 +0100)]
Merge remote-tracking branches 'asoc/topic/max98090', 'asoc/topic/max98095', 'asoc/topic/max98357a', 'asoc/topic/max9877' and 'asoc/topic/max98925' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/intel', 'asoc/topic/kirkwood', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:54:38 +0000 (15:54 +0100)]
Merge remote-tracking branches 'asoc/topic/intel', 'asoc/topic/kirkwood', 'asoc/topic/lm49453', 'asoc/topic/max9768' and 'asoc/topic/max98088' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/fsl-ssi', 'asoc...
Mark Brown [Sun, 30 Aug 2015 14:54:15 +0000 (15:54 +0100)]
Merge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/fsl-ssi', 'asoc/topic/gtm601', 'asoc/topic/ics43432' and 'asoc/topic/ids' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/fsi', 'asoc/topic/fsl', 'asoc/topic/fsl...
Mark Brown [Sun, 30 Aug 2015 14:53:56 +0000 (15:53 +0100)]
Merge remote-tracking branches 'asoc/topic/fsi', 'asoc/topic/fsl', 'asoc/topic/fsl-asrc', 'asoc/topic/fsl-card' and 'asoc/topic/fsl-sai' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/davinci-vcif', ...
Mark Brown [Sun, 30 Aug 2015 14:53:39 +0000 (15:53 +0100)]
Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/davinci-vcif', 'asoc/topic/doc' and 'asoc/topic/dpcm' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42l73', 'asoc...
Mark Brown [Sun, 30 Aug 2015 14:53:22 +0000 (15:53 +0100)]
Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42l73', 'asoc/topic/cs4349' and 'asoc/topic/da732x' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/const', 'asoc/topic/cs35l32', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:52:59 +0000 (15:52 +0100)]
Merge remote-tracking branches 'asoc/topic/const', 'asoc/topic/cs35l32', 'asoc/topic/cs4265' and 'asoc/topic/cs42l52' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/au1x', 'asoc/topic/bcm2835', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:52:41 +0000 (15:52 +0100)]
Merge remote-tracking branches 'asoc/topic/au1x', 'asoc/topic/bcm2835', 'asoc/topic/blackfin' and 'asoc/topic/card' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/ac97', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:52:21 +0000 (15:52 +0100)]
Merge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/ac97', 'asoc/topic/ak4542', 'asoc/topic/arizona' and 'asoc/topic/atmel' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/ssm4567' into asoc-next
Mark Brown [Sun, 30 Aug 2015 14:52:16 +0000 (15:52 +0100)]
Merge remote-tracking branch 'asoc/topic/ssm4567' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/rt5645' into asoc-next
Mark Brown [Sun, 30 Aug 2015 14:52:12 +0000 (15:52 +0100)]
Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/pcm1681' into asoc-next
Mark Brown [Sun, 30 Aug 2015 14:52:08 +0000 (15:52 +0100)]
Merge remote-tracking branch 'asoc/topic/pcm1681' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/dapm' into asoc-next
Mark Brown [Sun, 30 Aug 2015 14:51:57 +0000 (15:51 +0100)]
Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/core' into asoc-next
Mark Brown [Sun, 30 Aug 2015 14:51:52 +0000 (15:51 +0100)]
Merge remote-tracking branch 'asoc/topic/core' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/fix/adav80x', 'asoc/fix/arizona', 'asoc/fix...
Mark Brown [Sun, 30 Aug 2015 14:51:20 +0000 (15:51 +0100)]
Merge remote-tracking branches 'asoc/fix/adav80x', 'asoc/fix/arizona', 'asoc/fix/max98090', 'asoc/fix/rt5640', 'asoc/fix/samsung' and 'asoc/fix/wm8994' into asoc-linus

9 years agoMerge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus
Mark Brown [Sun, 30 Aug 2015 14:51:15 +0000 (15:51 +0100)]
Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus

9 years agoASoC: zx296702-i2s: Fix resource leak when unload module
Axel Lin [Sat, 29 Aug 2015 15:09:30 +0000 (23:09 +0800)]
ASoC: zx296702-i2s: Fix resource leak when unload module

Use devm_* API to fix leaks in current code.
1. Use devm_kzalloc to fix memory leak for zx_i2s when unload the module.
2. Use devm_snd_soc_register_component to ensure component is unregistered
   when unload the module.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: sti_uniperif: Ensure component is unregistered when unload module
Axel Lin [Sat, 29 Aug 2015 15:06:32 +0000 (23:06 +0800)]
ASoC: sti_uniperif: Ensure component is unregistered when unload module

Use devm_snd_soc_register_component to ensure component is unregistered
when unload the module.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource
Axel Lin [Sun, 30 Aug 2015 03:09:49 +0000 (11:09 +0800)]
ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource

Use devm_ioremap_resource() instead of open code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: sh: dma-sh7760: Convert to devm_snd_soc_register_platform
Axel Lin [Sun, 30 Aug 2015 03:07:33 +0000 (11:07 +0800)]
ASoC: sh: dma-sh7760: Convert to devm_snd_soc_register_platform

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: spear_pcm: Use devm_snd_dmaengine_pcm_register to fix resource leak
Axel Lin [Sun, 30 Aug 2015 00:08:15 +0000 (08:08 +0800)]
ASoC: spear_pcm: Use devm_snd_dmaengine_pcm_register to fix resource leak

All the callers assume devm_spear_pcm_platform_register is a devm_ API, so
use devm_snd_dmaengine_pcm_register in devm_spear_pcm_platform_register.

Fixes: e1771bcf99b0 ("ASoC: SPEAr: remove custom DMA alloc compat function")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: fireworks/bebob/dice/oxfw: fix substreams counting at vmalloc failure
Takashi Sakamoto [Sat, 29 Aug 2015 01:38:46 +0000 (10:38 +0900)]
ALSA: fireworks/bebob/dice/oxfw: fix substreams counting at vmalloc failure

In PCM core, when hw_params() in each driver returns error, the state of
PCM substream is kept as 'open'. In this case, current drivers for sound
units on IEEE 1394 bus doesn't decrement substream counter in hw_free()
correctly. This causes these drivers to keep streams even if not
required.

This commit fixes this bug. When snd_pcm_lib_alloc_vmalloc_buffer()
fails, hw_params function in each driver returns without incrementing the
counter.

Reported-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: Clean up docbook warnings
Jonathan Corbet [Tue, 25 Aug 2015 07:14:48 +0000 (01:14 -0600)]
ASoC: Clean up docbook warnings

A number of functions and structures in the sound subsystem had incomplete
and/or obsolete DocBook comments, leading to warnings when the docs were
built.  Correct those comments so that we can enjoy our audio in the
absence of warning noise.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: txx9: Convert to devm_snd_soc_register_platform
Axel Lin [Thu, 27 Aug 2015 01:14:50 +0000 (09:14 +0800)]
ASoC: txx9: Convert to devm_snd_soc_register_platform

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: pxa: Convert to devm_snd_soc_register_platform
Axel Lin [Thu, 27 Aug 2015 01:13:46 +0000 (09:13 +0800)]
ASoC: pxa: Convert to devm_snd_soc_register_platform

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: nuc900: Convert to devm_snd_soc_register_platform
Axel Lin [Thu, 27 Aug 2015 01:12:17 +0000 (09:12 +0800)]
ASoC: nuc900: Convert to devm_snd_soc_register_platform

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: blackfin: Convert to devm_snd_soc_register_platform
Axel Lin [Thu, 27 Aug 2015 01:11:13 +0000 (09:11 +0800)]
ASoC: blackfin: Convert to devm_snd_soc_register_platform

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: au1x: Convert to devm_snd_soc_register_platform
Axel Lin [Thu, 27 Aug 2015 01:09:29 +0000 (09:09 +0800)]
ASoC: au1x: Convert to devm_snd_soc_register_platform

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: qcom: Constify asoc_qcom_lpass_cpu_dai_ops
Axel Lin [Fri, 28 Aug 2015 02:53:31 +0000 (10:53 +0800)]
ASoC: qcom: Constify asoc_qcom_lpass_cpu_dai_ops

asoc_qcom_lpass_cpu_dai_ops is exported and used by multiple drivers,
make it const to prevent modifying it at run time.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: sh: ssi: Convert to devm_snd_soc_register_component
Axel Lin [Fri, 28 Aug 2015 02:50:53 +0000 (10:50 +0800)]
ASoC: sh: ssi: Convert to devm_snd_soc_register_component

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: pxa2xx-i2s: Convert to devm_snd_soc_register_component
Axel Lin [Fri, 28 Aug 2015 02:49:44 +0000 (10:49 +0800)]
ASoC: pxa2xx-i2s: Convert to devm_snd_soc_register_component

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: pxa-ssp: Convert to devm_snd_soc_register_component
Axel Lin [Fri, 28 Aug 2015 02:48:35 +0000 (10:48 +0800)]
ASoC: pxa-ssp: Convert to devm_snd_soc_register_component

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ics43432: Fix build errors
Ricard Wanderlof [Fri, 28 Aug 2015 10:11:48 +0000 (12:11 +0200)]
ASoC: ics43432: Fix build errors

Fix build errors

Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ics43432: Fix module license
Axel Lin [Fri, 28 Aug 2015 03:23:05 +0000 (11:23 +0800)]
ASoC: ics43432: Fix module license

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ics43432: fix platform_no_drv_owner.cocci warnings
kbuild test robot [Fri, 28 Aug 2015 02:04:03 +0000 (10:04 +0800)]
ASoC: ics43432: fix platform_no_drv_owner.cocci warnings

sound/soc/codecs/ics43432.c:66:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: Ricard Wanderlof <ricard.wanderlof@axis.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: usb-audio: correct the value cache check.
Yao-Wen Mao [Fri, 28 Aug 2015 08:33:25 +0000 (16:33 +0800)]
ALSA: usb-audio: correct the value cache check.

The check of cval->cached should be zero-based (including master channel).

Signed-off-by: Yao-Wen Mao <yaowen@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'topic/ics43432' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Mark Brown [Thu, 27 Aug 2015 19:30:46 +0000 (20:30 +0100)]
Merge branch 'topic/ics43432' of git://git./linux/kernel/git/broonie/sound into asoc-gtm601

9 years agoMerge branch 'topic/gtm601' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Thu, 27 Aug 2015 19:29:18 +0000 (20:29 +0100)]
Merge branch 'topic/gtm601' of git://git./linux/kernel/git/broonie/sound into asoc-ics43432

9 years agoASoC: bcm2835-i2s: Fix module autoload for OF platform drivers
Luis de Bethencourt [Thu, 27 Aug 2015 15:04:01 +0000 (17:04 +0200)]
ASoC: bcm2835-i2s: Fix module autoload for OF platform drivers

These platform drivers have a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5645: Prevent the pop sound of the headphone while rebooting or shutdowning
Oder Chiou [Thu, 27 Aug 2015 07:14:51 +0000 (15:14 +0800)]
ASoC: rt5645: Prevent the pop sound of the headphone while rebooting or shutdowning

Add i2c shutdown function to prevent the pop sound of the headphone while
the system is rebooting or shutdowning. It de-initials the jack detection
function, and it cannot be turned off in _BIAS_OFF. If we don't de-initial
it, the pop sound will be heard in the situation of powering off. And
replace the related register settings from magic number to meaningful
defined name.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ics43432: Add codec driver for InvenSense ICS-43432
Ricard Wanderlof [Thu, 27 Aug 2015 09:35:20 +0000 (11:35 +0200)]
ASoC: ics43432: Add codec driver for InvenSense ICS-43432

Add support for the InvenSense ICS-43432 I2S MEMS microphone.

This is a non-software-configurable MEMS microphone with I2S output.

Tested on a setup with a single ICS-43432 (the device itself supports
stereo operation using a hardware pin controlling left vs. right channel
output).

Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tegra: Use devm_ioremap_resource instead of open code
Axel Lin [Sun, 23 Aug 2015 15:32:14 +0000 (23:32 +0800)]
ASoC: tegra: Use devm_ioremap_resource instead of open code

Use devm_ioremap_resource() to simplify the code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: omap-hdmi-audio: Set buffer bytes step constraint to 128
Jyri Sarha [Wed, 26 Aug 2015 13:11:40 +0000 (16:11 +0300)]
ASoC: omap-hdmi-audio: Set buffer bytes step constraint to 128

Set buffer bytes step constraint to 128. A matching constraint has
already been set to period size. This helps PCM setup to tolerate ALSA
clients that set the PCM hw params in unusual order.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: usb-audio: Handle normal and auto-suspend equally
Takashi Iwai [Wed, 26 Aug 2015 08:23:26 +0000 (10:23 +0200)]
ALSA: usb-audio: Handle normal and auto-suspend equally

In theory, the device may get suspended even at runtime PM suspend.
Currently we don't save the mixer state for autopm, and it may bring
inconsistency.

This patch removes the special handling for autosuspend.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: Replace probing flag with active refcount
Takashi Iwai [Wed, 26 Aug 2015 08:20:59 +0000 (10:20 +0200)]
ALSA: usb-audio: Replace probing flag with active refcount

We can use active refcount for preventing autopm during probe.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: Avoid nested autoresume calls
Takashi Iwai [Tue, 25 Aug 2015 14:09:00 +0000 (16:09 +0200)]
ALSA: usb-audio: Avoid nested autoresume calls

After the recent fix of runtime PM for USB-audio driver, we got a
lockdep warning like:

  =============================================
  [ INFO: possible recursive locking detected ]
  4.2.0-rc8+ #61 Not tainted
  ---------------------------------------------
  pulseaudio/980 is trying to acquire lock:
   (&chip->shutdown_rwsem){.+.+.+}, at: [<ffffffffa0355dac>] snd_usb_autoresume+0x1d/0x52 [snd_usb_audio]
  but task is already holding lock:
   (&chip->shutdown_rwsem){.+.+.+}, at: [<ffffffffa0355dac>] snd_usb_autoresume+0x1d/0x52 [snd_usb_audio]

This comes from snd_usb_autoresume() invoking down_read() and it's
used in a nested way.  Although it's basically safe, per se (as these
are read locks), it's better to reduce such spurious warnings.

The read lock is needed to guarantee the execution of "shutdown"
(cleanup at disconnection) task after all concurrent tasks are
finished.  This can be implemented in another better way.

Also, the current check of chip->in_pm isn't good enough for
protecting the racy execution of multiple auto-resumes.

This patch rewrites the logic of snd_usb_autoresume() & co; namely,
- The recursive call of autopm is avoided by the new refcount,
  chip->active.  The chip->in_pm flag is removed accordingly.
- Instead of rwsem, another refcount, chip->usage_count, is introduced
  for tracking the period to delay the shutdown procedure.  At
  the last clear of this refcount, wake_up() to the shutdown waiter is
  called.
- The shutdown flag is replaced with shutdown atomic count; this is
  for reducing the lock.
- Two new helpers are introduced to simplify the management of these
  refcounts; snd_usb_lock_shutdown() increases the usage_count, checks
  the shutdown state, and does autoresume.  snd_usb_unlock_shutdown()
  does the opposite.  Most of mixer and other codes just need this,
  and simply returns an error if it receives an error from lock.

Fixes: 9003ebb13f61 ('ALSA: usb-audio: Fix runtime PM unbalance')
Reported-and-tested-by: Alexnader Kuleshov <kuleshovmail@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Remove superfluous pcm NULL check
Takashi Iwai [Wed, 26 Aug 2015 12:21:14 +0000 (14:21 +0200)]
ALSA: hda - Remove superfluous pcm NULL check

The variable pcm can be never NULL since it was rewritten with
list_for_each_entry().

Suggested-by: Markus Osterhoff <linux-kernel@k-raum.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: rockchip: fix platform_no_drv_owner.cocci warnings
kbuild test robot [Wed, 26 Aug 2015 11:48:13 +0000 (19:48 +0800)]
ASoC: rockchip: fix platform_no_drv_owner.cocci warnings

sound/soc/rockchip/rockchip_rt5645.c:214:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rockchip: fix platform_no_drv_owner.cocci warnings
kbuild test robot [Wed, 26 Aug 2015 11:44:10 +0000 (19:44 +0800)]
ASoC: rockchip: fix platform_no_drv_owner.cocci warnings

sound/soc/rockchip/rockchip_max98090.c:225:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rockchip: fix a misjudgement by return
Xing Zheng [Tue, 25 Aug 2015 07:52:42 +0000 (15:52 +0800)]
ASoC: rockchip: fix a misjudgement by return

Being careless, judge the return value of snd_soc_card_jack_new
is opposite, so it should be fixed.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: hda - Fix widget sysfs tree corruption after refresh
Takashi Iwai [Wed, 26 Aug 2015 05:22:49 +0000 (07:22 +0200)]
ALSA: hda - Fix widget sysfs tree corruption after refresh

When snd_hdac_refresh_widget_sysfs() is called before the first
hda_widget_sysfs_init(), the next call overrides and eventually
fails.  This results in unexpected Oops, something like:
  BUG: unable to handle kernel NULL pointer dereference at 00000000000000c8
  IP: [<ffffffff8180e2a3>] hdmi_chmap_ctl_info+0x23/0x40

The fix is to add a check of the existing sysfs tree.  Also, for more
safety, this patch adds the checks of device_is_registered() in
snd-hdac_refresh_wdiget_sysfs(), too.

Fixes: fa4f18b4f402 ('ALSA: hda - Refresh widgets sysfs at probing Haswell+ HDMI codecs')
Bugizlla: https://bugzilla.kernel.org/show_bug.cgi?id=103431
Reported-by: Andreas Reis <andreas.reis@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: arizona: Poll for FLL clock OK rather than use interrupts
Charles Keepax [Tue, 25 Aug 2015 11:43:48 +0000 (12:43 +0100)]
ASoC: arizona: Poll for FLL clock OK rather than use interrupts

The extcon driver takes the DAPM mutex from within the interrupt thread
in several places, which makes it possible to get into a situation where
the interrupt thread is blocked waiting on the DAPM mutex whilst a DAPM
sequence is running which is attempting to configure the FLL. In this
case the FLL completion can't be completed as as the IRQ handler is
ONE_SHOT, which cause the FLL lock to use the full time out (250mS) and
report that the process timed out.

It is not really practical to make the extcon driver not take the DAPM
mutex from within the interrupt thread, at least not without extensive
modification. So this patch fixes the issue by switching the wait for
the FLL lock to polling. A few fast polls are done first as the FLL
should lock quickly for a good quality reference clock, (indeed it hits
on the first poll on my system) and it will poll every 20mS after that
until it times out.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
9 years agoASoC: rt5645: Add struct dmi_system_id "Google Celes" for chrome platform
Oder Chiou [Tue, 25 Aug 2015 08:03:48 +0000 (16:03 +0800)]
ASoC: rt5645: Add struct dmi_system_id "Google Celes" for chrome platform

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
9 years agoASoC: rt5645: Add the register RT5645_CHARGE_PUMP to readable check function
Oder Chiou [Mon, 24 Aug 2015 12:32:59 +0000 (20:32 +0800)]
ASoC: rt5645: Add the register RT5645_CHARGE_PUMP to readable check function

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5645: Remove the incorrect setting of the JD mode
Oder Chiou [Mon, 24 Aug 2015 12:32:58 +0000 (20:32 +0800)]
ASoC: rt5645: Remove the incorrect setting of the JD mode

The patch removes the incorrect setting of the JD mode. It will cause pop
sound in the booting time.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5645: Modify the jack detection function to prevent the pop sound while the...
Oder Chiou [Mon, 24 Aug 2015 12:32:57 +0000 (20:32 +0800)]
ASoC: rt5645: Modify the jack detection function to prevent the pop sound while the jack plug in

The patch corrects the sequence of the jack detection. It will prevent the
pop sound while the jack plug in.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5645: Modify the headphone depop and calibration function to prevent the...
Oder Chiou [Mon, 24 Aug 2015 12:32:56 +0000 (20:32 +0800)]
ASoC: rt5645: Modify the headphone depop and calibration function to prevent the pop sound in the booting time

Remove the original calibration function and modify the depop and
calibration function to prevent the pop sound in the booting time.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5677: Allow arbitrary block read/write via SPI
Ben Zhang [Sat, 22 Aug 2015 04:17:00 +0000 (21:17 -0700)]
ASoC: rt5677: Allow arbitrary block read/write via SPI

Added rt5677_spi_read() and refactored rt5677_spi_write() so that
an arbitrary block in the DSP address space can be read/written
via SPI. For example, this allows us to load an ELF DSP firmware
with sparse sections, and stream audio samples from DSP ring buffer.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Acked-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: ppc: Add missing inclusion of linux/module.h
Takashi Iwai [Tue, 25 Aug 2015 12:04:44 +0000 (14:04 +0200)]
ALSA: ppc: Add missing inclusion of linux/module.h

Otherwise it triggers a compile warning like:
 sound/ppc/keywest.c:104:1: warning: data definition has no type or storage class
 sound/ppc/keywest.c:104:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]

Fixes: a2bc2af66a5b ('ALSA: ppc: keywest: Export I2C module alias information')
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ppc: keywest: Export I2C module alias information
Javier Martinez Canillas [Tue, 25 Aug 2015 06:31:14 +0000 (08:31 +0200)]
ALSA: ppc: keywest: Export I2C module alias information

The I2C core always reports the MODALIAS uevent as "i2c:<client name"
regardless if the driver was matched using the I2C id_table or the
of_match_table. So the driver needs to export the I2C table and this
be built into the module or udev won't have the necessary information
to auto load the correct module when the device is added.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: tegra: Fix unused variable 'spdif' warning
Axel Lin [Sun, 23 Aug 2015 02:07:13 +0000 (10:07 +0800)]
ASoC: tegra: Fix unused variable 'spdif' warning

Fix below build warning:
  CC [M]  sound/soc/tegra/tegra20_spdif.o
sound/soc/tegra/tegra20_spdif.c: In function 'tegra20_spdif_platform_remove':
sound/soc/tegra/tegra20_spdif.c:361:24: warning: unused variable 'spdif' [-Wunused-variable]

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: SPEAr: Convert to use devm_ioremap_resource
Axel Lin [Mon, 24 Aug 2015 08:52:30 +0000 (16:52 +0800)]
ASoC: SPEAr: Convert to use devm_ioremap_resource

Use devm_ioremap_resource() instead of open code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: omap-mcbsp: Convert to use devm_ioremap_resource
Axel Lin [Mon, 24 Aug 2015 08:49:05 +0000 (16:49 +0800)]
ASoC: omap-mcbsp: Convert to use devm_ioremap_resource

Use devm_ioremap_resource() instead of open code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: davinci: Convert to use devm_ioremap_resource
Axel Lin [Mon, 24 Aug 2015 08:47:36 +0000 (16:47 +0800)]
ASoC: davinci: Convert to use devm_ioremap_resource

Use devm_ioremap_resource() instead of open code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: cs4349: fix platform_no_drv_owner.cocci warnings
kbuild test robot [Sat, 22 Aug 2015 16:30:19 +0000 (00:30 +0800)]
ASoC: cs4349: fix platform_no_drv_owner.cocci warnings

sound/soc/codecs/cs4349.c:389:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: Tim Howe <tim.howe@cirrus.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: hda - Refresh sysfs at snd_hda_codec_update_widgets()
Takashi Iwai [Tue, 25 Aug 2015 06:52:55 +0000 (08:52 +0200)]
ALSA: hda - Refresh sysfs at snd_hda_codec_update_widgets()

In the commit [fa4f18b4f402: ALSA: hda - Refresh widgets sysfs at
probing Haswell+ HDMI codecs], snd_hdac_refresh_widget_sysfs() is
explicitly called in the codec driver.  But this results in refreshing
twice, as snd_hdac_refresh_widget_sysfs() itself calls
snd_hdac_refresh_widgets() function.

Instead, we can replace the call in snd_hda_codec_update_widgets()
with snd_hdac_refresh_widget_sysfs().  This also fixes the missing
sysfs update for ca0132, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Tue, 25 Aug 2015 06:01:41 +0000 (08:01 +0200)]
Merge branch 'for-linus' into for-next

9 years agoALSA: hda - Fix path power activation
Takashi Iwai [Mon, 24 Aug 2015 08:52:06 +0000 (10:52 +0200)]
ALSA: hda - Fix path power activation

The widget power-saving code tries to turn up/down the power of each
widget in the I/O paths that are modified at each jack plug/unplug.
The recent report revealed that the power activation leaves some
widgets unpowered after plugging.  This is because
snd_hda_activate_path() turns on path->active flag at the end of the
function while the path power management is done before that.  Then
it's regarded as if nothing is active, and the driver turns off the
power.

The fix is simply to set the flag at the beginning of the function,
before trying to power up.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102521
Cc: <stable@vger.kernel.org> [v4.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Check all inputs for is_active_nid_for_any()
Takashi Iwai [Mon, 24 Aug 2015 08:45:27 +0000 (10:45 +0200)]
ALSA: hda - Check all inputs for is_active_nid_for_any()

The is_active_nid_for_any() function in the generic parser is supposed
to check all connections from/to the given widget, but the current
code checks only the first input connection (index = 0).

This patch corrects the code to check all inputs by passing -1 to
index argument.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102521
Cc: <stable@vger.kernel.org> [v4.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda: fix possible NULL dereference
Markus Osterhoff [Mon, 24 Aug 2015 12:11:39 +0000 (14:11 +0200)]
ALSA: hda: fix possible NULL dereference

After a for-loop was replaced by list_for_each_entry, see
Commit bbbc7e8502c9 ("ALSA: hda - Allocate hda_pcm objects dynamically"),
Commit 751e2216899c ("ALSA: hda: fix possible null dereference"),
a possible NULL pointer dereference has been introduced; this patch adds
the NULL check on pcm->pcm, while leaving a potentially superfluous
check on pcm itself untouched.

Signed-off-by: Markus Osterhoff <linux-kernel@k-raum.org>
Cc: <stable@vger.kernel.org> #v4.1+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoLinux 4.2-rc8
Linus Torvalds [Mon, 24 Aug 2015 03:52:59 +0000 (20:52 -0700)]
Linux 4.2-rc8

9 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Mon, 24 Aug 2015 03:46:22 +0000 (20:46 -0700)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "A couple of major (hang and deadlock) fixes with fortunately fairly
  rare triggering conditions.  The PM oops is only really triggered by
  people using enclosure services (rare) and the fnic driver is mostly
  used in enterprise environments"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  SCSI: Fix NULL pointer dereference in runtime PM
  fnic: Use the local variable instead of I/O flag to acquire io_req_lock in fnic_queuecommand() to avoid deadloack

9 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Sun, 23 Aug 2015 14:23:09 +0000 (07:23 -0700)]
Merge branch 'upstream' of git://git.linux-mips.org/ralf/upstream-linus

Pull MIPS bug fixes from Ralf Baechle:
 "Two more fixes for 4.2.

  One fixes a build issue with the LLVM assembler - LLVM assembler macro
  names are case sensitive, GNU as macro names are insensitive; the
  other corrects a license string (GPL v2, not GPLv2) such that the
  module loader will recognice the license correctly"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  FIRMWARE: bcm47xx_nvram: Fix module license.
  MIPS: Fix LLVM build issue.

9 years agoALSA: hdac: Add snd_hdac_get_hdac_stream()
Jeeja KP [Sun, 23 Aug 2015 06:22:51 +0000 (11:52 +0530)]
ALSA: hdac: Add snd_hdac_get_hdac_stream()

Add a helper to find the stream using stream tag and direction.
This is useful for drivers to query stream based on stream tag
and direction, fox example while downloading FW thru DSP loader
code

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hdac: fix the spbmaxfifo API
Vinod Koul [Sun, 23 Aug 2015 06:22:50 +0000 (11:52 +0530)]
ALSA: hdac: fix the spbmaxfifo API

spbmaxfifo API is actually a query function not a set function so
name it snd_hdac_ext_stream_get_spbmaxfifo()

Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hdac: Fix size allocation for ext device allocation
Vinod Koul [Sun, 23 Aug 2015 06:22:49 +0000 (11:52 +0530)]
ALSA: hdac: Fix size allocation for ext device allocation

While creating hdac_ext_device, we used hdev for sizeof insteadof
edev, which resulted in eventual crash of the system Fix the size
here

Fixes: a512f5611646 ('ALSA: hdac: add hdac extended device')
Reported-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sun, 23 Aug 2015 03:22:11 +0000 (20:22 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

Pull 9p regression fix from Al Viro:
 "Fix for breakage introduced when switching p9_client_{read,write}() to
  struct iov_iter * (went into 4.1)"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  9p: ensure err is initialized to 0 in p9_client_read/write

9 years ago9p: ensure err is initialized to 0 in p9_client_read/write
Vincent Bernat [Sat, 15 Aug 2015 13:49:13 +0000 (15:49 +0200)]
9p: ensure err is initialized to 0 in p9_client_read/write

Some use of those functions were providing unitialized values to those
functions. Notably, when reading 0 bytes from an empty file on a 9P
filesystem, the return code of read() was not 0.

Tested with this simple program:

    #include <assert.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <fcntl.h>
    #include <unistd.h>

    int main(int argc, const char **argv)
    {
        assert(argc == 2);
        char buffer[256];
        int fd = open(argv[1], O_RDONLY|O_NOCTTY);
        assert(fd >= 0);
        assert(read(fd, buffer, 0) == 0);
        return 0;
    }

Cc: stable@vger.kernel.org # v4.1
Signed-off-by: Vincent Bernat <vincent@bernat.im>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoMerge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Linus Torvalds [Sat, 22 Aug 2015 22:48:04 +0000 (15:48 -0700)]
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm

Pull ARM fixes from Russell King:
 "Another couple of small ARM fixes.

  A patch from Masahiro Yamada who noticed that "make -jN all zImage"
  would end up generating bad images where N > 1, and a patch from
  Nicolas to fix the Marvell CPU user access optimisation code when page
  faults are disabled"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8418/1: add boot image dependencies to not generate invalid images
  ARM: 8414/1: __copy_to_user_memcpy: fix mmap semaphore usage

9 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 22 Aug 2015 15:15:36 +0000 (08:15 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Various low level fixes: fix more fallout from the FPU rework and the
  asm entry code rework, plus an MSI rework fix, and an idle-tracing fix"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/fpu/math-emu: Fix crash in fork()
  x86/fpu/math-emu: Fix math-emu boot crash
  x86/idle: Restore trace_cpu_idle to mwait_idle() calls
  x86/irq: Build correct vector mapping for multiple MSI interrupts
  Revert "sched/x86_64: Don't save flags on context switch"

9 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 22 Aug 2015 15:06:28 +0000 (08:06 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "Tooling fixes: a 'perf record' deadlock fix plus debuggability fixes"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf top: Show backtrace when handling a SIGSEGV on --stdio mode
  perf tools: Fix buildid processing
  perf tools: Make fork event processing more resilient
  perf tools: Avoid deadlock when map_groups are broken

9 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 22 Aug 2015 14:45:36 +0000 (07:45 -0700)]
Merge branch 'irq-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull irq fixes from Thomas Gleixner:
 "A series of small fixlets for a regression visible on OMAP devices
  caused by the conversion of the OMAP interrupt chips to hierarchical
  interrupt domains.  Mostly one liners on the driver side plus a small
  helper function in the core to avoid open coded mess in the drivers"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/crossbar: Restore set_wake functionality
  irqchip/crossbar: Restore the mask on suspend behaviour
  ARM: OMAP: wakeupgen: Restore the irq_set_type() mechanism
  irqchip/crossbar: Restore the irq_set_type() mechanism
  genirq: Introduce irq_chip_set_type_parent() helper
  genirq: Don't return ENOSYS in irq_chip_retrigger_hierarchy

9 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 22 Aug 2015 14:37:41 +0000 (07:37 -0700)]
Merge branch 'timers-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull timer fixes from Thomas Gleixner:
 "Two minimalistic fixes for 4.2 regressions:

   - Eric fixed a thinko in the timer_list base switching code caused by
     the overhaul of the timer wheel.  It can cause a cpu to see the
     wrong base for a timer while we move the timer around.

   - Guenter fixed a regression for IMX if booted w/o device tree, where
     the timer interrupt is not initialized and therefor the machine
     fails to boot"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource/imx: Fix boot with non-DT systems
  timer: Write timer->flags atomically

9 years agoALSA: hdsp: silence a sprinft() overflow warning
Dan Carpenter [Sat, 22 Aug 2015 09:24:13 +0000 (12:24 +0300)]
ALSA: hdsp: silence a sprinft() overflow warning

card->shortname is a 32 char string so the sprintf() can theoretically
overflow.  snd_rawmidi_new() can accept strings up to 64 bytes long.

I have made the temporay buf[] array 40 bytes long and changed the
sprintf() to snprintf().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agox86/fpu/math-emu: Fix crash in fork()
Ingo Molnar [Wed, 27 May 2015 10:22:29 +0000 (12:22 +0200)]
x86/fpu/math-emu: Fix crash in fork()

During later stages of math-emu bootup the following crash triggers:

 math_emulate: 0060:c100d0a8
 Kernel panic - not syncing: Math emulation needed in kernel
 CPU: 0 PID: 1511 Comm: login Not tainted 4.2.0-rc7+ #1012
 [...]
 Call Trace:
  [<c181d50d>] dump_stack+0x41/0x52
  [<c181c918>] panic+0x77/0x189
  [<c1003530>] ? math_error+0x140/0x140
  [<c164c2d7>] math_emulate+0xba7/0xbd0
  [<c100d0a8>] ? fpu__copy+0x138/0x1c0
  [<c1109c3c>] ? __alloc_pages_nodemask+0x12c/0x870
  [<c136ac20>] ? proc_clear_tty+0x40/0x70
  [<c136ac6e>] ? session_clear_tty+0x1e/0x30
  [<c1003530>] ? math_error+0x140/0x140
  [<c1003575>] do_device_not_available+0x45/0x70
  [<c100d0a8>] ? fpu__copy+0x138/0x1c0
  [<c18258e6>] error_code+0x5a/0x60
  [<c1003530>] ? math_error+0x140/0x140
  [<c100d0a8>] ? fpu__copy+0x138/0x1c0
  [<c100c205>] arch_dup_task_struct+0x25/0x30
  [<c1048cea>] copy_process.part.51+0xea/0x1480
  [<c115a8e5>] ? dput+0x175/0x200
  [<c136af70>] ? no_tty+0x30/0x30
  [<c1157242>] ? do_vfs_ioctl+0x322/0x540
  [<c104a21a>] _do_fork+0xca/0x340
  [<c1057b06>] ? SyS_rt_sigaction+0x66/0x90
  [<c104a557>] SyS_clone+0x27/0x30
  [<c1824a80>] sysenter_do_call+0x12/0x12

The reason is the incorrect assumption in fpu_copy(), that FNSAVE
can be executed from math-emu kernels as well.

Don't try to copy the registers, the soft state will be copied
by fork anyway, so the child task inherits the parent task's
soft math state.

With this fix applied math-emu kernels boot up fine on modern
hardware and the 'no387 nofxsr' boot options.

Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Bobby Powers <bobbypowers@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
9 years agox86/fpu/math-emu: Fix math-emu boot crash
Ingo Molnar [Sat, 22 Aug 2015 07:52:06 +0000 (09:52 +0200)]
x86/fpu/math-emu: Fix math-emu boot crash

On a math-emu bootup the following crash occurs:

Initializing CPU#0
------------[ cut here ]------------
kernel BUG at arch/x86/kernel/traps.c:779!
invalid opcode: 0000 [#1] SMP
[...]
EIP is at do_device_not_available+0xe/0x70
[...]
Call Trace:
 [<c18238e6>] error_code+0x5a/0x60
 [<c1002bd0>] ? math_error+0x140/0x140
 [<c100bbd9>] ? fpu__init_cpu+0x59/0xa0
 [<c1012322>] cpu_init+0x202/0x330
 [<c104509f>] ? __native_set_fixmap+0x1f/0x30
 [<c1b56ab0>] trap_init+0x305/0x346
 [<c1b548af>] start_kernel+0x1a5/0x35d
 [<c1b542b4>] i386_start_kernel+0x82/0x86

The reason is that in the following commit:

  b1276c48e91b ("x86/fpu: Initialize fpregs in fpu__init_cpu_generic()")

I failed to consider math-emu's limitation that it cannot execute the
FNINIT instruction in kernel mode.

The long term fix might be to allow math-emu to execute (certain) kernel
mode FPU instructions, but for now apply the safe (albeit somewhat ugly)
fix: initialize the emulation state explicitly without trapping out to
the FPU emulator.

Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
9 years agoASoC: topology: Add support for TLV bytes controls
Mengdong Lin [Tue, 18 Aug 2015 10:12:20 +0000 (18:12 +0800)]
ASoC: topology: Add support for TLV bytes controls

Allow vendor drivers to define bespoke bytes ext handlers and IDs for
TLV bytes controls. And the topology core will bind these handlers by
matching IDs defined by the vendor driver and user space topology
data file.

And TLV callback binding is moved to soc_tplg_kcontrol_bind_io(). This
function process all handler binding now.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: topology: Reduce arguments of soc_tplg_kcontrol_bind_io()
Mengdong Lin [Tue, 18 Aug 2015 10:12:01 +0000 (18:12 +0800)]
ASoC: topology: Reduce arguments of soc_tplg_kcontrol_bind_io()

Add the pointer of struct soc_tplg as one argument, so no need to
pass standard/vendor specific kcontrol handlers and their count.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>