sfrench/cifs-2.6.git
6 years agoMerge remote-tracking branches 'asoc/topic/ak4613', 'asoc/topic/core', 'asoc/topic...
Mark Brown [Wed, 7 Feb 2018 11:25:41 +0000 (11:25 +0000)]
Merge remote-tracking branches 'asoc/topic/ak4613', 'asoc/topic/core', 'asoc/topic/dmic' and 'asoc/topic/intel' into asoc-next

6 years agoMerge remote-tracking branch 'asoc/topic/compress' into asoc-next
Mark Brown [Wed, 7 Feb 2018 11:24:21 +0000 (11:24 +0000)]
Merge remote-tracking branch 'asoc/topic/compress' into asoc-next

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: Fixup error messages
Charles Keepax [Fri, 26 Jan 2018 13:08:45 +0000 (13:08 +0000)]
ASoC: compress: Fixup error messages

The error message prints are a little inconsisent, tidy them up to be a
little more consistent with current style recommendations.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: compress: Remove some extraneous blank lines
Charles Keepax [Fri, 26 Jan 2018 13:08:44 +0000 (13:08 +0000)]
ASoC: compress: Remove some extraneous blank lines

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoMerge branch 'fix/compress' of https://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Mark Brown [Fri, 26 Jan 2018 15:24:49 +0000 (15:24 +0000)]
Merge branch 'fix/compress' of https://git./linux/kernel/git/broonie/sound into asoc-compress

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: Intel: kbl: Enable mclk and ssp sclk early
Harsha Priya [Thu, 4 Jan 2018 11:25:16 +0000 (16:55 +0530)]
ASoC: Intel: kbl: Enable mclk and ssp sclk early

rt5663 needs mclk/sclk early to synchronize its internal clocks. Enable
these clocks early.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Skylake: Add extended I2S config blob support in Clock driver
Sriram Periyasamy [Thu, 4 Jan 2018 11:25:15 +0000 (16:55 +0530)]
ASoC: Intel: Skylake: Add extended I2S config blob support in Clock driver

Extended I2S config blob supports multiple mclk dividers in NHLT blob.
This patch detects whether the I2S blob is legacy or extended based on the
signature value and chooses the mclk source and divider accordingly.

Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Skylake: Add ssp clock driver
Sriram Periyasamy [Thu, 4 Jan 2018 11:25:14 +0000 (16:55 +0530)]
ASoC: Intel: Skylake: Add ssp clock driver

For certain platforms, it is required to start the clocks (mclk/sclk/fs)
before the stream start. Example: for few chrome systems, codec needs the
mclk/sclk to be enabled early for a successful clock synchronization and
for few IVI platforms, clock need to be enabled at boot and should be ON
always.

Add the required structures and create set_dma_control ipc to enable or
disable the clock. To enable sclk without fs, mclk ipc structure is used,
else sclkfs ipc structure is used.

Clock prepare/unprepare are used to enable/disable the clock as the IPC
will be sent in non-atomic context. The clk set_dma_control IPC
structures are populated during the set_rate callback and IPC is sent
to enable the clock during prepare callback.

This patch creates virtual clock driver, which allows the machine driver
to use the clock interface to send IPCs to DSP to enable/disable the
clocks.

Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com>
Signed-off-by: Jaikrishna Nemallapudi <jaikrishnax.nemallapudi@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mark Brown <broonie@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: ak4613: call dummy write for PW_MGMT1/3 when Playback
Kuninori Morimoto [Wed, 24 Jan 2018 05:11:42 +0000 (05:11 +0000)]
ASoC: ak4613: call dummy write for PW_MGMT1/3 when Playback

Power Down Release Command (PMVR, PMDAC, RSTN, PMDA1-PMDA6)
which are located on PW_MGMT1 / PW_MGMT3 register must be
write again after at least 5 LRCK cycle or later on each command.
Otherwise, Playback volume will be 0dB.
Basically, it should be

        1.   PowerDownRelease by Power Management1 <= call 1.x after 5LRCK
        1.x  Dummy write      to Power Management1
        2.   PowerDownRelease by Power Management3 <= call 2.x after 5LRCK
        2.x  Dummy write      to Power Management3

To avoid too many dummy write, this patch is merging these.

        1.   PowerDownRelease by Power Management1
        2.   PowerDownRelease by Power Management3   <= call after 5LRCK
        2.x  Dummy write      to Power Management1/3 <= merge dummy write

This patch adds dummy write when Playback Start timing.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
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 agoASoC: soc-core: snd_soc_rtdcom_lookup() cares component driver name
Kuninori Morimoto [Tue, 23 Jan 2018 00:41:24 +0000 (00:41 +0000)]
ASoC: soc-core: snd_soc_rtdcom_lookup() cares component driver name

snd_soc_rtdcom_lookup() look up component by uisng driver name.
Then, it uses component->driver->name.
Some driver might doesn't have it, thus it should care NULL pointer.
This patch solve this issue.

Reported-by: Mukunda,Vijendar <vijendar.mukunda@amd.com>
Reported-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Mukunda,Vijendar <vijendar.mukunda@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: dmic: Fix check of return value from read of 'num-channels'
Matthias Kaehlcke [Fri, 19 Jan 2018 23:36:50 +0000 (15:36 -0800)]
ASoC: dmic: Fix check of return value from read of 'num-channels'

