platform/kernel/linux-starfive.git
3 years agoASoC: fsl-asoc-card: Support configuring dai fmt from DT
Shengjiu Wang [Tue, 21 Jul 2020 03:41:49 +0000 (11:41 +0800)]
ASoC: fsl-asoc-card: Support configuring dai fmt from DT

Support same propeties as simple card for configuring fmt
from DT.
In order to make this change compatible with old DT, these
properties are optional.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1595302910-19688-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_esai: add IRQF_SHARED for devm_request_irq
Shengjiu Wang [Thu, 23 Jul 2020 04:00:08 +0000 (12:00 +0800)]
ASoC: fsl_esai: add IRQF_SHARED for devm_request_irq

ESAI interfaces may share same interrupt line with EDMA on
some platforms (e.g. i.MX8QXP, i.MX8QM).
Add IRQF_SHARED flag to allow sharing the irq among several
devices

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1595476808-28927-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: Fix build error due to 64-by-32 division
Sameer Pujar [Thu, 23 Jul 2020 08:13:31 +0000 (13:43 +0530)]
ASoC: tegra: Fix build error due to 64-by-32 division

Build errors are seen on 32-bit platforms because of a plain 64-by-32
division. For example, following build erros were reported.

"ERROR: modpost: "__udivdi3" [sound/soc/tegra/snd-soc-tegra210-dmic.ko]
 undefined!"
"ERROR: modpost: "__divdi3" [sound/soc/tegra/snd-soc-tegra210-dmic.ko]
 undefined!"

This can be fixed by using div_u64() helper from 'math64.h' header.

Fixes: 8c8ff982e9e2 ("ASoC: tegra: Add Tegra210 based DMIC driver")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1595492011-2411-1-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: ti: fix SND_SOC_J721E_EVM warnings & errors
Randy Dunlap [Mon, 20 Jul 2020 18:32:21 +0000 (11:32 -0700)]
ASoC: ti: fix SND_SOC_J721E_EVM warnings & errors

SND_SOC_J721E_EVM should not select SND_SOC_PCM3168A_I2C when I2C
is not enabled. That causes build errors, so make this driver's
symbol depend on I2C.

