linux-2.6-block.git
6 years agoMerge remote-tracking branch 'asoc/fix/twl-breakage' into asoc-next
Mark Brown [Wed, 7 Feb 2018 11:23:48 +0000 (11:23 +0000)]
Merge remote-tracking branch 'asoc/fix/twl-breakage' into asoc-next

6 years agoMerge remote-tracking branches 'asoc/fix/compress', 'asoc/fix/core', 'asoc/fix/dapm...
Mark Brown [Wed, 7 Feb 2018 11:21:02 +0000 (11:21 +0000)]
Merge remote-tracking branches 'asoc/fix/compress', 'asoc/fix/core', 'asoc/fix/dapm', 'asoc/fix/mtk' and 'asoc/fix/stm' into asoc-next

6 years agoASoC: stm32: add of dependency for stm32 drivers
Olivier Moysan [Mon, 5 Feb 2018 10:49:45 +0000 (11:49 +0100)]
ASoC: stm32: add of dependency for stm32 drivers

Add of dependency for STM32 ASoC drivers.
DFSDM of dependency is already inherited
from STM32_DFSDM_ADC dependency.

Signed-off-by: olivier moysan <olivier.moysan@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mt8173-rt5650: fix child-node lookup
Johan Hovold [Wed, 31 Jan 2018 05:59:21 +0000 (16:59 +1100)]
ASoC: mt8173-rt5650: fix child-node lookup

This driver used the wrong OF-helper when looking up the optional
capture-codec child node during probe. Instead of searching just
children of the sound node, a tree-wide depth-first search starting at
the unrelated platform node was done. Not only could this end up
matching an unrelated node or no node at all; the platform node could
also be prematurely freed since of_find_node_by_name() drops a reference
to its first argument. This particular pattern has been observed leading
to crashes after probe deferrals in other drivers.

Fix this by dropping the broken call to of_find_node_by_name() and
keeping only the second, correct lookup using of_get_child_by_name()
while taking care not to bail out if the optional node is missing.

Note that this also addresses two capture-codec node-reference leaks
(one for each of the original helper calls).

Compile tested only.

Fixes: d349caeb0510 ("ASoC: mediatek: Add second I2S on mt8173-rt5650 machine driver")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: dapm: fix debugfs read using path->connected
KaiChieh Chuang [Mon, 5 Feb 2018 05:00:00 +0000 (13:00 +0800)]
ASoC: dapm: fix debugfs read using path->connected

This fix a bug in dapm_widget_power_read_file(),
where it may sent opposite order of source/sink widget
into the p->connected().

for example,
static int connected_check(source, sink);
{"w_sink", NULL, "w_source", connected_check}

the dapm_widget_power_read_file() will query p->connected()
in following case
p->conneted("w_source", "w_sink")
p->conneted("w_sink", "w_source")
we should avoid the last case, since it's the wrong order (source/sink)
as declared in snd_soc_dapm_route.

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: compress: Correct handling of copy callback
Charles Keepax [Fri, 26 Jan 2018 13:08:43 +0000 (13:08 +0000)]
ASoC: compress: Correct handling of copy callback

The soc_compr_copy callback is currently broken. Since the
changes to move the compr_ops over to the component the return
value is not correctly propagated, always returning zero on
success rather than the number of bytes copied. This causes
user-space to stall continuously reading as it does not believe
it has received any data.

Furthermore, the changes to move the compr_ops over to the
component iterate through the list of components and will call
the copy callback for any that have compressed ops. There isn't
currently any consensus on the mechanism to combine the results
of multiple copy callbacks.

To fix this issue for now halt searching the component list when
we locate a copy callback and return the result of that single
callback. Additional work should probably be done to look at the
other ops, tidy things up, and work out if we want to support
multiple components on a single compressed, but this is the only
fix required to get things working again.

Fixes: 9e7e3738ab0e ("ASoC: snd_soc_component_driver has snd_compr_ops")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
6 years agoASoC: Fix twl4030 and 6040 regression by adding back read and write
Tony Lindgren [Thu, 25 Jan 2018 17:35:05 +0000 (09:35 -0800)]
ASoC: Fix twl4030 and 6040 regression by adding back read and write

Commit 3bb0f7c31b1a ("ASoC: don't use snd_soc_write/read on twl4030")
caused regressions for both twl4030 and twl6040 as it assumes the
ASoC driver is using regmap. As a side effect, this also causes a
considerable increase in idle power consumption omap3 boards using
twl4030 as the PMIC.

This is because the removal of read and write function pointers
causes some of the ASoC IO functions to not do anything. For example,
snd_soc_register_card() calls snd_soc_dapm_new_widgets() that calls
snd_soc_codec_drv_read() that now does nothing.

A long term solution suggested by Mark Brown <broonie@kernel.org>
is to make the twl drivers use regmap by adding a call to
snd_soc_codec_set_regmap(). This however needs more consideration
as currently the driver internal reads do caching and we would have
both regmap access and internal read/write access accessing the same
hardware registers.

So to fix the regression, let's just do a partial revert adding back
the read and write function pointers. Note that other non-regmap
ASoC drivers may need similar patches.

