]> git.proxmox.com Git - mirror_ubuntu-kernels.git/log
mirror_ubuntu-kernels.git
6 years agoASoC: remove unneeded .pcm_new/free
Kuninori Morimoto [Tue, 8 May 2018 03:19:49 +0000 (03:19 +0000)]
ASoC: remove unneeded .pcm_new/free

commit ef050bece1b55 ("ASoC: Remove platform code now everything is
componentised") removed platform code, but it didn't remove
.pcm_new/free which existed only for platform.
This patch remove these

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: remove .get_regmap
Kuninori Morimoto [Tue, 8 May 2018 03:19:16 +0000 (03:19 +0000)]
ASoC: remove .get_regmap

To setup regmap, ALSA SoC has snd_soc_component_init_regmap() and
.get_regmap. But these are duplicated feature.
Now, no one is using .get_regmap, let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: remove codec reg_cache
Kuninori Morimoto [Tue, 8 May 2018 03:18:38 +0000 (03:18 +0000)]
ASoC: remove codec reg_cache

Codec reg_cache is legacy feature, almost all driver are now using
common regmap, and very few driver had been used this legacy feature.
Because of this background, it is now implemented on each
driver internally now.
So now, no one is using codec reg_cache. Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: remove codec hw_write/control_data
Kuninori Morimoto [Tue, 8 May 2018 03:18:11 +0000 (03:18 +0000)]
ASoC: remove codec hw_write/control_data

No one is using codec hw_write/control_data any more.
Let's remove these.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: omap-mcbsp: Convert to use the sdma-pcm instead of omap-pcm
Peter Ujfalusi [Mon, 7 May 2018 08:49:59 +0000 (11:49 +0300)]
ASoC: omap-mcbsp: Convert to use the sdma-pcm instead of omap-pcm

Use the new platform driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: omap-mcpdm: Convert to use the sdma-pcm instead of omap-pcm
Peter Ujfalusi [Mon, 7 May 2018 08:49:58 +0000 (11:49 +0300)]
ASoC: omap-mcpdm: Convert to use the sdma-pcm instead of omap-pcm

Use the new platform driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: omap-dmic: Convert to use the sdma-pcm instead of omap-pcm
Peter Ujfalusi [Mon, 7 May 2018 08:49:57 +0000 (11:49 +0300)]
ASoC: omap-dmic: Convert to use the sdma-pcm instead of omap-pcm

Use the new platform driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: omap-hdmi-audio: Convert to use the sdma-pcm instead of omap-pcm
Peter Ujfalusi [Mon, 7 May 2018 08:49:56 +0000 (11:49 +0300)]
ASoC: omap-hdmi-audio: Convert to use the sdma-pcm instead of omap-pcm

Use the new platform driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: omap: Introduce the generic_dmaengine_pcm based sdma-pcm
Peter Ujfalusi [Mon, 7 May 2018 08:49:54 +0000 (11:49 +0300)]
ASoC: omap: Introduce the generic_dmaengine_pcm based sdma-pcm

With the generic dmaengine_pcm support the omap-cpm can be replaced with a
much smaller wrapper.

CPU DAI drivers can use the:
int sdma_pcm_platform_register(struct device *dev,
       char *txdmachan, char *rxdmachan);

To register the platform driver, txdmachan/rxdmachan is only needed to be
provided if the DMA channel names are not standard tx/rx, like in case of
McPDM, or the DAI is only capable of one audio direction (DMIC, HDMI).

This patch only introduces the source file and changes to the
Kconfig/Makefile, but does not change any of the DAI drivers to use it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: uniphier: evea: use DAPM to change source of line-in
Katsuhiro Suzuki [Tue, 8 May 2018 08:45:09 +0000 (17:45 +0900)]
ASoC: uniphier: evea: use DAPM to change source of line-in

This patch replaces mixer switch to DAPM one for changing audio source
of line-in.

Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: nau8824: fix spelling mistake: "semaphone" -> "semaphore"
Colin Ian King [Tue, 8 May 2018 22:41:55 +0000 (23:41 +0100)]
ASoC: nau8824: fix spelling mistake: "semaphone" -> "semaphore"

Trivial fix to spelling mistake in dev_warn messages

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: fix return value check in mt6351_codec_driver_probe()
Wei Yongjun [Mon, 7 May 2018 01:39:45 +0000 (01:39 +0000)]
ASoC: fix return value check in mt6351_codec_driver_probe()

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

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agomedia: i2c: tda1997: replace codec to component
Kuninori Morimoto [Mon, 23 Apr 2018 02:10:26 +0000 (02:10 +0000)]
media: i2c: tda1997: replace codec to component

Now we can replace Codec to Component. Let's do it.

Note:
xxx_codec_xxx() -> xxx_component_xxx()
.idle_bias_off = 0 -> .idle_bias_on = 1
.ignore_pmdown_time = 0 -> .use_pmdown_time = 1
- -> .endianness = 1
- -> .non_legacy_dai_naming = 1

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Tim Harvey <tharvey@gateworks.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: rt5663: Optimize the power consumption
oder_chiou@realtek.com [Fri, 4 May 2018 09:15:34 +0000 (17:15 +0800)]
ASoC: rt5663: Optimize the power consumption

The patch optimizes the power consumption.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: cs42xx8: Make the node name generic
Fabio Estevam [Fri, 4 May 2018 19:12:03 +0000 (16:12 -0300)]
ASoC: cs42xx8: Make the node name generic

According to Devicetree Specification v0.2 document:

"The name of a node should be somewhat generic, reflecting the function
of the device and not its precise programming model."

Do as suggested in the binding example.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: wm8960: Make the node name generic
Fabio Estevam [Fri, 4 May 2018 19:12:02 +0000 (16:12 -0300)]
ASoC: wm8960: Make the node name generic

According to Devicetree Specification v0.2 document:

"The name of a node should be somewhat generic, reflecting the function
of the device and not its precise programming model."

Do as suggested in the binding example.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: wm8962: Make the node name generic
Fabio Estevam [Fri, 4 May 2018 19:12:01 +0000 (16:12 -0300)]
ASoC: wm8962: Make the node name generic

According to Devicetree Specification v0.2 document:

"The name of a node should be somewhat generic, reflecting the function
of the device and not its precise programming model."

Do as suggested in the binding example.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: sgtl5000: Make the node name generic
Fabio Estevam [Fri, 4 May 2018 19:12:00 +0000 (16:12 -0300)]
ASoC: sgtl5000: Make the node name generic

According to Devicetree Specification v0.2 document:

"The name of a node should be somewhat generic, reflecting the function
of the device and not its precise programming model."

Do as suggested in the binding example.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: tas6424: Allow disabling auto diagnostics for faster power-on
Jean-Jacques Hiblot [Thu, 3 May 2018 07:36:27 +0000 (09:36 +0200)]
ASoC: tas6424: Allow disabling auto diagnostics for faster power-on

The TAS6424 incorporates both DC-load and AC-load diagnostics which are
used to determine the status of the load. The DC diagnostics runs when any
channel is directed to leave the Hi-Z state and enter the MUTE or PLAY
state.
The DC diagnostics are turned on by default but, if a fast startup without
diagnostics is required, the diagnostics can be disabled using a dedicated
ALSA control.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: nau8810: change input PGA mixer stage
John Hsu [Thu, 3 May 2018 02:46:41 +0000 (10:46 +0800)]
ASoC: nau8810: change input PGA mixer stage

Organize the paths of the mixer, "Input Boost Stage", including
the routes of the mixer. The control is not used correctly before.
Besides, the driver changes the name of the mixer controls.

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: fsl_spdif: Switch to SPDX identifier
Fabio Estevam [Tue, 1 May 2018 12:20:43 +0000 (09:20 -0300)]
ASoC: fsl_spdif: Switch to SPDX identifier

Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: fsl_esai: Switch to SPDX identifier
Fabio Estevam [Tue, 1 May 2018 12:20:42 +0000 (09:20 -0300)]
ASoC: fsl_esai: Switch to SPDX identifier

Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: fsl_sai: Switch to SPDX identifier
Fabio Estevam [Tue, 1 May 2018 12:20:41 +0000 (09:20 -0300)]
ASoC: fsl_sai: Switch to SPDX identifier

Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: fsl_ssi: Switch to SPDX identifier
Fabio Estevam [Tue, 1 May 2018 12:20:40 +0000 (09:20 -0300)]
ASoC: fsl_ssi: Switch to SPDX identifier

Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoMerge remote-tracking branch 'asoc/for-4.17' into asoc-4.18 to resolve a
Mark Brown [Tue, 1 May 2018 21:12:18 +0000 (06:12 +0900)]
Merge remote-tracking branch 'asoc/for-4.17' into asoc-4.18 to resolve a
conflict between a fix and new development in mtk

6 years agoASoC: dai playback and capture active may be greater than 1
Jerome Brunet [Fri, 27 Apr 2018 11:31:51 +0000 (13:31 +0200)]
ASoC: dai playback and capture active may be greater than 1

At the moment playback_active and capture_active are using only 1 bit so
the maximum active count is 1.

However, snd_soc_runtime_activate() may be called several time on the
same dai. This happens when a dai is part of several dai_links. It is
often the case for "snd-soc-dummy-dai".

This is a problem if snd_soc_runtime_activate() is called an even number
of times on a dai. In this case the active count overflow back to 0. As
consequence, ASoC functions, such as soc_dpcm_runtime_update(), won't run
correctly.

Storing these usage counts on plain 'unsigned int' solves the problem.

Fixes: f0fba2ad1b6b ("ASoC: multi-component - ASoC Multi-Component Support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: cirrus: i2s: Fix {TX|RX}LinCtrlData setup
Alexander Sverdlin [Sat, 28 Apr 2018 20:51:39 +0000 (22:51 +0200)]
ASoC: cirrus: i2s: Fix {TX|RX}LinCtrlData setup

According to "EP93xx User’s Guide", I2STXLinCtrlData and I2SRXLinCtrlData
registers actually have different format. The only currently used bit
(Left_Right_Justify) has different position. Fix this and simplify the
whole setup taking into account the fact that both registers have zero
default value.

The practical effect of the above is repaired SND_SOC_DAIFMT_RIGHT_J
support (currently unused).

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
6 years agoASoC: cirrus: i2s: Fix LRCLK configuration
Alexander Sverdlin [Sat, 28 Apr 2018 20:51:38 +0000 (22:51 +0200)]
ASoC: cirrus: i2s: Fix LRCLK configuration

The bit responsible for LRCLK polarity is i2s_tlrs (0), not i2s_trel (2)
(refer to "EP93xx User's Guide").

Previously card drivers which specified SND_SOC_DAIFMT_NB_IF actually got
SND_SOC_DAIFMT_NB_NF, an adaptation is necessary to retain the old
behavior.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
6 years agoASoC: amd: fix spelling mistake: "failer" -> "failure"
Colin Ian King [Tue, 1 May 2018 08:20:01 +0000 (09:20 +0100)]
ASoC: amd: fix spelling mistake: "failer" -> "failure"

Trivial fix to spelling mistake in dev_err error message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mediatek: add the .probe() callback in mt2701_afe_pcm_dai_component
Ryder Lee [Mon, 30 Apr 2018 12:15:31 +0000 (20:15 +0800)]
ASoC: mediatek: add the .probe() callback in mt2701_afe_pcm_dai_component

For the sake of uniformity, this patch adds a callback mt2701_afe_pcm_probe()
in mt2701_afe_pcm_dai_component to retrieve the regmap - the canonical way to
obtain the pointer..

Doing so, we could switch to use devm_snd_soc_register_component() to register
the component driver.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: cht-bsw-rt5672: allow for topology-defined codec-dai setup
Pierre-Louis Bossart [Fri, 27 Apr 2018 21:36:00 +0000 (16:36 -0500)]
ASoC: Intel: cht-bsw-rt5672: allow for topology-defined codec-dai setup

Hard-coded setups conflict with topology defined ones. Move this code to
codec_fixup so that SOF can override codec dai settings, e.g. to only use
2 channels.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mediatek: avoid using snd_soc_platform
Kai Chieh Chuang [Sat, 28 Apr 2018 05:21:26 +0000 (13:21 +0800)]
ASoC: mediatek: avoid using snd_soc_platform

avoid using snd_soc_platform, which is removed after 4.18

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: tas6424: Add support for the mute pin
Jean-Jacques Hiblot [Fri, 27 Apr 2018 13:55:48 +0000 (15:55 +0200)]
ASoC: tas6424: Add support for the mute pin

mute can be connected to GPIO. In that case we have to drive it to the
correct value

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: tas6424: Add support for the standby pin
Jean-Jacques Hiblot [Fri, 27 Apr 2018 13:55:47 +0000 (15:55 +0200)]
ASoC: tas6424: Add support for the standby pin

The standby pin can be connected to a GPIO. In that case we have to drive
it to the correct values for the TAS6424 to operate properly.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: core: Allow codec_conf DT lookups to match parent of_node
Charles Keepax [Fri, 27 Apr 2018 12:54:36 +0000 (13:54 +0100)]
ASoC: core: Allow codec_conf DT lookups to match parent of_node

For devices implemented as a MFD it is common to only have a single node
in devicetree representing the whole device. As such when looking up
codec_conf mappings we should match against both the devices of_node and
the devices parent's of_node, as is already done for DAIs and platform
components.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mediatek: preallocate pages use platform device
Kai Chieh Chuang [Fri, 27 Apr 2018 02:11:35 +0000 (10:11 +0800)]
ASoC: mediatek: preallocate pages use platform device

preallocate pages should use platform device,
since we set dma mask for platform device.

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
6 years agoASoC: mediatek: preallocate pages use platform device
Kai Chieh Chuang [Fri, 27 Apr 2018 02:11:35 +0000 (10:11 +0800)]
ASoC: mediatek: preallocate pages use platform device

preallocate pages should use platform device,
since we set dma mask for platform device.

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: omap: Remove OMAP_MUX dependency from Nokia N810 audio support
Jarkko Nikula [Fri, 27 Apr 2018 08:17:15 +0000 (11:17 +0300)]
ASoC: omap: Remove OMAP_MUX dependency from Nokia N810 audio support

Commit e9f5f1e45608 ("ARM: OMAP2+: Remove legacy mux code") removed
CONFIG_OMAP_MUX making impossible to build Nokia N810 audio support. Remove
this dependency so we can do at least build tests.

Fixes: e9f5f1e45608 ("ARM: OMAP2+: Remove legacy mux code")
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: omap: n810: HS mic is not working, add a widget for it with comment
Peter Ujfalusi [Fri, 27 Apr 2018 08:17:14 +0000 (11:17 +0300)]
ASoC: omap: n810: HS mic is not working, add a widget for it with comment

The bias for the analog HS microphone is coming from Retu/Vilma chip and
we do not have control over it, yet.

For clarity, add a new DAPM_MIC widget for the HS mic and document the
current state.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoMerge branch 'asoc-4.17' into asoc-4.18 n810 dependencies
Mark Brown [Fri, 27 Apr 2018 10:58:05 +0000 (11:58 +0100)]
Merge branch 'asoc-4.17' into asoc-4.18 n810 dependencies

6 years agoASoC: omap: n810: Correct the cpu_dai, platform and codec name
Peter Ujfalusi [Fri, 27 Apr 2018 08:17:13 +0000 (11:17 +0300)]
ASoC: omap: n810: Correct the cpu_dai, platform and codec name

The non DT boot is no longer supported and when booting with DT the device
names are different.

Fix them up for now, but the n810.c should be updated to support probing
via DT with proper bindings.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: omap: n810: Correct the card level dapm_route
Peter Ujfalusi [Fri, 27 Apr 2018 08:17:12 +0000 (11:17 +0300)]
ASoC: omap: n810: Correct the card level dapm_route

Fix the capture DAPM route due to core changes regarding to mic bias.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mt6797: switch to SPDX license tag
Kai Chieh Chuang [Fri, 27 Apr 2018 01:54:44 +0000 (09:54 +0800)]
ASoC: mt6797: switch to SPDX license tag

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mt6797: add structure define and clock control function for 6797
Kai Chieh Chuang [Wed, 25 Apr 2018 02:48:49 +0000 (10:48 +0800)]
ASoC: mt6797: add structure define and clock control function for 6797

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: add mt6797-mt6351 driver and config option
Kai Chieh Chuang [Wed, 25 Apr 2018 07:25:21 +0000 (15:25 +0800)]
ASoC: add mt6797-mt6351 driver and config option

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mt6351 switch to SPDX license tag
Kai Chieh Chuang [Fri, 27 Apr 2018 01:54:45 +0000 (09:54 +0800)]
ASoC: mt6351 switch to SPDX license tag

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: uniphier: remove boilerplate from lisence comment
Katsuhiro Suzuki [Fri, 27 Apr 2018 05:27:34 +0000 (14:27 +0900)]
ASoC: uniphier: remove boilerplate from lisence comment

This patch removes boilerplate of GPLv2, use only SPDX identifier as
same as other recently ASoC DAI drivers.

Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: fsl_ssi: Use u32 variable type when using regmap_read()
Fabio Estevam [Wed, 25 Apr 2018 22:53:52 +0000 (19:53 -0300)]
ASoC: fsl_ssi: Use u32 variable type when using regmap_read()

Convert the sisr and sisr2 variable types to u32 to avoid the following
sparse warnings:

sound/soc/fsl/fsl_ssi.c:391:42: warning: incorrect type in argument 3 (different base types)
sound/soc/fsl/fsl_ssi.c:391:42:    expected unsigned int *val
sound/soc/fsl/fsl_ssi.c:391:42:    got restricted __be32 *<noident>
sound/soc/fsl/fsl_ssi.c:393:17: warning: restricted __be32 degrades to integer
sound/soc/fsl/fsl_ssi.c:393:15: warning: incorrect type in assignment (different base types)
sound/soc/fsl/fsl_ssi.c:393:15:    expected restricted __be32 [usertype] sisr2
sound/soc/fsl/fsl_ssi.c:393:15:    got unsigned int
sound/soc/fsl/fsl_ssi.c:396:50: warning: incorrect type in argument 3 (different base types)
sound/soc/fsl/fsl_ssi.c:396:50:    expected unsigned int [unsigned] val
sound/soc/fsl/fsl_ssi.c:396:50:    got restricted __be32 [usertype] sisr2
sound/soc/fsl/fsl_ssi.c:398:42: warning: incorrect type in argument 2 (different base types)
sound/soc/fsl/fsl_ssi.c:398:42:    expected unsigned int [unsigned] [usertype] sisr
sound/soc/fsl/fsl_ssi.c:398:42:    got restricted __be32 [addressable] [usertype] sisr

In other places where regmap_read() is used a u32 variable is passed
to store the register read value, so do the same here as well.

regmap API already takes care of endianness, so the usage of u32 is safe.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: amd: rename audio_substream_data variable
Mukunda, Vijendar [Thu, 26 Apr 2018 11:15:47 +0000 (16:45 +0530)]
ASoC: amd: rename audio_substream_data variable

In order to make audio_substream_data structure variable
consistent throughout the code, changed the name from
audio_config to rtd wherever applicable.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mediatek: switch to SPDX license tag
Ryder Lee [Wed, 25 Apr 2018 04:19:59 +0000 (12:19 +0800)]
ASoC: mediatek: switch to SPDX license tag

Add SPDX identifiers to all remaining files in sound/soc/mediatek/

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mediatek: add MT7622 AFE compatible in documentation
Ryder Lee [Wed, 25 Apr 2018 04:19:58 +0000 (12:19 +0800)]
ASoC: mediatek: add MT7622 AFE compatible in documentation

Add support for MT7622 AFE which shares the same binding with MT2701.

Cc: devicetree@vger.kernel.org
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mediatek: add MT7622 AFE support
Ryder Lee [Wed, 25 Apr 2018 04:19:57 +0000 (12:19 +0800)]
ASoC: mediatek: add MT7622 AFE support

This patch adds support for the MT7622 AFE which reuses MT2701 driver.

We also introduce the 'struct mt2701_soc_variants' to differentiate
between the SoC generations as there might be other (existing or future)
chips that use the same binding and driver, then being a little more
abstract could help in the long run.

Cc: Jia Zeng <jia.zeng@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Reviewed-by: Garlic Tseng <garlic.tseng@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mediatek: Add MTK_STREAM_NUM to mtk-base-afe.h
Ryder Lee [Wed, 25 Apr 2018 04:19:56 +0000 (12:19 +0800)]
ASoC: mediatek: Add MTK_STREAM_NUM to mtk-base-afe.h

Add MTK_STREAM_NUM to common header and modify related stuff so that
the other SoCs can reuse it.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Reviewed-by: Garlic Tseng <garlic.tseng@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mediatek: simplify the control logic of MT2701 I2S
Ryder Lee [Wed, 25 Apr 2018 04:19:55 +0000 (12:19 +0800)]
ASoC: mediatek: simplify the control logic of MT2701 I2S

This patch adjusts the mt2701_afe_i2s_ops to simplify the control
logic of the I2S path.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Reviewed-by: Garlic Tseng <garlic.tseng@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: add mt6351 codec driver
Kai Chieh Chuang [Thu, 26 Apr 2018 02:41:44 +0000 (10:41 +0800)]
ASoC: add mt6351 codec driver

This patch adds the MediaTek MT6351 codec driver.
MT6351 communicate with SoC through MediaTek PMIC wrapper.
MT6351 use MediaTek proprietary audio interface.

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: compress: Add helper functions for component open/free
Charles Keepax [Tue, 24 Apr 2018 15:39:03 +0000 (16:39 +0100)]
ASoC: compress: Add helper functions for component open/free

There are 2 loops calling open and 4 loops calling free for all the
components on a DAI link. Factor out these loops into helper functions
to make the code a little clearer.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Remove platform code now everything is componentised
Charles Keepax [Tue, 24 Apr 2018 15:39:02 +0000 (16:39 +0100)]
ASoC: Remove platform code now everything is componentised

As all drivers have been moved over to the new generic component
code remove the now unused platform specific code.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoMerge branch 'asoc-4.17' into asoc-4.18 for compress dependencies
Mark Brown [Thu, 26 Apr 2018 11:24:28 +0000 (12:24 +0100)]
Merge branch 'asoc-4.17' into asoc-4.18 for compress dependencies

6 years agoASoC: compress: Only call free for components which have been opened
Charles Keepax [Tue, 24 Apr 2018 15:39:01 +0000 (16:39 +0100)]
ASoC: compress: Only call free for components which have been opened

The core should only call free on a component if said component has
already had open called on it. This is not presently the case and most
compressed drivers in the kernel assume it will be. This causes null
pointer dereferences in the drivers as they attempt clean up for stuff
that was never put in place.

This is fixed by aborting calling open callbacks once a failure is
encountered and then during clean up only iterating through the
component list to that point.

This is a fairly quick fix to the issue, to allow backporting. There
is more refactoring to follow to tidy the code up a little.

Fixes: 9e7e3738ab0e ("ASoC: snd_soc_component_driver has snd_compr_ops")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Update email address for Vinod
Vinod Koul [Thu, 26 Apr 2018 06:44:50 +0000 (12:14 +0530)]
ASoC: Update email address for Vinod

Update the email address for compressed audio maintainer
Also update .mailmap.

Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mediatek: use snd_soc_dai_get_drvdata() to get the private data
Ryder Lee [Wed, 25 Apr 2018 04:19:54 +0000 (12:19 +0800)]
ASoC: mediatek: use snd_soc_dai_get_drvdata() to get the private data

Reduce the boilerplate code to retrieve the private data.
No functional change intended.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Reviewed-by: Garlic Tseng <garlic.tseng@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mediatek: add documents for mt6797
Kai Chieh Chuang [Wed, 25 Apr 2018 07:25:22 +0000 (15:25 +0800)]
ASoC: mediatek: add documents for mt6797

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mt6797: add mt6797 platform driver
Kai Chieh Chuang [Wed, 25 Apr 2018 07:25:20 +0000 (15:25 +0800)]
ASoC: mt6797: add mt6797 platform driver

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: wm_adsp: Account for name prefixes when toggling preloader
Charles Keepax [Tue, 24 Apr 2018 15:53:09 +0000 (16:53 +0100)]
ASoC: wm_adsp: Account for name prefixes when toggling preloader

Use the correct functions to allow a name prefix assigned through
codec_conf to be taken into consideration whilst enabling and disabling
the preloader widget.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: sgtl5000: Switch to SPDX identifier
Fabio Estevam [Mon, 23 Apr 2018 00:02:11 +0000 (21:02 -0300)]
ASoC: sgtl5000: Switch to SPDX identifier

Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: sgtl5000: Fix the spelling of 'exceed'
Fabio Estevam [Mon, 23 Apr 2018 00:02:10 +0000 (21:02 -0300)]
ASoC: sgtl5000: Fix the spelling of 'exceed'

Fix the spelling of 'exceed' in two comments.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: sh: Update menu title and platform dependency
Geert Uytterhoeven [Fri, 20 Apr 2018 13:28:32 +0000 (15:28 +0200)]
ASoC: sh: Update menu title and platform dependency

Change the menu title to refer to "Renesas SoCs" instead of "SuperH", as
both SuperH and ARM SoCs are supported.

Since commit 9b5ba0df4ea4f940 ("ARM: shmobile: Introduce ARCH_RENESAS")
is ARCH_RENESAS a more appropriate platform dependency for Renesas ARM
SoCs than the legacy ARCH_SHMOBILE, hence use the former.
Renesas SuperH SH-Mobile SoCs are still covered by the SUPERH
dependency.

This will allow to drop ARCH_SHMOBILE on ARM and ARM64 in the near
future.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: sh: Drop SUPERH platform dependency
Geert Uytterhoeven [Fri, 20 Apr 2018 14:22:14 +0000 (16:22 +0200)]
ASoC: sh: Drop SUPERH platform dependency

The SIU sound peripheral is used only on SuperH SH-Mobile platforms.
As both SUPERH and ARCH_SHMOBILE are set for these platforms, the SUPERH
dependency can be dropped.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: kbl_rt5663_rt5514_max98927: Replace GFP_ATOMIC with GFP_KERNEL
Vinod Koul [Fri, 20 Apr 2018 10:44:32 +0000 (16:14 +0530)]
ASoC: Intel: kbl_rt5663_rt5514_max98927: Replace GFP_ATOMIC with GFP_KERNEL

In kabylake_audio_probe which is not atomic context, we use GFP_ATOMIC
flag with memory allocation, fix that by using GFP_KERNEL.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: kbl_rt5663_max98927: Replace GFP_ATOMIC with GFP_KERNEL
Vinod Koul [Fri, 20 Apr 2018 10:44:31 +0000 (16:14 +0530)]
ASoC: Intel: kbl_rt5663_max98927: Replace GFP_ATOMIC with GFP_KERNEL

In kabylake_audio_probe which is not atomic context, we use GFP_ATOMIC
flag with memory allocation, fix that by using GFP_KERNEL.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: kbl_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL
Vinod Koul [Fri, 20 Apr 2018 10:44:30 +0000 (16:14 +0530)]
ASoC: Intel: kbl_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL

In kabylake_audio_probe which is not atomic context, we use GFP_ATOMIC
flag with memory allocation, fix that by using GFP_KERNEL.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: cht_bsw_nau8824: Replace GFP_ATOMIC with GFP_KERNEL
Vinod Koul [Fri, 20 Apr 2018 10:44:29 +0000 (16:14 +0530)]
ASoC: Intel: cht_bsw_nau8824: Replace GFP_ATOMIC with GFP_KERNEL

In snd_cht_mc_probe which is not atomic context, we use GFP_ATOMIC
flag with memory allocation, fix that by using GFP_KERNEL.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr_rt5651: Replace GFP_ATOMIC with GFP_KERNEL
Vinod Koul [Fri, 20 Apr 2018 10:44:28 +0000 (16:14 +0530)]
ASoC: Intel: bytcr_rt5651: Replace GFP_ATOMIC with GFP_KERNEL

In snd_byt_rt5651_mc_probe which is not atomic context, we use
GFP_ATOMIC flag with memory allocation, fix that by using GFP_KERNEL.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcht_es8316: Replace GFP_ATOMIC with GFP_KERNEL
Vinod Koul [Fri, 20 Apr 2018 10:44:27 +0000 (16:14 +0530)]
ASoC: Intel: bytcht_es8316: Replace GFP_ATOMIC with GFP_KERNEL

In snd_byt_cht_es8316_mc_probe which is not atomic context, we use
GFP_ATOMIC flag with memory allocation, fix that by using GFP_KERNEL.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: byt-max98090: Replace GFP_ATOMIC with GFP_KERNEL
Vinod Koul [Fri, 20 Apr 2018 10:44:26 +0000 (16:14 +0530)]
ASoC: Intel: byt-max98090: Replace GFP_ATOMIC with GFP_KERNEL

In byt_max98090_probe which is not atomic context, we use GFP_ATOMIC
flag with memory allocation, fix that by using GFP_KERNEL.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: atmel: simplify getting .drvdata
Wolfram Sang [Thu, 19 Apr 2018 14:06:31 +0000 (16:06 +0200)]
ASoC: atmel: simplify getting .drvdata

We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: rt5668: fix incorrect 'and' operator
Colin Ian King [Thu, 19 Apr 2018 14:34:31 +0000 (15:34 +0100)]
ASoC: rt5668: fix incorrect 'and' operator

Currently logical and is being used instead of bitwise and. Fix this.

Detected by CoverityScan, CID#1468008 ("Logical vs bitwise operator")

Fixes: d59fb2856223 ("ASoC: rt5668: add rt5668B codec driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Disable SND_SOC_INTEL_BAYTRAIL when SND_SST_ATOM_HIFI2_PLATFORM is enabled
Hans de Goede [Fri, 13 Apr 2018 12:45:37 +0000 (14:45 +0200)]
ASoC: Intel: Disable SND_SOC_INTEL_BAYTRAIL when SND_SST_ATOM_HIFI2_PLATFORM is enabled

The sound/soc/intel/common/sst-acpi.c code only tries to load the
"baytrail-pcm-audio" driver (and supporting board drivers) when
SND_SST_ATOM_HIFI2_PLATFORM is not enabled, since otherwise these
are handled by snd-soc-sst-atom-hifi2-platform.ko.

Since these thus will never be used when SND_SST_ATOM_HIFI2_PLATFORM is
enabled, building these drivers when it is enabled is useless.

Add a Kconfig dependency to reflect this, so that SND_SOC_INTEL_BAYTRAIL
cannot be enabled when SND_SST_ATOM_HIFI2_PLATFORM is also enabled.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: msm8916-wcd-analog: use threaded context for mbhc events
Srinivas Kandagatla [Wed, 18 Apr 2018 17:46:37 +0000 (18:46 +0100)]
ASoC: msm8916-wcd-analog: use threaded context for mbhc events

As snd_soc_jack_report() can sleep, move handling of mbhc events to a
thread context rather than in interrupt context.

Fixes: de66b3455023 ('ASoC: codecs: msm8916-wcd-analog: add MBHC support')
Reported-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: topology: Revert recent changes while boot errors are investigated
Mark Brown [Thu, 19 Apr 2018 11:14:10 +0000 (12:14 +0100)]
ASoC: topology: Revert recent changes while boot errors are investigated

Krzysztof Kozlowski reported a NULL dereference in _instantiate_card()
on Odroid XU3 and XU boards which he bisected to 45f8cb57da0d7 (ASoC:
core: Allow topology to override machine driver FE DAI link config).
Revert that commit for now, along with f11a5c27f928 (ASoC: core: Add
name prefix for machines with topology rewrites) due to dependency
issues, in order to keep things booting cleanly in -next.

Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: topology: Fix build errors
Mark Brown [Wed, 18 Apr 2018 14:40:41 +0000 (15:40 +0100)]
ASoC: topology: Fix build errors

The two commits:

   81e9b0a07889 ASoC: topology: Give more data to clients via callbacks
   28aa6f7779f7 ASoC: topology: Add callback for DAPM route load/unload

break the build so revert them.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Remove depends on HAS_DMA in case of platform dependency
Geert Uytterhoeven [Tue, 17 Apr 2018 17:49:01 +0000 (19:49 +0200)]
ASoC: Remove depends on HAS_DMA in case of platform dependency

Remove dependencies on HAS_DMA where a Kconfig symbol depends on another
symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST".
In most cases this other symbol is an architecture or platform specific
symbol, or PCI.

Generic symbols and drivers without platform dependencies keep their
dependencies on HAS_DMA, to prevent compiling subsystems or drivers that
cannot work anyway.

This simplifies the dependencies, and allows to improve compile-testing.

Note:
  - The various SND_SOC_LPASS_* symbols had to loose their dependencies
    on HAS_DMA, as they are selected by SND_SOC_STORM and/or
    SND_SOC_APQ8016_SBC.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: topology: Add support for compressed PCMs
Liam Girdwood [Tue, 27 Mar 2018 13:30:45 +0000 (14:30 +0100)]
ASoC: topology: Add support for compressed PCMs

Register a compressed PCM if topology defines one.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: topology: Add callback for DAPM route load/unload
Liam Girdwood [Tue, 27 Mar 2018 13:30:43 +0000 (14:30 +0100)]
ASoC: topology: Add callback for DAPM route load/unload

Add a callback fro clients for notification about DAPM route loading and
unloading.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: topology: Give more data to clients via callbacks
Liam Girdwood [Tue, 27 Mar 2018 13:30:42 +0000 (14:30 +0100)]
ASoC: topology: Give more data to clients via callbacks

Give topology clients more access to the topology data by passing index,
pcm, link_config and dai_driver to clients. This allows clients to fully
instantiate and track topology objects.

The SOF driver is the first user of these new APIs and needs them to build
component topology driver and FW objects.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: core: Add name prefix for machines with topology rewrites
Liam Girdwood [Tue, 27 Mar 2018 13:30:41 +0000 (14:30 +0100)]
ASoC: core: Add name prefix for machines with topology rewrites

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: core: Allow topology to override machine driver FE DAI link config.
Liam Girdwood [Tue, 27 Mar 2018 13:30:40 +0000 (14:30 +0100)]
ASoC: core: Allow topology to override machine driver FE DAI link config.

Machine drivers statically define a number of DAI links that currently
cannot be changed or removed by topology. This means PCMs and platform
components cannot be changed by topology at runtime AND machine drivers
are tightly coupled to topology.

This patch allows topology to override the machine driver DAI link config
in order to reuse machine drivers with different topologies and platform
components. The patch supports :-

1) create new FE PCMs with a topology defined PCM ID.
2) destroy existing static FE PCMs
3) change the platform component driver.
4) assign any new HW params fixups.