WARNING: unmet direct dependencies detected for SND_SOC_PCM3168A_I2C
  Depends on [n]: SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && I2C [=n]
  Selected by [m]:
  - SND_SOC_J721E_EVM [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && (DMA_OMAP [=y] || TI_EDMA [=m] || TI_K3_UDMA [=n] || COMPILE_TEST [=y]) && (ARCH_K3_J721E_SOC [=n] || COMPILE_TEST [=y])

../sound/soc/codecs/pcm3168a-i2c.c:59:1: warning: data definition has no type or storage class
 module_i2c_driver(pcm3168a_i2c_driver);
 ^~~~~~~~~~~~~~~~~
../sound/soc/codecs/pcm3168a-i2c.c:59:1: error: type defaults to ‘int’ in declaration of ‘module_i2c_driver’ [-Werror=implicit-int]
../sound/soc/codecs/pcm3168a-i2c.c:59:1: warning: parameter names (without types) in function declaration
../sound/soc/codecs/pcm3168a-i2c.c:49:26: warning: ‘pcm3168a_i2c_driver’ defined but not used [-Wunused-variable]
 static struct i2c_driver pcm3168a_i2c_driver = {
                          ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

Fixes: 6748d0559059 ("ASoC: ti: Add custom machine driver for j721e EVM (CPB and IVI)")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/e74c690c-c7f8-fd42-e461-4f33571df4ef@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: omap: Replace HTTP links with HTTPS ones
Alexander A. Klimov [Sat, 18 Jul 2020 11:24:03 +0000 (13:24 +0200)]
ASoC: omap: Replace HTTP links with HTTPS ones

Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200718112403.13709-1-grandmaster@al2klimov.de
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: wm_adsp: Support new metadata block ID's
James Schulman [Thu, 23 Jul 2020 11:03:21 +0000 (12:03 +0100)]
ASoC: wm_adsp: Support new metadata block ID's

Coefficient files now support additional metadata blocks, these
contain machine parsable text strings describing the parameters
contained in the coefficient file.

Signed-off-by: James Schulman <james.schulman@cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200723110321.16382-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl: Replace HTTP links with HTTPS ones
Alexander A. Klimov [Sat, 18 Jul 2020 11:12:09 +0000 (13:12 +0200)]
ASoC: fsl: Replace HTTP links with HTTPS ones

Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200718111209.11760-1-grandmaster@al2klimov.de
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: ti: Replace HTTP links with HTTPS ones
Alexander A. Klimov [Sat, 18 Jul 2020 11:08:57 +0000 (13:08 +0200)]
ASoC: ti: Replace HTTP links with HTTPS ones

Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200718110857.11520-1-grandmaster@al2klimov.de
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: mediatek: mt8183: support machine driver for max98357b" from...
Mark Brown [Wed, 22 Jul 2020 13:32:00 +0000 (14:32 +0100)]
Merge series "ASoC: mediatek: mt8183: support machine driver for max98357b" from Tzung-Bi Shih <tzungbi@google.com>:

The series re-uses mt8183-mt6358-ts3a227-max98357.c to support machine driver
with max98357b.

The 1st patch enables left justified format from mt8183 audio platform.

The 2nd patch adds document for the new proposed compatible string for
max98357b.

The 3rd patch supports machine driver with max98357b and uses left justified
format for it.

Tzung-Bi Shih (3):
  ASoC: mediatek: mt8183: support left justified format for I2S
  ASoC: dt-bindings: mt8183: add compatible string for using max98357b
  ASoC: mediatek: mt8183: support machine driver with max98357b

 .../sound/mt8183-mt6358-ts3a227-max98357.txt  |  1 +
 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c    | 59 ++++++++++++++++---
 .../mt8183/mt8183-mt6358-ts3a227-max98357.c   | 22 ++++++-
 3 files changed, 73 insertions(+), 9 deletions(-)

--
2.28.0.rc0.105.gf9edc3c819-goog

3 years agoMerge series "SOF IMX fixes" from Daniel Baluta <daniel.baluta@oss.nxp.com>
Mark Brown [Wed, 22 Jul 2020 13:31:59 +0000 (14:31 +0100)]
Merge series "SOF IMX fixes" from Daniel Baluta <daniel.baluta@oss.nxp.com>
Daniel Baluta <daniel.baluta@nxp.com>:

From: Daniel Baluta <daniel.baluta@nxp.com>

This patchseries contains a couple of SOF IMX fixes
found during our first IMX SOF release.

Daniel Baluta (7):
  ASoC: SOF: define INFO_ flags in dsp_ops for imx8
  ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value
  ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X
  ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M
  ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X
  ASoC: SOF: topology: Update SAI config bclk/fsync rate
  ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs

 sound/soc/sof/imx/imx8.c  | 24 +++++++++++++++++++++---
 sound/soc/sof/imx/imx8m.c |  4 ++--
 sound/soc/sof/pcm.c       |  8 ++++++++
 sound/soc/sof/topology.c  |  2 ++
 4 files changed, 33 insertions(+), 5 deletions(-)

--
2.17.1

3 years agoASoC: hdac_hda: fix deadlock after PCM open error
Kai Vehmanen [Fri, 17 Jul 2020 10:19:50 +0000 (13:19 +0300)]
ASoC: hdac_hda: fix deadlock after PCM open error

Commit 5bd70440cb0a ("ASoC: soc-dai: revert all changes to DAI
startup/shutdown sequence"), introduced a slight change of semantics
to DAI startup/shutdown. If startup() returns an error, shutdown()
is now called for the DAI.

This causes a deadlock in hdac_hda which issues a call to
snd_hda_codec_pcm_put() in case open fails. Upon error, soc_pcm_open()
will call shutdown(), and pcm_put() ends up getting called twice. Result
is a deadlock on pcm->open_mutex, as snd_device_free() gets called from
within snd_pcm_open(). Typical task backtrace looks like this:

[  334.244627]  snd_pcm_dev_disconnect+0x49/0x340 [snd_pcm]
[  334.244634]  __snd_device_disconnect.part.0+0x2c/0x50 [snd]
[  334.244640]  __snd_device_free+0x7f/0xc0 [snd]
[  334.244650]  snd_hda_codec_pcm_put+0x87/0x120 [snd_hda_codec]
[  334.244660]  soc_pcm_open+0x6a0/0xbe0 [snd_soc_core]
[  334.244676]  ? dpcm_add_paths.isra.0+0x491/0x590 [snd_soc_core]
[  334.244679]  ? kfree+0x9a/0x230
[  334.244686]  dpcm_be_dai_startup+0x255/0x300 [snd_soc_core]
[  334.244695]  dpcm_fe_dai_open+0x20e/0xf30 [snd_soc_core]
[  334.244701]  ? snd_pcm_hw_rule_muldivk+0x110/0x110 [snd_pcm]
[  334.244709]  ? dpcm_be_dai_startup+0x300/0x300 [snd_soc_core]
[  334.244714]  ? snd_pcm_attach_substream+0x3c4/0x540 [snd_pcm]
[  334.244719]  snd_pcm_open_substream+0x69a/0xb60 [snd_pcm]
[  334.244729]  ? snd_pcm_release_substream+0x30/0x30 [snd_pcm]
[  334.244732]  ? __mutex_lock_slowpath+0x10/0x10
[  334.244736]  snd_pcm_open+0x1b3/0x3c0 [snd_pcm]

Fixes: 5bd70440cb0a ("ASoC: soc-dai: revert all changes to DAI startup/shutdown sequence")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
BugLink: https://github.com/thesofproject/linux/issues/2159
Link: https://lore.kernel.org/r/20200717101950.3885187-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: hdac_hda: fix memleak on module unload
Kai Vehmanen [Fri, 17 Jul 2020 10:19:49 +0000 (13:19 +0300)]
ASoC: hdac_hda: fix memleak on module unload

The hdac_hda remove implementation fails to free the hda codec
resources, leading to memleaks at module unload. This gap has been there
from the start, commit 6bae5ea94989 ("ASoC: hdac_hda: add asoc
extension for legacy HDA codec drivers").

Instead of duplicating the cleanup logic, use the common
snd_hda_codec_cleanup_for_unbind() to free the resources. Remove
existing code in hdac_hda to cleanup "codec.jackpoll_work" and call to
snd_hdac_regmap_exit(), as these are already done in
snd_hda_codec_cleanup_for_unbind().

The cleanup is done in ASoC component remove() callback and not in the
HDAC bus hdev_detach(). This is done to ensure the codec specific
cleanup routines are run before the parent card is freed.

Fixes: 6bae5ea94989 ("ASoC: hdac_hda: add asoc extension for legacy HDA codec drivers")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
BugLink: https://github.com/thesofproject/linux/issues/2195
Link: https://lore.kernel.org/r/20200717101950.3885187-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: hdac_hda: call patch_ops.free() on probe error
Kai Vehmanen [Fri, 17 Jul 2020 10:19:48 +0000 (13:19 +0300)]
ASoC: hdac_hda: call patch_ops.free() on probe error

Add error handling for patch_ops in hdac_hda_codec_probe().

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-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/20200717101950.3885187-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Replace HTTP links with HTTPS ones
Alexander A. Klimov [Sun, 19 Jul 2020 15:38:22 +0000 (17:38 +0200)]
ASoC: Replace HTTP links with HTTPS ones

Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200719153822.59788-1-grandmaster@al2klimov.de
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: mediatek: mt8183: support machine driver with max98357b
Tzung-Bi Shih [Mon, 20 Jul 2020 01:25:59 +0000 (09:25 +0800)]
ASoC: mediatek: mt8183: support machine driver with max98357b

Supports machine driver with max98357b
("mt8183-mt6358-ts3a227-max98357b").

The key difference from max98357a: max98357b needs to use left
justified format.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200720012559.906088-4-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dt-bindings: mt8183: add compatible string for using max98357b
Tzung-Bi Shih [Mon, 20 Jul 2020 01:25:58 +0000 (09:25 +0800)]
ASoC: dt-bindings: mt8183: add compatible string for using max98357b

Machines with max98357b should use the compatible string
"mt8183-mt6358-ts3a227-max98357b".

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200720012559.906088-3-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: mediatek: mt8183: support left justified format for I2S
Tzung-Bi Shih [Mon, 20 Jul 2020 01:25:57 +0000 (09:25 +0800)]
ASoC: mediatek: mt8183: support left justified format for I2S

MT8183 audio platform supports EIAJ and I2S formats.  The code fixed to
use I2S format in the past.

Supports EIAJ mode via set_fmt ops and preserves to use I2S format as
the default format intentionally.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200720012559.906088-2-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs
Daniel Baluta [Mon, 20 Jul 2020 07:20:46 +0000 (10:20 +0300)]
ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs

Fixup BE DAI links rate/channels parameters to match any values
from topology.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-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/20200720072046.8152-8-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: topology: Update SAI config bclk/fsync rate
Daniel Baluta [Mon, 20 Jul 2020 07:20:45 +0000 (10:20 +0300)]
ASoC: SOF: topology: Update SAI config bclk/fsync rate

These parameters are read from topology file and sent to DSP.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-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/20200720072046.8152-7-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X
Daniel Baluta [Mon, 20 Jul 2020 07:20:44 +0000 (10:20 +0300)]
ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X

With SOF we support 1 ESAI interface and 1 SAI interface.
This patch adds SAI1 interface support existing on i.MX8/i.MX8X
boards.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200720072046.8152-6-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M
Daniel Baluta [Mon, 20 Jul 2020 07:20:43 +0000 (10:20 +0300)]
ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M

This must match DAI name from topology. Also, sai-port
is too generic. Physical DAI port on i.MX8MP is labeled SAI3.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200720072046.8152-5-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X
Daniel Baluta [Mon, 20 Jul 2020 07:20:42 +0000 (10:20 +0300)]
ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X

This must match DAI name from topology. Also, esai-port is too generic
as they are 2 ESAIs on i.MX8/i.MX8X boards.

SOF integration only uses ESAI0 for now.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200720072046.8152-4-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value
Daniel Baluta [Mon, 20 Jul 2020 07:20:41 +0000 (10:20 +0300)]
ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value

With this change we no longer need to update num_drv when adding
new DAI driver.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200720072046.8152-3-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: define INFO_ flags in dsp_ops for imx8
Daniel Baluta [Mon, 20 Jul 2020 07:20:40 +0000 (10:20 +0300)]
ASoC: SOF: define INFO_ flags in dsp_ops for imx8

In the past, the INFO_ flags such as PAUSE/NO_PERIOD_WAKEUP were
defined in the SOF PCM core, but that was changed since
commit 27e322fabd50 ("ASoC: SOF: define INFO_ flags in dsp_ops")

Now these flags must be set in DSP ops.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200720072046.8152-2-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "Add ASoC AHUB components for Tegra210 and later" from Sameer Pujar...
Mark Brown [Tue, 21 Jul 2020 22:44:59 +0000 (23:44 +0100)]
Merge series "Add ASoC AHUB components for Tegra210 and later" from Sameer Pujar <spujar@nvidia.com>:

Overview
========
Audio Processing Engine (APE) comprises of Audio DMA (ADMA) and Audio
Hub (AHUB) unit. AHUB is a collection of hardware accelerators for audio
pre-processing and post-processing. It also includes a programmable full
crossbar for routing audio data across these accelerators.

This series exposes some of these below mentioned HW devices as ASoC
components for Tegra platforms from Tegra210 onwards.
 * ADMAIF : The interface between ADMA and AHUB
 * XBAR   : Crossbar for routing audio samples across various modules
 * I2S    : Inter-IC Sound Controller
 * DMIC   : Digital Microphone
 * DSPK   : Digital Speaker

Following is the summary of current series.
 * Add YAML DT binding documentation for above mentioned modules.
 * Helper function for ACIF programming is exposed for Tegra210 and later.
 * Add ASoC driver components for each of the above modules.
 * Build ACONNECT and ADMA drivers which are essential to realize audio
   use case.
 * Add DT entries for above components for Tegra210, Tegra186 and
   Tegra194.

As per the suggestion in [0] audio graph based sound card support
is pushed in a separate series.

[0] https://lkml.org/lkml/2020/6/27/4

Changelog
=========

v4 -> v5
--------
 * Common changes
   - simple-card driver changes are dropped. Changes are migrated to audio
     graph card and are moved to a separate series as suggested.

   - '#sound-dai-cells' property is not needed for planned audio graph card
     Hence dropped from documentation and related DT binding of component
     drivers.

   - CIF and DAP DAIs are added for I/O drivers (DMIC, DSPK, I2S) to
     represent DAI links using audio graph card. Similary DAIs are added in
     AHUB driver to describe endpoints in audio crossbar. Routing is updated
     to reflect the same in drivers.

v3 -> v4
--------
 * [1/23] "ASoC: dt-bindings: tegra: Add DT bindings for Tegra210"
   - Removed multiple examples and retained one example per doc
   - Fixed as per inputs on the previous series
   - Tested bindings with 'make dt_binding_check/dtbs_check'

 * [2/23] "ASoC: tegra: Add support for CIF programming"
   - No change

 * Common changes (for patch [3/10] to [7/10])
   - Mixer control overrides, for PCM parameters (rate, channel, bits),
     in each driver are dropped.
   - Updated routing as per DPCM usage
   - Minor changes related to formatting

 * New changes (patch [8/23] to [18/23] and patch [23/23])
   - Based on discussions in following threads DPCM is used for Tegra Audio.
     https://lkml.org/lkml/2020/2/20/91
     https://lkml.org/lkml/2020/4/30/519
   - The simple-card driver is used for Tegra Audio and accordingly
     some enhancements are made in simple-card and core drivers.
   - Patch [8/23] to [18/23] are related to simple-card and core changes.
   - Patch [23/23] adds sound card support to realize complete audio path.
     This is based on simple-card driver with proposed enhancements.
   - Re-ordered patches depending on above

v2 -> v3
--------
 * [1/10]  "dt-bindings: sound: tegra: add DT binding for AHUB
   - Updated licence
   - Removed redundancy w.r.t items/const/enum
   - Added constraints wherever needed with "pattern" property

 * [2/10]  "ASoC: tegra: add support for CIF programming"
   - Removed tegra_cif.c
   - Instead added inline helper function in tegra_cif.h

 * common changes (for patch [3/10] to [7/10])
   - Replace LATE system calls with Normal sleep
   - Remove explicit RPM suspend in driver remove() call
   - Use devm_kzalloc() instead of devm_kcalloc() for single element
   - Replace 'ret' with 'err' for better reading
   - Consistent error printing style across drivers
   - Minor formating fixes

 * [8/10]  "arm64: tegra: add AHUB components for few Tegra chips"
   - no change

 * [9/10]  "arm64: tegra: enable AHUB modules for few Tegra chips"
   - no change

 * [10/10] "arm64: defconfig: enable AHUB components for Tegra210 and later"
   (New patch)
   - Enables ACONNECT and AHUB components. With this AHUB and components are
     registered with ASoC core.

v1 -> v2
--------
 * [1/9] "dt-bindings: sound: tegra: add DT binding for AHUB"
   - no changes

 * [2/9] "ASoC: tegra: add support for CIF programming"
   - removed CIF programming changes for legacy chips.
   - this patch now exposes helper function for CIF programming,
     which can be used on Tegra210 later.
   - later tegra_cif.c can be extended for legacy chips as well.
   - updated commit message accordingly

 * [3/9] "ASoC: tegra: add Tegra210 based DMIC driver"
   - removed unnecessary initialization of 'ret' in probe()

 * [4/9] "ASoC: tegra: add Tegra210 based I2S driver"
   - removed unnecessary initialization of 'ret' in probe()
   - fixed indentation
   - added consistent bracing for if-else clauses
   - updated 'rx_fifo_th' type to 'unsigned int'
   - used BIT() macro for defines like '1 << {x}' in tegra210_i2s.h

 * [5/9] "ASoC: tegra: add Tegra210 based AHUB driver"
   - used of_device_get_match_data() to get 'soc_data' and removed
    explicit of_match_device()
   - used devm_platform_ioremap_resource() and removed explicit
    platform_get_resource()
   - fixed indentation for devm_snd_soc_register_component()
   - updated commit message
   - updated commit message to reflect compatible binding for Tegra186 and
     Tegra194.

 * [6/9] "ASoC: tegra: add Tegra186 based DSPK driver"
   - removed unnecessary initialization of 'ret' in probe()
   - updated 'max_th' to 'unsigned int'
   - shortened lengthy macro names to avoid wrapping in
     tegra186_dspk_wr_reg() and to be consistent

 * [7/9] "ASoC: tegra: add Tegra210 based ADMAIF driver"
   - used of_device_get_match_data() and removed explicit of_match_device()
   - used BIT() macro for defines like '1 << {x}' in tegra210_admaif.h
   - updated commit message to reflect compatible binding for Tegra186 and
     Tegra194.

 * [8/9] "arm64: tegra: add AHUB components for few Tegra chips"
   - no change

 * [9/9] "arm64: tegra: enable AHUB modules for few Tegra chips"
   - no change

 * common changes for patch [3/9] to [7/9]
   - sorted headers in alphabetical order
   - moved MODULE_DEVICE_TABLE() right below *_of_match table
   - removed macro DRV_NAME
   - removed explicit 'owner' field from platform_driver structure
   - added 'const' to snd_soc_dai_ops structure

Sameer Pujar (11):
  ASoC: dt-bindings: tegra: Add DT bindings for Tegra210
  ASoC: tegra: Add support for CIF programming
  ASoC: tegra: Add Tegra210 based DMIC driver
  ASoC: tegra: Add Tegra210 based I2S driver
  ASoC: tegra: Add Tegra210 based AHUB driver
  ASoC: tegra: Add Tegra186 based DSPK driver
  ASoC: tegra: Add Tegra210 based ADMAIF driver
  arm64: defconfig: Build AHUB component drivers
  arm64: defconfig: Build ADMA and ACONNECT driver
  arm64: tegra: Enable ACONNECT, ADMA and AGIC on Jetson Nano
  arm64: tegra: Add DT binding for AHUB components

 .../bindings/sound/nvidia,tegra186-dspk.yaml       |  83 +++
 .../bindings/sound/nvidia,tegra210-admaif.yaml     | 111 +++
 .../bindings/sound/nvidia,tegra210-ahub.yaml       | 136 ++++
 .../bindings/sound/nvidia,tegra210-dmic.yaml       |  83 +++
 .../bindings/sound/nvidia,tegra210-i2s.yaml        | 101 +++
 arch/arm64/boot/dts/nvidia/tegra186.dtsi           | 217 +++++-
 arch/arm64/boot/dts/nvidia/tegra194.dtsi           | 225 +++++-
 arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts |  12 +
 arch/arm64/boot/dts/nvidia/tegra210.dtsi           | 140 ++++
 arch/arm64/configs/defconfig                       |   8 +
 sound/soc/tegra/Kconfig                            |  56 ++
 sound/soc/tegra/Makefile                           |  10 +
 sound/soc/tegra/tegra186_dspk.c                    | 442 +++++++++++
 sound/soc/tegra/tegra186_dspk.h                    |  70 ++
 sound/soc/tegra/tegra210_admaif.c                  | 800 ++++++++++++++++++++
 sound/soc/tegra/tegra210_admaif.h                  | 162 ++++
 sound/soc/tegra/tegra210_ahub.c                    | 676 +++++++++++++++++
 sound/soc/tegra/tegra210_ahub.h                    | 127 ++++
 sound/soc/tegra/tegra210_dmic.c                    | 455 ++++++++++++
 sound/soc/tegra/tegra210_dmic.h                    |  82 +++
 sound/soc/tegra/tegra210_i2s.c                     | 812 +++++++++++++++++++++
 sound/soc/tegra/tegra210_i2s.h                     | 126 ++++
 sound/soc/tegra/tegra_cif.h                        |  65 ++
 sound/soc/tegra/tegra_pcm.c                        | 235 +++++-
 sound/soc/tegra/tegra_pcm.h                        |  21 +-
 25 files changed, 5251 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml
 create mode 100644 sound/soc/tegra/tegra186_dspk.c
 create mode 100644 sound/soc/tegra/tegra186_dspk.h
 create mode 100644 sound/soc/tegra/tegra210_admaif.c
 create mode 100644 sound/soc/tegra/tegra210_admaif.h
 create mode 100644 sound/soc/tegra/tegra210_ahub.c
 create mode 100644 sound/soc/tegra/tegra210_ahub.h
 create mode 100644 sound/soc/tegra/tegra210_dmic.c
 create mode 100644 sound/soc/tegra/tegra210_dmic.h
 create mode 100644 sound/soc/tegra/tegra210_i2s.c
 create mode 100644 sound/soc/tegra/tegra210_i2s.h
 create mode 100644 sound/soc/tegra/tegra_cif.h

--
2.7.4

3 years agoASoC: tegra: Add Tegra210 based ADMAIF driver
Sameer Pujar [Sun, 19 Jul 2020 05:01:26 +0000 (10:31 +0530)]
ASoC: tegra: Add Tegra210 based ADMAIF driver

ADMAIF is the interface between ADMA and AHUB. Each ADMA channel that
sends/receives data to/from AHUB must intreface through an ADMAIF channel.
ADMA channel sending data to AHUB pairs with an ADMAIF Tx channel and
similarly ADMA channel receiving data from AHUB pairs with an ADMAIF Rx
channel. Buffer size is configurable for each ADMAIF channel, but currently
SW uses default values.

This patch registers ADMAIF driver with ASoC framework. The component
driver exposes DAPM widgets, routes and kcontrols for the device. The DAI
driver exposes ADMAIF interfaces, which can be used to connect different
components in the ASoC layer. Makefile and Kconfig support is added to
allow to build the driver. The ADMAIF device can be enabled in the DT via
"nvidia,tegra210-admaif" compatible binding.

Tegra PCM driver is updated to expose required PCM interfaces and
snd_pcm_ops callbacks.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1595134890-16470-8-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tas2770: Convert tas2770 binding to yaml
Dan Murphy [Mon, 20 Jul 2020 18:12:01 +0000 (13:12 -0500)]
ASoC: tas2770: Convert tas2770 binding to yaml

Convert the tas2770 binding to yaml format.
Add in the reset-gpio to the binding as it is in the code but not
documented in the binding.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200720181202.31000-1-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tas2770: Fix reset gpio property name
Dan Murphy [Mon, 20 Jul 2020 18:12:02 +0000 (13:12 -0500)]
ASoC: tas2770: Fix reset gpio property name

Fix the reset property name when allocating the GPIO descriptor.
The gpiod_get_optional appends either the -gpio or -gpios suffix to the
name.

Fixes: 1a476abc723e6 ("tas2770: add tas2770 smart PA kernel driver")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200720181202.31000-2-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: sgtl5000: Convert to json-schema
Thierry Reding [Mon, 8 Jun 2020 17:46:58 +0000 (19:46 +0200)]
ASoC: sgtl5000: Convert to json-schema

Convert the Freescale SGTL5000 device tree bindings from free-form text
format to json-schema.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20200608174658.1315325-1-thierry.reding@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: Intel: machine driver updates for 5.9" from Pierre-Louis Bossart...
Mark Brown [Mon, 20 Jul 2020 15:08:24 +0000 (16:08 +0100)]
Merge series "ASoC: Intel: machine driver updates for 5.9" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Small patchset to harden the SoundWire machine driver, change bad
HIDs, update PLL settings and avoid memory leaks. Given that the
SoundWire core parts are not upstream it's probably not necessary to
provide the patches to stable branches.

Bard Liao (1):
  ASoC: Intel: sof_sdw_rt711: remove hard-coded codec name

Kai Vehmanen (2):
  ASoC: Intel: sof_sdw: add support for systems without i915 audio
  ASoC: Intel: sof_sdw: avoid crash if invalid DSP topology loaded

Libin Yang (1):
  ASoC: Intel: common: change match table ehl-rt5660

Pierre-Louis Bossart (1):
  ASoC: Intel: sof_sdw_rt711: remove properties in card remove

Yong Zhi (1):
  ASoC: intel: board: sof_rt5682: Update rt1015 pll input clk freq

 sound/soc/intel/boards/sof_rt5682.c           |  9 +++++-
 sound/soc/intel/boards/sof_sdw.c              | 31 +++++++++++++------
 sound/soc/intel/boards/sof_sdw_common.h       |  2 ++
 sound/soc/intel/boards/sof_sdw_hdmi.c         |  6 ++++
 sound/soc/intel/boards/sof_sdw_rt711.c        | 17 +++++++++-
 .../intel/common/soc-acpi-intel-ehl-match.c   |  2 +-
 6 files changed, 54 insertions(+), 13 deletions(-)

base-commit: 22e9b54307987787efa0ee534aa9e31982ec1161
--
2.25.1

3 years agoASoC: intel: board: sof_rt5682: Update rt1015 pll input clk freq
Yong Zhi [Fri, 17 Jul 2020 21:13:36 +0000 (16:13 -0500)]
ASoC: intel: board: sof_rt5682: Update rt1015 pll input clk freq

In commit d696a61413b4 ("ASoC: rt1015: Add condition to prevent SoC
providing bclk in ratio of 50 times of sample rate."), PLL input at 50fs
is no longer supported, the new recommended settings at 48Khz rate are:

PLL input       SSP bclk
------------------------
64fs            3.073Mhz
100fs           4.8Mhz

(bclk update is reflected in topoplogy.)

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200717211337.31956-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_sdw: avoid crash if invalid DSP topology loaded
Kai Vehmanen [Fri, 17 Jul 2020 21:13:35 +0000 (16:13 -0500)]
ASoC: Intel: sof_sdw: avoid crash if invalid DSP topology loaded

The mc_private->hdmi_pcm_list is populated by elements loaded during
DSP topology load. Valid topologies for this machine driver will always
have PCM nodes for HDMI, but driver should fail gracefully even in the case
this is not true. Add a sanity check to sof_sdw_hdmi_card_late_probe()
for this case. Without the fix, a null pcm handle gets dereferenced.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Link: https://lore.kernel.org/r/20200717211337.31956-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_sdw: add support for systems without i915 audio
Kai Vehmanen [Fri, 17 Jul 2020 21:13:34 +0000 (16:13 -0500)]
ASoC: Intel: sof_sdw: add support for systems without i915 audio

Extend the generic SOF Soundwire machine driver to support systems where
iDisp HDMI/DP audio codec is disabled for some reason (i915 driver
disabled, HDMI/DP implemented with a discrete GPU, etc). Switch codecs
to SoC dummy in the affected DAI links. This allows to reuse existing
topologies for this case.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Link: https://lore.kernel.org/r/20200717211337.31956-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_sdw_rt711: remove properties in card remove
Pierre-Louis Bossart [Fri, 17 Jul 2020 21:13:33 +0000 (16:13 -0500)]
ASoC: Intel: sof_sdw_rt711: remove properties in card remove

The rt711 jack detection properties are set from the machine drivers
during the card probe, as done in other ASoC examples.

KASAN reports a use-after-free error when unbinding drivers due to a
confusing sequence between the ACPI core, the device core and the
SoundWire device cleanups.

Rather than fixing this sequence, follow the recommendation to have
the same caller add and remove properties, add an explicit
device_remove_properties() in the card .remove() callback.

In future patches the use of device_add/remove_properties will be
replaced by a direct handling of a swnode, but the sequence will
remain the same.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200717211337.31956-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_sdw_rt711: remove hard-coded codec name
Bard Liao [Fri, 17 Jul 2020 21:13:32 +0000 (16:13 -0500)]
ASoC: Intel: sof_sdw_rt711: remove hard-coded codec name

We can get codec name from dai link.

Suggested-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200717211337.31956-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "Add ASoC AHUB components for Tegra210 and later" from Sameer Pujar...
Mark Brown [Mon, 20 Jul 2020 14:34:33 +0000 (15:34 +0100)]
Merge series "Add ASoC AHUB components for Tegra210 and later" from Sameer Pujar <spujar@nvidia.com>:

Overview
========
Audio Processing Engine (APE) comprises of Audio DMA (ADMA) and Audio
Hub (AHUB) unit. AHUB is a collection of hardware accelerators for audio
pre-processing and post-processing. It also includes a programmable full
crossbar for routing audio data across these accelerators.

This series exposes some of these below mentioned HW devices as ASoC
components for Tegra platforms from Tegra210 onwards.
 * ADMAIF : The interface between ADMA and AHUB
 * XBAR   : Crossbar for routing audio samples across various modules
 * I2S    : Inter-IC Sound Controller
 * DMIC   : Digital Microphone
 * DSPK   : Digital Speaker

Following is the summary of current series.
 * Add YAML DT binding documentation for above mentioned modules.
 * Helper function for ACIF programming is exposed for Tegra210 and later.
 * Add ASoC driver components for each of the above modules.
 * Build ACONNECT and ADMA drivers which are essential to realize audio
   use case.
 * Add DT entries for above components for Tegra210, Tegra186 and
   Tegra194.

As per the suggestion in [0] audio graph based sound card support
is pushed in a separate series.

[0] https://lkml.org/lkml/2020/6/27/4

Changelog
=========

v4 -> v5
--------
 * Common changes
   - simple-card driver changes are dropped. Changes are migrated to audio
     graph card and are moved to a separate series as suggested.

   - '#sound-dai-cells' property is not needed for planned audio graph card
     Hence dropped from documentation and related DT binding of component
     drivers.

   - CIF and DAP DAIs are added for I/O drivers (DMIC, DSPK, I2S) to
     represent DAI links using audio graph card. Similary DAIs are added in
     AHUB driver to describe endpoints in audio crossbar. Routing is updated
     to reflect the same in drivers.

v3 -> v4
--------
 * [1/23] "ASoC: dt-bindings: tegra: Add DT bindings for Tegra210"
   - Removed multiple examples and retained one example per doc
   - Fixed as per inputs on the previous series
   - Tested bindings with 'make dt_binding_check/dtbs_check'

 * [2/23] "ASoC: tegra: Add support for CIF programming"
   - No change

 * Common changes (for patch [3/10] to [7/10])
   - Mixer control overrides, for PCM parameters (rate, channel, bits),
     in each driver are dropped.
   - Updated routing as per DPCM usage
   - Minor changes related to formatting

 * New changes (patch [8/23] to [18/23] and patch [23/23])
   - Based on discussions in following threads DPCM is used for Tegra Audio.
     https://lkml.org/lkml/2020/2/20/91
     https://lkml.org/lkml/2020/4/30/519
   - The simple-card driver is used for Tegra Audio and accordingly
     some enhancements are made in simple-card and core drivers.
   - Patch [8/23] to [18/23] are related to simple-card and core changes.
   - Patch [23/23] adds sound card support to realize complete audio path.
     This is based on simple-card driver with proposed enhancements.
   - Re-ordered patches depending on above

v2 -> v3
--------
 * [1/10]  "dt-bindings: sound: tegra: add DT binding for AHUB
   - Updated licence
   - Removed redundancy w.r.t items/const/enum
   - Added constraints wherever needed with "pattern" property

 * [2/10]  "ASoC: tegra: add support for CIF programming"
   - Removed tegra_cif.c
   - Instead added inline helper function in tegra_cif.h

 * common changes (for patch [3/10] to [7/10])
   - Replace LATE system calls with Normal sleep
   - Remove explicit RPM suspend in driver remove() call
   - Use devm_kzalloc() instead of devm_kcalloc() for single element
   - Replace 'ret' with 'err' for better reading
   - Consistent error printing style across drivers
   - Minor formating fixes

 * [8/10]  "arm64: tegra: add AHUB components for few Tegra chips"
   - no change

 * [9/10]  "arm64: tegra: enable AHUB modules for few Tegra chips"
   - no change

 * [10/10] "arm64: defconfig: enable AHUB components for Tegra210 and later"
   (New patch)
   - Enables ACONNECT and AHUB components. With this AHUB and components are
     registered with ASoC core.

v1 -> v2
--------
 * [1/9] "dt-bindings: sound: tegra: add DT binding for AHUB"
   - no changes

 * [2/9] "ASoC: tegra: add support for CIF programming"
   - removed CIF programming changes for legacy chips.
   - this patch now exposes helper function for CIF programming,
     which can be used on Tegra210 later.
   - later tegra_cif.c can be extended for legacy chips as well.
   - updated commit message accordingly

 * [3/9] "ASoC: tegra: add Tegra210 based DMIC driver"
   - removed unnecessary initialization of 'ret' in probe()

 * [4/9] "ASoC: tegra: add Tegra210 based I2S driver"
   - removed unnecessary initialization of 'ret' in probe()
   - fixed indentation
   - added consistent bracing for if-else clauses
   - updated 'rx_fifo_th' type to 'unsigned int'
   - used BIT() macro for defines like '1 << {x}' in tegra210_i2s.h

 * [5/9] "ASoC: tegra: add Tegra210 based AHUB driver"
   - used of_device_get_match_data() to get 'soc_data' and removed
    explicit of_match_device()
   - used devm_platform_ioremap_resource() and removed explicit
    platform_get_resource()
   - fixed indentation for devm_snd_soc_register_component()
   - updated commit message
   - updated commit message to reflect compatible binding for Tegra186 and
     Tegra194.

 * [6/9] "ASoC: tegra: add Tegra186 based DSPK driver"
   - removed unnecessary initialization of 'ret' in probe()
   - updated 'max_th' to 'unsigned int'
   - shortened lengthy macro names to avoid wrapping in
     tegra186_dspk_wr_reg() and to be consistent

 * [7/9] "ASoC: tegra: add Tegra210 based ADMAIF driver"
   - used of_device_get_match_data() and removed explicit of_match_device()
   - used BIT() macro for defines like '1 << {x}' in tegra210_admaif.h
   - updated commit message to reflect compatible binding for Tegra186 and
     Tegra194.

 * [8/9] "arm64: tegra: add AHUB components for few Tegra chips"
   - no change

 * [9/9] "arm64: tegra: enable AHUB modules for few Tegra chips"
   - no change

 * common changes for patch [3/9] to [7/9]
   - sorted headers in alphabetical order
   - moved MODULE_DEVICE_TABLE() right below *_of_match table
   - removed macro DRV_NAME
   - removed explicit 'owner' field from platform_driver structure
   - added 'const' to snd_soc_dai_ops structure

Sameer Pujar (11):
  ASoC: dt-bindings: tegra: Add DT bindings for Tegra210
  ASoC: tegra: Add support for CIF programming
  ASoC: tegra: Add Tegra210 based DMIC driver
  ASoC: tegra: Add Tegra210 based I2S driver
  ASoC: tegra: Add Tegra210 based AHUB driver
  ASoC: tegra: Add Tegra186 based DSPK driver
  ASoC: tegra: Add Tegra210 based ADMAIF driver
  arm64: defconfig: Build AHUB component drivers
  arm64: defconfig: Build ADMA and ACONNECT driver
  arm64: tegra: Enable ACONNECT, ADMA and AGIC on Jetson Nano
  arm64: tegra: Add DT binding for AHUB components

 .../bindings/sound/nvidia,tegra186-dspk.yaml       |  83 +++
 .../bindings/sound/nvidia,tegra210-admaif.yaml     | 111 +++
 .../bindings/sound/nvidia,tegra210-ahub.yaml       | 136 ++++
 .../bindings/sound/nvidia,tegra210-dmic.yaml       |  83 +++
 .../bindings/sound/nvidia,tegra210-i2s.yaml        | 101 +++
 arch/arm64/boot/dts/nvidia/tegra186.dtsi           | 217 +++++-
 arch/arm64/boot/dts/nvidia/tegra194.dtsi           | 225 +++++-
 arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts |  12 +
 arch/arm64/boot/dts/nvidia/tegra210.dtsi           | 140 ++++
 arch/arm64/configs/defconfig                       |   8 +
 sound/soc/tegra/Kconfig                            |  56 ++
 sound/soc/tegra/Makefile                           |  10 +
 sound/soc/tegra/tegra186_dspk.c                    | 442 +++++++++++
 sound/soc/tegra/tegra186_dspk.h                    |  70 ++
 sound/soc/tegra/tegra210_admaif.c                  | 800 ++++++++++++++++++++
 sound/soc/tegra/tegra210_admaif.h                  | 162 ++++
 sound/soc/tegra/tegra210_ahub.c                    | 676 +++++++++++++++++
 sound/soc/tegra/tegra210_ahub.h                    | 127 ++++
 sound/soc/tegra/tegra210_dmic.c                    | 455 ++++++++++++
 sound/soc/tegra/tegra210_dmic.h                    |  82 +++
 sound/soc/tegra/tegra210_i2s.c                     | 812 +++++++++++++++++++++
 sound/soc/tegra/tegra210_i2s.h                     | 126 ++++
 sound/soc/tegra/tegra_cif.h                        |  65 ++
 sound/soc/tegra/tegra_pcm.c                        | 235 +++++-
 sound/soc/tegra/tegra_pcm.h                        |  21 +-
 25 files changed, 5251 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml
 create mode 100644 sound/soc/tegra/tegra186_dspk.c
 create mode 100644 sound/soc/tegra/tegra186_dspk.h
 create mode 100644 sound/soc/tegra/tegra210_admaif.c
 create mode 100644 sound/soc/tegra/tegra210_admaif.h
 create mode 100644 sound/soc/tegra/tegra210_ahub.c
 create mode 100644 sound/soc/tegra/tegra210_ahub.h
 create mode 100644 sound/soc/tegra/tegra210_dmic.c
 create mode 100644 sound/soc/tegra/tegra210_dmic.h
 create mode 100644 sound/soc/tegra/tegra210_i2s.c
 create mode 100644 sound/soc/tegra/tegra210_i2s.h
 create mode 100644 sound/soc/tegra/tegra_cif.h

--
2.7.4

3 years agoMerge series "ASoC: Intel: machine driver updates for 5.9" from Pierre-Louis Bossart...
Mark Brown [Mon, 20 Jul 2020 14:34:31 +0000 (15:34 +0100)]
Merge series "ASoC: Intel: machine driver updates for 5.9" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Small patchset to harden the SoundWire machine driver, change bad
HIDs, update PLL settings and avoid memory leaks. Given that the
SoundWire core parts are not upstream it's probably not necessary to
provide the patches to stable branches.

Bard Liao (1):
  ASoC: Intel: sof_sdw_rt711: remove hard-coded codec name

Kai Vehmanen (2):
  ASoC: Intel: sof_sdw: add support for systems without i915 audio
  ASoC: Intel: sof_sdw: avoid crash if invalid DSP topology loaded

Libin Yang (1):
  ASoC: Intel: common: change match table ehl-rt5660

Pierre-Louis Bossart (1):
  ASoC: Intel: sof_sdw_rt711: remove properties in card remove

Yong Zhi (1):
  ASoC: intel: board: sof_rt5682: Update rt1015 pll input clk freq

 sound/soc/intel/boards/sof_rt5682.c           |  9 +++++-
 sound/soc/intel/boards/sof_sdw.c              | 31 +++++++++++++------
 sound/soc/intel/boards/sof_sdw_common.h       |  2 ++
 sound/soc/intel/boards/sof_sdw_hdmi.c         |  6 ++++
 sound/soc/intel/boards/sof_sdw_rt711.c        | 17 +++++++++-
 .../intel/common/soc-acpi-intel-ehl-match.c   |  2 +-
 6 files changed, 54 insertions(+), 13 deletions(-)

base-commit: 22e9b54307987787efa0ee534aa9e31982ec1161
--
2.25.1

3 years agoASoC: soc-dai.h: drop a duplicated word
Randy Dunlap [Sun, 19 Jul 2020 00:33:07 +0000 (17:33 -0700)]
ASoC: soc-dai.h: drop a duplicated word

Drop the repeated word "be" in a comment.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Link: https://lore.kernel.org/r/20200719003307.21403-1-rdunlap@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: wcd9335.h: fix duplicated word
Randy Dunlap [Sun, 19 Jul 2020 18:09:01 +0000 (11:09 -0700)]
ASoC: wcd9335.h: fix duplicated word

Fix the doubled word "in" in a comment by adding punctuation
in 3 places and capitalization.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Link: https://lore.kernel.org/r/20200719180901.30720-1-rdunlap@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra20_das.h: delete duplicated words
Randy Dunlap [Sun, 19 Jul 2020 18:09:12 +0000 (11:09 -0700)]
ASoC: tegra20_das.h: delete duplicated words

Delete the doubled word "to" in two comments.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Link: https://lore.kernel.org/r/20200719180912.30770-1-rdunlap@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: Skylake: Avoid the use of one-element array
Gustavo A. R. Silva [Fri, 17 Jul 2020 21:55:00 +0000 (16:55 -0500)]
ASoC: Intel: Skylake: Avoid the use of one-element array

One-element arrays are being deprecated[1]. Replace the one-element
array with a simple value type 'u8 reserved'[2], once it seems this
is just a placeholder for alignment.

[1] https://github.com/KSPP/linux/issues/79
[2] https://github.com/KSPP/linux/issues/86

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Tested-by: kernel test robot <lkp@intel.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/skylake-20200717.md
Link: https://lore.kernel.org/r/20200717215500.GA13910@embeddedor
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: Add Tegra186 based DSPK driver
Sameer Pujar [Sun, 19 Jul 2020 05:01:25 +0000 (10:31 +0530)]
ASoC: tegra: Add Tegra186 based DSPK driver

The Digital Speaker Controller (DSPK) converts the multi-bit Pulse Code
Modulation (PCM) audio input to oversampled 1-bit Pulse Density Modulation
(PDM) output. From the signal flow perpsective, the DSPK can be viewed as
a PDM transmitter that up-samples the input to the desired sampling rate
by interpolation then converts the oversampled PCM input to the desired
1-bit output via Delta Sigma Modulation (DSM).

This patch registers DSPK component with ASoC framework. The component
driver exposes DAPM widgets, routes and kcontrols for the device. The DAI
driver exposes DSPK interfaces, which can be used to connect different
components in the ASoC layer. Makefile and Kconfig support is added to
allow to build the driver. The DSPK devices can be enabled in the DT via
"nvidia,tegra186-dspk" compatible binding. This driver can be used
on Tegra194 chip as well.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1595134890-16470-7-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: Add Tegra210 based AHUB driver
Sameer Pujar [Sun, 19 Jul 2020 05:01:24 +0000 (10:31 +0530)]
ASoC: tegra: Add Tegra210 based AHUB driver

The Audio Hub (AHUB) comprises a collection of hardware accelerators for
audio pre/post-processing and a programmable full crossbar (XBAR) for
routing audio data across these accelerators in time and in parallel.
AHUB supports multiple interfaces to I2S, DSPK, DMIC etc., XBAR is a
switch used to configure or modify audio routing between HW accelerators
present inside AHUB.

This patch registers AHUB component with ASoC framework. The component
driver exposes DAPM widgets, routes and kcontrols for the device. The DAI
driver exposes AHUB interfaces, which can be used to connect different
components in the ASoC layer. Currently the driver takes care of XBAR
programming to allow audio data flow through various clients of the AHUB.
Makefile and Kconfig support is added to allow to build the driver. The
AHUB component can be enabled in the DT via below compatible bindings.
  - "nvidia,tegra210-ahub" for Tegra210
  - "nvidia,tegra186-ahub" for Tegra186 and Tegra194

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1595134890-16470-6-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: Add Tegra210 based I2S driver
Sameer Pujar [Sun, 19 Jul 2020 05:01:23 +0000 (10:31 +0530)]
ASoC: tegra: Add Tegra210 based I2S driver

The Inter-IC Sound (I2S) controller implements full-duplex, bi-directional
and single direction point to point serial interface. It can interface
with I2S compatible devices. Tegra I2S controller can operate as both
master and slave.

This patch registers I2S controller with ASoC framework. The component
driver exposes DAPM widgets, routes and kcontrols for the device. The DAI
driver exposes I2S interfaces, which can be used to connect different
components in the ASoC layer. Makefile and Kconfig support is added to
allow to build the driver. The I2S devices can be enabled in the DT via
"nvidia,tegra210-i2s" compatible binding.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1595134890-16470-5-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: Add Tegra210 based DMIC driver
Sameer Pujar [Sun, 19 Jul 2020 05:01:22 +0000 (10:31 +0530)]
ASoC: tegra: Add Tegra210 based DMIC driver

The Digital MIC (DMIC) Controller is used to interface with Pulse Density
Modulation (PDM) input devices. The DMIC controller implements a converter
to convert PDM signals to Pulse Code Modulation (PCM) signals. From signal
flow perspective, the DMIC can be viewed as a PDM receiver.

This patch registers DMIC component with ASoC framework. The component
driver exposes DAPM widgets, routes and kcontrols for the device. The DAI
driver exposes DMIC interfaces, which can be used to connect different
components in the ASoC layer. Makefile and Kconfig support is added to
allow to build the driver. The DMIC devices can be enabled in the DT via
"nvidia,tegra210-dmic" compatible string. This driver can be used for
Tegra186 and Tegra194 chips as well.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1595134890-16470-4-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: Add support for CIF programming
Sameer Pujar [Sun, 19 Jul 2020 05:01:21 +0000 (10:31 +0530)]
ASoC: tegra: Add support for CIF programming

Audio Client Interface (CIF) is a proprietary interface employed to route
audio samples through Audio Hub (AHUB) components by inter connecting the
various modules.

This patch exports an inline function tegra_set_cif() which can be used,
for now, to program CIF on Tegra210 and later Tegra generations. Later it
can be extended to include helpers for legacy chips as well.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/1595134890-16470-3-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dt-bindings: tegra: Add DT bindings for Tegra210
Sameer Pujar [Sun, 19 Jul 2020 05:01:20 +0000 (10:31 +0530)]
ASoC: dt-bindings: tegra: Add DT bindings for Tegra210

This patch adds YAML schema for DT binding of AHUB and few of its
following components. These devices will be registered as ASoC
components and binding will be used on Tegra210 and later chips.
 * ADMAIF
 * I2S
 * DMIC
 * DSPK
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1;
t=1595134894; bh=DX96zRQRNplPikN828HbAfbjGumAn9IgtktrsenKjgk=;
h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer:
 In-Reply-To:References:X-NVConfidentiality:MIME-Version:
 Content-Type;
b=IhfGFjMxsnRHso1Ku2GEGC+mtLCy3AbRKPfgTS56XGqEWquUr/1s8n9tFpriqF7a+
 tJGrTN9mKhRQGrwdey/AHsMY4Tbm4fKEWxIASgAV/lFPCfgP3BnVjEdHclc7FdBaB0
 Qvd3zs8HFsgoIzksLrtHNMrUepkeZajn0/XnC7nghGDRim4+6Hauupr5kj/KVlihsS
 KS1YQ2Zz9TZzLaC5QXALiHj3ATLvBFrmIf6Vj19q7hePt0menTZVzQNy+y3h4xZfLH
 +OvBCsLgHGGhq+iM9rm64D+S5Op2vCslwq3Q/42TnYZ0vDbD7aA9nTAQzfYeI6HK6b
 vi7eYbryzCTSg==

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1595134890-16470-2-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: common: change match table ehl-rt5660
Libin Yang [Fri, 17 Jul 2020 21:13:37 +0000 (16:13 -0500)]
ASoC: Intel: common: change match table ehl-rt5660

This configuration is for EHL with the RT5660 codec. RT5660
should use "10EC5660" ID instead of "INTC1027".

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200717211337.31956-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-dai: remove .digital_mute
Kuninori Morimoto [Fri, 17 Jul 2020 00:21:54 +0000 (09:21 +0900)]
ASoC: soc-dai: remove .digital_mute

All drivers are now using .mute_stream.
Let's remove .digital_mute.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/87h7u72dqz.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge series "ASoC: merge .digital_mute() into .mute_stream()" from Kuninori Morimoto...
Mark Brown [Fri, 17 Jul 2020 13:47:04 +0000 (14:47 +0100)]
Merge series "ASoC: merge .digital_mute() into .mute_stream()" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Hi Mark

These are v4 digital_mute() patch which adjusts
to atmel which had conflict on v3.

v3 -> v4
- tidyup for atmel which had conflict

v2 -> v3
- uses "xxx_mute_stream" for .mute_stream naming
  if it was better
- removed verbose Cc email address

v1 -> v2
- return -ENOTSUPP at hdmi-codec
- add new .no_capture_mute flag and emulate .digital_mute()
  by .mute_stream()

Link: https://lore.kernel.org/r/87h7uhxxk6.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/874kqy2y5t.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87ftam37ko.wl-kuninori.morimoto.gx@renesas.com
Kuninori Morimoto (3):
  ASoC: soc-dai: remove .digital_mute
  ASoC: soc-core: snd_soc_dai_digital_mute() for both CPU/Codec
  ASoC: soc-xxx: add asoc_substream_to_rtd()

 include/sound/soc-dai.h               |  1 -
 include/sound/soc.h                   |  2 +
 sound/soc/soc-component.c             | 20 ++++-----
 sound/soc/soc-core.c                  |  4 +-
 sound/soc/soc-dai.c                   | 12 ++----
 sound/soc/soc-dapm.c                  |  6 +--
 sound/soc/soc-generic-dmaengine-pcm.c |  4 +-
 sound/soc/soc-link.c                  | 12 +++---
 sound/soc/soc-pcm.c                   | 62 +++++++++++++--------------
 sound/soc/soc-utils.c                 |  2 +-
 10 files changed, 61 insertions(+), 64 deletions(-)

--
2.25.1

4 years agoMerge series "Add support for SATA/PCIe/USB2[3]/VIN/CSI on R8A774E1" from Lad Prabhak...
Mark Brown [Fri, 17 Jul 2020 13:47:03 +0000 (14:47 +0100)]
Merge series "Add support for SATA/PCIe/USB2[3]/VIN/CSI on R8A774E1" from Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>:

Hi All,

This patch series adds support for the following peripherals on RZ/G2H SoC
 * PCIe
 * SATA
 * USB2
 * USB3
 * Audio
 * VIN
 * CSI

Cheers,
Prabhakar

Lad Prabhakar (20):
  dt-bindings: pci: rcar-pci: Add device tree support for r8a774e1
  arm64: dts: renesas: r8a774e1: Add PCIe device nodes
  dt-bindings: ata: renesas,rcar-sata: Add r8a774e1 support
  arm64: dts: renesas: r8a774e1: Add SATA controller node
  dt-bindings: phy: renesas,usb2-phy: Add r8a774e1 support
  arm64: dts: renesas: r8a774e1: Add USB2.0 phy and host (EHCI/OHCI)
    device nodes
  dt-bindings: usb: renesas,usb3-peri: Document r8a774e1 support
  dt-bindings: usb: usb-xhci: Document r8a774e1 support
  dt-bindings: phy: renesas,usb3-phy: Add r8a774e1 support
  arm64: dts: renesas: r8a774e1: Add USB3.0 device nodes
  dt-bindings: usb: renesas,usbhs: Add r8a774e1 support
  dt-bindings: dma: renesas,usb-dmac: Add binding for r8a774e1
  arm64: dts: renesas: r8a774e1: Add USB-DMAC and HSUSB device nodes
  dt-bindings: sound: renesas,rsnd: Document r8a774e1 bindings
  arm64: dts: renesas: r8a774e1: Add audio support
  dt-bindings: media: renesas,csi2: Add R8A774E1 support
  dt-bindings: media: renesas,vin: Add R8A774E1 support
  media: rcar-csi2: Enable support for R8A774E1
  media: rcar-vin: Enable support for R8A774E1
  arm64: dts: renesas: r8a774e1: Add VIN and CSI-2 nodes

 .../bindings/ata/renesas,rcar-sata.yaml       |   1 +
 .../bindings/dma/renesas,usb-dmac.yaml        |   1 +
 .../bindings/media/renesas,csi2.yaml          |   1 +
 .../bindings/media/renesas,vin.yaml           |   1 +
 .../devicetree/bindings/pci/rcar-pci.txt      |   1 +
 .../bindings/phy/renesas,usb2-phy.yaml        |   1 +
 .../bindings/phy/renesas,usb3-phy.yaml        |   1 +
 .../bindings/sound/renesas,rsnd.txt           |   1 +
 .../bindings/usb/renesas,usb3-peri.yaml       |   1 +
 .../bindings/usb/renesas,usbhs.yaml           |   1 +
 .../devicetree/bindings/usb/usb-xhci.txt      |   1 +
 arch/arm64/boot/dts/renesas/r8a774e1.dtsi     | 989 +++++++++++++++++-
 drivers/media/platform/rcar-vin/rcar-core.c   |  40 +
 drivers/media/platform/rcar-vin/rcar-csi2.c   |   4 +
 14 files changed, 1022 insertions(+), 22 deletions(-)

--
2.17.1

4 years agoASoC: rt5682: optimize the power consumption
Shuming Fan [Fri, 17 Jul 2020 07:02:28 +0000 (15:02 +0800)]
ASoC: rt5682: optimize the power consumption

Some settings should set to default value after the calibration.
This patch also disables the 25MHz and 1MHz clock power when the jack unplugged.
The JD is triggered by JDH, therefore this patch removes JDL setting.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20200717070228.28660-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: soc-dai.h: don't use discriminatory terms for comment
Kuninori Morimoto [Fri, 17 Jul 2020 06:22:26 +0000 (15:22 +0900)]
ASoC: soc-dai.h: don't use discriminatory terms for comment

soc-dai is using discriminatory terms for comment.
This patch renames "slave" to "secondary", thus
we can keep M/S initials.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875zam3bmk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: qcom: qdsp6: Use IS_ERR() instead of IS_ERR_OR_NULL()
Tang Bin [Tue, 14 Jul 2020 11:27:44 +0000 (19:27 +0800)]
ASoC: qcom: qdsp6: Use IS_ERR() instead of IS_ERR_OR_NULL()

In the function q6adm_open(), q6adm_alloc_copp() doesn't return
NULL. Thus use IS_ERR() to validate the returned value instead
of IS_ERR_OR_NULL(). And delete the extra line.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20200714112744.20560-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: rt5682: disable MICBIAS and Vref2 widget in default
Shuming Fan [Fri, 17 Jul 2020 07:02:56 +0000 (15:02 +0800)]
ASoC: rt5682: disable MICBIAS and Vref2 widget in default

The pin status of the widget was connected after the sound card registered.
The rt5682_headset_detect function will use the pin status of these two widgets
to decide the certain register setting on/off.
Therefore this patch disables the pin of these two widgets in the codec probe.
This patch could avoid the misjudgment.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20200717070256.28712-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: qcom: qdsp6: Use the defined variable to clean code
Tang Bin [Tue, 14 Jul 2020 11:29:23 +0000 (19:29 +0800)]
ASoC: qcom: qdsp6: Use the defined variable to clean code

Use the defined variable "dev" to make the code cleaner.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20200714112923.14944-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: soc-core: snd_soc_dai_digital_mute() for both CPU/Codec
Kuninori Morimoto [Fri, 17 Jul 2020 00:22:02 +0000 (09:22 +0900)]
ASoC: soc-core: snd_soc_dai_digital_mute() for both CPU/Codec

snd_soc_dai_digital_mute() is used for both CPU and Codec.
For example, soc_pcm_prepare() / soc_pcm_hw_free() are caring
both CPU and Codec.

But soc_resume_deferred() / snd_soc_suspend() are not.
This patch cares it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/87ft9r2dqr.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: atmel: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Fri, 17 Jul 2020 00:23:51 +0000 (09:23 +0900)]
ASoC: atmel: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

-

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/87eepb2dnq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agodt-bindings: sound: renesas, rsnd: Document r8a774e1 bindings
Lad Prabhakar [Thu, 16 Jul 2020 17:18:29 +0000 (18:18 +0100)]
dt-bindings: sound: renesas, rsnd: Document r8a774e1 bindings

Document SoC specific bindings for RZ/G2H (r8a774e1) SoC.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
Link: https://lore.kernel.org/r/1594919915-5225-15-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: meson: fixes the missed kfree() for axg_card_add_tdm_loopback
Jing Xiangfeng [Fri, 17 Jul 2020 08:22:42 +0000 (16:22 +0800)]
ASoC: meson: fixes the missed kfree() for axg_card_add_tdm_loopback

axg_card_add_tdm_loopback() misses to call kfree() in an error path. We
can use devm_kasprintf() to fix the issue, also improve maintainability.
So use it instead.

Fixes: c84836d7f650 ("ASoC: meson: axg-card: use modern dai_link style")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20200717082242.130627-1-jingxiangfeng@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge series "ALSA: hda: export snd_hda_codec_cleanup()" from Kai Vehmanen <kai.vehma...
Mark Brown [Thu, 16 Jul 2020 22:51:54 +0000 (23:51 +0100)]
Merge series "ALSA: hda: export snd_hda_codec_cleanup()" from Kai Vehmanen <kai.vehmanen@linux.intel.com>:

Hi,

this small series is preparation for a set of bugfix ASoC patches
addressing a memleak at module unload for the HDA codec wrapper.
Instead of duplicating HDA code in ASoC tree, I chose to export
more functionality from hda_codec.c so it can be (re)used in ASoC's
hdac_hda.c.

Full series:
https://github.com/thesofproject/linux/pull/2252

Takashi and Mark, feedback is welcome on how to best handle this
kind of series where I have dependent patches both in sound/pci/hda
and in ASoC. For this series, I'm sending the patches separately
and when/if first set is merged by Takashi, I'll route the ASoC
patches via our usually SOF set to Mark.

Kai Vehmanen (2):
  ALSA: hda: export snd_hda_codec_cleanup_for_unbind()
  ALSA: hda: fix snd_hda_codec_cleanup() documentation

 include/sound/hda_codec.h | 2 ++
 sound/pci/hda/hda_codec.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

--
2.27.0

4 years agoMerge series "ASoC: fsl-asoc-card: Support hp and mic detection" from Shengjiu Wang...
Mark Brown [Thu, 16 Jul 2020 22:51:52 +0000 (23:51 +0100)]
Merge series "ASoC: fsl-asoc-card: Support hp and mic detection" from Shengjiu Wang <shengjiu.wang@nxp.com>:

Support hp and mic detection.
Add a parameter for asoc_simple_init_jack.

Shengjiu Wang (3):
  ASoC: simple-card-utils: Support configure pin_name for
    asoc_simple_init_jack
  ASoC: bindings: fsl-asoc-card: Support hp-det-gpio and mic-det-gpio
  ASoC: fsl-asoc-card: Support Headphone and Microphone Jack detection

changes in v2:
- Add more comments in third commit
- Add Acked-by Nicolin.

 .../bindings/sound/fsl-asoc-card.txt          |  3 +
 include/sound/simple_card_utils.h             |  6 +-
 sound/soc/fsl/Kconfig                         |  1 +
 sound/soc/fsl/fsl-asoc-card.c                 | 77 ++++++++++++++++++-
 sound/soc/generic/simple-card-utils.c         |  7 +-
 5 files changed, 86 insertions(+), 8 deletions(-)

--
2.27.0

4 years agoMerge series "ASoC: merge .digital_mute() into .mute_stream()" from Kuninori Morimoto...
Mark Brown [Thu, 16 Jul 2020 22:51:51 +0000 (23:51 +0100)]
Merge series "ASoC: merge .digital_mute() into .mute_stream()" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Hi Mark

These are v3 patch-set.
ALSA SoC has 2 mute callbacks (= .digital_mute(), .mute_stream()).
But the difference between these 2 are very small.
.digital_mute() is for Playback
.mute_stream()  is for Playback/Capture

This patch-set adds new .no_capture_mute flag and emulate
.digital_mute() by .mute_stream().

v2 -> v3
- uses "xxx_mute_stream" for .mute_stream naming
  if it was better
- removed verbose Cc email address

v1 -> v2
- return -ENOTSUPP at hdmi-codec
- add new .no_capture_mute flag and emulate .digital_mute()
  by .mute_stream()

Link: https://lore.kernel.org/r/874kqy2y5t.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87ftam37ko.wl-kuninori.morimoto.gx@renesas.com
Kuninori Morimoto (21):
  ASoC: hdmi-codec: return -ENOTSUPP for digital_mute
  ASoC: soc-dai.c: add .no_capture_mute support
  ASoC: hdmi-codec: merge .digital_mute() into .mute_stream()
  ASoC: ti: merge .digital_mute() into .mute_stream()
  ASoC: spear: merge .digital_mute() into .mute_stream()
  ASoC: meson: merge .digital_mute() into .mute_stream()
  ASoC: atmel: merge .digital_mute() into .mute_stream()
  ASoC: codecs: merge .digital_mute() into .mute_stream()
  ASoC: codecs: tlv*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: tas*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: ssm*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: pcm*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: max*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: alc*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: wm*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: es*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: da*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: cs*: merge .digital_mute() into .mute_stream()
  ASoC: codecs: ak*: merge .digital_mute() into .mute_stream()
  ASoC: soc-dai: remove .digital_mute
  ASoC: soc-core: snd_soc_dai_digital_mute() for both CPU/Codec

 drivers/gpu/drm/bridge/sii902x.c       |  7 ++++---
 drivers/gpu/drm/exynos/exynos_hdmi.c   |  6 ++++--
 drivers/gpu/drm/i2c/tda998x_drv.c      |  7 ++++---
 drivers/gpu/drm/mediatek/mtk_hdmi.c    |  6 ++++--
 drivers/gpu/drm/rockchip/cdn-dp-core.c |  7 ++++---
 drivers/gpu/drm/sti/sti_hdmi.c         |  6 ++++--
 drivers/gpu/drm/zte/zx_hdmi.c          |  7 ++++---
 include/sound/hdmi-codec.h             |  6 +++++-
 include/sound/soc-dai.h                |  4 +++-
 sound/soc/atmel/atmel-classd.c         |  7 ++++---
 sound/soc/codecs/88pm860x-codec.c      |  8 +++++---
 sound/soc/codecs/ad193x.c              |  5 +++--
 sound/soc/codecs/adau1701.c            |  5 +++--
 sound/soc/codecs/ak4458.c              |  5 +++--
 sound/soc/codecs/ak4535.c              |  6 ++++--
 sound/soc/codecs/ak4641.c              |  8 +++++---
 sound/soc/codecs/alc5623.c             |  5 +++--
 sound/soc/codecs/alc5632.c             |  5 +++--
 sound/soc/codecs/cpcap.c               | 11 +++++++----
 sound/soc/codecs/cq93vc.c              |  5 +++--
 sound/soc/codecs/cs4265.c              |  5 +++--
 sound/soc/codecs/cs4270.c              |  5 +++--
 sound/soc/codecs/cs42l42.c             |  5 +++--
 sound/soc/codecs/cs42l51.c             |  5 +++--
 sound/soc/codecs/cs42l52.c             |  5 +++--
 sound/soc/codecs/cs42l56.c             |  5 +++--
 sound/soc/codecs/cs42xx8.c             |  5 +++--
 sound/soc/codecs/cs4341.c              |  5 +++--
 sound/soc/codecs/cs4349.c              |  5 +++--
 sound/soc/codecs/da7210.c              |  5 +++--
 sound/soc/codecs/da7213.c              |  5 +++--
 sound/soc/codecs/da9055.c              |  5 +++--
 sound/soc/codecs/es8316.c              |  5 +++--
 sound/soc/codecs/es8328.c              |  5 +++--
 sound/soc/codecs/hdmi-codec.c          | 25 +++++++++++++++++--------
 sound/soc/codecs/isabelle.c            | 15 +++++++++------
 sound/soc/codecs/jz4770.c              |  5 +++--
 sound/soc/codecs/lm49453.c             | 25 +++++++++++++++----------
 sound/soc/codecs/max98088.c            | 12 ++++++++----
 sound/soc/codecs/max98090.c            |  6 ++++--
 sound/soc/codecs/max9867.c             |  5 +++--
 sound/soc/codecs/ml26124.c             |  5 +++--
 sound/soc/codecs/nau8822.c             |  5 +++--
 sound/soc/codecs/pcm1681.c             |  5 +++--
 sound/soc/codecs/pcm1789.c             |  5 +++--
 sound/soc/codecs/pcm179x.c             |  5 +++--
 sound/soc/codecs/pcm3168a.c            |  5 +++--
 sound/soc/codecs/pcm512x.c             |  5 +++--
 sound/soc/codecs/rk3328_codec.c        |  5 +++--
 sound/soc/codecs/sgtl5000.c            |  5 +++--
 sound/soc/codecs/ssm2518.c             |  5 +++--
 sound/soc/codecs/ssm2602.c             |  5 +++--
 sound/soc/codecs/ssm4567.c             |  5 +++--
 sound/soc/codecs/sta529.c              |  5 +++--
 sound/soc/codecs/tas2552.c             |  5 +++--
 sound/soc/codecs/tas2562.c             |  5 +++--
 sound/soc/codecs/tas2770.c             |  5 +++--
 sound/soc/codecs/tas571x.c             |  5 +++--
 sound/soc/codecs/tas5720.c             |  5 +++--
 sound/soc/codecs/tas6424.c             |  5 +++--
 sound/soc/codecs/tfa9879.c             |  5 +++--
 sound/soc/codecs/tlv320aic23.c         |  5 +++--
 sound/soc/codecs/tlv320aic26.c         |  5 +++--
 sound/soc/codecs/tlv320aic31xx.c       |  6 ++++--
 sound/soc/codecs/tlv320aic32x4.c       |  5 +++--
 sound/soc/codecs/tlv320aic3x.c         |  5 +++--
 sound/soc/codecs/twl6040.c             |  5 +++--
 sound/soc/codecs/uda134x.c             |  5 +++--
 sound/soc/codecs/wm8350.c              |  5 +++--
 sound/soc/codecs/wm8400.c              |  5 +++--
 sound/soc/codecs/wm8510.c              |  5 +++--
 sound/soc/codecs/wm8580.c              |  5 +++--
 sound/soc/codecs/wm8711.c              |  5 +++--
 sound/soc/codecs/wm8728.c              |  5 +++--
 sound/soc/codecs/wm8731.c              |  5 +++--
 sound/soc/codecs/wm8741.c              |  5 +++--
 sound/soc/codecs/wm8750.c              |  5 +++--
 sound/soc/codecs/wm8753.c              |  8 +++++---
 sound/soc/codecs/wm8770.c              |  5 +++--
 sound/soc/codecs/wm8776.c              |  5 +++--
 sound/soc/codecs/wm8900.c              |  5 +++--
 sound/soc/codecs/wm8903.c              |  5 +++--
 sound/soc/codecs/wm8904.c              |  5 +++--
 sound/soc/codecs/wm8940.c              |  5 +++--
 sound/soc/codecs/wm8955.c              |  5 +++--
 sound/soc/codecs/wm8960.c              |  5 +++--
 sound/soc/codecs/wm8961.c              |  5 +++--
 sound/soc/codecs/wm8962.c              |  5 +++--
 sound/soc/codecs/wm8971.c              |  5 +++--
 sound/soc/codecs/wm8974.c              |  5 +++--
 sound/soc/codecs/wm8978.c              |  5 +++--
 sound/soc/codecs/wm8983.c              |  7 ++++---
 sound/soc/codecs/wm8985.c              |  7 ++++---
 sound/soc/codecs/wm8988.c              |  5 +++--
 sound/soc/codecs/wm8990.c              |  5 +++--
 sound/soc/codecs/wm8991.c              |  7 ++++---
 sound/soc/codecs/wm8993.c              |  5 +++--
 sound/soc/codecs/wm8994.c              |  9 ++++++---
 sound/soc/codecs/wm8995.c              |  8 +++++---
 sound/soc/codecs/wm9081.c              |  5 +++--
 sound/soc/meson/axg-spdifout.c         |  5 +++--
 sound/soc/soc-core.c                   |  4 ++--
 sound/soc/soc-dai.c                    | 12 +++++++-----
 sound/soc/spear/spdif_out.c            |  8 +++++---
 sound/soc/ti/ams-delta.c               |  9 +++++----
 105 files changed, 390 insertions(+), 249 deletions(-)

--
2.25.1

4 years agoASoC: dt-bindings: renesas, fsi: use patternProperties for FSI-A/B
Kuninori Morimoto [Thu, 16 Jul 2020 00:29:10 +0000 (09:29 +0900)]
ASoC: dt-bindings: renesas, fsi: use patternProperties for FSI-A/B

FSI has FSI-A and FSI-B, and has fsia-xxx/fsib-xxx properties.
This patch uses patternProperties, and reduce verbose settings.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/87o8osxlow.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87pn9v39eo.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87zh802tif.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: dt-bindings: ak4613: switch to yaml base Documentation
Kuninori Morimoto [Thu, 16 Jul 2020 00:31:01 +0000 (09:31 +0900)]
ASoC: dt-bindings: ak4613: switch to yaml base Documentation

This patch switches from .txt base to .yaml base Document.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/87mu4cxlo2.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87o8pf3923.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87y2nk2tfd.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: dt-bindings: ak4642: switch to yaml base Documentation
Kuninori Morimoto [Thu, 16 Jul 2020 00:31:57 +0000 (09:31 +0900)]
ASoC: dt-bindings: ak4642: switch to yaml base Documentation

This patch switches from .txt base to .yaml base Document.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/87lfjwxlna.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87mu4z3904.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87wo342tds.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: soc-component: Add missed return for calling soc_component_ret
Shengjiu Wang [Thu, 16 Jul 2020 05:07:08 +0000 (13:07 +0800)]
ASoC: soc-component: Add missed return for calling soc_component_ret

Add missed return for calling soc_component_ret, otherwise the return
value is wrong.

Fixes: e2329eeba45f ("ASoC: soc-component: add soc_component_err()")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1594876028-1845-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: fsl: fsl-asoc-card: Trivial: Fix misspelling of 'exists'
Lee Jones [Wed, 15 Jul 2020 15:00:09 +0000 (16:00 +0100)]
ASoC: fsl: fsl-asoc-card: Trivial: Fix misspelling of 'exists'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Cc: Timur Tabi <timur@kernel.org>
Cc: Nicolin Chen <nicoleotsuka@gmail.com>
Cc: Xiubo Li <Xiubo.Lee@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20200715150009.407442-1-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: fsl-asoc-card: Support Headphone and Microphone Jack detection
Shengjiu Wang [Wed, 15 Jul 2020 14:09:39 +0000 (22:09 +0800)]
ASoC: fsl-asoc-card: Support Headphone and Microphone Jack detection

Use asoc_simple_init_jack function from simple card to implement
the Headphone and Microphone detection.
Register notifier to disable Speaker when Headphone is plugged in
and enable Speaker when Headphone is unplugged.
Register notifier to disable Digital Microphone when Analog Microphone
is plugged in and enable DMIC when Analog Microphone is unplugged.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1594822179-1849-4-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: bindings: fsl-asoc-card: Support hp-det-gpio and mic-det-gpio
Shengjiu Wang [Wed, 15 Jul 2020 14:09:38 +0000 (22:09 +0800)]
ASoC: bindings: fsl-asoc-card: Support hp-det-gpio and mic-det-gpio

Add headphone and microphone detection GPIO support.
These properties are optional.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1594822179-1849-3-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: simple-card-utils: Support configure pin_name for asoc_simple_init_jack
Shengjiu Wang [Wed, 15 Jul 2020 14:09:37 +0000 (22:09 +0800)]
ASoC: simple-card-utils: Support configure pin_name for asoc_simple_init_jack

Currently the pin_name is fixed in asoc_simple_init_jack, but some driver
may use a different pin_name. So add a new parameter in
asoc_simple_init_jack for configuring pin_name.

If this parameter is NULL, then the default pin_name is used.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1594822179-1849-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: codecs: ak*: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:57:10 +0000 (10:57 +0900)]
ASoC: codecs: ak*: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/87pn95wiwa.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: codecs: cs*: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:57:06 +0000 (10:57 +0900)]
ASoC: codecs: cs*: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/87r1tlwiwe.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: codecs: da*: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:57:02 +0000 (10:57 +0900)]
ASoC: codecs: da*: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Link: https://lore.kernel.org/r/87sge1wiwi.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: codecs: es*: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:56:57 +0000 (10:56 +0900)]
ASoC: codecs: es*: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/87tuyhwiwm.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: codecs: wm*: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:56:53 +0000 (10:56 +0900)]
ASoC: codecs: wm*: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/87v9ixwiwr.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: codecs: alc*: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:56:48 +0000 (10:56 +0900)]
ASoC: codecs: alc*: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/87wo3dwiwv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: codecs: max*: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:56:44 +0000 (10:56 +0900)]
ASoC: codecs: max*: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/87y2ntwix0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: codecs: pcm*: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:56:39 +0000 (10:56 +0900)]
ASoC: codecs: pcm*: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/87zh89wix5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: codecs: ssm*: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:56:35 +0000 (10:56 +0900)]
ASoC: codecs: ssm*: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/871rllxxhp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: codecs: tas*: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:56:30 +0000 (10:56 +0900)]
ASoC: codecs: tas*: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/873661xxhu.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: codecs: tlv*: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:56:25 +0000 (10:56 +0900)]
ASoC: codecs: tlv*: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/874kqhxxhz.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: codecs: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:56:20 +0000 (10:56 +0900)]
ASoC: codecs: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/875zaxxxi4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: meson: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:56:10 +0000 (10:56 +0900)]
ASoC: meson: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/878sftxxie.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: spear: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:56:05 +0000 (10:56 +0900)]
ASoC: spear: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/87a709xxij.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: ti: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:55:59 +0000 (10:55 +0900)]
ASoC: ti: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/87blkpxxip.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: hdmi-codec: merge .digital_mute() into .mute_stream()
Kuninori Morimoto [Thu, 9 Jul 2020 01:55:45 +0000 (10:55 +0900)]
ASoC: hdmi-codec: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