Fixes: 3bb0f7c31b1a ("ASoC: don't use snd_soc_write/read on twl4030")
Fixes: 93a00c467fe9 ("ASoC: don't use snd_soc_write/read on twl6040")
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoMerge branches 'topic/twl4030' and 'topic/twl6040' of https://git.kernel.org/pub...
Mark Brown [Thu, 25 Jan 2018 18:16:26 +0000 (18:16 +0000)]
Merge branches 'topic/twl4030' and 'topic/twl6040' of https://git./linux/kernel/git/broonie/sound into asoc-twl-breakage

6 years agoASoC: soc-pcm: don't call flush_delayed_work() many times in soc_pcm_private_free()
Kuninori Morimoto [Wed, 24 Jan 2018 05:18:46 +0000 (05:18 +0000)]
ASoC: soc-pcm: don't call flush_delayed_work() many times in soc_pcm_private_free()

commit f523acebbb74 ("ASoC: add Component level pcm_new/pcm_free v2")
added component level pcm_new/pcm_free, but flush_delayed_work()
on soc_pcm_private_free() is called in for_each_rtdcom() loop.
It doesn't need to be called many times.
This patch moves it out of loop.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
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 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 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 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 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 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 agoLinux 4.15-rc7 v4.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

6 years agoleds: core: Fix regression caused by commit 2b83ff96f51d
Jacek Anaszewski [Wed, 3 Jan 2018 20:13:45 +0000 (21:13 +0100)]
leds: core: Fix regression caused by commit 2b83ff96f51d

Commit 2b83ff96f51d ("led: core: Fix brightness setting when setting delay_off=0")
replaced del_timer_sync(&led_cdev->blink_timer) with led_stop_software_blink()
in led_blink_set(), which additionally clears LED_BLINK_SW flag as well as
zeroes blink_delay_on and blink_delay_off properties of the struct led_classdev.

Cleansing of the latter ones wasn't required to fix the original issue but
wasn't considered harmful. It nonetheless turned out to be so in case when
pointer to one or both props is passed to led_blink_set() like in the
ledtrig-timer.c. In such cases zeroes are passed later in delay_on and/or
delay_off arguments to led_blink_setup(), which results either in stopping
the software blinking or setting blinking frequency always to 1Hz.

Avoid using led_stop_software_blink() and add a single call required
to clear LED_BLINK_SW flag, which was the only needed modification to
fix the original issue.

Fixes 2b83ff96f51d ("led: core: Fix brightness setting when setting delay_off=0")
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
6 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sun, 7 Jan 2018 01:13:21 +0000 (17:13 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

Pull vfs fixes from Al Viro:

 - untangle sys_close() abuses in xt_bpf

 - deal with register_shrinker() failures in sget()

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  fix "netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1'"
  sget(): handle failures of register_shrinker()
  mm,vmscan: Make unregister_shrinker() no-op if register_shrinker() failed.

6 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Sun, 7 Jan 2018 01:05:05 +0000 (17:05 -0800)]
Merge tag 'for-linus' of git://git./virt/kvm/kvm

Pull KVM fixes from Radim Krčmář:
 "s390:
   - Two fixes for potential bitmap overruns in the cmma migration code

  x86:
   - Clear guest provided GPRs to defeat the Project Zero PoC for CVE
     2017-5715"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  kvm: vmx: Scrub hardware GPRs at VM-exit
  KVM: s390: prevent buffer overrun on memory hotplug during migration
  KVM: s390: fix cmma migration for multiple memory slots

6 years agomtd: nand: pxa3xx: Fix READOOB implementation
Boris Brezillon [Mon, 18 Dec 2017 10:32:45 +0000 (11:32 +0100)]
mtd: nand: pxa3xx: Fix READOOB implementation

In the current driver, OOB bytes are accessed in raw mode, and when a
page access is done with NDCR_SPARE_EN set and NDCR_ECC_EN cleared, the
driver must read the whole spare area (64 bytes in case of a 2k page,
16 bytes for a 512 page). The driver was only reading the free OOB
bytes, which was leaving some unread data in the FIFO and was somehow
leading to a timeout.

We could patch the driver to read ->spare_size + ->ecc_size instead of
just ->spare_size when READOOB is requested, but we'd better make
in-band and OOB accesses consistent.
Since the driver is always accessing in-band data in non-raw mode (with
the ECC engine enabled), we should also access OOB data in this mode.
That's particularly useful when using the BCH engine because in this
mode the free OOB bytes are also ECC protected.

Fixes: 43bcfd2bb24a ("mtd: nand: pxa3xx: Add driver-specific ECC BCH support")
Cc: stable@vger.kernel.org
Reported-by: Sean Nyekjær <sean.nyekjaer@prevas.dk>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Tested-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Richard Weinberger <richard@nod.at>
6 years agoMerge tag 'powerpc-4.15-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Sat, 6 Jan 2018 17:48:27 +0000 (09:48 -0800)]
Merge tag 'powerpc-4.15-6' of git://git./linux/kernel/git/powerpc/linux

Pull powerpc fix from Michael Ellerman:
 "Just one fix to correctly return SEGV_ACCERR when we take a SEGV on a
  mapped region. The bug was introduced in the refactoring of the page
  fault handler we did in the previous release.

  Thanks to John Sperbeck"

* tag 'powerpc-4.15-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/mm: Fix SEGV on mapped region to return SEGV_ACCERR