linux-2.6-microblaze.git
3 years agoASoC: qcom: dt-bindings: add bindings for lpass wsa macro codec
Srinivas Kandagatla [Thu, 5 Nov 2020 11:34:53 +0000 (11:34 +0000)]
ASoC: qcom: dt-bindings: add bindings for lpass wsa macro codec

This binding is for LPASS has internal codec WSA macro which is
for connecting with WSA Smart speakers.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201105113458.12360-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: soc-component: add snd_soc_component_xxx()" from Kuninori Morimot...
Mark Brown [Wed, 18 Nov 2020 20:56:23 +0000 (20:56 +0000)]
Merge series "ASoC: soc-component: add snd_soc_component_xxx()" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Hi Mark

These are v2 of snd_soc_component_compr_xxx() function patches.
I think component related function should be implemented at
soc-component.c, otherwise it is confusable to read.
These are for it.

v1 -> v2
- fixup function return timing on
snd_soc_component_compr_get_params()
snd_soc_component_compr_get_metadata()

- use mutex at compr side on
snd_soc_component_compr_get_caps()
snd_soc_component_compr_get_codec_caps()
snd_soc_component_compr_copy()

Link: https://lore.kernel.org/r/878sb78ac4.wl-kuninori.morimoto.gx@renesas.com
Kuninori Morimoto (12):
  ASoC: soc-component: add snd_soc_component_compr_open()
  ASoC: soc-component: add snd_soc_component_compr_free()
  ASoC: soc-component: add snd_soc_component_compr_trigger()
  ASoC: soc-component: add snd_soc_component_compr_set_params()
  ASoC: soc-component: add snd_soc_component_compr_get_params()
  ASoC: soc-component: add snd_soc_component_compr_get_caps()
  ASoC: soc-component: add snd_soc_component_compr_get_codec_caps()
  ASoC: soc-component: add snd_soc_component_compr_ack()
  ASoC: soc-component: add snd_soc_component_compr_pointer()
  ASoC: soc-component: add snd_soc_component_compr_copy()
  ASoC: soc-component: add snd_soc_component_compr_set_metadata()
  ASoC: soc-component: add snd_soc_component_compr_get_metadata()

 include/sound/soc-component.h |  22 +++
 sound/soc/soc-component.c     | 255 ++++++++++++++++++++++++++++++++
 sound/soc/soc-compress.c      | 263 ++++------------------------------
 3 files changed, 303 insertions(+), 237 deletions(-)

--
2.25.1

3 years agoMerge series "ASoC: graph card schema rework" from Rob Herring <robh@kernel.org>:
Mark Brown [Wed, 18 Nov 2020 20:56:22 +0000 (20:56 +0000)]
Merge series "ASoC: graph card schema rework" from Rob Herring <robh@>:

This series updates Sameer's patch to repartition the graph card binding
schema and incorporate the OF graph schema. The schema was also mixing
card node and DAI node properties, so I've split the DAI part (the
'port' node) into a separate schema.

There's another problem that 'frame-master' and 'bitclock-master' have
inconsistent types of boolean and phandle. Having the properties just
point to the local or remote endpoint within an endpoint node is kind of
pointless. We should have gone with just boolean, but looks like we
already have several users. MMP OLPC is the one platform using boolean,
but it happens to work because the properties are effectively ignored
and CPU DAI as the master is the default.

Rob

Rob Herring (3):
  ASoC: dt-bindings: Use OF graph schema
  ASoC: dt-bindings: marvell,mmp-sspa: Use audio-graph-port schema
  ASoC: dt-bindings: Refine 'frame-master' and 'bitclock-master' type

Sameer Pujar (1):
  ASoC: audio-graph-card: Refactor schema

 .../bindings/sound/audio-graph-card.yaml      | 106 +-----------------
 .../bindings/sound/audio-graph-port.yaml      |  72 ++++++++++++
 .../bindings/sound/audio-graph.yaml           |  45 ++++++++
 .../bindings/sound/marvell,mmp-sspa.yaml      |  25 +----
 .../bindings/sound/renesas,rsnd.yaml          |  12 +-
 .../bindings/sound/simple-card.yaml           |   6 +-
 6 files changed, 132 insertions(+), 134 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/audio-graph-port.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/audio-graph.yaml

base-commit: e2e99930ec006c6fe1d62af339a765ade71a0d9a
--
2.25.1

3 years agoASoC: mt8192: revert "add audio afe document"
Jiaxin Yu [Wed, 11 Nov 2020 08:05:20 +0000 (16:05 +0800)]
ASoC: mt8192: revert "add audio afe document"

This reverts commit 1afc60e00de3abbb6c559da409c5c1bb8c1d98ec
(dt-bindings: mediatek: mt8192: add audio afe document).

 https://mailman.alsa-project.org/pipermail/alsa-devel/2020-November/176873.html
 These dependency are continuing to upstream, I will revert this patch first.
 After the dependencies are merged, I will send 'mt8192-afe-pcm.yaml' again.

[Massaged commit message to put hint about issue being fixed into there
rather than the trailer -- broonie]

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1605081920-11848-1-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: samsung: fix platform_no_drv_owner.cocci warnings
Zou Wei [Mon, 16 Nov 2020 12:29:00 +0000 (20:29 +0800)]
ASoC: samsung: fix platform_no_drv_owner.cocci warnings

./sound/soc/samsung/midas_wm1811.c:534:3-8: No need to set .owner here. The core will do it.

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

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

Signed-off-by: Zou Wei <zou_wei@huawei.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/1605529740-68757-1-git-send-email-zou_wei@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: mmp-sspa: clear transmit phase bit for non-stereo formats
Kyle Russell [Fri, 6 Nov 2020 14:59:05 +0000 (09:59 -0500)]
ASoC: mmp-sspa: clear transmit phase bit for non-stereo formats

The transmit phase register value is never cleared during hw params.
So once hw params sets this bit to handle a two channel format, it
remains configured for dual-phase, which is not desirable for mono
playback.

Signed-off-by: Kyle Russell <bkylerussell@gmail.com>
Link: https://lore.kernel.org/r/20201106145905.365903-1-bkylerussell@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: wcd9335: Remove unnecessary conversion to bool
Kaixu Xia [Fri, 6 Nov 2020 08:53:36 +0000 (16:53 +0800)]
ASoC: wcd9335: Remove unnecessary conversion to bool

The '>=' expression itself is bool, no need to convert it to bool.
Fix the following coccicheck warning:

./sound/soc/codecs/wcd9335.c:3982:25-30: WARNING: conversion to bool not needed here

Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Link: https://lore.kernel.org/r/1604652816-1330-1-git-send-email-kaixuxia@tencent.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dt-bindings: Refine 'frame-master' and 'bitclock-master' type
Rob Herring [Tue, 17 Nov 2020 01:33:49 +0000 (19:33 -0600)]
ASoC: dt-bindings: Refine 'frame-master' and 'bitclock-master' type

'frame-master' and 'bitclock-master' are only a single phandle, so use
the more specific 'phandle' type definition instead.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/20201117013349.2458416-5-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dt-bindings: marvell, mmp-sspa: Use audio-graph-port schema
Rob Herring [Tue, 17 Nov 2020 01:33:48 +0000 (19:33 -0600)]
ASoC: dt-bindings: marvell, mmp-sspa: Use audio-graph-port schema

Now that we have a graph schema, reference it from the marvell,mmp-sspa
schema.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Lubomir Rintel <lkundrak@v3.sk>
Link: https://lore.kernel.org/r/20201117013349.2458416-4-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: audio-graph-card: Refactor schema
Sameer Pujar [Tue, 17 Nov 2020 01:33:46 +0000 (19:33 -0600)]
ASoC: audio-graph-card: Refactor schema

There can be customized sound cards which are based on generic audio
graph. In such cases most of the stuff is reused from generic audio
graph. To facilitate this, refactor audio graph schema into multiple
files and the base schema can be reused for specific sound cards.

The graph card nodes and port nodes are separate entities, so they
should be separate schemas.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[robh: Split out port schema. Add graph.yaml in subsequent commit]
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/20201117013349.2458416-2-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-component: add snd_soc_component_compr_get_metadata()
Kuninori Morimoto [Fri, 13 Nov 2020 04:16:41 +0000 (13:16 +0900)]
ASoC: soc-component: add snd_soc_component_compr_get_metadata()

