platform/kernel/linux-rpi.git
6 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Mon, 15 Jan 2018 15:45:11 +0000 (16:45 +0100)]
Merge branch 'for-linus' into for-next

Back-merge to the development branch for further fixes of sequencer
stuff.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoALSA: usb-audio: Add a quirk for Nura's first gen headset
Martin Peres [Sun, 14 Jan 2018 16:05:53 +0000 (18:05 +0200)]
ALSA: usb-audio: Add a quirk for Nura's first gen headset

The capture interface does not work, and the playback interface
actually supports only 48kHz unlike what is advertised (44.1, 32, 22,
16, 8).

The only unknown here is if there are other devices that use the same
product ID, but given that this ID is currently unknown, I would assume
it is specially allocated for the nura headset.

Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoMerge tag 'asoc-v4.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Fri, 12 Jan 2018 13:02:15 +0000 (14:02 +0100)]
Merge tag 'asoc-v4.16-2' of https://git./linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v4.16

Some more updates for v4.16, the big things here are the ST DFSDM driver
and the IIO patches required to support that and even more in the
neverending series of code quality improvements for x86, including
Pierre's work to improve the Kconfig.  The unused SN95031 driver and
associated board support are also removed, they haven't been buildable
for a considerable time without anyone noticing.

6 years agoMerge remote-tracking branches 'asoc/topic/wm8994', 'asoc/topic/wm8997' and 'asoc...
Mark Brown [Fri, 12 Jan 2018 12:29:46 +0000 (12:29 +0000)]
Merge remote-tracking branches 'asoc/topic/wm8994', 'asoc/topic/wm8997' and 'asoc/topic/wm8998' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/wm5102', 'asoc/topic/wm5110', 'asoc/topic...
Mark Brown [Fri, 12 Jan 2018 12:29:43 +0000 (12:29 +0000)]
Merge remote-tracking branches 'asoc/topic/wm5102', 'asoc/topic/wm5110', 'asoc/topic/wm8350', 'asoc/topic/wm8400' and 'asoc/topic/wm8903' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/uniphier', 'asoc/topic/utils', 'asoc/topic...
Mark Brown [Fri, 12 Jan 2018 12:29:40 +0000 (12:29 +0000)]
Merge remote-tracking branches 'asoc/topic/uniphier', 'asoc/topic/utils', 'asoc/topic/ux500', 'asoc/topic/wm0010' and 'asoc/topic/wm2000' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/tscs42xx', 'asoc/topic/twl4030', 'asoc...
Mark Brown [Fri, 12 Jan 2018 12:29:37 +0000 (12:29 +0000)]
Merge remote-tracking branches 'asoc/topic/tscs42xx', 'asoc/topic/twl4030', 'asoc/topic/twl6040' and 'asoc/topic/uda1380' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/tlv320aic31xx', 'asoc/topic/tlv320aic32x4...
Mark Brown [Fri, 12 Jan 2018 12:29:33 +0000 (12:29 +0000)]
Merge remote-tracking branches 'asoc/topic/tlv320aic31xx', 'asoc/topic/tlv320aic32x4', 'asoc/topic/tlv320aic3x', 'asoc/topic/tlv320dac33' and 'asoc/topic/ts3a227e' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/sunxi', 'asoc/topic/symmetry', 'asoc/topic...
Mark Brown [Fri, 12 Jan 2018 12:29:30 +0000 (12:29 +0000)]
Merge remote-tracking branches 'asoc/topic/sunxi', 'asoc/topic/symmetry', 'asoc/topic/tas5720', 'asoc/topic/tas6424' and 'asoc/topic/tfa9879' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/simple', 'asoc/topic/spdif', 'asoc/topic...
Mark Brown [Fri, 12 Jan 2018 12:29:27 +0000 (12:29 +0000)]
Merge remote-tracking branches 'asoc/topic/simple', 'asoc/topic/spdif', 'asoc/topic/st-dfsdm', 'asoc/topic/stm32' and 'asoc/topic/sun4i-i2s' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/rt5514', 'asoc/topic/rt5645', 'asoc/topic...
Mark Brown [Fri, 12 Jan 2018 12:29:23 +0000 (12:29 +0000)]
Merge remote-tracking branches 'asoc/topic/rt5514', 'asoc/topic/rt5645', 'asoc/topic/samsung' and 'asoc/topic/si476x' into asoc-next