Commit 7fb59e940f62 ("ASoC: codecs: dmic: Make number of channels
 configurable") introduces an optional property to the device tree
to specify the number of DMIC channels. dmic_codec_probe() uses
of_property_read_u32() to read the DT value, and expects a return
value of -ENOENT when the property does not exist. This expectation
is incorrect, the actual value returned in this case is -EINVAL (see
of_find_property_value_of_size(), which is called under the hood).
Check for -EINVAL instead.

Fixes: 7fb59e940f62 ("ASoC: codecs: dmic: Make number of channels configurable")
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: soc-core: add missing EXPORT_SYMBOL_GPL() for snd_soc_rtdcom_lookup
Kuninori Morimoto [Thu, 18 Jan 2018 01:13:54 +0000 (01:13 +0000)]
ASoC: soc-core: add missing EXPORT_SYMBOL_GPL() for snd_soc_rtdcom_lookup

Reported-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: remove select on non-existing SND_SOC_INTEL_COMMON
Corentin LABBE [Wed, 17 Jan 2018 18:43:24 +0000 (19:43 +0100)]
ASoC: Intel: remove select on non-existing SND_SOC_INTEL_COMMON

SND_SST_ATOM_HIFI2_PLATFORM_PCI select SND_SOC_INTEL_COMMON which do not
exists anymore.
So remove this select.

Fixes: c6059879be29 ("ASoC: Intel: Fix Kconfig with top-level selector")
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: remove second duplicated assignment to pointer 'res'
Colin Ian King [Wed, 17 Jan 2018 10:17:08 +0000 (10:17 +0000)]
ASoC: Intel: remove second duplicated assignment to pointer 'res'

The second assignment to res is identical to the previous assignment
so it is redundant and can be removed.

Cleans up clang warning:
sound/soc/intel/skylake/skl-topology.c:191:25: warning: Value stored to
'res' during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: add Component level .read/.write
Kuninori Morimoto [Tue, 16 Jan 2018 02:00:59 +0000 (02:00 +0000)]
ASoC: add Component level .read/.write

In current ALSA SoC, Codec only has .read/.write callback.
Codec will be merged into Component in next generation ALSA SoC,
thus current Codec specific feature need to be merged into it.
This is glue patch for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel - Convert to use acpi_dev_get_first_match_name()
Andy Shevchenko [Fri, 12 Jan 2018 21:16:17 +0000 (23:16 +0200)]
ASoC: Intel - Convert to use acpi_dev_get_first_match_name()

Instead of home grown snd_soc_acpi_find_name_from_hid() use
acpi_dev_get_first_match_name().

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoMerge branch 'topic/hdac-hdmi' of https://git.kernel.org/pub/scm/linux/kernel/git...
Mark Brown [Fri, 12 Jan 2018 21:19:05 +0000 (21:19 +0000)]
Merge branch 'topic/hdac-hdmi' of https://git./linux/kernel/git/broonie/sound into asoc-intel

6 years agoASoC: acpi: remove hard-coded i2c-device name length
Pierre-Louis Bossart [Thu, 11 Jan 2018 19:52:09 +0000 (13:52 -0600)]
ASoC: acpi: remove hard-coded i2c-device name length

Remove hard-codec [16] array size, replace with clearer description and
dependency on ACPI_ID_LEN
No functionality change

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
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: bytcht_es8316: fix HID handling
Pierre-Louis Bossart [Thu, 11 Jan 2018 19:52:08 +0000 (13:52 -0600)]
ASoC: Intel: bytcht_es8316: fix HID handling

Same problem as with previous machine drivers, the codec dai
uses a hard-coded name of "i2c-ESSX8316:00" but ACPI provides
"i2c-ESSX8316:01" in some systems.

Fix by overriding the hard-coded value with the codec name derived
from the HID information

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189261
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 agoMerge branch 'fix/intel' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Fri, 12 Jan 2018 21:04:56 +0000 (21:04 +0000)]
Merge branch 'fix/intel' of https://git./linux/kernel/git/broonie/sound into asoc-intel

6 years agoMerge branch 'acpi-gpio' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Mark Brown [Fri, 12 Jan 2018 18:59:19 +0000 (18:59 +0000)]
Merge branch 'acpi-gpio' of git://git./linux/kernel/git/rafael/linux-pm into asoc-intel

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 agogpio: merrifield: Add support of ACPI enabled platforms
Andy Shevchenko [Fri, 5 Jan 2018 16:09:34 +0000 (18:09 +0200)]
gpio: merrifield: Add support of ACPI enabled platforms

The driver needs the pin control device name for ACPI.

We are looking through ACPI namespace and return first found device
based on ACPI HID for Intel Merrifield FLIS (pin control device).

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
6 years agoACPI: utils: Introduce acpi_dev_get_first_match_name()
Andy Shevchenko [Fri, 5 Jan 2018 16:09:33 +0000 (18:09 +0200)]
ACPI: utils: Introduce acpi_dev_get_first_match_name()

Sometimes the user wants to have device name of the match rather than
just checking if device present or not. To make life easier for such
users introduce acpi_dev_get_first_match_name() helper based on code
for acpi_dev_present().

For example, GPIO driver for Intel Merrifield needs to know the device
name of pin control to be able to apply GPIO mapping table to the proper
device.

To be more consistent with the purpose rename

  struct acpi_dev_present_info  -> struct acpi_dev_match_info
  acpi_dev_present_cb()         -> acpi_dev_match_cb()

in the utils.c file.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
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