component related function should be implemented at
soc-component.c.
This patch adds snd_soc_component_compr_get_metadata().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87zh3l6gl8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-component: add snd_soc_component_compr_set_metadata()
Kuninori Morimoto [Fri, 13 Nov 2020 04:16:36 +0000 (13:16 +0900)]
ASoC: soc-component: add snd_soc_component_compr_set_metadata()

component related function should be implemented at
soc-component.c.
This patch adds snd_soc_component_compr_set_metadata().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/871rgx7v5t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-component: add snd_soc_component_compr_copy()
Kuninori Morimoto [Fri, 13 Nov 2020 04:16:30 +0000 (13:16 +0900)]
ASoC: soc-component: add snd_soc_component_compr_copy()

component related function should be implemented at
soc-component.c.
This patch adds snd_soc_component_compr_copy().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87361d7v5z.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-component: add snd_soc_component_compr_pointer()
Kuninori Morimoto [Fri, 13 Nov 2020 04:16:24 +0000 (13:16 +0900)]
ASoC: soc-component: add snd_soc_component_compr_pointer()

component related function should be implemented at
soc-component.c.
This patch adds snd_soc_component_compr_pointer().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/874klt7v65.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-component: add snd_soc_component_compr_ack()
Kuninori Morimoto [Fri, 13 Nov 2020 04:16:17 +0000 (13:16 +0900)]
ASoC: soc-component: add snd_soc_component_compr_ack()

component related function should be implemented at
soc-component.c.
This patch adds snd_soc_component_compr_ack().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/875z697v6c.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-component: add snd_soc_component_compr_get_codec_caps()
Kuninori Morimoto [Fri, 13 Nov 2020 04:16:11 +0000 (13:16 +0900)]
ASoC: soc-component: add snd_soc_component_compr_get_codec_caps()

component related function should be implemented at
soc-component.c.
This patch adds snd_soc_component_compr_get_codec_caps().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/877dqp7v6i.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-component: add snd_soc_component_compr_get_caps()
Kuninori Morimoto [Fri, 13 Nov 2020 04:16:03 +0000 (13:16 +0900)]
ASoC: soc-component: add snd_soc_component_compr_get_caps()

component related function should be implemented at
soc-component.c.
This patch adds snd_soc_component_compr_get_caps().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/878sb57v6q.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-component: add snd_soc_component_compr_get_params()
Kuninori Morimoto [Fri, 13 Nov 2020 04:15:56 +0000 (13:15 +0900)]
ASoC: soc-component: add snd_soc_component_compr_get_params()

component related function should be implemented at
soc-component.c.
This patch adds snd_soc_component_compr_get_params().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87a6vl7v6x.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-component: add snd_soc_component_compr_set_params()
Kuninori Morimoto [Fri, 13 Nov 2020 04:15:49 +0000 (13:15 +0900)]
ASoC: soc-component: add snd_soc_component_compr_set_params()

component related function should be implemented at
soc-component.c.
This patch moves soc-compress soc_compr_components_set_params()
to soc-component as snd_soc_component_compr_set_params().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87blg17v74.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-component: add snd_soc_component_compr_trigger()
Kuninori Morimoto [Fri, 13 Nov 2020 04:15:33 +0000 (13:15 +0900)]
ASoC: soc-component: add snd_soc_component_compr_trigger()

component related function should be implemented at
soc-component.c.
This patch moves soc-compress soc_compr_components_trigger()
to soc-component as snd_soc_component_compr_trigger().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87d00h7v7k.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-component: add snd_soc_component_compr_free()
Kuninori Morimoto [Fri, 13 Nov 2020 04:15:26 +0000 (13:15 +0900)]
ASoC: soc-component: add snd_soc_component_compr_free()

component related function should be implemented at
soc-component.c.
This patch moves soc-compress soc_compr_components_free()
to soc-component as snd_soc_component_compr_free().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87eekx7v7r.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-component: add snd_soc_component_compr_open()
Kuninori Morimoto [Fri, 13 Nov 2020 04:15:20 +0000 (13:15 +0900)]
ASoC: soc-component: add snd_soc_component_compr_open()

component related function should be implemented at
soc-component.c.
This patch moves soc-compress soc_compr_components_open()
to soc-component as snd_soc_component_compr_open().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87ft5d7v7x.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Fix 7/8 spaces indentation in Kconfig
Geert Uytterhoeven [Tue, 10 Nov 2020 17:49:04 +0000 (18:49 +0100)]
ASoC: Fix 7/8 spaces indentation in Kconfig

Some entries used 7 or 8 spaces instead if a single TAB.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20201110174904.3413846-1-geert@linux-m68k.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: intel: SND_SOC_INTEL_KEEMBAY should depend on ARCH_KEEMBAY
Geert Uytterhoeven [Tue, 10 Nov 2020 14:50:01 +0000 (15:50 +0100)]
ASoC: intel: SND_SOC_INTEL_KEEMBAY should depend on ARCH_KEEMBAY

The Intel Keem Bay audio module is only present on Intel Keem Bay SoCs.
Hence add a dependency on ARCH_KEEMBAY, to prevent asking the user about
this driver when configuring a kernel without Intel Keem Bay platform
support.

Fixes: c544912bcc2dc806 ("ASoC: Intel: Add makefiles and kconfig changes for KeemBay")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20201110145001.3280479-1-geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl: SND_SOC_FSL_AUD2HTX should depend on ARCH_MXC
Geert Uytterhoeven [Tue, 10 Nov 2020 14:51:20 +0000 (15:51 +0100)]
ASoC: fsl: SND_SOC_FSL_AUD2HTX should depend on ARCH_MXC

The Freescale/NXP AUDIO TO HDMI TX module is only present on NXP i.MX 8
Series SoCs.  Hence add a dependency on ARCH_MXC, to prevent asking the
user about this driver when configuring a kernel without i.MX 8 platform
support.