For hdmi-codec, we need to update struct hdmi_codec_ops,
and all its users in the same time.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/87d055xxj2.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: soc-dai.c: add .no_capture_mute support
Kuninori Morimoto [Thu, 9 Jul 2020 01:55:41 +0000 (10:55 +0900)]
ASoC: soc-dai.c: add .no_capture_mute support

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling "direction".
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
 dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

To prepare merging mute_stream()/digital_mute(),
this patch adds .no_capture_mute support to emulate .digital_mute().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87eeplxxj7.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: hdmi-codec: return -ENOTSUPP for digital_mute
Kuninori Morimoto [Thu, 9 Jul 2020 01:55:36 +0000 (10:55 +0900)]
ASoC: hdmi-codec: return -ENOTSUPP for digital_mute

snd_soc_dai_digital_mute() will return -ENOTSUPP if driver doesn't
support mute.
In hdmi-codec case, hdmi_codec_digital_mute() will be used for it,
and each driver has .digital_mute() callback.
hdmi_codec_digital_mute() want to return -ENOTSUPP to follow it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87fta1xxjc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoALSA: hda: fix snd_hda_codec_cleanup() documentation
Kai Vehmanen [Wed, 15 Jul 2020 17:45:51 +0000 (20:45 +0300)]
ALSA: hda: fix snd_hda_codec_cleanup() documentation