The patch requires no changes to the machine drivers, but does add some
platform component flags that the platform component driver can assign
before loading topologies.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: topology: Check widget kcontrols before deref
Liam Girdwood [Tue, 27 Mar 2018 13:30:44 +0000 (14:30 +0100)]
ASoC: topology: Check widget kcontrols before deref

Validate the topology input before we dereference the pointer.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: nau8824: user configuration of key detection
John Hsu [Wed, 21 Mar 2018 07:30:23 +0000 (15:30 +0800)]
ASoC: nau8824: user configuration of key detection

The SAR ADC of key press detection varies depending on headset.
We can't make a set of common threshold values for every case.
Therefore, the driver provides configuration for user and
they can set up values by UCM configuration.

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: amd: fixed checkpatch pl warnings
Mukunda, Vijendar [Tue, 17 Apr 2018 04:59:52 +0000 (10:29 +0530)]
ASoC: amd: fixed checkpatch pl warnings

fixed checkpatch pl warnings.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: topology: Fix bugs of freeing soc topology
Yan Wang [Mon, 26 Mar 2018 15:48:00 +0000 (16:48 +0100)]
ASoC: topology: Fix bugs of freeing soc topology

In snd_soc_tplg_component_remove(), it should compare index and
not dobj->index with SND_SOC_TPLG_INDEX_ALL for removing all
topology objects.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Skylake: Reset stream to link mapping
Rakesh Ughreja [Sun, 1 Apr 2018 09:43:23 +0000 (15:13 +0530)]
ASoC: Intel: Skylake: Reset stream to link mapping