6 years agoMerge remote-tracking branch 'asoc/topic/rl6231' into asoc-next
Mark Brown [Fri, 12 Jan 2018 12:29:22 +0000 (12:29 +0000)]
Merge remote-tracking branch 'asoc/topic/rl6231' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/mtk', 'asoc/topic/nau8540', 'asoc/topic...
Mark Brown [Fri, 12 Jan 2018 12:29:18 +0000 (12:29 +0000)]
Merge remote-tracking branches 'asoc/topic/mtk', 'asoc/topic/nau8540', 'asoc/topic/nau8824', 'asoc/topic/nau8825' and 'asoc/topic/nuc900' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/max98926', 'asoc/topic/max98927', 'asoc...
Mark Brown [Fri, 12 Jan 2018 12:29:14 +0000 (12:29 +0000)]
Merge remote-tracking branches 'asoc/topic/max98926', 'asoc/topic/max98927', 'asoc/topic/mc13783', 'asoc/topic/msm8916' and 'asoc/topic/mt8173' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/hdac_hdmi', 'asoc/topic/hisilicon', 'asoc...
Mark Brown [Fri, 12 Jan 2018 12:29:11 +0000 (12:29 +0000)]
Merge remote-tracking branches 'asoc/topic/hdac_hdmi', 'asoc/topic/hisilicon', 'asoc/topic/iio' and 'asoc/topic/max98373' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/eukrea-tlv320', 'asoc/topic/fsl', 'asoc...
Mark Brown [Fri, 12 Jan 2018 12:29:08 +0000 (12:29 +0000)]
Merge remote-tracking branches 'asoc/topic/eukrea-tlv320', 'asoc/topic/fsl', 'asoc/topic/fsl-ssi' and 'asoc/topic/fsl_asrc' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/da7218', 'asoc/topic/dai-drv', 'asoc/topic...
Mark Brown [Fri, 12 Jan 2018 12:29:05 +0000 (12:29 +0000)]
Merge remote-tracking branches 'asoc/topic/da7218', 'asoc/topic/dai-drv', 'asoc/topic/davinci', 'asoc/topic/disconnect' and 'asoc/topic/ep93xx' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42l73', 'asoc...
Mark Brown [Fri, 12 Jan 2018 12:29:02 +0000 (12:29 +0000)]
Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42l73', 'asoc/topic/cs47l24', 'asoc/topic/cx20442' and 'asoc/topic/da7213' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/cq93vc', 'asoc/topic/cs35l32', 'asoc/topic...
Mark Brown [Fri, 12 Jan 2018 12:28:59 +0000 (12:28 +0000)]
Merge remote-tracking branches 'asoc/topic/cq93vc', 'asoc/topic/cs35l32', 'asoc/topic/cs35l34' and 'asoc/topic/cs42l52' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/amd', 'asoc/topic...
Mark Brown [Fri, 12 Jan 2018 12:28:56 +0000 (12:28 +0000)]
Merge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/amd', 'asoc/topic/atmel', 'asoc/topic/codecs' and 'asoc/topic/compress' into asoc-next

6 years agoMerge remote-tracking branch 'asoc/topic/rockchip' into asoc-next
Mark Brown [Fri, 12 Jan 2018 12:28:54 +0000 (12:28 +0000)]
Merge remote-tracking branch 'asoc/topic/rockchip' into asoc-next

6 years agoMerge remote-tracking branch 'asoc/topic/rcar' into asoc-next
Mark Brown [Fri, 12 Jan 2018 12:28:52 +0000 (12:28 +0000)]
Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next

6 years agoMerge remote-tracking branch 'asoc/topic/qcom' into asoc-next
Mark Brown [Fri, 12 Jan 2018 12:28:51 +0000 (12:28 +0000)]
Merge remote-tracking branch 'asoc/topic/qcom' into asoc-next

6 years agoMerge remote-tracking branch 'asoc/topic/pcm512x' into asoc-next
Mark Brown [Fri, 12 Jan 2018 12:28:50 +0000 (12:28 +0000)]
Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-next

6 years agoMerge remote-tracking branch 'asoc/topic/pcm186x' into asoc-next
Mark Brown [Fri, 12 Jan 2018 12:28:48 +0000 (12:28 +0000)]
Merge remote-tracking branch 'asoc/topic/pcm186x' into asoc-next

6 years agoMerge remote-tracking branch 'asoc/topic/intel' into asoc-next
Mark Brown [Fri, 12 Jan 2018 12:28:47 +0000 (12:28 +0000)]
Merge remote-tracking branch 'asoc/topic/intel' into asoc-next

6 years agoMerge remote-tracking branch 'asoc/topic/core' into asoc-next
Mark Brown [Fri, 12 Jan 2018 12:28:46 +0000 (12:28 +0000)]
Merge remote-tracking branch 'asoc/topic/core' into asoc-next

6 years agoMerge remote-tracking branch 'asoc/fix/mtk' into asoc-linus
Mark Brown [Fri, 12 Jan 2018 12:28:43 +0000 (12:28 +0000)]
Merge remote-tracking branch 'asoc/fix/mtk' into asoc-linus

6 years agoMerge remote-tracking branch 'asoc/fix/rockchip' into asoc-linus
Mark Brown [Fri, 12 Jan 2018 12:28:41 +0000 (12:28 +0000)]
Merge remote-tracking branch 'asoc/fix/rockchip' into asoc-linus

6 years agoMerge remote-tracking branch 'asoc/fix/intel' into asoc-linus
Mark Brown [Fri, 12 Jan 2018 12:28:40 +0000 (12:28 +0000)]
Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus

6 years agoASoC: rt5645: add fallback case for jack detection support
Pierre-Louis Bossart [Thu, 11 Jan 2018 20:05:11 +0000 (14:05 -0600)]
ASoC: rt5645: add fallback case for jack detection support

Commit 78f5605c0329 ("ASoC: rt5645: cleanup DMI matching code") did a
lot of useful cleanups. This patch adds a default case to enable
jack detection if there is no pdata, device property or quirk.

The chosen jd-mode3 is the most common and should limit the addition
of new DMI-based quirks. Existing DMI quirks which only set this mode
are left as is and not removed.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agosound: Remove leftover msnd init declarations
Takashi Iwai [Thu, 11 Jan 2018 16:10:34 +0000 (17:10 +0100)]
sound: Remove leftover msnd init declarations

Some obsoleted functions are still declared in sound_core.c.
Get rid of them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agosound: Remove unused register_sound_midi() and co
Takashi Iwai [Thu, 11 Jan 2018 16:05:23 +0000 (17:05 +0100)]
sound: Remove unused register_sound_midi() and co