Fix a copy and paste error in snd_hda_codec_cleanup()
documentation.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200715174551.3730165-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoALSA: hda: export snd_hda_codec_cleanup_for_unbind()
Kai Vehmanen [Wed, 15 Jul 2020 17:45:50 +0000 (20:45 +0300)]
ALSA: hda: export snd_hda_codec_cleanup_for_unbind()

To avoid duplicated code for cleanup, and match the already exported
snd_hda_codec_pcm_new(), also export snd_hda_codec_cleanup_for_unbind().

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200715174551.3730165-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: rt5682: Report the button event in the headset type only
Oder Chiou [Thu, 16 Jul 2020 03:01:23 +0000 (11:01 +0800)]
ASoC: rt5682: Report the button event in the headset type only

The irq work will be manipulated by resume function, and it will report
the wrong jack type while the jack type is headphone in the button event.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Link: https://lore.kernel.org/r/20200716030123.27122-1-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: Intel: bytcht_es8316: Add missed put_device()
Jing Xiangfeng [Tue, 14 Jul 2020 08:09:18 +0000 (16:09 +0800)]
ASoC: Intel: bytcht_es8316: Add missed put_device()

snd_byt_cht_es8316_mc_probe() misses to call put_device() in an error
path. Add the missed function call to fix it.