By default all the streams are mapped to all links after controller is
reset which causes stream to be broadcast on all the links.

This patch resets the stream-link mapping after controller reset. The
stream is mapped later to the appropriate link as part of stream setup.

Tested-by: Abhijeet Kumar <abhijeet.kumar@intel.com>
Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com>
Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Skylake: Reset DSP Pipelines in prepare
Pardha Saradhi K [Mon, 2 Apr 2018 06:45:48 +0000 (12:15 +0530)]
ASoC: Intel: Skylake: Reset DSP Pipelines in prepare

An application can choose to call .prepare function
any number of times. In such scenarios, there is a
need to reset the DSP pipeline.

Signed-off-by: Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com>
Signed-off-by: Divya Prakash <divya1.prakash@intel.com>
Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Skylake: Unify the fw ops for SKL and KBL
Pradeep Tewani [Mon, 2 Apr 2018 06:45:50 +0000 (12:15 +0530)]
ASoC: Intel: Skylake: Unify the fw ops for SKL and KBL

SKL and KBL driver used separate set of fw ops for library loading.
However, with the unification of fw binary, use the common set of fw
ops for both

Signed-off-by: Pradeep Tewani <pradeep.d.tewani@intel.com>
Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Skylake: Reset DSP pipe in skl_pcm_hw_free
Divya Prakash [Mon, 2 Apr 2018 06:45:49 +0000 (12:15 +0530)]
ASoC: Intel: Skylake: Reset DSP pipe in skl_pcm_hw_free