Fixes: 8a24c834c053ef1b ("ASoC: fsl_aud2htx: Add aud2htx module driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20201110145120.3280658-1-geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoc: adi: Kconfig: Remove depends on for ADI reference designs
Bogdan Togorean [Tue, 10 Nov 2020 15:22:13 +0000 (17:22 +0200)]
ASoc: adi: Kconfig: Remove depends on for ADI reference designs

Audio ADI reference designs are also used on some ZynqMP boards, and can
also be used on Intel FPGA boards and also on some more complex FPGA
combinations (FPGA cards connected through PCIe).

This change removes the dependency on Microblaze and Zynq architectures
to allow the usage of this driver for the systems described above.

Signed-off-by: Bogdan Togorean <bogdan.togorean@analog.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201110152213.37811-1-alexandru.ardelean@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: adau1977: convert text binding to yaml format
Alexandru Ardelean [Tue, 10 Nov 2020 08:47:54 +0000 (10:47 +0200)]
ASoC: adau1977: convert text binding to yaml format

This change converts the old device-tree binding for ADAU1977 from text
format to the new yaml format.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201110084754.46756-1-alexandru.ardelean@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: Intel: catpt: Offload fixes and code optimization" from Cezary...
Mark Brown [Mon, 16 Nov 2020 23:28:03 +0000 (23:28 +0000)]
Merge series "ASoC: Intel: catpt: Offload fixes and code optimization" from Cezary Rojewski <cezary.rojewski@intel.com>:

First two of the series address bugs connected mainly to offload streams:
- scenarios with very low buffer sizes: RESET_STREAM IPC timeouts
- fix lp clock selection when switching between PAUSE <-> RESUME states:
  glitches on first offload when no additional stream is opened
  simultaneously

Follow ups are: code reduction and optimization oriented patches.
This has been foretold in:

[PATCH v10 00/14] ASoC: Intel: Catpt - Lynx and Wildcat point
https://www.spinics.net/lists/alsa-devel/msg116440.html
  Note: LPT power up/down sequences might get aligned with WPT once
  enough testing is done as capabilities are shared for both DSPs.

First, optimize applying of user settings - prevent redundand calls from
happening - and then as mentioned above, streamline power on/off sequence
for LPT and WPT.

Cezary Rojewski (5):
  ASoC: Intel: catpt: Skip position update for unprepared streams
  ASoC: Intel: catpt: Correct clock selection for dai trigger
  ASoC: Intel: catpt: Optimize applying user settings
  ASoC: Intel: catpt: Streamline power routines across LPT and WPT
  ASoC: Intel: catpt: Cleanup after power routines streamlining

 sound/soc/intel/catpt/core.h   |  10 ++-
 sound/soc/intel/catpt/device.c |  18 +++---
 sound/soc/intel/catpt/dsp.c    |  56 ++--------------
 sound/soc/intel/catpt/pcm.c    | 113 ++++++++++++++++-----------------
 4 files changed, 74 insertions(+), 123 deletions(-)

--
2.17.1

base-commit: 3650b228f83adda7e5ee532e2b90429c03f7b9ec

3 years agoMerge series "ASoC: pcm512x: Patch series to set fmt from `set_fmt()`" from Kirill...
Mark Brown [Mon, 16 Nov 2020 23:23:48 +0000 (23:23 +0000)]
Merge series "ASoC: pcm512x: Patch series to set fmt from `set_fmt()`" from Kirill Marinushkin <kmarinushkin@birdec.com>:

Set format from `set_fmt()` func instead of `hw_params()`, plus supportive
commits

Kirill Marinushkin (4):
  ASoC: pcm512x: Fix not setting word length if DAIFMT_CBS_CFS
  ASoC: pcm512x: Rearrange operations in `hw_params()`
  ASoC: pcm512x: Move format check into `set_fmt()`
  ASoC: pcm512x: Add support for more data formats

 sound/soc/codecs/pcm512x.c | 134 ++++++++++++++++++++++++++++-----------------
 1 file changed, 84 insertions(+), 50 deletions(-)

--
2.13.6

3 years agoASoC: qcom: sc7180: Register shutdown handler for lpass platform
V Sujith Kumar Reddy [Fri, 13 Nov 2020 18:38:22 +0000 (00:08 +0530)]
ASoC: qcom: sc7180: Register shutdown handler for lpass platform

Register shutdown handler to stop sc7180 lpass platform driver
and to disable audio clocks.

Signed-off-by: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
Link: https://lore.kernel.org/r/1605292702-25046-1-git-send-email-srivasam@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qcom: lpass-sc7180: Add 32 bit format support for capture
V Sujith Kumar Reddy [Mon, 16 Nov 2020 07:49:15 +0000 (13:19 +0530)]
ASoC: qcom: lpass-sc7180: Add 32 bit format support for capture

Add 32 bit format support for capture in lpass-sc7180
snd_soc_dai_driver capabilities. Need to add contstraints
in machine driver so that only specific format allowed.

Signed-off-by: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
Signed-off-by: Srinivasa Rao Manidadapu <srivasam@codeaurora.org>
Link: https://lore.kernel.org/r/1605512955-7017-1-git-send-email-srivasam@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: Intel: initial support for Alderlake-S
Kai Vehmanen [Mon, 16 Nov 2020 14:26:42 +0000 (16:26 +0200)]
ASoC: SOF: Intel: initial support for Alderlake-S

Add Kconfig entries, PCI ID and chip info for Alderlake-S product.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20201116142642.2106067-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: meson: fix COMPILE_TEST error
Jerome Brunet [Mon, 16 Nov 2020 17:24:23 +0000 (18:24 +0100)]
ASoC: meson: fix COMPILE_TEST error

When compiled with CONFIG_HAVE_CLK, the kernel need to get provider for the
clock API. This is usually selected by the platform and the sound drivers
should not really care about this. However COMPILE_TEST is special and the
platform required may not have been selected, leading to this type of
error:

> aiu-encoder-spdif.c:(.text+0x3a0): undefined reference to `clk_set_parent'

Since we need a sane provider of the API with COMPILE_TEST, depends on
COMMON_CLK.

Fixes: 6dc4fa179fb8 ("ASoC: meson: add axg fifo base driver")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20201116172423.546855-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qcom: sc7180: initialize the "no_headphone" variable
Dan Carpenter [Mon, 16 Nov 2020 12:59:50 +0000 (15:59 +0300)]
ASoC: qcom: sc7180: initialize the "no_headphone" variable

The "no_headphone" variable is never set to "false" so it could be
uninitialized.

Fixes: e936619b7ce7 ("ASoC: qcom: sc7180: Modify machine driver for sound card")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201116125950.GA44063@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: catpt: Cleanup after power routines streamlining
Cezary Rojewski [Mon, 16 Nov 2020 13:33:32 +0000 (14:33 +0100)]
ASoC: Intel: catpt: Cleanup after power routines streamlining

With LPT switching to WPT-based power on/off routines, functions that
have been previously used by it are rendered redundant so remove them.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201116133332.8530-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: catpt: Streamline power routines across LPT and WPT
Cezary Rojewski [Mon, 16 Nov 2020 13:33:31 +0000 (14:33 +0100)]
ASoC: Intel: catpt: Streamline power routines across LPT and WPT

There is no need for separate power on/off routines for LPT and WPT as
as the protocol is shared for both platforms. Make WPT routines generic
and reuse them in LPT case too.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201116133332.8530-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: catpt: Optimize applying user settings
Cezary Rojewski [Mon, 16 Nov 2020 13:33:30 +0000 (14:33 +0100)]
ASoC: Intel: catpt: Optimize applying user settings

Initial user settings such as volume control need to be applied only
once after stream is allocated. As prepare() operation can be invoked
multiple times during the stream's lifetime, relocate
catpt_dai_apply_usettings() and call it directly within
catpt_dai_hw_params() rather than on every catpt_dai_prepare().

catpt_dai_apply_usettings() remains unchanged.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201116133332.8530-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: catpt: Correct clock selection for dai trigger
Cezary Rojewski [Mon, 16 Nov 2020 13:33:29 +0000 (14:33 +0100)]
ASoC: Intel: catpt: Correct clock selection for dai trigger

During stream start DSP firmware requires LPCS disabled as that moment in
time is resource heavy. Currently high-clock is selected on start of
second stream onwards while low-clock is re-selected before stream
actually leaves RESUME state i.e. PAUSE_STREAM call. Fix this by always
updating clock before RESUME_STREAM and directly after PAUSE_STREAM.

Fixes: a126750fc865 ("ASoC: Intel: catpt: PCM operations")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201116133332.8530-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: catpt: Skip position update for unprepared streams
Cezary Rojewski [Mon, 16 Nov 2020 13:33:28 +0000 (14:33 +0100)]
ASoC: Intel: catpt: Skip position update for unprepared streams

Playing with very low period sizes may lead to timeouts when awaiting
RESET_STREAM reply for offload streams. This is caused by NOTIFY_POSITION
appearing in the middle of trigger(stop).

Stream is unprepared during trigger(stop) where PAUSE_STREAM IPC gets
invoked. However, all data that is already mixed in DSP firmware's mixer
stream will still be played regardless of the pause. For offload streams,
this means possibility for another NOTIFY_POSITION to process. Keep these
notifications in check by only handling them when stream is in prepared
state.

Fixes: a126750fc865 ("ASoC: Intel: catpt: PCM operations")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201116133332.8530-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: pcm512x: Add support for more data formats
Kirill Marinushkin [Sun, 15 Nov 2020 12:23:06 +0000 (13:23 +0100)]
ASoC: pcm512x: Add support for more data formats

Currently, pcm512x driver supports only I2S data format.
This commit adds RJ, LJ, DSP_A and DSP_B as well.

I don't expect regression WRT existing sound cards, because:

* default value in corresponding register of pcm512x codec is 0 ==  I2S
* existing in-tree sound cards with pcm512x codec are configured for I2S
* i don't see how existing off-tree sound cards with pcm512x codec could be
  configured differently - it would not work
* tested explicitly, that there is no regression with Raspberry Pi +
  sound card `sound/soc/bcm/hifiberry_dacplus.c`

Signed-off-by: Kirill Marinushkin <kmarinushkin@birdec.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Matthias Reichl <hias@horus.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201115122306.18164-5-kmarinushkin@birdec.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: pcm512x: Move format check into `set_fmt()`
Kirill Marinushkin [Sun, 15 Nov 2020 12:23:05 +0000 (13:23 +0100)]
ASoC: pcm512x: Move format check into `set_fmt()`

I would like to describe the reasoning by quoting Peter Ujfalusi
<peter.ujfalusi@ti.com> from his review of this patch series v1 [1]:

> When you bind a link you will use set_fmt for the two sides to see if
> they can agree, that both can support what has been asked.
>
> The pcm512x driver just saves the fmt and say back to that card:
> whatever, I'm fine with it. But runtime during hw_params it can fail due
> to unsupported bus format, which it actually acked to be ok.
>
> This is the difference.
>
> Sure, some device have constraint based on the fmt towards the hw_params
> and it is perfectly OK to do such a checks and rejections or build
> rules/constraints based on fmt, but failing hw_params just because
> set_fmt did not checked that the bus format is not even supported is not
> a nice thing to do.

[1] https://patchwork.kernel.org/project/alsa-devel/patch/
    20201109212133.25869-1-kmarinushkin@birdec.com/

Signed-off-by: Kirill Marinushkin <kmarinushkin@birdec.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Matthias Reichl <hias@horus.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201115122306.18164-4-kmarinushkin@birdec.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: pcm512x: Rearrange operations in `hw_params()`
Kirill Marinushkin [Sun, 15 Nov 2020 12:23:04 +0000 (13:23 +0100)]
ASoC: pcm512x: Rearrange operations in `hw_params()`

This commit is a preparation for the next patch in the series.
It's goal is to make format check easy-to-move-out. Theoretically, more
butifications are possile in `hw_params()` func, but my intention in this
commit is to keep behaviour unchanged.

Signed-off-by: Kirill Marinushkin <kmarinushkin@birdec.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Matthias Reichl <hias@horus.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201115122306.18164-3-kmarinushkin@birdec.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: pcm512x: Fix not setting word length if DAIFMT_CBS_CFS
Kirill Marinushkin [Sun, 15 Nov 2020 12:23:03 +0000 (13:23 +0100)]
ASoC: pcm512x: Fix not setting word length if DAIFMT_CBS_CFS

In `pcm512x_hw_params()`, the following switch-case:

~~~~
switch (pcm512x->fmt & SND_SOC_DAIFMT_MASTER_MASK) {
case SND_SOC_DAIFMT_CBS_CFS:
~~~~

returns 0, which was preventing word length from being written into codecs
register.

Fixed by writing it into register before checking
`SND_SOC_DAIFMT_MASTER_MASK`.
Tested with Raspberry Pi + sound card `hifiberry_dacplus` in CBS_CFS format

Signed-off-by: Kirill Marinushkin <kmarinushkin@birdec.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Matthias Reichl <hias@horus.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201115122306.18164-2-kmarinushkin@birdec.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: use inclusive language for bclk/fsync/topology" from Pierre-Louis...
Mark Brown [Fri, 13 Nov 2020 16:04:13 +0000 (16:04 +0000)]
Merge series "ASoC: use inclusive language for bclk/fsync/topology" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

The SOF (Sound Open Firmware) tree contains a lot of references in
topology files to 'codec_slave'/'codec_master' terms, which in turn
come from alsa-lib and ALSA/ASoC topology support at the kernel
level. These terms are no longer compatible with the guidelines
adopted by the kernel community [1], standard organizations, and need
to change in backwards-compatible ways.

The main/secondary terms typically suggested in guidelines don't mean
anything for clocks, this patchset suggests instead the use of
'provider' and 'consumer' terms, with the 'codec' prefix kept to make
it clear that the codec is the reference. The CM/CS suffixes are also
replaced by CP/CC.

It can be argued that the change of suffix is invasive, but finding a
replacement that keeps the M and S shortcuts has proven difficult in
quite a few contexts.

The previous definitions are kept for backwards-compatibility so this
change should not have any functional impact. It is suggested that new
contributions only use the new terms but there is no requirement to
transition immediately to the new definitions for existing code. Intel
will however update all its past contributions related to bit
clock/frame sync configurations immediately.

This patchset contains the kernel changes only, the alsa-lib changes
were shared separately.

Feedback welcome
~Pierre

[1] https://lkml.org/lkml/2020/7/4/229

Pierre-Louis Bossart (4):
  ASoC: topology: use inclusive language for bclk and fsync
  ASoC: SOF: use inclusive language for bclk and fsync
  ASoC: Intel: atom: use inclusive language for SSP bclk/fsync
  ASoC: Intel: keembay: use inclusive language for bclk and fsync

 include/sound/soc-dai.h                  | 32 +++++++++++++++---------
 include/sound/sof/dai.h                  | 16 ++++++++----
 include/uapi/sound/asoc.h                | 22 ++++++++++------
 sound/soc/intel/atom/sst-atom-controls.c | 12 ++++-----
 sound/soc/intel/atom/sst-atom-controls.h |  4 +--
 sound/soc/intel/keembay/kmb_platform.c   | 22 ++++++++--------
 sound/soc/intel/keembay/kmb_platform.h   |  8 +++---
 sound/soc/soc-topology.c                 | 24 +++++++++---------
 sound/soc/sof/topology.c                 | 18 ++++++-------
 9 files changed, 89 insertions(+), 69 deletions(-)

--
2.25.1

3 years agoASoC: rt5682: Add a new property to the device tree.
Oder Chiou [Fri, 13 Nov 2020 05:54:00 +0000 (13:54 +0800)]
ASoC: rt5682: Add a new property to the device tree.

The patch adds a new property to the drice tree for the DMIC clcok driving.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Link: https://lore.kernel.org/r/20201113055400.11242-2-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rt5682: Add a new property for the DMIC clock driving
Oder Chiou [Fri, 13 Nov 2020 05:53:59 +0000 (13:53 +0800)]
ASoC: rt5682: Add a new property for the DMIC clock driving

The patch adds a new property to set the DMIC clock driving.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Link: https://lore.kernel.org/r/20201113055400.11242-1-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: keembay: use inclusive language for bclk and fsync
Pierre-Louis Bossart [Thu, 12 Nov 2020 16:31:00 +0000 (10:31 -0600)]
ASoC: Intel: keembay: use inclusive language for bclk and fsync

Use 'clock provider' and 'clock consumer' terms.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201112163100.5081-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: atom: use inclusive language for SSP bclk/fsync
Pierre-Louis Bossart [Thu, 12 Nov 2020 16:30:59 +0000 (10:30 -0600)]
ASoC: Intel: atom: use inclusive language for SSP bclk/fsync

Use 'provider' and 'consumer' terms.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201112163100.5081-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: use inclusive language for bclk and fsync
Pierre-Louis Bossart [Thu, 12 Nov 2020 16:30:58 +0000 (10:30 -0600)]
ASoC: SOF: use inclusive language for bclk and fsync

Mirror alsa-lib definitions w/ codec_provider (CP) and
codec_consumer (CC).

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201112163100.5081-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: topology: use inclusive language for bclk and fsync
Pierre-Louis Bossart [Thu, 12 Nov 2020 16:30:57 +0000 (10:30 -0600)]
ASoC: topology: use inclusive language for bclk and fsync

Mirror suggested changes in alsa-lib.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201112163100.5081-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: SOF: Kconfig corrections" from Pierre-Louis Bossart <pierre-louis...
Mark Brown [Thu, 12 Nov 2020 19:35:50 +0000 (19:35 +0000)]
Merge series "ASoC: SOF: Kconfig corrections" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Three cosmetic patches and a fix for a randconfig issue.

v2: rebase to remove git am issue (worked with --3way before)

Pierre-Louis Bossart (1):
  ASoC: SOF: Intel: fix Kconfig dependency for SND_INTEL_DSP_CONFIG

Randy Dunlap (3):
  ASoC: SOF: imx: fix Kconfig punctuation
  ASoC: SOF: Kconfig: fix Kconfig punctuation and wording
  ASoC: SOF: Intel: fix Kconfig punctuation and wording

 sound/soc/sof/Kconfig       | 42 ++++++++++++------------
 sound/soc/sof/imx/Kconfig   | 10 +++---
 sound/soc/sof/intel/Kconfig | 64 ++++++++++++++++++-------------------
 3 files changed, 58 insertions(+), 58 deletions(-)

--
2.25.1

3 years agoMerge series "Support SC7180 sound card variation without headset" from xuyuqing...
Mark Brown [Thu, 12 Nov 2020 19:35:49 +0000 (19:35 +0000)]
Merge series "Support SC7180 sound card variation without headset" from xuyuqing <xuyuqing@huaqin.corp-partner.google.com>:

Use compatible string to let machine driver handle the case
where ALC5682 headset codec is replaced with ADAU7002 dmic codec

xuyuqing (2):
  ASoC: google: dt-bindings: add new compatible for sc7180-coachz
  ASoC: qcom: sc7180: Add machine driver for sound card

 .../bindings/sound/google,sc7180-trogdor.yaml |  4 +-
 sound/soc/qcom/Kconfig                        |  1 +
 sound/soc/qcom/sc7180.c                       | 86 ++++++++++++++++---
 3 files changed, 77 insertions(+), 14 deletions(-)

--
2.25.1

3 years agoMerge series "ASoC: soundwire: SDCA device quirk and cleanups" from Pierre-Louis...
Mark Brown [Thu, 12 Nov 2020 19:35:48 +0000 (19:35 +0000)]
Merge series "ASoC: soundwire: SDCA device quirk and cleanups" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Add one quirk to handle new TigerLake-SDCA device and cleanup code.

Pierre-Louis Bossart (4):
  ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device
  ASoC: codecs: rt*.c: remove useless pointer cast
  ASoC: rt711: remove warnings
  ASoC: codecs: max98373-sdw: align regmap use with other codecs

 sound/soc/codecs/max98373-sdw.c  |  2 +-
 sound/soc/codecs/rt1308-sdw.c    |  2 +-
 sound/soc/codecs/rt5682-sdw.c    |  2 +-
 sound/soc/codecs/rt700.c         |  2 +-
 sound/soc/codecs/rt711-sdw.c     | 15 ++++++++-------
 sound/soc/codecs/rt711.c         |  2 +-
 sound/soc/codecs/rt715.c         |  2 +-
 sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++
 8 files changed, 24 insertions(+), 13 deletions(-)

--
2.25.1

3 years agoMerge series "ASoC: Fix error handling in wm899x" from Zhang Qilong <zhangqilong3...
Mark Brown [Thu, 12 Nov 2020 19:35:47 +0000 (19:35 +0000)]
Merge series "ASoC: Fix error handling in wm899x" from Zhang Qilong <zhangqilong3@huawei.com>:

The first patch fixed a wrong free in wm8997_probe. The
remaining three patches fixed PM disable depth imbalance
on error handling.

Zhang Qilong (4):
  ASoC: arizona: Fix a wrong free in wm8997_probe
  ASoC: arizona: Fix PM disable depth imbalance on error
  ASoC: wm8994: Fix PM disable depth imbalance on error
  ASoC: wm8998: Fix PM disable depth imbalance on error

 sound/soc/codecs/wm8994.c | 6 +++++-
 sound/soc/codecs/wm8997.c | 8 ++++++--
 sound/soc/codecs/wm8998.c | 4 +++-
 3 files changed, 14 insertions(+), 4 deletions(-)

--
2.25.4

3 years agoASoC: imx-ssi: Remove unused driver
Fabio Estevam [Tue, 10 Nov 2020 20:39:37 +0000 (17:39 -0300)]
ASoC: imx-ssi: Remove unused driver

The imx-ssi driver was only used by i.MX non-DT platforms.

Since 5.10-rc1, i.MX has been converted to a DT-only platform and all
board files are gone.

Remove the imx-ssi audio driver as there are no more users at all.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-6-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl: eukrea: Remove the SND_SOC_IMX_SSI selection
Fabio Estevam [Tue, 10 Nov 2020 20:39:36 +0000 (17:39 -0300)]
ASoC: fsl: eukrea: Remove the SND_SOC_IMX_SSI selection

SND_SOC_IMX_SSI was only used by i.MX non-DT platforms.

SND_SOC_EUKREA_TLV320 already selects the SND_SOC_FSL_SSI symbol,
which is enough.

Remove the unneeded SND_SOC_IMX_SSI selection.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-5-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: imx-mc13783: Remove unused driver
Fabio Estevam [Tue, 10 Nov 2020 20:39:35 +0000 (17:39 -0300)]
ASoC: imx-mc13783: Remove unused driver

The imx-mc13783 was used on imx27-pdk and imx31-pdk non-DT platforms.

Since 5.10-rc1, i.MX has been converted to a DT-only platform and all
board files are gone.

Remove the imx-mc13783 audio machine driver as there is no user at all.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-4-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: phycore-ac97: Remove unused driver
Fabio Estevam [Tue, 10 Nov 2020 20:39:34 +0000 (17:39 -0300)]
ASoC: phycore-ac97: Remove unused driver

Since commit e1324ece2af4 ("ARM: imx: Remove i.MX35 board files"), the
MACH_PCM043 and MACH_PCA100 non-DT platform are no longer supported,
so get rid of their machine audio driver too.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-3-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: mx27vis-aic32x4: Remove unused driver
Fabio Estevam [Tue, 10 Nov 2020 20:39:33 +0000 (17:39 -0300)]
ASoC: mx27vis-aic32x4: Remove unused driver

Since commit 879c0e5e0ac7 ("ARM: imx: Remove i.MX27 board files"), the
MACH_IMX27_VISSTRIM_M10 non-DT platform is no longer supported,
so get rid of its machine audio driver too.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-2-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: wm1133-ev1: Remove unused driver
Fabio Estevam [Tue, 10 Nov 2020 20:39:32 +0000 (17:39 -0300)]
ASoC: wm1133-ev1: Remove unused driver

Since commit c93197b0041d ("ARM: imx: Remove i.MX31 board files"), the
MACH_MX31ADS_WM1133_EV1 non-DT platform is no longer supported,
so get rid of its machine audio driver too.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: Intel: fix Kconfig dependency for SND_INTEL_DSP_CONFIG
Pierre-Louis Bossart [Thu, 12 Nov 2020 16:44:25 +0000 (10:44 -0600)]
ASoC: SOF: Intel: fix Kconfig dependency for SND_INTEL_DSP_CONFIG

SND_INTEL_DSP_CONFIG is selected by the HDaudio, Skylake and SOF
drivers. When the HDaudio link is not selected as a option, this
Kconfig option is not touched and will default to whatever other
drivers selected. In the case e.g. where HDaudio is compiled as
built-in, the linker will complain:

ld: sound/soc/sof/sof-pci-dev.o: in function `sof_pci_probe':
sof-pci-dev.c:(.text+0x5c): undefined reference to
`snd_intel_dsp_driver_probe'

Adding the select for all HDaudio platforms, regardless of whether
they rely on the HDaudio link or not, solves the problem.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: 82d9d54a6c0ee ('ALSA: hda: add Intel DSP configuration / probe code')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20201112164425.25603-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: Intel: fix Kconfig punctuation and wording
Randy Dunlap [Thu, 12 Nov 2020 16:44:24 +0000 (10:44 -0600)]
ASoC: SOF: Intel: fix Kconfig punctuation and wording

Add periods at the end of sentences in help text.
Insert a "not" in one place.
Fix help text indentation.
Remove a duplicate "Intel(R)" in one place.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20201112164425.25603-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: Kconfig: fix Kconfig punctuation and wording
Randy Dunlap [Thu, 12 Nov 2020 16:44:23 +0000 (10:44 -0600)]
ASoC: SOF: Kconfig: fix Kconfig punctuation and wording

Add periods at the end of sentences in help text.
Drop "a" in one place where it is not needed.
Fix a verb.
Add some capitalization.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20201112164425.25603-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: imx: fix Kconfig punctuation
Randy Dunlap [Thu, 12 Nov 2020 16:44:22 +0000 (10:44 -0600)]
ASoC: SOF: imx: fix Kconfig punctuation

Add periods at the end of sentences in help text.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20201112164425.25603-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: loader: do not warn about unknown firmware headers
Kai Vehmanen [Wed, 11 Nov 2020 17:33:21 +0000 (19:33 +0200)]
ASoC: SOF: loader: do not warn about unknown firmware headers

The firmware extended data IPC and manifest structures are designed to
be extendable without breaking the driver-firmware ABI. Driver should
not raise a warning in case a new header type is detected at
firmware boot. There are already checks for IPC ABI compatibility in
snd_sof_ipc_valid() and if the versions are deemed compatible, extra
fields in IPC messages should not trigger warnings.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Karol Trzciński <karolx.trzcinski@linux.intel.com>
Link: https://lore.kernel.org/r/20201111173321.1933452-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: Boards: tgl_max98373: add dpcm_capture flag for speaker_smart_amp
Dharageswari R [Mon, 9 Nov 2020 21:09:58 +0000 (13:09 -0800)]
ASoC: Intel: Boards: tgl_max98373: add dpcm_capture flag for speaker_smart_amp

Smart_amp_speaker device has the playback stream and capture stream
associated to it. Hence add the dpcm_capture = 1 flag while dailink
creation.
This patches fixes:
ERR kernel [timestamp] SSP1-Codec: ASoC: no backend capture stream

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20201109210958.84198-1-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: max98373-sdw: align regmap use with other codecs
Pierre-Louis Bossart [Wed, 11 Nov 2020 21:43:18 +0000 (15:43 -0600)]
ASoC: codecs: max98373-sdw: align regmap use with other codecs

It's not clear why this driver has an additional call to
regmap_mark_dirty(), remove to align with others.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20201111214318.150529-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rt711: remove warnings
Pierre-Louis Bossart [Wed, 11 Nov 2020 21:43:17 +0000 (15:43 -0600)]
ASoC: rt711: remove warnings

cppcheck complains, use separate loop variable for sink and source ports

sound/soc/codecs/rt711-sdw.c:382:4: style: Variable 'i' is reassigned
a value before the old one has been used. [redundantAssignment]
 i = 0;
   ^
sound/soc/codecs/rt711-sdw.c:371:4: note: i is assigned
  i++;
   ^
sound/soc/codecs/rt711-sdw.c:382:4: note: i is overwritten
 i = 0;
   ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Link: https://lore.kernel.org/r/20201111214318.150529-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: rt*.c: remove useless pointer cast
Pierre-Louis Bossart [Wed, 11 Nov 2020 21:43:16 +0000 (15:43 -0600)]
ASoC: codecs: rt*.c: remove useless pointer cast

Pointer cast is not necessary, remove.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Link: https://lore.kernel.org/r/20201111214318.150529-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device
Pierre-Louis Bossart [Wed, 11 Nov 2020 21:43:15 +0000 (15:43 -0600)]
ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device

Add quirks for jack detection, rt715 DAI and number of speakers.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Link: https://lore.kernel.org/r/20201111214318.150529-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qcom: sc7180: Modify machine driver for sound card
xuyuqing [Thu, 12 Nov 2020 01:43:28 +0000 (09:43 +0800)]
ASoC: qcom: sc7180: Modify machine driver for sound card

Bypass set jack because there is no jack on coachz.
Create route for dmic.

Signed-off-by: xuyuqing <xuyuqing@huaqin.corp-partner.google.com>
Link: https://lore.kernel.org/r/20201112014328.695232-3-xuyuqing@huaqin.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: google: dt-bindings: add new compatible for sc7180-coachz
xuyuqing [Thu, 12 Nov 2020 01:43:27 +0000 (09:43 +0800)]
ASoC: google: dt-bindings: add new compatible for sc7180-coachz

Add devicetree bindings for coachz in documentation file

Signed-off-by: xuyuqing <xuyuqing@huaqin.corp-partner.google.com>
Link: https://lore.kernel.org/r/20201112014328.695232-2-xuyuqing@huaqin.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: arizona: Fix a wrong free in wm8997_probe
Zhang Qilong [Wed, 11 Nov 2020 13:09:20 +0000 (21:09 +0800)]
ASoC: arizona: Fix a wrong free in wm8997_probe

In the normal path, we should not free the arizona,
we should return immediately. It will be free when
call remove operation.

Fixes: 31833ead95c2c ("ASoC: arizona: Move request of speaker IRQs into bus probe")
Reported-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20201111130923.220186-2-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "Fix PM disable depth imbalance on error" from Zhang Qilong <zhangqilong...
Mark Brown [Wed, 11 Nov 2020 15:44:29 +0000 (15:44 +0000)]
Merge series "Fix PM disable depth imbalance on error" from Zhang Qilong <zhangqilong3@huawei.com>:

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. This series of patches
fixed it.

Zhang Qilong (3):
  ASoC: wm8994: Fix PM disable depth imbalance on error
  ASoC: wm8997: Fix PM disable depth imbalance on error
  ASoC: wm8998: Fix PM disable depth imbalance on error

 sound/soc/codecs/wm8994.c | 6 +++++-
 sound/soc/codecs/wm8997.c | 9 +++++++--
 sound/soc/codecs/wm8998.c | 4 +++-
 3 files changed, 15 insertions(+), 4 deletions(-)

--
2.25.4

3 years agoASoC: mediatek: mt8192: skip first time data at the beginning of DMIC recording
Jiaxin Yu [Wed, 11 Nov 2020 02:45:22 +0000 (10:45 +0800)]
ASoC: mediatek: mt8192: skip first time data at the beginning of DMIC recording

We can choose to drop away any length of data from the beginning according
to project needs. Some projects don't want to throw away any data, because
they want to use recorded data to do echo cancellation, so they have to
make sure that they are aligned with the reference data as much as
possible. Or there are other algorithms in the upper layer to eliminate
this noise. Or some projects want to eliminate this noise form the kernel
layer. However, the minimum recommended value is 50ms to skip pop noise.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1605062722-8711-1-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Remove mt6359_platform_driver_remove
Shane.Chien [Wed, 11 Nov 2020 04:14:56 +0000 (12:14 +0800)]
ASoC: Remove mt6359_platform_driver_remove

remove mt6359_platform_driver_remove due to it is
useless.

Signed-off-by: Shane.Chien <shane.chien@mediatek.com>
Link: https://lore.kernel.org/r/1605068096-12587-1-git-send-email-shane.chien@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: Don't warn on probe deferral
Jon Hunter [Wed, 11 Nov 2020 10:32:45 +0000 (10:32 +0000)]
ASoC: tegra: Don't warn on probe deferral

Deferred probe is an expected return value for snd_soc_register_card().
Given that the driver deals with it properly, there's no need to output
a warning that may potentially confuse users.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20201111103245.152189-1-jonathanh@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: wm8998: Fix PM disable depth imbalance on error
Zhang Qilong [Wed, 11 Nov 2020 04:13:26 +0000 (12:13 +0800)]
ASoC: wm8998: Fix PM disable depth imbalance on error

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context.

Fixes: 31833ead95c2c ("ASoC: arizona: Move request of speaker IRQs into bus probe")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20201111041326.1257558-4-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: wm8994: Fix PM disable depth imbalance on error
Zhang Qilong [Wed, 11 Nov 2020 04:13:24 +0000 (12:13 +0800)]
ASoC: wm8994: Fix PM disable depth imbalance on error

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context.

Fixes: 57e265c8d71fb ("ASoC: wm8994: Move runtime PM init to platform device init")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20201111041326.1257558-2-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "Audio Graph Updates" from Sameer Pujar <spujar@nvidia.com>:
Mark Brown [Tue, 10 Nov 2020 21:36:13 +0000 (21:36 +0000)]
Merge series "Audio Graph Updates" from Sameer Pujar <spujar@nvidia.com>:

This series is a prepraration for using generic graph driver for Tegra210
audio. Tegra audio graph series will be sent in a separate series because
it has some dependency over other series for documentation work. This
series can focus on the generic ASoC driver updates. Below are the summary
of changes done.

 * Support multiple instances of a component. For example there can be
   multiple I2S devices which can use the same component driver.

 * Support open platforms with empty Codec endpoint. Customers can plug
   their own HW and can populate codec endpoint.

 * In a component model there can be many components which can be
   connected together. In such cases Identify no-pcm DPCM DAI links which
   can be used in BE<->BE connections.

 * Expose structures or helpers to be re-used by other similar graph
   drivers.

The series is based on following references where DPCM usgae for Tegra
Audio and simple-card driver proposal were discussed.

 * https://lkml.org/lkml/2020/4/30/519 (DPCM for Tegra)
 * https://lkml.org/lkml/2020/6/27/4 (simple-card driver)

Changelog
=========

v4 -> v5
--------
 * No changes in the core/audio-graph driver patches which are
   part of the current series.
 * Dropped Tegra audio patches and doc patches. This will be
   sent separately once the doc depdendencies are resolved.

v3 -> v4
--------
 * Added new patches to convert graph.txt and audio-graph-card.txt
   to corresponding json-schema files. Later these references
   are used in Tegra audio graph schema.

 * AHUB component binding docs are updated to reflect the usage
   of ports/port/endpoint

 * More common stuff is moved into graph_parse_of() and this is
   used by both generic and Tegra audio graph.

 * DT binding for Tegra audio graph is updated to included "ports { }"

 * As per the suggestion 'void *data' member is dropped from
   'asoc_simple_priv' and instead container method is used to
   maintain required custom data internal to Tegra audio graph.

v2 -> v3
--------
 * Dropped new compatible addition in generic graph driver
   after reviewing it with Morimoto-san. Instead added Tegra
   audio graph driver and new compatibles are added in the same.
 * Added new patches to expose new members for customization
   in audio graph driver.
 * Added new patch for Tegra audio graph driver and related
   documentation.
 * Minor change in below commit where mutex version of helper is used
   "ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM"
 * DT binding is updated to use the newly exposed compatibles
 * No changes in other patches

v1 -> v2
--------
 * Re-organized ports/endpoints description for ADMAIF and XBAR.
   Updated DT patches accordingly.
 * After above change, multiple Codec endpoint support is not
   required and hence dropped for now. This will be considered
   separately if at all required in future.
 * Re-ordered patches in the series.

Sameer Pujar (7):
  ASoC: soc-core: Fix component name_prefix parsing
  ASoC: soc-pcm: Get all BEs along DAPM path
  ASoC: audio-graph: Use of_node and DAI for DPCM DAI link names
  ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM
  ASoC: audio-graph: Support empty Codec endpoint
  ASoC: audio-graph: Expose new members for asoc_simple_priv
  ASoC: audio-graph: Expose helpers from audio graph

 include/sound/graph_card.h           |  16 ++++
 include/sound/simple_card_utils.h    |   3 +
 include/sound/soc.h                  |   1 +
 sound/soc/generic/audio-graph-card.c | 175 ++++++++++++++++++++++++-----------
 sound/soc/soc-core.c                 |   3 +-
 sound/soc/soc-pcm.c                  |   3 +-
 6 files changed, 143 insertions(+), 58 deletions(-)
 create mode 100644 include/sound/graph_card.h

--
2.7.4

3 years agoASoC: qcom: common: Fix refcounting in qcom_snd_parse_of()
Dan Carpenter [Thu, 5 Nov 2020 12:51:54 +0000 (15:51 +0300)]
ASoC: qcom: common: Fix refcounting in qcom_snd_parse_of()

There are two issues in this function.

1) We can't drop the refrences on "cpu", "codec" and "platform" before
   we take the reference.  This doesn't cause a problem on the first
   iteration because those pointers start as NULL so the of_node_put()
   is a no-op.  But on the subsequent iterations, it will lead to a use
   after free.

2) If the devm_kzalloc() allocation failed then the code returned
   directly instead of cleaning up.

Fixes: c1e6414cdc37 ("ASoC: qcom: common: Fix refcount imbalance on error")
Fixes: 1e36ea360ab9 ("ASoC: qcom: common: use modern dai_link style")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201105125154.GA176426@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_xcvr: fix break condition
Viorel Suman [Mon, 2 Nov 2020 16:18:10 +0000 (18:18 +0200)]
ASoC: fsl_xcvr: fix break condition

The break condition copied by mistake as same
as loop condition in the previous version, but must
be the opposite. So fix it.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Link: https://lore.kernel.org/r/20201102161810.902464-1-viorel.suman@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: audio-graph: Expose helpers from audio graph
Sameer Pujar [Mon, 2 Nov 2020 15:10:14 +0000 (20:40 +0530)]
ASoC: audio-graph: Expose helpers from audio graph

This commit exposes following functions which can be used by a sound
card driver based on generic audio graph driver. Idea is vendors can
have a thin driver and re-use common stuff from audio graph driver.

 - graph_card_probe()
 - graph_parse_of()

In doing so a new header file is added for above. The graph_probe()
function is simplified by moving more common stuff to graph_parse_of().

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-8-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: audio-graph: Expose new members for asoc_simple_priv
Sameer Pujar [Mon, 2 Nov 2020 15:10:13 +0000 (20:40 +0530)]
ASoC: audio-graph: Expose new members for asoc_simple_priv

Add new members in struct 'asoc_simple_priv'. Idea is to leverage
simple or graph card driver as much as possible and vendor can
maintain a thin driver to control the behavior by populating these
newly exposed members.

Following are the members added in 'asoc_simple_priv':

  - 'ops' struct: In some cases SoC vendor drivers may want to
    implement 'snd_soc_ops' callbacks differently. In such cases
    custom callbacks would be used.

  - 'force_dpcm' flag: Right now simple or graph card drivers
    detect DAI links as DPCM links if:

      * The dpcm_selectable is set AND
      * Codec is connected to multiple CPU endpoints or aconvert
        property is used for rate/channels.

    So there is no way to directly specify usage of DPCM alone. So a
    flag is exposed to mark all links as DPCM. Vendor driver can
    set this if required.

  - 'dpcm_selectable': Currently simple or audio graph drivers
    provide a way to enable this for specific compatibles. However
    vendor driver may want to define some additional info. Thus
    expose this variable where vendor drivers can set this if
    required.

Audio graph driver is updated to consider above flags or callbacks.
Subsequent patches in the series illustrate usage for above.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-7-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: audio-graph: Support empty Codec endpoint
Sameer Pujar [Mon, 2 Nov 2020 15:10:12 +0000 (20:40 +0530)]
ASoC: audio-graph: Support empty Codec endpoint

For open platforms, which can support pluggable audio cards, Codec
endpoint is not fixed always. It actually depends on the compatible
HW module that is going to be connected. From SoC side the given I/O
interface is always available. Hence such links have fixed CPU endpoint
but no Codec endpoint. This patch helps to support such links where
user can populate Codec endpoint only and its fields in Platform DT
depending on the plugged HW.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-6-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM
Sameer Pujar [Mon, 2 Nov 2020 15:10:11 +0000 (20:40 +0530)]
ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM

PCM devices are created for FE dai links with 'no-pcm' flag as '0'.
Such DAI links have CPU component which implement either pcm_construct()
or pcm_new() at component or dai level respectively. Based on this,
current patch exposes a helper function to identify such components
and populate 'no_pcm' flag for DPCM DAI link.

This helps to have BE<->BE component links where PCM devices need
not be created for CPU component involved in such links.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-5-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: audio-graph: Use of_node and DAI for DPCM DAI link names
Sameer Pujar [Mon, 2 Nov 2020 15:10:10 +0000 (20:40 +0530)]
ASoC: audio-graph: Use of_node and DAI for DPCM DAI link names

For multiple instances of components, using DAI name alone for DAI links
is causing conflicts. Components can define multiple DAIs and hence using
just a device name won't help either. Thus DT device node reference and
DAI names are used to uniquely represent DAI link names.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-4-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-pcm: Get all BEs along DAPM path
Sameer Pujar [Mon, 2 Nov 2020 15:10:09 +0000 (20:40 +0530)]
ASoC: soc-pcm: Get all BEs along DAPM path

dpcm_end_walk_at_be() stops the graph walk when first BE is found for
the given FE component. In a component model we may want to connect
multiple DAIs from different components. A new flag is introduced in
'snd_soc_card', which when set allows DAI/component chaining. Later
PCM operations can be called for all these listed components for a
valid DAPM path.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1604329814-24779-3-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-core: Fix component name_prefix parsing
Sameer Pujar [Mon, 2 Nov 2020 15:10:08 +0000 (20:40 +0530)]
ASoC: soc-core: Fix component name_prefix parsing

The "prefix" can be defined in DAI link node or it can be specified as
part of the component node itself. Currently "sound-name-prefix" defined
in a component is not taking effect. Actually the property is not getting
parsed. It can be fixed by parsing "sound-name-prefix" property whenever
"prefix" is missing in DAI link Codec node.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1604329814-24779-2-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "Modify documentation and machine driver for SC7180 sound card" from...
Mark Brown [Tue, 10 Nov 2020 15:57:39 +0000 (15:57 +0000)]
Merge series "Modify documentation and machine driver for SC7180 sound card" from Ajye Huang <ajye.huang@gmail.com>:

Note:
- The patch is made by the collaboration of
 Ajye Huang <ajye_huang@compal.corp-partner.google.com>
 Cheng-Yi Chiang <cychiang@chromium.org>

v6:
- Documentation: Addressed suggestions from Rob Herring.
  - Define "maxItems: 1" in dmic-gpios property.
  - Only keep one example and add dmic-gpios property in.
v5:
- Machine driver:
  - Fix a format string warning (Reported-by: kernel test robot <lkp@intel.com>).
    detailed info at https://lore.kernel.org/patchwork/patch/1331087/

v4:
- Machine driver: Addressed suggestions from Tzung-Bi.
  - Remove redundant judgments in dmic_set() and dmic_get().
  - Remove 1 level indent of judgment of IS_ERR(data->dmic_sel).

v3:
- Machine driver: Addressed suggestions from Tzung-Bi.
  - Move variables "dmic_switch" and "dmic_sel" into struct sc7180_snd_data.
  - Remove redundant judgments in dmic_set().

v2:
- Documentation: Modify the dimc-gpios property description and examples.
- Machine driver:
  - Remove "qcom,sc7180-sndcard-rt5682-m98357-2mic" compatible
  - See gpio property and use anadditional control.

Thanks for the review!

Ajye Huang (2):
  ASoC: google: dt-bindings: modify machine bindings for two MICs case
  ASoC: qcom: sc7180: Modify machine driver for 2mic

 .../bindings/sound/google,sc7180-trogdor.yaml |  8 ++-
 sound/soc/qcom/sc7180.c                       | 61 +++++++++++++++++++
 2 files changed, 68 insertions(+), 1 deletion(-)

--
2.25.1

3 years agoMerge series "Fix vaud18 power leakage of mt6359" from Shane Chien <shane.chien@media...
Mark Brown [Tue, 10 Nov 2020 15:57:38 +0000 (15:57 +0000)]
Merge series "Fix vaud18 power leakage of mt6359" from Shane Chien <shane.chien@mediatek.com>
"Shane.Chien" <shane.chien@mediatek.com>:

From: "Shane.Chien" <shane.chien@mediatek.com>

This series of patches is to fix vaud18 power leakage problem.
vaud18 will be enable only when mt6359 audio path is turned on.

Change since v2:
 - fix dt-binnding syntex error

Change since v1:
 - use dapm regulator supply widget for vaud18 control.
 - add vaud18 regulator property in mt6359 dt-binding.

Shane.Chien (2):
  ASoC: Fix vaud18 power leakage of mt6359
  dt-bindings: mediatek: mt6359: Add new property for mt6359

 .../devicetree/bindings/sound/mt6359.yaml          |    9 +++++++
 sound/soc/codecs/mt6359.c                          |   25 +-------------------
 sound/soc/codecs/mt6359.h                          |    8 -------
 3 files changed, 10 insertions(+), 32 deletions(-)

--
1.7.9.5

3 years agoMerge series "ASoC: soc-compress: tidyup STREAM vs COMPRESS" from Kuninori Morimoto...
Mark Brown [Tue, 10 Nov 2020 15:57:37 +0000 (15:57 +0000)]
Merge series "ASoC: soc-compress: tidyup STREAM vs COMPRESS" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Hi Mark

These are v2 of tidyup patch-set for SNDRV_PCM_STREAM_xxx and SND_COMPRESS_xxx.
soc-compress is using both SNDRV_PCM_STREAM_xxx and SND_COMPRESS_xxx, but mixed use.
This is confusable, but no problem. Because these are defined as UAPI and
are using same value.
This patch-set make sure these are same value.

v1 -> v2
- checks COMPRESS vs PCM_STREAM by using BUILD_BUG_ON()

Link: https://lore.kernel.org/r/87wnzcfnkk.wl-kuninori.morimoto.gx@renesas.com
Kuninori Morimoto (2):
  ASoC: soc-compress: tidyup STREAM vs COMPRESS
  ASoC: soc-compress: assume SNDRV_PCM_STREAM_xxx and SND_COMPRESS_xxx are same

 sound/soc/soc-compress.c | 63 +++++++++++++++-------------------------
 1 file changed, 23 insertions(+), 40 deletions(-)

--
2.25.1

3 years agoASoC: nau8315: revise the power event of EN_PIN dapm widget for symmetry
David Lin [Tue, 10 Nov 2020 09:58:25 +0000 (17:58 +0800)]
ASoC: nau8315: revise the power event of EN_PIN dapm widget for symmetry

This patch is to revise the power event of EN_PIN dapm widget for symmetry.

Signed-off-by: David Lin <CTLIN0@nuvoton.com>
Link: https://lore.kernel.org/r/20201110095823.3512447-1-CTLIN0@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: nau8315: add codec driver
David Lin [Mon, 2 Nov 2020 02:32:13 +0000 (10:32 +0800)]
ASoC: nau8315: add codec driver

Add codec driver for Nuvoton NAU8315.

Signed-off-by: David Lin <CTLIN0@nuvoton.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201102023212.594137-1-CTLIN0@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-compress: assume SNDRV_PCM_STREAM_xxx and SND_COMPRESS_xxx are same
Kuninori Morimoto [Fri, 30 Oct 2020 01:01:22 +0000 (10:01 +0900)]
ASoC: soc-compress: assume SNDRV_PCM_STREAM_xxx and SND_COMPRESS_xxx are same

soc-compress.c is using both SND_COMPRESS_xxx and SND_PCM_STREAM_xxx.
These are defined as UAPI, and has same value.

enum {
SNDRV_PCM_STREAM_PLAYBACK = 0,
SNDRV_PCM_STREAM_CAPTURE,
...
};

enum snd_compr_direction {
SND_COMPRESS_PLAYBACK = 0,
SND_COMPRESS_CAPTURE
};

Essentially both COMPRESS and PCM_STREAM definitions are identical,
and can be never different because of ABI compatibility,
which means it's safe to mix both variants in the code.

This patch checks it by BUILD_BUG_ON(), and merge to use.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87361wmsyg.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-compress: tidyup STREAM vs COMPRESS
Kuninori Morimoto [Fri, 30 Oct 2020 01:01:15 +0000 (10:01 +0900)]
ASoC: soc-compress: tidyup STREAM vs COMPRESS

snd_soc_runtime_activate() and
snd_soc_dai_digital_mute() need SNDRV_PCM_STREAM_xxx
instead of SND_COMPRESS_xxx.

These are bug but nothing happen because these are same value.

enum {
SNDRV_PCM_STREAM_PLAYBACK = 0,
SNDRV_PCM_STREAM_CAPTURE,
...
};

enum snd_compr_direction {
SND_COMPRESS_PLAYBACK = 0,
SND_COMPRESS_CAPTURE
};

This patch tidyup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874kmcmsyn.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qcom: sc7180: Modify machine driver for 2mic
Ajye Huang [Fri, 6 Nov 2020 06:14:33 +0000 (14:14 +0800)]
ASoC: qcom: sc7180: Modify machine driver for 2mic

In addition, having mixer control to switch between DMICs by
using "dmic-gpios" property.

Refer to this one as an example,
commit b7a742cff3f6 ("ASoC: AMD: Use mixer control to switch between DMICs")

Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20201106061433.1483129-3-ajye_huang@compal.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: google: dt-bindings: modify machine bindings for two MICs case
Ajye Huang [Fri, 6 Nov 2020 06:14:32 +0000 (14:14 +0800)]
ASoC: google: dt-bindings: modify machine bindings for two MICs case

Add a property "dmic-gpios" for switching between two MICs.

Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201106061433.1483129-2-ajye_huang@compal.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agodt-bindings: mediatek: mt6359: Add new property for mt6359
Shane.Chien [Tue, 10 Nov 2020 02:31:32 +0000 (10:31 +0800)]
dt-bindings: mediatek: mt6359: Add new property for mt6359

This patch add "LDO_VAUD18-supply" property to
control vaud18 regulator. It is labeled as required
due to mt6359 audio path always need to enable vaud18.

Signed-off-by: Shane.Chien <shane.chien@mediatek.com>
Link: https://lore.kernel.org/r/1604975492-6142-3-git-send-email-shane.chien@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Fix vaud18 power leakage of mt6359
Shane.Chien [Tue, 10 Nov 2020 02:31:31 +0000 (10:31 +0800)]
ASoC: Fix vaud18 power leakage of mt6359

vaud18 is power of mt6359 audio path. It
should only enable when audio is used,
instead of in boot up stage.
Once mt6359 audio path is enabled or disabled,
vaud18 is controlled by regulator supply widget
"LDO_VAUD18". Due to vaud18 is controlled by
regulator dapm macro instead of regmap, the macro
MT6359_LDO_VAUD18_CON0 and variable avdd_reg
is no used and removed from mt6359.h.

Signed-off-by: Shane.Chien <shane.chien@mediatek.com>
Link: https://lore.kernel.org/r/1604975492-6142-2-git-send-email-shane.chien@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>