Fixes: ba49cf6f8e4a ("ASoC: Intel: bytcht_es8316: Add quirk for inverted jack detect")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200714080918.148196-1-jingxiangfeng@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge series "ASoC: sh: remove discriminatory terms" from Kuninori Morimoto <kuninori...
Mark Brown [Tue, 14 Jul 2020 15:55:17 +0000 (16:55 +0100)]
Merge series "ASoC: sh: remove discriminatory terms" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Renesas SH drivers are using discriminatory terms.
This patch-set removes or changes it as much as possible.
But, because DMA related API function name, it still exists.
I hope all these are removed someday.

v1 -> v2
- use "secondary" instead of "follower"
- care siu/ssi drivers
- tidyup git-log

Link: https://lore.kernel.org/r/87r1tg3swv.wl-kuninori.morimoto.gx@renesas.com
Kuninori Morimoto (5):
  ASoC: rsnd: don't use discriminatory terms for function names
  ASoC: rsnd: don't use discriminatory terms for comment
  ASoC: fsi: don't use discriminatory terms for comment
  ASoC: siu: don't use discriminatory terms for parameter
  ASoC: ssi: don't use discriminatory terms for debug log

 sound/soc/sh/fsi.c       |  4 ++--
 sound/soc/sh/rcar/core.c |  4 ++--
 sound/soc/sh/rcar/rsnd.h |  2 +-
 sound/soc/sh/rcar/ssi.c  | 28 ++++++++++++++--------------
 sound/soc/sh/rcar/ssiu.c |  6 +++---
 sound/soc/sh/siu_pcm.c   |  6 +++---
 sound/soc/sh/ssi.c       |  2 +-
 7 files changed, 26 insertions(+), 26 deletions(-)