Currently during destroy pipeline the gateway is disabled
before DMA completion. This leads to improper draining of
data and subsequently causing issues on HD-Audio DMA.
Hence added a new pipe reset IPC in skl_pcm_hw_free in
which the Gateway Enable(GEN bit) is reset to 0 after
DMA completion in skl_pcm_trigger.

Signed-off-by: Divya Prakash <divya1.prakash@intel.com>
Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: rt1305: fix platform_no_drv_owner.cocci warnings
Fengguang Wu [Mon, 16 Apr 2018 19:41:24 +0000 (03:41 +0800)]
ASoC: rt1305: fix platform_no_drv_owner.cocci warnings

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

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

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

Fixes: 29bc643ddd7e ("ASoC: rt1305: Add RT1305/RT1306 amplifier driver")
CC: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: rt1305: fix ACPI_PTR compile error
Shuming Fan [Tue, 17 Apr 2018 02:08:02 +0000 (10:08 +0800)]
ASoC: rt1305: fix ACPI_PTR compile error

This patch added <linux/acpi.h> header

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: topology: Modify clock gating parameter parsing to switch
Kirill Marinushkin [Mon, 16 Apr 2018 17:56:44 +0000 (19:56 +0200)]
ASoC: topology: Modify clock gating parameter parsing to switch

This improves the coding style of this piece of code.

Signed-off-by: Kirill Marinushkin <k.marinushkin@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Pan Xiuli <xiuli.pan@linux.intel.com>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Cc: linux-kernel@vger.kernel.org
Cc: alsa-devel@alsa-project.org
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: rt5668: add rt5668B codec driver
Bard Liao [Thu, 22 Mar 2018 06:12:33 +0000 (14:12 +0800)]
ASoC: rt5668: add rt5668B codec driver

This is the initial codec driver for rt5668b.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: rt1305: Add RT1305/RT1306 amplifier driver
Shuming Fan [Thu, 29 Mar 2018 12:05:14 +0000 (20:05 +0800)]
ASoC: rt1305: Add RT1305/RT1306 amplifier driver

This is the initial amplifier driver for rt1305/rt1306.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>