These helpers are no longer used after the removal of the legacy OSS
drivers.  Let's clean up.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoALSA: seq: Make ioctls race-free
Takashi Iwai [Tue, 9 Jan 2018 22:11:03 +0000 (23:11 +0100)]
ALSA: seq: Make ioctls race-free

The ALSA sequencer ioctls have no protection against racy calls while
the concurrent operations may lead to interfere with each other.  As
reported recently, for example, the concurrent calls of setting client
pool with a combination of write calls may lead to either the
unkillable dead-lock or UAF.

As a slightly big hammer solution, this patch introduces the mutex to
make each ioctl exclusive.  Although this may reduce performance via
parallel ioctl calls, usually it's not demanded for sequencer usages,
hence it should be negligible.

Reported-by: Luo Quan <a4651386@163.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoIIO: ADC: fix return value check in stm32_dfsdm_adc_probe()
Wei Yongjun [Thu, 11 Jan 2018 11:12:41 +0000 (11:12 +0000)]
IIO: ADC: fix return value check in stm32_dfsdm_adc_probe()

In case of error, the function devm_iio_device_alloc() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Fixes: e2e6771c6462 ("IIO: ADC: add STM32 DFSDM sigma delta ADC support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoIIO: ADC: stm32-dfsdm: avoid unused-variable warning
Arnd Bergmann [Thu, 11 Jan 2018 10:34:46 +0000 (11:34 +0100)]
IIO: ADC: stm32-dfsdm: avoid unused-variable warning

Building with CONFIG_OF disabled produces a compiler warning:

drivers/iio/adc/stm32-dfsdm-core.c: In function 'stm32_dfsdm_probe':
drivers/iio/adc/stm32-dfsdm-core.c:245:22: error: unused variable 'pnode' [-Werror=unused-variable]

This removes the variable and open-codes it in the only place
it gets used to avoid that warning.

Fixes: bed73904e76f ("IIO: ADC: add stm32 DFSDM core support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoIIO: ADC: stm32-dfsdm: avoid unused-variable warning
Arnd Bergmann [Thu, 11 Jan 2018 10:34:46 +0000 (11:34 +0100)]
IIO: ADC: stm32-dfsdm: avoid unused-variable warning

Building with CONFIG_OF disabled produces a compiler warning:

drivers/iio/adc/stm32-dfsdm-core.c: In function 'stm32_dfsdm_probe':
drivers/iio/adc/stm32-dfsdm-core.c:245:22: error: unused variable 'pnode' [-Werror=unused-variable]

This removes the variable and open-codes it in the only place
it gets used to avoid that warning.

Fixes: bed73904e76f ("IIO: ADC: add stm32 DFSDM core support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: stm32: fix a typo in stm32_adfsdm_probe()
Wei Yongjun [Thu, 11 Jan 2018 11:11:51 +0000 (11:11 +0000)]
ASoC: stm32: fix a typo in stm32_adfsdm_probe()

Fix a typo, we should return PTR_ERR(priv->iio_cb) instead of
PTR_ERR(priv->iio_ch).

Fixes: 55da094824c4 ("ASoC: stm32: add DFSDM DAI support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoMerge branch 'topic/iio' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Thu, 11 Jan 2018 10:39:26 +0000 (10:39 +0000)]
Merge branch 'topic/iio' of https://git./linux/kernel/git/broonie/sound into asoc-st-dfsdm

6 years agoASoC: stm32: select IIO_BUFFER
Arnd Bergmann [Thu, 11 Jan 2018 10:33:26 +0000 (11:33 +0100)]
ASoC: stm32: select IIO_BUFFER

The new stm32_adfsdm driver has incomplete dependencies as shown
by Kconfig:

warning: (SND_SOC_STM32_DFSDM && LMP91000) selects IIO_BUFFER_CB which has unmet direct dependencies (IIO && IIO_BUFFER)
sound/soc/stm/stm32_adfsdm.o: In function `stm32_adfsdm_trigger':
stm32_adfsdm.c:(.text+0x8c): undefined reference to `stm32_dfsdm_get_buff_cb'
stm32_adfsdm.c:(.text+0x9c): undefined reference to `stm32_dfsdm_release_buff_cb'

This makes the dependency on SND_SOC_STM32_DFSDM unconditional, so we can
always resolve the stm32_dfsdm_get_buff_cb/stm32_dfsdm_release_buff_cb
symbols and get the implied IIO_BUFFER dependency.

compile-testing on other platforms is still possible as long as that IIO
driver is there.

Fixes: 55da094824c4 ("ASoC: stm32: add DFSDM DAI support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoALSA: pcm: Remove yet superfluous WARN_ON()
Takashi Iwai [Wed, 10 Jan 2018 22:48:05 +0000 (23:48 +0100)]
ALSA: pcm: Remove yet superfluous WARN_ON()

muldiv32() contains a snd_BUG_ON() (which is morphed as WARN_ON() with
debug option) for checking the case of 0 / 0.  This would be helpful
if this happens only as a logical error; however, since the hw refine
is performed with any data set provided by user, the inconsistent
values that can trigger such a condition might be passed easily.
Actually, syzbot caught this by passing some zero'ed old hw_params
ioctl.

So, having snd_BUG_ON() there is simply superfluous and rather
harmful to give unnecessary confusions.  Let's get rid of it.

Reported-by: syzbot+7e6ee55011deeebce15d@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoASoC: ux500: add MODULE_LICENSE tag
Arnd Bergmann [Wed, 10 Jan 2018 16:34:45 +0000 (17:34 +0100)]
ASoC: ux500: add MODULE_LICENSE tag

This adds MODULE_LICENSE/AUTHOR/DESCRIPTION tags to the ux500
platform drivers, to avoid these build warnings:

WARNING: modpost: missing MODULE_LICENSE() in sound/soc/ux500/snd-soc-ux500-plat-dma.o
WARNING: modpost: missing MODULE_LICENSE() in sound/soc/ux500/snd-soc-ux500-mach-mop500.o

The company no longer exists, so the email addresses of the authors
don't work any more, but I've added them anyway for consistency.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoIIO: ADC: stm32_dfsdm_stop_filter() can be static
kbuild test robot [Wed, 10 Jan 2018 15:23:05 +0000 (23:23 +0800)]
IIO: ADC: stm32_dfsdm_stop_filter() can be static

Fixes: e2e6771c6462 ("IIO: ADC: add STM32 DFSDM sigma delta ADC support")
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mt8173: remove unnecessary micbias widget in route
Bard Liao [Fri, 5 Jan 2018 09:00:51 +0000 (17:00 +0800)]
ASoC: mt8173: remove unnecessary micbias widget in route

The micbias1/2 are connected to route as SUPPLY usage. It was not
take effect since they were MICBIAS type. To keep the same register
settings, we have to remove it once the micbias1/2 widget is converted
to SUPPLY type.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: sn95031: remove this code
Vinod Koul [Wed, 10 Jan 2018 10:29:35 +0000 (15:59 +0530)]
ASoC: sn95031: remove this code

This codec was used in MFLD systems in the PMIC chip, we no longer have
users for this, so remove it

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: remove mfld_machine
Vinod Koul [Wed, 10 Jan 2018 10:29:34 +0000 (15:59 +0530)]
ASoC: Intel: remove mfld_machine

mfld_machine was not getting compiled due to missed Makefile changes.
Since no one complained it is safe to assume that it is not being used,
so remove it

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: stm32: add DFSDM DAI support
Arnaud Pouliquen [Wed, 10 Jan 2018 10:13:15 +0000 (11:13 +0100)]
ASoC: stm32: add DFSDM DAI support

Add driver to handle DAI interface for PDM microphones connected
to Digital Filter for Sigma Delta Modulators IP.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: add bindings for stm32 DFSDM filter
Arnaud Pouliquen [Wed, 10 Jan 2018 10:13:14 +0000 (11:13 +0100)]
ASoC: add bindings for stm32 DFSDM filter

Add bindings that describes audio settings to support
Digital Filter for pulse density modulation(PDM) microphone.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoIIO: consumer: allow to set buffer sizes
Arnaud Pouliquen [Wed, 10 Jan 2018 10:13:13 +0000 (11:13 +0100)]
IIO: consumer: allow to set buffer sizes

Add iio consumer API to set buffer size and watermark according
to sysfs API.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoIIO: ADC: add stm32 DFSDM support for PDM microphone
Arnaud Pouliquen [Wed, 10 Jan 2018 10:13:12 +0000 (11:13 +0100)]
IIO: ADC: add stm32 DFSDM support for PDM microphone

This code offers a way to handle PDM audio microphones in
ASOC framework. Audio driver should use consumer API.
A specific management is implemented for DMA, with a
callback, to allows to handle audio buffers efficiently.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoIIO: ADC: add STM32 DFSDM sigma delta ADC support
Arnaud Pouliquen [Wed, 10 Jan 2018 10:13:11 +0000 (11:13 +0100)]
IIO: ADC: add STM32 DFSDM sigma delta ADC support

Add DFSDM driver to handle sigma delta ADC.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoIIO: ADC: add stm32 DFSDM core support
Arnaud Pouliquen [Wed, 10 Jan 2018 10:13:10 +0000 (11:13 +0100)]
IIO: ADC: add stm32 DFSDM core support

Add driver for stm32 DFSDM pheripheral. Its converts a sigma delta
stream in n bit samples through a low pass filter and an integrator.
stm32-dfsdm-core driver is the core part supporting the filter
instances dedicated to sigma-delta ADC or audio PDM microphone purpose.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoIIO: add DT bindings for stm32 DFSDM filter
Arnaud Pouliquen [Wed, 10 Jan 2018 10:13:09 +0000 (11:13 +0100)]
IIO: add DT bindings for stm32 DFSDM filter

Add bindings that describes STM32 Digital Filter for Sigma Delta
Modulators. DFSDM allows to connect sigma delta
modulators.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoIIO: ADC: add sigma delta modulator support
Arnaud Pouliquen [Wed, 10 Jan 2018 10:13:08 +0000 (11:13 +0100)]
IIO: ADC: add sigma delta modulator support

Add generic driver to support sigma delta modulators.
Typically, this device is hardware connected to
an IIO device in charge of the conversion. Devices are
bonded through the hardware consumer API.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoIIO: Add DT bindings for sigma delta adc modulator
Arnaud Pouliquen [Wed, 10 Jan 2018 10:13:07 +0000 (11:13 +0100)]
IIO: Add DT bindings for sigma delta adc modulator

Add documentation of device tree bindings to support
sigma delta modulator in IIO framework.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoIIO: inkern: API for manipulating channel attributes
Arnaud Pouliquen [Wed, 10 Jan 2018 10:13:06 +0000 (11:13 +0100)]
IIO: inkern: API for manipulating channel attributes

Extend the inkern API with functions for reading and writing
attribute of iio channels.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoIIO: hw_consumer: add devm_iio_hw_consumer_alloc
Arnaud Pouliquen [Wed, 10 Jan 2018 10:13:05 +0000 (11:13 +0100)]
IIO: hw_consumer: add devm_iio_hw_consumer_alloc

Add devm_iio_hw_consumer_alloc function that calls iio_hw_consumer_free
when the device is unbound from the bus.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agodocs: driver-api: add iio hw consumer section
Arnaud Pouliquen [Wed, 10 Jan 2018 10:13:04 +0000 (11:13 +0100)]
docs: driver-api: add iio hw consumer section

This adds a section about the Hardware consumer
API of the IIO subsystem to the driver API
documentation.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoiio: Add hardware consumer buffer support
Lars-Peter Clausen [Wed, 10 Jan 2018 10:13:03 +0000 (11:13 +0100)]
iio: Add hardware consumer buffer support

Hardware consumer interface can be used when one IIO device has
a direct connection to another device in hardware.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: max98373: Modified control names for TLV controls
Ryan Lee [Wed, 10 Jan 2018 05:02:01 +0000 (21:02 -0800)]
ASoC: max98373: Modified control names for TLV controls

Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: max98373: Added TDM off if parameters are all zeroes
Ryan Lee [Wed, 10 Jan 2018 05:02:00 +0000 (21:02 -0800)]
ASoC: max98373: Added TDM off if parameters are all zeroes

Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: max98373: Added missing blank lines
Ryan Lee [Wed, 10 Jan 2018 05:01:59 +0000 (21:01 -0800)]
ASoC: max98373: Added missing blank lines

Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoALSA: hda - Apply the existing quirk to iMac 14,1
Takashi Iwai [Wed, 10 Jan 2018 09:53:18 +0000 (10:53 +0100)]
ALSA: hda - Apply the existing quirk to iMac 14,1

iMac 14,1 requires the same quirk as iMac 12,2, using GPIO 2 and 3 for
headphone and speaker output amps.  Add the codec SSID quirk entry
(106b:0600) accordingly.

BugLink: http://lkml.kernel.org/r/CAEw6Zyteav09VGHRfD5QwsfuWv5a43r0tFBNbfcHXoNrxVz7ew@mail.gmail.com
Reported-by: Freaky <freaky2000@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoALSA: hda - Apply headphone noise quirk for another Dell XPS 13 variant
Takashi Iwai [Wed, 10 Jan 2018 07:34:28 +0000 (08:34 +0100)]
ALSA: hda - Apply headphone noise quirk for another Dell XPS 13 variant

There is another Dell XPS 13 variant (SSID 1028:082a) that requires
the existing fixup for reducing the headphone noise.
This patch adds the quirk entry for that.

BugLink: http://lkml.kernel.org/r/CAHXyb9ZCZJzVisuBARa+UORcjRERV8yokez=DP1_5O5isTz0ZA@mail.gmail.com
Reported-and-tested-by: Francisco G. <frangio.1@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoASoC: TSCS42xx: make functions pll_event and dac_event static
Colin Ian King [Mon, 8 Jan 2018 23:14:44 +0000 (23:14 +0000)]
ASoC: TSCS42xx: make functions pll_event and dac_event static

The functions pll_event and dac_event are local to the source and do
not need to be in global scope, so make them static.

Cleans up sparse warnings:
symbol 'pll_event' was not declared. Should it be static?
symbol 'dac_event' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: TSCS42xx: Fix control names
Steven Eckhoff [Mon, 8 Jan 2018 16:47:54 +0000 (09:47 -0700)]
ASoC: TSCS42xx: Fix control names

The tscs42xx CODEC driver can confuse userspace with non-standard
control names.

Remove "Switch" from enum control type names.
Add "Switch" to on/off control type names.

Signed-off-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: codecs: dmic: Make number of channels configurable
Matthias Kaehlcke [Fri, 5 Jan 2018 20:39:57 +0000 (12:39 -0800)]
ASoC: codecs: dmic: Make number of channels configurable

The DMIC DAI driver specifies a number of 1 to 8 channels for each DAI.
The actual number of mics can currently not be configured in the device
tree or audio glue, but is derived from the min/max channels of the CPU
and codec DAI. A typical CPU DAI has two or more channels, in consequence
a single mic is treated as a stereo/multi channel device, even though
only one channel carries audio data.

This change adds the option to specify the number of used DMIC channels
in the device tree. When specified this value overwrites the default
channels_max value of 8 in the snd_soc_dai_driver struct of the codec.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoALSA: pcm: Use ERESTARTSYS instead of EINTR in OSS emulation
Takashi Iwai [Tue, 9 Jan 2018 07:51:02 +0000 (08:51 +0100)]
ALSA: pcm: Use ERESTARTSYS instead of EINTR in OSS emulation

Fix the last standing EINTR in the whole subsystem.  Use more correct
ERESTARTSYS for pending signals.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Tue, 9 Jan 2018 07:49:41 +0000 (08:49 +0100)]
Merge branch 'for-linus' into for-next

Back-merge to continue fixing the OSS emulation code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoASoC: Intel: kconfig: drop boiler plate text from config items
Vinod Koul [Thu, 4 Jan 2018 22:36:01 +0000 (16:36 -0600)]
ASoC: Intel: kconfig: drop boiler plate text from config items

Drop "Intel ASoC SST driver for " platforms and "SOC Machine Audio driver
for Intel" for machines..

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: kconfig: add some comments for if symbols
Vinod Koul [Thu, 4 Jan 2018 22:36:00 +0000 (16:36 -0600)]
ASoC: Intel: kconfig: add some comments for if symbols

Help in finding matching "if" endings by commenting the "endif".

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: boards: align/fix SKL/BXT/KBL Kconfigs
Pierre-Louis Bossart [Thu, 4 Jan 2018 22:35:59 +0000 (16:35 -0600)]
ASoC: Intel: boards: align/fix SKL/BXT/KBL Kconfigs

No reason why SND_SOC_INTEL_SST should be set here.
Also make sure same dependencies are used everywhere (only last one has SPI
in addition). Replace X86_INTEL_LPSS by MFD_INTEL_LPSS since the former
makes no sense for Skylake+ devices

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: boards: align Kconfig configurations for HiFi2
Pierre-Louis Bossart [Thu, 4 Jan 2018 22:35:58 +0000 (16:35 -0600)]
ASoC: Intel: boards: align Kconfig configurations for HiFi2

Make sure all the configs are aligned
Also add the missing dependencies on SOC_ACPI stuff used to fix
DAI names based on HID and fix a couple of indentation issues

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: boards: align Kconfig dependencies for Haswell/Broadwell
Pierre-Louis Bossart [Thu, 4 Jan 2018 22:35:57 +0000 (16:35 -0600)]
ASoC: Intel: boards: align Kconfig dependencies for Haswell/Broadwell

Make sure that the same I2C/I2C_DESIGNWARE_PLATFORM are selected.
The latter might actually need to be moved to the SOC side of things,
it really has no place in a machine driver dependency

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Fix nested/unnecessary Kconfig dependencies
Pierre-Louis Bossart [Thu, 4 Jan 2018 22:35:56 +0000 (16:35 -0600)]
ASoC: Intel: Fix nested/unnecessary Kconfig dependencies

This patch fixes a number of issues:
1. IOSF_MBI is only needed for byt-cr detection, which is only supported
on Baytrail/Cherrytrail, move to HiFi2 config

2. SND_SOC_INTEL_SST should not select SND_SOC_INTEL_SST_ACPI, the latter
config is only valid for Haswell/Baytrail legacy but not needed by Skylake

3. SND_SST_IPC_ACPI, used only by the atom/sst driver, should not select
SND_SOC_INTEL_SST, none of the code under common/sst*.c is used

This nesting of configs really makes no sense, it's easier to maintain
if for each platform one can control what is strictly required.

Compiled-tested with each of Haswell, Baytrail legacy, HiFi2, SKL cases
selected independently. 0-day and explicit randconfig tests did not report
additional issues and no functionality loss was observed in Intel tests on
HIFI2 and SKYLAKE platforms

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: document what Kconfig options do
Pierre-Louis Bossart [Thu, 4 Jan 2018 22:35:55 +0000 (16:35 -0600)]
ASoC: Intel: document what Kconfig options do

Document in comments what the options are supposed to mean, before
clean-up in next patch.

No functionality change here.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Kconfig: Simplify-clarify ACPI/PCI dependencies
Pierre-Louis Bossart [Thu, 4 Jan 2018 22:35:54 +0000 (16:35 -0600)]
ASoC: Intel: Kconfig: Simplify-clarify ACPI/PCI dependencies

PCI/ACPI selections should not happen in Kconfig for machine drivers,
move to SOC selections.

Add distinction between PCI and ACPI HiFi2 platforms and help text.

There should be no functionality change.

The PCI-based platforms may be removed at some point since Medfield
is not really supported by anyone, and with Edison now defunct support for
Merrifield/Edison is to be determined.

The dependency on SND_DMA_SGBUF for Haswell is not clear at this
point and may have to be further updated.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Fix Kconfig with top-level selector
Pierre-Louis Bossart [Thu, 4 Jan 2018 22:35:53 +0000 (16:35 -0600)]
ASoC: Intel: Fix Kconfig with top-level selector

Follow network example suggested by Linus, move Intel definitions
in if/endif block and clarify in help text which options distro
configurations should enable - everything except legacy Baytrail stuff and
NOCODEC (test only)

To avoid user confusion, machine drivers are handled with a submenu made
dependent on this top-level selector.

There should be no functionality change - except that sound capabilities
are restored when using older configs without any user selection.

Note that the SND_SOC_ACPI_INTEL_MATCH config is currently filtered
out by the top-level selector. This will change in the near future to
allow for this option to be selected by both SST and SOF drivers

(simplification with submenu for machine drivers by Vinod Koul)

Fixes: f6a118a800e3 ("ASoC: Intel: clarify Kconfig dependencies")
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: rockchip: i2s: fix playback after runtime resume
John Keeping [Mon, 8 Jan 2018 16:01:04 +0000 (16:01 +0000)]
ASoC: rockchip: i2s: fix playback after runtime resume

When restoring registers during runtime resume, we must not write to
I2S_TXDR which is the transmit FIFO as this queues up a sample to be
output and pushes all of the output channels down by one.

This can be demonstrated with the speaker-test utility:

for i in a b c; do speaker-test -c 2 -s 1; done

which should play a test through the left speaker three times but if the
I2S hardware starts runtime suspended the first sample will be played
through the right speaker.

Fix this by marking I2S_TXDR as volatile (which also requires marking it
as readble, even though it technically isn't).  This seems to be the
most robust fix, the alternative of giving I2S_TXDR a default value is
more fragile since it does not prevent regcache writing to the register
in all circumstances.

While here, also fix the configuration of I2S_RXDR and I2S_FIFOLR; these
are not writable so they do not suffer from the same problem as I2S_TXDR
but reading from I2S_RXDR does suffer from a similar problem.

Fixes: f0447f6cbb20 ("ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle", 2016-09-07)
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
6 years agoASoC: Intel: bytcr-rt5651: add support for Line In
Pierre-Louis Bossart [Fri, 5 Jan 2018 19:20:23 +0000 (13:20 -0600)]
ASoC: Intel: bytcr-rt5651: add support for Line In

Add the DAPM widgets and routes.

Tested with MinnowMax Turbot + rt5651 eval board with Speaker
(LineOut) -> LineIn loopback

Thanks to Bard Liao @ Realtek for providing the 0dB settings

"IN Capture Volume" = 23
"ADC Capture Volume" = 47
"OUT Playback Volume" = 31
"DAC1 Playback Volume" = 175

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirks
Pierre-Louis Bossart [Fri, 5 Jan 2018 19:20:20 +0000 (13:20 -0600)]
ASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirks

Define DMI quirk for rt5651 eval board connected to MinnowBoard
Turbot. The only difference with a MinnowBoard MAX is that the MCLK
pin is enabled on the LSE connector

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Keqiao.Zhang <Keqiao.zhang@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also be used
Keyon Jie [Fri, 5 Jan 2018 19:20:18 +0000 (13:20 -0600)]
ASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also be used

On Minnowboard Max with Realtek rt5651 eval board, the IN3P is
connected to Headset Mic.

Here add and select it for Minnowboard Max.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr_rt5651: fix Kiano DMI quirk
Pierre-Louis Bossart [Fri, 5 Jan 2018 19:20:21 +0000 (13:20 -0600)]
ASoC: Intel: bytcr_rt5651: fix Kiano DMI quirk

The current code doesn't enable the MCLK which reduces audio quality
(PLL driven from BLCK), fix the quirk

Tested-by: Carlo Caione <carlo@caione.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: sst: Fix some style
Christophe JAILLET [Sat, 6 Jan 2018 20:18:55 +0000 (21:18 +0100)]
ASoC: Intel: sst: Fix some style

This patch fixes 3 small issues:
 - missing 2nd '*' at the beginning of a doxygen comment
 - extra space after a '\n' in a dev_dbg message
 - extra tab before a 'return" statement

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: sst: Fix the return value of 'sst_send_byte_stream_mrfld()'
Christophe JAILLET [Sat, 6 Jan 2018 20:18:24 +0000 (21:18 +0100)]
ASoC: Intel: sst: Fix the return value of 'sst_send_byte_stream_mrfld()'

In some error handling paths, an error code is assiegned to 'ret'.
However, the function always return 0.

Fix it and return the error code if such an error paths is taken.

Fixes: 3d9ff34622ba ("ASoC: Intel: sst: add stream operations")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: acpi: add missing includes for non-ACPI platforms
Pierre-Louis Bossart [Thu, 4 Jan 2018 22:35:52 +0000 (16:35 -0600)]
ASoC: acpi: add missing includes for non-ACPI platforms

0-day reports compilation issues with non-ACPI platforms.

In file included from sound/soc/soc-acpi.c:17:0:
>> include/sound/soc-acpi.h:36:46: error: 'ACPI_ID_LEN' undeclared here
(not in a function); did you mean 'ACPI_FILE'?
    snd_soc_acpi_find_name_from_hid(const u8 hid[ACPI_ID_LEN])

 sound/soc/soc-acpi.c: At top level:
>> sound/soc/soc-acpi.c:174:16: error: expected declaration specifiers or
'...' before string constant
    MODULE_LICENSE("GPL v2");

Add missing include files.

Fixes: 7feb2f786a46 ("ASoC: move ACPI common code out of Intel/sst tree")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Replace snd_soc_acpi_check_hid with acpi_dev_present
Jeremy Cline [Fri, 5 Jan 2018 20:55:34 +0000 (14:55 -0600)]
ASoC: Replace snd_soc_acpi_check_hid with acpi_dev_present

Replace snd_soc_acpi_check_hid() with the generic acpi_dev_present()
and remove the now unused snd_soc_acpi_check_hid function. This should
have no functional change.

Signed-off-by: Jeremy Cline <jeremy@jcline.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoMerge branch 'fix/intel' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Mon, 8 Jan 2018 15:54:50 +0000 (15:54 +0000)]
Merge branch 'fix/intel' of https://git./linux/kernel/git/broonie/sound into asoc-intel

6 years agoALSA: pcm: Allow aborting mutex lock at OSS read/write loops
Takashi Iwai [Mon, 8 Jan 2018 13:03:53 +0000 (14:03 +0100)]
ALSA: pcm: Allow aborting mutex lock at OSS read/write loops

PCM OSS read/write loops keep taking the mutex lock for the whole
read/write, and this might take very long when the exceptionally high
amount of data is given.  Also, since it invokes with mutex_lock(),
the concurrent read/write becomes unbreakable.

This patch tries to address these issues by replacing mutex_lock()
with mutex_lock_interruptible(), and also splits / re-takes the lock
at each read/write period chunk, so that it can switch the context
more finely if requested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoALSA: pcm: Abort properly at pending signal in OSS read/write loops
Takashi Iwai [Mon, 8 Jan 2018 12:58:31 +0000 (13:58 +0100)]
ALSA: pcm: Abort properly at pending signal in OSS read/write loops

The loops for read and write in PCM OSS emulation have no proper check
of pending signals, and they keep processing even after user tries to
break.  This results in a very long delay, often seen as RCU stall
when a huge unprocessed bytes remain queued.  The bug could be easily
triggered by syzkaller.

As a simple workaround, this patch adds the proper check of pending
signals and aborts the loop appropriately.

Reported-by: syzbot+993cb4cfcbbff3947c21@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoASoC: acpi: fix machine driver selection based on quirk
Pierre-Louis Bossart [Fri, 5 Jan 2018 20:55:33 +0000 (14:55 -0600)]
ASoC: acpi: fix machine driver selection based on quirk

The ACPI/machine-driver code refactoring introduced in 4.13 introduced
a regression for cases where we need a DMI-based quirk to select the
machine driver (the BIOS reports an invalid HID). The fix is just to
make sure the results of the quirk are actually used.

Fixes: 54746dabf770 ('ASoC: Improve machine driver selection based on quirk data')
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96691
Tested-by: Nicole Færber <nicole.faerber@dpin.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
6 years agoASoC: rockchip: i2s: Support mono capture
Matthias Kaehlcke [Fri, 5 Jan 2018 22:12:42 +0000 (14:12 -0800)]
ASoC: rockchip: i2s: Support mono capture

The Rockchip I2S controller only allows to configure even numbers of
capture channels. It is still possible to capture monophonic audio by
using dual-channel mode and ignoring the 'data' from the second
channel.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mediatek: mt2701: fix return value check in mt2701_afe_pcm_dev_probe()
Wei Yongjun [Mon, 8 Jan 2018 02:15:01 +0000 (02:15 +0000)]
ASoC: mediatek: mt2701: fix return value check in mt2701_afe_pcm_dev_probe()

In case of error, the function syscon_node_to_regmap() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Fixes: dfa3cbb83e09 ("ASoC: mediatek: modify MT2701 AFE driver to adapt mfd device")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: fsl_ssi: Fix build error
Guenter Roeck [Sun, 7 Jan 2018 17:05:50 +0000 (09:05 -0800)]
ASoC: fsl_ssi: Fix build error

powerpc:mpc85xx_defconfig fails to build with the following errors.

sound/soc/fsl/fsl_dma.c: In function 'fsl_soc_dma_probe':
sound/soc/fsl/fsl_dma.c:916:34: error: 'CCSR_SSI_STX0' undeclared
sound/soc/fsl/fsl_dma.c:917:34: error: 'CCSR_SSI_SRX0' undeclared

Fixes: a818aa5f967b ("ASoC: fsl_ssi: Rename registers and fields macros")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoALSA: hda/realtek - update ALC225 depop optimize
Kailang Yang [Fri, 5 Jan 2018 08:50:08 +0000 (16:50 +0800)]
ALSA: hda/realtek - update ALC225 depop optimize

Add ALC225 its own depop functions for alc_init and alc_shutup.
Add depop optimize step for headset mode functions.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoLinux 4.15-rc7
Linus Torvalds [Sun, 7 Jan 2018 22:22:41 +0000 (14:22 -0800)]
Linux 4.15-rc7

6 years agoMerge branch 'parisc-4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Sun, 7 Jan 2018 19:42:57 +0000 (11:42 -0800)]
Merge branch 'parisc-4.15-3' of git://git./linux/kernel/git/deller/parisc-linux

Pull parisc fixes from Helge Deller:

 - Many small fixes to show the real physical addresses of devices
   instead of hashed addresses.

 - One important fix to unbreak 32-bit SMP support: We forgot to 16-byte
   align the spinlocks in the assembler code.

 - Qemu support: The host will get a chance to sleep when the parisc
   guest is idle. We use the same mechanism as the power architecture by
   overlaying the "or %r10,%r10,%r10" instruction which is simply a nop
   on real hardware.

* 'parisc-4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: qemu idle sleep support
  parisc: Fix alignment of pa_tlb_lock in assembly on 32-bit SMP kernel
  parisc: Show unhashed EISA EEPROM address
  parisc: Show unhashed HPA of Dino chip
  parisc: Show initial kernel memory layout unhashed
  parisc: Show unhashed hardware inventory

6 years agoMerge tag 'apparmor-pr-2018-01-07' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 7 Jan 2018 19:33:12 +0000 (11:33 -0800)]
Merge tag 'apparmor-pr-2018-01-07' of git://git./linux/kernel/git/jj/linux-apparmor

Pull apparmor fix from John Johansen:
 "This fixes a regression when the kernel feature set is reported as
  supporting mount and policy is pinned to a feature set that does not
  support mount mediation"

* tag 'apparmor-pr-2018-01-07' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor:
  apparmor: fix regression in mount mediation when feature set is pinned

6 years agoMerge tag 'led_fixes_for_4.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 7 Jan 2018 19:01:59 +0000 (11:01 -0800)]
Merge tag 'led_fixes_for_4.15-rc7' of git://git./linux/kernel/git/j.anaszewski/linux-leds

Pull LED fix from Jacek Anaszewski:
 "The commit 2b83ff96f51d for 4.15-rc6, which was fixing LED brightness
  setting after clearing delay_off broke the behavior on any alteration
  of delay_on{off} properties, due to use of a LED core helper that does
  too much for this particular case"

* tag 'led_fixes_for_4.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
  leds: core: Fix regression caused by commit 2b83ff96f51d

6 years agoMerge tag 'for-linus-20180107' of git://git.infradead.org/linux-mtd
Linus Torvalds [Sun, 7 Jan 2018 19:00:06 +0000 (11:00 -0800)]
Merge tag 'for-linus-20180107' of git://git.infradead.org/linux-mtd

Pull MTD bugfix from Richard Weinberger:
 "A single fix for the pxa3xx NAND driver"

* tag 'for-linus-20180107' of git://git.infradead.org/linux-mtd:
  mtd: nand: pxa3xx: Fix READOOB implementation