--
2.25.1

4 years agoASoC: Convert UniPhier AIO audio system to json-schema
Masahiro Yamada [Tue, 23 Jun 2020 11:39:15 +0000 (20:39 +0900)]
ASoC: Convert UniPhier AIO audio system to json-schema

Convert the UniPhier AIO audio system binding to DT schema format.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200623113915.791386-1-yamada.masahiro@socionext.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: Convert UniPhier EVEA codec to json-schema
Masahiro Yamada [Tue, 23 Jun 2020 11:40:05 +0000 (20:40 +0900)]
ASoC: Convert UniPhier EVEA codec to json-schema

Convert the UniPhier EVEA sound codec binding to DT schema format.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200623114005.791643-1-yamada.masahiro@socionext.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: convert rk3328 codec binding to yaml
Katsuhiro Suzuki [Tue, 14 Jul 2020 07:32:47 +0000 (16:32 +0900)]
ASoC: convert rk3328 codec binding to yaml

This patch converts Rockchip rk3328 audio codec binding to DT schema.
And adds description about "mclk" clock and fixes some errors in
original example.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200714073247.172859-1-katsuhiro@katsuster.net
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: ssi: don't use discriminatory terms for debug log
Kuninori Morimoto [Tue, 14 Jul 2020 00:07:09 +0000 (09:07 +0900)]
ASoC: ssi: don't use discriminatory terms for debug log

ssi is using discriminatory terms for debug log.
This patch changes it to "secondary"

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87blkj3qq9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: siu: don't use discriminatory terms for parameter
Kuninori Morimoto [Tue, 14 Jul 2020 00:07:01 +0000 (09:07 +0900)]
ASoC: siu: don't use discriminatory terms for parameter

siu is using discriminatory terms for function parameter.
This patch changes it to "secondary"

One note here is that it do nothing to DMA related naming
for now, because it needs framework level modification.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87d04z3qqg.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: fsi: don't use discriminatory terms for comment
Kuninori Morimoto [Tue, 14 Jul 2020 00:06:50 +0000 (09:06 +0900)]
ASoC: fsi: don't use discriminatory terms for comment

fsi is using discriminatory terms for comment.
This patch removes it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87eepf3qqs.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>