linux-2.6-microblaze.git
3 years agoMerge series "ASoC: Intel: machine driver updates for 5.9" from Pierre-Louis Bossart...
Mark Brown [Fri, 26 Jun 2020 13:43:48 +0000 (14:43 +0100)]
Merge series "ASoC: Intel: machine driver updates for 5.9" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

This patchset adds:

a) fixes for missing .owner = THIS_MODULE initializations for
snd_soc_card structures

b) extensions for TigerLake and JasperLake reusing the same machine
drivers.

c) Max98373 support for SoundWire machine driver.

d) cleanups (use-after-free, quirks, etc).

Bard Liao (1):
  ASoC: intel: cml_rt1011_rt5682: use for_each_card_prelinks

Dharageswari R (3):
  ASoC: Intel: Boards: tgl_max98373: add dai_trigger function
  ASoC: Intel: Boards: tgl_max98373: Fix the comment for
    max_98373_components
  ASoC: Intel: Boards: tgl_max98373: Update TDM configuration in
    hw_params

Fred Oh (3):
  ASoC: Intel: Boards: cml_rt1011_rt5682: reduce log level for printing
    quirk
  ASoC: Intel: Boards: cml_rt1011_rt5682: use statically define codec
    config
  ASoc: Intel: cml_rt1011_rt5682: explicitly access first codec

Naveen Manohar (2):
  ASoC: Intel: sof_sdw: Add MAX98373 support
  ASoC: Intel: common: add match table for TGL MAX98373 + RT5682
    SoundWire driver

Pierre-Louis Bossart (6):
  ASoC: SOF: nocodec: add missing .owner field
  ASoC: Intel: cml_rt1011_rt5682: add missing .owner field
  ASoC: Intel: sof_sdw: add missing .owner field
  ASoC: Intel: bxt_rt298: add missing .owner field
  ASoC: Intel: sof_sdw: add quirk override with kernel parameter
  ASoC: Intel: boards: byt*.c: remove cast in dev_info quirk log

Yong Zhi (1):
  ASoC: intel: sof_rt5682: Add support for jsl-max98360a-rt5682

randerwang (1):
  ASoC: Intel: sdw_max98373: add card_late_probe support

 sound/soc/intel/boards/Kconfig                |  3 +-
 sound/soc/intel/boards/Makefile               |  2 +
 sound/soc/intel/boards/bxt_rt298.c            |  2 +
 sound/soc/intel/boards/bytcht_es8316.c        |  5 +-
 sound/soc/intel/boards/bytcr_rt5640.c         |  4 +-
 sound/soc/intel/boards/bytcr_rt5651.c         |  4 +-
 sound/soc/intel/boards/cml_rt1011_rt5682.c    | 90 ++++++-------------
 sound/soc/intel/boards/sof_maxim_common.c     | 55 ++++++++++--
 sound/soc/intel/boards/sof_maxim_common.h     |  3 +
 sound/soc/intel/boards/sof_rt5682.c           | 32 +++++++
 sound/soc/intel/boards/sof_sdw.c              | 72 ++++++++++++++-
 sound/soc/intel/boards/sof_sdw_common.h       | 15 ++++
 sound/soc/intel/boards/sof_sdw_max98373.c     | 86 ++++++++++++++++++
 .../intel/common/soc-acpi-intel-jsl-match.c   | 13 +++
 .../intel/common/soc-acpi-intel-tgl-match.c   | 25 ++++++
 sound/soc/sof/nocodec.c                       |  1 +
 16 files changed, 332 insertions(+), 80 deletions(-)
 create mode 100644 sound/soc/intel/boards/sof_sdw_max98373.c

base-commit: 6f81e520b2906258a063f09b8d1dd9d0cc6a3172
--
2.20.1

3 years agosnd/soc: correct trivial kernel-doc inconsistency
Colton Lewis [Fri, 26 Jun 2020 05:40:24 +0000 (05:40 +0000)]
snd/soc: correct trivial kernel-doc inconsistency

Silence documentation build warning by correcting kernel-doc comment
for snd_soc_runtime_action.

./sound/soc/soc-pcm.c:220: warning: Function parameter or member 'action' not described in 'snd_soc_runtime_action'

Signed-off-by: Colton Lewis <colton.w.lewis@protonmail.com>
Link: https://lore.kernel.org/r/20200626053953.68797-1-colton.w.lewis@protonmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: Boards: tgl_max98373: Update TDM configuration in hw_params
Dharageswari R [Thu, 25 Jun 2020 19:13:04 +0000 (14:13 -0500)]
ASoC: Intel: Boards: tgl_max98373: Update TDM configuration in hw_params

This patch updates tx_mask, so that (0-3)slots are reserved for
Maxim amps to feedback data.

V0->slot0,
I0->slot1,
V1->slot2,
I1->slot3.

also update slot_width in tdm configuration to 24 as the BE
configuration is 24 in topology.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: intel: cml_rt1011_rt5682: use for_each_card_prelinks
Bard Liao [Thu, 25 Jun 2020 19:13:03 +0000 (14:13 -0500)]
ASoC: intel: cml_rt1011_rt5682: use for_each_card_prelinks

for_each_card_prelinks() is a common API to walk through each prelink
in the card.

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: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: Boards: cml_rt1011_rt5682: use statically define codec config
Fred Oh [Thu, 25 Jun 2020 19:13:02 +0000 (14:13 -0500)]
ASoC: Intel: Boards: cml_rt1011_rt5682: use statically define codec config

When the cml_rt1011_rt5682_dailink[].codecs pointer is overridden by
a quirk with a devm allocated structure and the probe is deferred,
in the next probe we will see an use-after-free condition
(verified with KASAN). This can be avoided by using statically allocated
configurations - which simplifies the code quite a bit as well.

KASAN issue fixed.
[   23.301373] cml_rt1011_rt5682 cml_rt1011_rt5682: sof_rt1011_quirk = f
[   23.301875] ==================================================================
[   23.302018] BUG: KASAN: use-after-free in snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682]
[   23.302178] Read of size 8 at addr ffff8881ec6acae0 by task kworker/0:2/105
[   23.302320] CPU: 0 PID: 105 Comm: kworker/0:2 Not tainted 5.7.0-rc7-test+ #3
[   23.302322] Hardware name: Google Helios/Helios, BIOS  01/21/2020
[   23.302329] Workqueue: events deferred_probe_work_func
[   23.302331] Call Trace:
[   23.302339]  dump_stack+0x76/0xa0
[   23.302345]  print_address_description.constprop.0.cold+0xd3/0x43e
[   23.302351]  ? _raw_spin_lock_irqsave+0x7b/0xd0
[   23.302355]  ? _raw_spin_trylock_bh+0xf0/0xf0
[   23.302362]  ? snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682]
[   23.302365]  __kasan_report.cold+0x37/0x86
[   23.302371]  ? snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682]
[   23.302375]  kasan_report+0x38/0x50
[   23.302382]  snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682]
[   23.302389]  platform_drv_probe+0x66/0xc0

Fixes: 629ba12e9998 ("ASoC: Intel: boards: split woofer and tweeter support")
Suggested-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: Boards: cml_rt1011_rt5682: reduce log level for printing quirk
Fred Oh [Thu, 25 Jun 2020 19:13:01 +0000 (14:13 -0500)]
ASoC: Intel: Boards: cml_rt1011_rt5682: reduce log level for printing quirk

Change dev_info to dev_dbg to reduce noise during multiple deferred
probes.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: intel: sof_rt5682: Add support for jsl-max98360a-rt5682
Yong Zhi [Thu, 25 Jun 2020 19:13:00 +0000 (14:13 -0500)]
ASoC: intel: sof_rt5682: Add support for jsl-max98360a-rt5682

Add support for max98360a speaker amp on SSP1 and ALC5682 on SSP0
for jsl+ platform.

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/20200625191308.3322-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: Boards: tgl_max98373: Fix the comment for max_98373_components
Dharageswari R [Thu, 25 Jun 2020 19:12:59 +0000 (14:12 -0500)]
ASoC: Intel: Boards: tgl_max98373: Fix the comment for max_98373_components

MAX_98373_DEV0_NAME is the Right speaker and MAX_98373_DEV1_NAME is the
Left speaker, hence updating the comments for max98373 dailink components
accordingly.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-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>
Link: https://lore.kernel.org/r/20200625191308.3322-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: Boards: tgl_max98373: add dai_trigger function
Dharageswari R [Thu, 25 Jun 2020 19:12:58 +0000 (14:12 -0500)]
ASoC: Intel: Boards: tgl_max98373: add dai_trigger function

Speaker amplifier feedback is not modeled as being dependent on any
active output. Even when there is no playback happening, parts of the
graph, specifically the IV sense->speaker protection->output remains
active and this prevents the DSP from entering low-power states.

This patch suggests a machine driver level approach where the speaker
pins are enabled/disabled dynamically depending on stream start/stop
events. DPAM graph representations show the feedback loop is indeed
disabled and low-power states can be reached.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-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>
Link: https://lore.kernel.org/r/20200625191308.3322-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: boards: byt*.c: remove cast in dev_info quirk log
Pierre-Louis Bossart [Thu, 25 Jun 2020 19:12:57 +0000 (14:12 -0500)]
ASoC: Intel: boards: byt*.c: remove cast in dev_info quirk log

We don't need an explicit cast, using the right format is simple
enough.

Suggested-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_sdw: add quirk override with kernel parameter
Pierre-Louis Bossart [Thu, 25 Jun 2020 19:12:56 +0000 (14:12 -0500)]
ASoC: Intel: sof_sdw: add quirk override with kernel parameter

During the bring-up of new platforms, or to take care of specific
hardware reworks, it's useful to add a kernel parameter to override
the default DMI-based quirks.

For example, adding the following line in a .conf file in
/etc/modprobe.d/ will change the default quirk and log the changes if
dynamic debug is enabled.

options snd_soc_sof_sdw quirk=0x802

[  735.025785] sof_sdw sof_sdw: Overriding quirk 0x10 => 0x802
[  735.025787] sof_sdw sof_sdw: quirk realtek,jack-detect-source 2
[  735.025790] sof_sdw sof_sdw: quirk SOF_RT715_DAI_ID_FIX enabled

Tested on ICL RVP with add-on board instead of default codec.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: bxt_rt298: add missing .owner field
Pierre-Louis Bossart [Thu, 25 Jun 2020 19:12:55 +0000 (14:12 -0500)]
ASoC: Intel: bxt_rt298: add missing .owner field

This field is required for ASoC cards. Not setting it will result in a
module->name pointer being NULL and generate problems such as

cat /proc/asound/modules
 0 (efault)

Fixes: 76016322ec56 ('ASoC: Intel: Add Broxton-P machine driver')
Reported-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Takashi Iwai <tiwai@suse.de>
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/20200625191308.3322-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_sdw: add missing .owner field
Pierre-Louis Bossart [Thu, 25 Jun 2020 19:12:54 +0000 (14:12 -0500)]
ASoC: Intel: sof_sdw: add missing .owner field

This field is required for ASoC cards. Not setting it will result in a
module->name pointer being NULL and generate problems such as

cat /proc/asound/modules
 0 (efault)

Fixes: 52db12d193d4 ('ASoC: Intel: boards: add sof_sdw machine driver')
Reported-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Takashi Iwai <tiwai@suse.de>
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/20200625191308.3322-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: cml_rt1011_rt5682: add missing .owner field
Pierre-Louis Bossart [Thu, 25 Jun 2020 19:12:53 +0000 (14:12 -0500)]
ASoC: Intel: cml_rt1011_rt5682: add missing .owner field

This field is required for ASoC cards. Not setting it will result in a
module->name pointer being NULL and generate problems such as

cat /proc/asound/modules
 0 (efault)

Fixes: 17fe95d6df93 ('ASoC: Intel: boards: Add CML m/c using RT1011 and RT5682')
Reported-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Takashi Iwai <tiwai@suse.de>
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/20200625191308.3322-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: nocodec: add missing .owner field
Pierre-Louis Bossart [Thu, 25 Jun 2020 19:12:52 +0000 (14:12 -0500)]
ASoC: SOF: nocodec: add missing .owner field

This field is required for ASoC cards. Not setting it will result in a
module->name pointer being NULL and generate problems such as

cat /proc/asound/modules
 0 (efault)

Fixes: 8017b8fd37bf ('ASoC: SOF: Add Nocodec machine driver support')
Reported-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Takashi Iwai <tiwai@suse.de>
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/20200625191308.3322-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rt1015: add missing header inclusion
Tzung-Bi Shih [Thu, 25 Jun 2020 15:35:43 +0000 (23:35 +0800)]
ASoC: rt1015: add missing header inclusion

To fix compilation error:

error: implicit declaration of function 'ACPI_PTR'
[-Werror,-Wimplicit-function-declaration]
                .acpi_match_table = ACPI_PTR(rt1015_acpi_match),
                    ^

Adds the missing header "acpi.h" inclusion and sorts in alphabetical.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200625153543.85039-4-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dapm: declare missing structure prototypes
Tzung-Bi Shih [Thu, 25 Jun 2020 15:35:42 +0000 (23:35 +0800)]
ASoC: dapm: declare missing structure prototypes

To fix compilation warnings:

- struct 'snd_soc_pcm_runtime' declared inside parameter list will not
  be visible outside of this definition or declaration
- struct 'soc_enum' declared inside parameter list will not be visible
  outside of this definition or declaration

Declares the missing structure prototypes.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200625153543.85039-3-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: core: move definition of enum snd_soc_bias_level
Tzung-Bi Shih [Thu, 25 Jun 2020 15:35:41 +0000 (23:35 +0800)]
ASoC: core: move definition of enum snd_soc_bias_level

To fix compilation error:

- error: field 'XXX' has incomplete type

Moves definition of enum snd_soc_bias_level from soc.h to soc-dapm.h.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200625153543.85039-2-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tas2562: Fix shut-down gpio property
Dan Murphy [Wed, 24 Jun 2020 17:49:26 +0000 (12:49 -0500)]
ASoC: tas2562: Fix shut-down gpio property

Fix the shut-down gpio property to be shut-down-gpio and fix the
example.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200624174932.9604-2-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tas2562: Fix format issue for extra space before a comma
Dan Murphy [Wed, 24 Jun 2020 17:49:28 +0000 (12:49 -0500)]
ASoC: tas2562: Fix format issue for extra space before a comma

Fix the issue found that there is an extra space before a comma in the
volume control.

Fixes: bf726b1c86f2c ("ASoC: tas2562: Add support for digital volume control")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200624174932.9604-4-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tas2562: Update shutdown GPIO property
Dan Murphy [Wed, 24 Jun 2020 17:49:27 +0000 (12:49 -0500)]
ASoC: tas2562: Update shutdown GPIO property

Update the shutdown GPIO property to be shutdown from shut-down.

Fixes: c173dba44c2d2 ("ASoC: tas2562: Introduce the TAS2562 amplifier")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200624174932.9604-3-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: bindings: fsl-asoc-card: Add compatible string for wm8524
Shengjiu Wang [Tue, 23 Jun 2020 06:52:47 +0000 (14:52 +0800)]
ASoC: bindings: fsl-asoc-card: Add compatible string for wm8524

In order to support wm8524 codec with fsl-asoc-card machine
driver, add compatible string "fsl,imx-audio-wm8524".

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1592895167-30483-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl-asoc-card: Add WM8524 support
Shengjiu Wang [Tue, 23 Jun 2020 06:52:46 +0000 (14:52 +0800)]
ASoC: fsl-asoc-card: Add WM8524 support

WM8524 only supports playback mode, and only works at
slave mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1592895167-30483-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: add dailink .exit() callback" from Pierre-Louis Bossart <pierre...
Mark Brown [Tue, 23 Jun 2020 11:54:12 +0000 (12:54 +0100)]
Merge series "ASoC: add dailink .exit() callback" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

While looking at reboot issues and module load/unload tests, I found
out some resources allocated in the dailink .init() callback are not
properly released - there is no existing mechanism in the soc-core to
do so.

The addition of a dailink .exit() callback seems to be the simplest
solution overall. It can be argued that the existing machine platform
device .remove() callback can also perform the necessary cleanups,
however as shown in the last two examples this might require a loop to
identify components whereas the dailink .exit() already has all the
necessary information to revert the actions done in the .init() step.

Changes since RFC:
Better commit messages and explanations
rt5682 cases with snd_soc_component_set_jack() called in the .exit()

Fred Oh (2):
  ASoC: intel: sof_rt5682: move disabling jack to dai link's exit()
  ASoC: intel: cml_rt1011_rt5682: disable jack in dailink .exit()

Pierre-Louis Bossart (3):
  ASoC: soc-link: introduce exit() callback
  ASoC: Intel: bdw-rt5677: fix module load/unload issues
  ASoC: Intel: kbl-rt5660: use .exit() dailink callback to release gpiod

 include/sound/soc-link.h                   |  1 +
 include/sound/soc.h                        |  3 +++
 sound/soc/intel/boards/bdw-rt5677.c        | 18 ++++++++++++++--
 sound/soc/intel/boards/cml_rt1011_rt5682.c |  8 ++++++++
 sound/soc/intel/boards/kbl_rt5660.c        | 17 +++++++++++++--
 sound/soc/intel/boards/sof_rt5682.c        | 24 ++++++++--------------
 sound/soc/soc-core.c                       |  3 +++
 sound/soc/soc-link.c                       |  6 ++++++
 8 files changed, 60 insertions(+), 20 deletions(-)

base-commit: 39853b1438bf9b07349c8c44b48f6c2eda6f8840
--
2.20.1

3 years agoASoC: rt1011: fix KASAN out-of-bounds bug in find_next_bit()
Fred Oh [Mon, 22 Jun 2020 15:13:48 +0000 (10:13 -0500)]
ASoC: rt1011: fix KASAN out-of-bounds bug in find_next_bit()

KASAN throws the following warning in rt1011.c:
[ 170.777603] BUG: KASAN: stack-out-of-bounds in _find_next_bit.constprop.0+0x3e/0xf0

find_next_bit() relies on unsigned long pointer arguments, but this driver
uses a type cast that generates the KASAN warning. Replace find_next_bit()
and find_last_bit() with __ffs() and __fls() to pass the value and avoid
casting pointers to make the warning go away.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200622151348.28063-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: mediatek: mt8183-da7219: set playback and capture constraints
Tzung-Bi Shih [Tue, 23 Jun 2020 05:51:30 +0000 (13:51 +0800)]
ASoC: mediatek: mt8183-da7219: set playback and capture constraints

Sets playback and capture constraints to S16_LE, stereo, 48kHz.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200623055130.159718-1-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_easrc: Fix uninitialized scalar variable in fsl_easrc_set_ctx_format
Shengjiu Wang [Mon, 22 Jun 2020 09:03:31 +0000 (17:03 +0800)]
ASoC: fsl_easrc: Fix uninitialized scalar variable in fsl_easrc_set_ctx_format

The "ret" in fsl_easrc_set_ctx_format is not initialized, then
the unknown value maybe returned by this function.

Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1592816611-16297-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: intel: cml_rt1011_rt5682: disable jack in dailink .exit()
Fred Oh [Mon, 22 Jun 2020 15:42:41 +0000 (10:42 -0500)]
ASoC: intel: cml_rt1011_rt5682: disable jack in dailink .exit()

When removing the machine driver, the rt5682 jack handler will oops if jack
detection is not disabled. The jack can be disabled in the dai link's exit().

This is symmetrical change as jack is enabled in init().

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200622154241.29053-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: intel: sof_rt5682: move disabling jack to dai link's exit()
Fred Oh [Mon, 22 Jun 2020 15:42:40 +0000 (10:42 -0500)]
ASoC: intel: sof_rt5682: move disabling jack to dai link's exit()

Move disabling jack from platform driver's remove() to dai link's exit().
This is symmetrical change as jack is enabled in init().

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200622154241.29053-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: kbl-rt5660: use .exit() dailink callback to release gpiod
Pierre-Louis Bossart [Mon, 22 Jun 2020 15:42:39 +0000 (10:42 -0500)]
ASoC: Intel: kbl-rt5660: use .exit() dailink callback to release gpiod

The gpiod handling is inspired from the bdw-rt5677 code. Apply same
fix to avoid reference count issue while removing modules for
consistency.

Suggested-by: Andy Shevchenko <andriy.shevchenko@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: Curtis Malainey <curtis@malainey.com>
Link: https://lore.kernel.org/r/20200622154241.29053-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: bdw-rt5677: fix module load/unload issues
Pierre-Louis Bossart [Mon, 22 Jun 2020 15:42:38 +0000 (10:42 -0500)]
ASoC: Intel: bdw-rt5677: fix module load/unload issues

The mainline code currently prevents modules from being removed.

The BE dailink .init() function calls devm_gpiod_get() using the codec
component device as argument. When the machine driver is removed, the
references to the gpiod are not released, and it's not possible to
remove the codec driver module - which is the only entity which could
free the gpiod.

This conceptual deadlock can be avoided by invoking gpiod_get() in the
.init() callback, and calling gpiod_put() in the exit() callback.

Tested on SAMUS Chromebook with SOF driver.

Suggested-by: Andy Shevchenko <andriy.shevchenko@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: Curtis Malainey <curtis@malainey.com>
Link: https://lore.kernel.org/r/20200622154241.29053-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-link: introduce exit() callback
Pierre-Louis Bossart [Mon, 22 Jun 2020 15:42:37 +0000 (10:42 -0500)]
ASoC: soc-link: introduce exit() callback

Some machine drivers allocate or request resources with
snd_soc_link_init() phase of the card probe. These resources need to
be properly released when removing a card, and this patch suggests a
dual exit() callback.

The exit() is invoked in soc_remove_pcm_runtime(), which is not
completely symmetric with the init() invoked in soc_init_pcm_runtime().

Alternate solutions were considered, e.g. adding a .remove() callback
for the platform driver, but that's not symmetrical at all and would
be difficult to handle if there are more than one dailink implementing
an .init(). We looked also into using .remove_dai_link() callback, but
that would also be imbalanced.

Note that because of the error handling in snd_soc_bind_card(), which
jumps to probe_end, there is no way to guarantee the exit() is invoked
with resources allocated in the init(). Prior to releasing those
resources, implementations of the exit() callback shall check the
resources are valid.

Suggested-by: Andy Shevchenko <andriy.shevchenko@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: Curtis Malainey <curtis@malainey.com>
Link: https://lore.kernel.org/r/20200622154241.29053-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: merge snd_soc_component_read() and snd_soc_component_read32(...
Mark Brown [Mon, 22 Jun 2020 14:36:06 +0000 (15:36 +0100)]
Merge series "ASoC: merge snd_soc_component_read() and snd_soc_component_read32()" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Hi Mark

Because we can use "read" function which is using
"regmap" or "driver", current ALSA SoC drivers are using both
snd_soc_component_read()    // for regmap
snd_soc_component_read32()  // for driver callback
These are similar but needs different parameter.

This patch aggressively merge snd_soc_component_read() and _read32(),
and makes snd_soc_component_read/write() as generally style.

New read doesn't return error if it failed,
thus, it can't keep compatibility,
but assuming it is not a big problem.
Because 1) it will indicate error message,
2) it can do nothing anyway if it fails "read".

[02/16] patch is not directly connected to read function merging,
but need to be apply after [01/16].

Kuninori Morimoto (16):
  ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32()
  ASoC: soc-component: use io_mutex correctly
  ASoC: pxa: rename to snd_soc_component_read()
  ASoC: atmel: rename to snd_soc_component_read()
  ASoC: codecs: rename to snd_soc_component_read()
  ASoC: codecs: wcd*: rename to snd_soc_component_read()
  ASoC: codecs: tlv*: rename to snd_soc_component_read()
  ASoC: codecs: max*: rename to snd_soc_component_read()
  ASoC: codecs: msm*: rename to snd_soc_component_read()
  ASoC: codecs: alc*: rename to snd_soc_component_read()
  ASoC: codecs: wm*: rename to snd_soc_component_read()
  ASoC: codecs: rt*: rename to snd_soc_component_read()
  ASoC: codecs: da*: rename to snd_soc_component_read()
  ASoC: codecs: cs*: rename to snd_soc_component_read()
  ASoC: codecs: ak*: rename to snd_soc_component_read()
  ASoC: remove snd_soc_component_read32()

 include/sound/soc-component.h          |  4 +-
 sound/soc/atmel/atmel-pdmic.c          |  4 +-
 sound/soc/codecs/88pm860x-codec.c      | 14 ++---
 sound/soc/codecs/ab8500-codec.c        |  8 +--
 sound/soc/codecs/ad1980.c              |  4 +-
 sound/soc/codecs/ak4458.c              |  2 +-
 sound/soc/codecs/ak4535.c              |  4 +-
 sound/soc/codecs/ak4613.c              |  4 +-
 sound/soc/codecs/ak4671.c              |  8 +--
 sound/soc/codecs/alc5623.c             |  6 +-
 sound/soc/codecs/alc5632.c             |  6 +-
 sound/soc/codecs/arizona.c             | 18 +++---
 sound/soc/codecs/cs4270.c              | 10 +--
 sound/soc/codecs/cs42l42.c             |  2 +-
 sound/soc/codecs/cs42l51.c             |  8 +--
 sound/soc/codecs/cs42l73.c             |  4 +-
 sound/soc/codecs/cs47l35.c             | 10 +--
 sound/soc/codecs/cs47l85.c             | 10 +--
 sound/soc/codecs/da7210.c              | 24 ++++----
 sound/soc/codecs/da7213.c              | 24 ++++----
 sound/soc/codecs/da7218.c              | 34 +++++------
 sound/soc/codecs/da7219-aad.c          | 16 ++---
 sound/soc/codecs/da7219.c              | 20 +++---
 sound/soc/codecs/da732x.c              | 18 +++---
 sound/soc/codecs/da9055.c              | 14 ++---
 sound/soc/codecs/inno_rk3036.c         |  6 +-
 sound/soc/codecs/madera.c              | 49 +++------------
 sound/soc/codecs/max98088.c            | 12 ++--
 sound/soc/codecs/max98090.c            | 20 +++---
 sound/soc/codecs/max98095.c            | 16 ++---
 sound/soc/codecs/max9850.c             |  2 +-
 sound/soc/codecs/msm8916-wcd-analog.c  | 14 ++---
 sound/soc/codecs/msm8916-wcd-digital.c | 16 ++---
 sound/soc/codecs/nau8822.c             |  6 +-
 sound/soc/codecs/rt1305.c              |  2 +-
 sound/soc/codecs/rt298.c               |  2 +-
 sound/soc/codecs/rt5616.c              |  2 +-
 sound/soc/codecs/rt5631.c              | 32 +++++-----
 sound/soc/codecs/rt5640.c              | 10 +--
 sound/soc/codecs/rt5645.c              | 16 ++---
 sound/soc/codecs/rt5651.c              |  6 +-
 sound/soc/codecs/rt5659.c              | 14 ++---
 sound/soc/codecs/rt5660.c              |  2 +-
 sound/soc/codecs/rt5663.c              | 34 +++++------
 sound/soc/codecs/rt5665.c              | 16 ++---
 sound/soc/codecs/rt5668.c              | 16 ++---
 sound/soc/codecs/rt5670.c              | 18 +++---
 sound/soc/codecs/rt5682-i2c.c          |  2 +-
 sound/soc/codecs/rt5682.c              | 19 +++---
 sound/soc/codecs/sgtl5000.c            | 16 ++---
 sound/soc/codecs/sta32x.c              |  4 +-
 sound/soc/codecs/tas2552.c             |  4 +-
 sound/soc/codecs/tas5720.c             |  4 +-
 sound/soc/codecs/tda7419.c             |  9 +--
 sound/soc/codecs/tlv320aic23.c         | 14 ++---
 sound/soc/codecs/tlv320aic26.c         |  4 +-
 sound/soc/codecs/tlv320aic32x4.c       | 16 ++---
 sound/soc/codecs/tlv320aic3x.c         | 14 ++---
 sound/soc/codecs/tscs42xx.c            |  4 +-
 sound/soc/codecs/tscs454.c             | 24 ++------
 sound/soc/codecs/wcd-clsh-v2.c         |  2 +-
 sound/soc/codecs/wcd9335.c             | 48 +++++++--------
 sound/soc/codecs/wcd934x.c             | 52 ++++++++--------
 sound/soc/codecs/wm2200.c              |  4 +-
 sound/soc/codecs/wm5100.c              | 18 +++---
 sound/soc/codecs/wm5110.c              |  6 +-
 sound/soc/codecs/wm8350.c              | 32 +++++-----
 sound/soc/codecs/wm8400.c              | 50 +++++++--------
 sound/soc/codecs/wm8510.c              | 28 ++++-----
 sound/soc/codecs/wm8523.c              |  6 +-
 sound/soc/codecs/wm8580.c              | 12 ++--
 sound/soc/codecs/wm8711.c              |  8 +--
 sound/soc/codecs/wm8728.c              | 10 +--
 sound/soc/codecs/wm8731.c              |  6 +-
 sound/soc/codecs/wm8750.c              |  8 +--
 sound/soc/codecs/wm8753.c              | 42 ++++++-------
 sound/soc/codecs/wm8770.c              |  2 +-
 sound/soc/codecs/wm8776.c              |  2 +-
 sound/soc/codecs/wm8804.c              |  2 +-
 sound/soc/codecs/wm8900.c              | 22 +++----
 sound/soc/codecs/wm8903.c              | 20 +++---
 sound/soc/codecs/wm8904.c              | 16 ++---
 sound/soc/codecs/wm8940.c              | 32 +++++-----
 sound/soc/codecs/wm8955.c              |  2 +-
 sound/soc/codecs/wm8958-dsp2.c         | 18 +++---
 sound/soc/codecs/wm8960.c              | 20 +++---
 sound/soc/codecs/wm8961.c              | 58 +++++++++---------
 sound/soc/codecs/wm8962.c              | 31 +++++-----
 sound/soc/codecs/wm8971.c              |  8 +--
 sound/soc/codecs/wm8974.c              | 24 ++++----
 sound/soc/codecs/wm8978.c              | 12 ++--
 sound/soc/codecs/wm8983.c              |  8 +--
 sound/soc/codecs/wm8985.c              |  8 +--
 sound/soc/codecs/wm8988.c              | 12 ++--
 sound/soc/codecs/wm8990.c              | 18 +++---
 sound/soc/codecs/wm8991.c              | 38 ++++++------
 sound/soc/codecs/wm8993.c              | 28 ++++-----
 sound/soc/codecs/wm8994.c              | 60 +++++++++---------
 sound/soc/codecs/wm8995.c              | 16 ++---
 sound/soc/codecs/wm8996.c              | 30 ++++-----
 sound/soc/codecs/wm8998.c              |  8 +--
 sound/soc/codecs/wm9081.c              | 36 +++++------
 sound/soc/codecs/wm9090.c              |  4 +-
 sound/soc/codecs/wm9713.c              |  2 +-
 sound/soc/codecs/wm_hubs.c             | 30 ++++-----
 sound/soc/fsl/fsl_audmix.c             | 10 +--
 sound/soc/fsl/fsl_easrc.c              |  5 +-
 sound/soc/meson/aiu-encoder-i2s.c      |  3 +-
 sound/soc/meson/aiu-fifo-i2s.c         |  3 +-
 sound/soc/meson/aiu-fifo.c             |  3 +-
 sound/soc/pxa/mioa701_wm9713.c         |  8 +--
 sound/soc/soc-ac97.c                   |  7 +--
 sound/soc/soc-component.c              | 84 ++++++++++++++------------
 sound/soc/soc-dapm.c                   | 31 ++++------
 sound/soc/soc-ops.c                    | 43 +++----------
 115 files changed, 854 insertions(+), 963 deletions(-)

--
2.25.1

3 years agoASoC: wm_adsp: Add controls for calibration and diagnostic FW
Vlad Karpovich [Fri, 19 Jun 2020 21:26:51 +0000 (16:26 -0500)]
ASoC: wm_adsp: Add controls for calibration and diagnostic FW

Exposed additional mixer controls to select calibration or diagnostic
firmware.

'Calibration' --> chip-dsp<id>-spk-cali.wmfw (.bin)
'Diagnostic'  --> chip-dsp<id>-spk-diag.wmfw (.bin)

Signed-off-by: Vlad Karpovich <Vlad.Karpovich@cirrus.com>
Signed-off-by: David Rhodes <david.rhodes@cirrus.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200619212651.2739-1-david.rhodes@cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: remove snd_soc_component_read32()
Kuninori Morimoto [Tue, 16 Jun 2020 05:21:55 +0000 (14:21 +0900)]
ASoC: remove snd_soc_component_read32()

No driver is using snd_soc_component_read32() anymore.
This patch removes it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/877dw74mbv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: ak*: rename to snd_soc_component_read()
Kuninori Morimoto [Tue, 16 Jun 2020 05:21:50 +0000 (14:21 +0900)]
ASoC: codecs: ak*: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878sgn4mc0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: cs*: rename to snd_soc_component_read()
Kuninori Morimoto [Tue, 16 Jun 2020 05:21:46 +0000 (14:21 +0900)]
ASoC: codecs: cs*: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a7134mc4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: da*: rename to snd_soc_component_read()
Kuninori Morimoto [Tue, 16 Jun 2020 05:21:42 +0000 (14:21 +0900)]
ASoC: codecs: da*: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Link: https://lore.kernel.org/r/87bllj4mc8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: rt*: rename to snd_soc_component_read()
Kuninori Morimoto [Tue, 16 Jun 2020 05:21:37 +0000 (14:21 +0900)]
ASoC: codecs: rt*: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87d05z4mce.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: wm*: rename to snd_soc_component_read()
Kuninori Morimoto [Tue, 16 Jun 2020 05:21:29 +0000 (14:21 +0900)]
ASoC: codecs: wm*: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87eeqf4mcl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: alc*: rename to snd_soc_component_read()
Kuninori Morimoto [Tue, 16 Jun 2020 05:21:05 +0000 (14:21 +0900)]
ASoC: codecs: alc*: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ftav4md9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: msm*: rename to snd_soc_component_read()
Kuninori Morimoto [Tue, 16 Jun 2020 05:20:59 +0000 (14:20 +0900)]
ASoC: codecs: msm*: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h7vb4mdf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: max*: rename to snd_soc_component_read()
Kuninori Morimoto [Tue, 16 Jun 2020 05:20:53 +0000 (14:20 +0900)]
ASoC: codecs: max*: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87imfr4mdl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: tlv*: rename to snd_soc_component_read()
Kuninori Morimoto [Tue, 16 Jun 2020 05:20:46 +0000 (14:20 +0900)]
ASoC: codecs: tlv*: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k1074mds.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: wcd*: rename to snd_soc_component_read()
Kuninori Morimoto [Tue, 16 Jun 2020 05:20:40 +0000 (14:20 +0900)]
ASoC: codecs: wcd*: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/87lfkn4mdy.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: rename to snd_soc_component_read()
Kuninori Morimoto [Tue, 16 Jun 2020 05:20:33 +0000 (14:20 +0900)]
ASoC: codecs: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mu534me5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: atmel: rename to snd_soc_component_read()
Kuninori Morimoto [Tue, 16 Jun 2020 05:20:23 +0000 (14:20 +0900)]
ASoC: atmel: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8pj4mef.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: pxa: rename to snd_soc_component_read()
Kuninori Morimoto [Tue, 16 Jun 2020 05:20:15 +0000 (14:20 +0900)]
ASoC: pxa: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pn9z4men.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-component: use io_mutex correctly
Kuninori Morimoto [Tue, 16 Jun 2020 05:19:52 +0000 (14:19 +0900)]
ASoC: soc-component: use io_mutex correctly

component has io_mutex, but it had been used at
snd_soc_component_update_bits_legacy() only which does read and write.

static int snd_soc_component_update_bits_legacy(...)
{
...
=> mutex_lock(&component->io_mutex);
...
old = snd_soc_component_read(...);
...
ret = snd_soc_component_write(...);
...
=> mutex_unlock(&component->io_mutex);
...
}

It is pointless if it is not used with both read and write functions.
This patch uses io_mutex correctly with read/write.
Here, xxx_no_lock() is local functions.

static int snd_soc_component_read(...)
{
...
=> mutex_lock(&component->io_mutex);
val = soc_component_read_no_lock(...);
=> mutex_unlock(&component->io_mutex);
...
}

static int snd_soc_component_write(...)
{
...
=> mutex_lock(&component->io_mutex);
ret = soc_component_write_no_lock(...);
=> mutex_unlock(&component->io_mutex);
...
}

static int snd_soc_component_update_bits_legacy(...)
{
...
=> mutex_lock(&component->io_mutex);
...
old = soc_component_read_no_lock(...);
...
ret = soc_component_write_no_lock(...);
...
=> mutex_unlock(&component->io_mutex);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r1uf4mfa.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32()
Kuninori Morimoto [Tue, 16 Jun 2020 05:19:41 +0000 (14:19 +0900)]
ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32()

We had read/write function for Codec, Platform, etc,
but these has been merged into snd_soc_component_read/write().

Internally, it is using regmap or driver function.
In read case, each styles are like below

regmap
ret = regmap_read(..., reg, &val);

driver function
val = xxx->read(..., reg);

Because of this kind of different style, to keep same read style,
when we merged each read function into snd_soc_component_read(),
we created snd_soc_component_read32(), like below.
commit 738b49efe6c6 ("ASoC: add snd_soc_component_read32")

(1) val = snd_soc_component_read32(component, reg);

(2) ret = snd_soc_component_read(component, reg, &val);

Many drivers are using snd_soc_component_read32(), and
some drivers are using snd_soc_component_read() today.

In generally, we don't check read function successes,
because, we will have many other issues at initial timing
if read function didn't work.

Now we can use soc_component_err() when error case.
This means, it is easy to notice if error occurred.

This patch aggressively merge snd_soc_component_read() and _read32(),
and makes snd_soc_component_read/write() as generally style.

This patch do
1) merge snd_soc_component_read() and snd_soc_component_read32()
2) it uses soc_component_err() when error case (easy to notice)
3) keeps read32 for now by #define
4) update snd_soc_component_read() for all drivers

Because _read() user drivers are not too many, this patch changes
all user drivers.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/87sgev4mfl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qcom: Kconfig: Tweak dependencies on SND_SOC_SDM845
John Stultz [Fri, 19 Jun 2020 03:14:07 +0000 (03:14 +0000)]
ASoC: qcom: Kconfig: Tweak dependencies on SND_SOC_SDM845

CROS_EC isn't strictly required for audio to work
on other SDM845 platforms (like the Dragonboard 845c).

So lets remove the dependency and select the related
CROS_EC options via imply.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Rohit kumar <rohitkr@codeaurora.org>
Cc: Patrick Lai <plai@codeaurora.org>
Cc: Banajit Goswami <bgoswami@codeaurora.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Link: https://lore.kernel.org/r/20200619031407.116140-1-john.stultz@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_spdif: Add pm runtime function
Shengjiu Wang [Fri, 19 Jun 2020 07:54:33 +0000 (15:54 +0800)]
ASoC: fsl_spdif: Add pm runtime function

Add pm runtime support and move clock handling there.
Close the clocks at suspend to reduce the power consumption.

fsl_spdif_suspend is replaced by pm_runtime_force_suspend.
fsl_spdif_resume is replaced by pm_runtime_force_resume.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/579c0d71e976f34f23f40daa9f1aa06c4baca2f1.1592552389.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: amd: Removing unnecessary instance initialization
Ravulapati Vishnu vardhan rao [Thu, 18 Jun 2020 07:26:10 +0000 (12:56 +0530)]
ASoC: amd: Removing unnecessary instance initialization

In trigger we already get the selected instance details
from runtime->private_data.So, removing the local
initialization which may corrupt the instance selected
details and this leads to corrupt data.

Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>
Link: https://lore.kernel.org/r/20200618072624.27047-1-Vishnuvardhanrao.Ravulapati@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: Intel: broadwell: simplify card names for SOF uses
Pierre-Louis Bossart [Wed, 17 Jun 2020 16:56:16 +0000 (11:56 -0500)]
ASoC: Intel: broadwell: simplify card names for SOF uses

Blindly adding an sof- prefix to the card name is not user friendly
and causes UCM issues with a driver name truncated to 16 characters.

Simplify to use "sof-bdw <codec_name>" pattern for all Broadwell
machine drivers. The sof- prefix is added by the core. A generic "SOF"
driver name is used, and UCMv2 will detect the configuration for this
driver by testing the card name.

Legacy uses are unmodified.

Suggested-by: Jaroslav Kysela <perex@perex.cz>
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/20200617165616.18511-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: Intel: cht*: simplify card names for SOF uses
Pierre-Louis Bossart [Wed, 17 Jun 2020 16:56:15 +0000 (11:56 -0500)]
ASoC: Intel: cht*: simplify card names for SOF uses

Blindly adding an sof- prefix to the card name is not user friendly
and causes UCM issues with a driver name truncated to 16 characters.

Simplify to use "sof-bytcht <codec_name>" pattern for all cht* machine
drivers. The sof- prefix is added by the core. A generic "SOF" driver
name is used, and UCMv2 will detect the configuration for this driver
by testing the card name.

Legacy uses are unmodified.

Suggested-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200617165616.18511-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: Intel: byt*: simplify card names for SOF uses
Pierre-Louis Bossart [Wed, 17 Jun 2020 16:56:14 +0000 (11:56 -0500)]
ASoC: Intel: byt*: simplify card names for SOF uses

Blindly adding an sof- prefix to the card name is not user friendly
and causes UCM issues with a driver name truncated to 16 characters.

Simplify to use "sof-bytcht <codec_name>" pattern for all byt* machine
drivers. The sof- prefix is added by the core. A generic "SOF" driver
name is used, and UCMv2 will detect the configuration for this driver
by testing the card name.

Legacy uses are unmodified.

Suggested-by: Jaroslav Kysela <perex@perex.cz>
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/20200617165616.18511-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: meson: imply acodec glue on axg sound card
Jerome Brunet [Wed, 17 Jun 2020 15:50:47 +0000 (17:50 +0200)]
ASoC: meson: imply acodec glue on axg sound card

When axg card driver support is enabled, lets enable the related
internal DAC glue by default.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20200617155047.1187256-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: fsl_spdif: Add support for imx6sx platform
Shengjiu Wang [Wed, 17 Jun 2020 06:58:01 +0000 (14:58 +0800)]
ASoC: fsl_spdif: Add support for imx6sx platform

The one difference on imx6sx platform is that the root clock
is shared with ASRC module, so we add a new flags
"shared_root_clock" which means the root clock is not independent,
then we will not do the clk_set_rate and clk_round_rate to avoid
impact ASRC module usage.

As add a new flags, we include the soc specific data struct.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/7a343edd5f8487abad248a0b862f45fd95067751.1592376770.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: bindings: fsl_spdif: Add new compatible string for imx6sx
Shengjiu Wang [Wed, 17 Jun 2020 06:58:00 +0000 (14:58 +0800)]
ASoC: bindings: fsl_spdif: Add new compatible string for imx6sx

Add new compatible string "fsl,imx6sx-spdif" in the binding document.
And add compatible string "fsl,vf610-spdif" which was missed before.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/feda3bb02296455d43aeebb7575918d9b28e1a3f.1592376770.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: fsl-asoc-card: Add MQS support
Shengjiu Wang [Wed, 17 Jun 2020 04:48:25 +0000 (12:48 +0800)]
ASoC: fsl-asoc-card: Add MQS support

The MQS codec isn't an i2c device, so use of_find_device_by_node
to get platform device pointer.

Because MQS only support playback, then add a new audio map.

And there maybe "model" property or no "audio-routing" property in
devicetree, so add some enhancement for these two property.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/918505decb7f757f12c38059c590984f28d2f3a4.1592369271.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: bindings: fsl-asoc-card: Add compatible string for MQS
Shengjiu Wang [Wed, 17 Jun 2020 04:48:24 +0000 (12:48 +0800)]
ASoC: bindings: fsl-asoc-card: Add compatible string for MQS

Add compatible string "fsl,imx-audio-mqs" for MQS, and move
"audio-routing" property to be optional for MQS doesn't need
such property.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/2185a3ec866bc59f82d93b73d1a732a896fd8f48.1592369271.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: tegra: Fix reference count leaks.
Qiushi Wu [Sat, 13 Jun 2020 20:44:19 +0000 (15:44 -0500)]
ASoC: tegra: Fix reference count leaks.

Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count if pm_runtime_put is not called in
error handling paths. Call pm_runtime_put if pm_runtime_get_sync fails.

Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20200613204422.24484-1-wu000273@umn.edu
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: rt1015: Flush DAC data before playback.
Jack Yu [Tue, 16 Jun 2020 02:36:44 +0000 (10:36 +0800)]
ASoC: rt1015: Flush DAC data before playback.

Flush DAC data before playback.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/20200616023644.4523-1-jack.yu@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge series "ASoC: fsl_easrc: Fix several warnings" from Shengjiu Wang <shengjiu...
Mark Brown [Mon, 15 Jun 2020 20:43:55 +0000 (21:43 +0100)]
Merge series "ASoC: fsl_easrc: Fix several warnings" from Shengjiu Wang <shengjiu.wang@nxp.com>:

Fix several warnings with "make W=1"

Shengjiu Wang (3):
  ASoC: fsl_easrc: Fix -Wmissing-prototypes warning
  ASoC: fsl_easrc: Fix -Wunused-but-set-variable
  ASoC: fsl_easrc: Fix "Function parameter not described" warnings

 sound/soc/fsl/fsl_easrc.c | 42 +++++++++++++++++----------------------
 1 file changed, 18 insertions(+), 24 deletions(-)

--
2.21.0

4 years agoMerge series "ASoC: Intel: Add KeemBay ASoC platform driver" from Sia Jee Heng <jee...
Mark Brown [Mon, 15 Jun 2020 20:43:54 +0000 (21:43 +0100)]
Merge series "ASoC: Intel: Add KeemBay ASoC platform driver" from Sia Jee Heng <jee.heng.sia@intel.com>:

The below series of patches support the KeemBay ASoC platform driver.
The platform driver initialize the i2s to capture and playback the
pcm data on the ARM. The i2s is running in polling mode.

There is no DSP in the KeemBay SoC. Users are rely on the Gstreamer plugin
to perform Audio preprocessing.

Audio graph card is used to connect the platform driver with the
tlv320aic3204 codec.

Change History:
v5:
- Remove OF dependency from Kconfig as OF is shifted to audio graph card.

v4:
- Reduce if-otology at the tx/rx function.
- Fix indentation.
- specify .rate directly

v3:
- Adjusted header format.
- Use Audio graph card instead of custom sound card.
- Use if-else instead of conditional operator.
- Enabled .set_fmt to configure master clock.

v2:
- Corrected I2S naming for DT binding.

v1:
- Initial version.

Sia Jee Heng (3):
  ASoC: Intel: Add KeemBay platform driver
  ASoC: Intel: Add makefiles and kconfig changes for KeemBay
  dt-bindings: sound: Add documentation for KeemBay i2s

 .../bindings/sound/intel,keembay-i2s.yaml          |  68 +++
 sound/soc/intel/Kconfig                            |   7 +
 sound/soc/intel/Makefile                           |   1 +
 sound/soc/intel/keembay/Makefile                   |   4 +
 sound/soc/intel/keembay/kmb_platform.c             | 654 +++++++++++++++++++++
 sound/soc/intel/keembay/kmb_platform.h             | 145 +++++
 6 files changed, 879 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/intel,keembay-i2s.yaml
 create mode 100644 sound/soc/intel/keembay/Makefile
 create mode 100644 sound/soc/intel/keembay/kmb_platform.c
 create mode 100644 sound/soc/intel/keembay/kmb_platform.h

--
1.9.1

4 years agoMerge series "ASoC: improve core dmesg logs and verbosity" from Pierre-Louis Bossart...
Mark Brown [Mon, 15 Jun 2020 19:58:46 +0000 (20:58 +0100)]
Merge series "ASoC: improve core dmesg logs and verbosity" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Try to both reduce useless verbosity and keep useful error reports.

Pierre-Louis Bossart (3):
  ASoC: soc-core: reduce verbosity of BE override message
  ASoC: soc-pcm: improve error messages in soc_pcm_new()
  ASoC: soc-pcm/compress: reduce verbosity on mapping ok messages

 sound/soc/soc-compress.c |  4 ++--
 sound/soc/soc-core.c     |  4 ++--
 sound/soc/soc-pcm.c      | 13 +++++++------
 3 files changed, 11 insertions(+), 10 deletions(-)

--
2.20.1

4 years agoMerge series "ASoC: max98357a: support MAX98360A in OF" from Tzung-Bi Shih <tzungbi...
Mark Brown [Mon, 15 Jun 2020 19:58:44 +0000 (20:58 +0100)]
Merge series "ASoC: max98357a: support MAX98360A in OF" from Tzung-Bi Shih <tzungbi@google.com>:

Commit 1a0f2433d738 ("ASoC: max98357a: Add ACPI HID MAX98360A") supports
MAX98360A in ACPI world.  This series supports MAX98360A in OF world.

Tzung-Bi Shih (2):
  ASoC: max98357a: add compatible string for MAX98360A
  ASoC: dt-bindings: add compatible string for MAX98360A

 .../devicetree/bindings/sound/max98357a.txt          | 12 +++++++++---
 sound/soc/codecs/max98357a.c                         |  1 +
 2 files changed, 10 insertions(+), 3 deletions(-)

--
2.27.0.278.ge193c7cf3a9-goog

4 years agoMerge series "ASoC: mediatek: mt6358: support DMIC one-wire mode" from Jiaxin Yu...
Mark Brown [Mon, 15 Jun 2020 19:58:43 +0000 (20:58 +0100)]
Merge series "ASoC: mediatek: mt6358: support DMIC one-wire mode" from Jiaxin Yu <jiaxin.yu@mediatek.com>:

v2 changes:
1. Uses a DT property to select DMIC mode instead of a mixer control.

v1 changes:
1. Uses a mixer control to select DMIC mode.
2. patchwork list:
https://patchwork.kernel.org/patch/11578309

Jiaxin Yu (2):
  ASoC: mediatek: mt6358: support DMIC one-wire mode
  ASoC: dt-bindings: mediatek: mt6358: add dmic-mode property

 Documentation/devicetree/bindings/sound/mt6358.txt |  6 ++++++
 sound/soc/codecs/mt6358.c                          | 23 +++++++++++++++++++++-
 2 files changed, 28 insertions(+), 1 deletion(-)

--
1.8.1.1.dirty
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

4 years agoMerge series "ASoC: soc-component: collect component functions" from Kuninori Morimot...
Mark Brown [Mon, 15 Jun 2020 19:58:42 +0000 (20:58 +0100)]
Merge series "ASoC: soc-component: collect component functions" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Hi Mark

We have soc-component.c now, but still many component related
functions are implemented many place.
This patch-set collect these into soc-component.c.

v1 -> v2
- remove soc-compress.c exchange
  (But I have plan to repost it)
- fixup loop break issue on some functions
- direct return on some functions

Link: https://lore.kernel.org/r/87a71nzhy2.wl-kuninori.morimoto.gx@renesas.com
Kuninori Morimoto (12):
  ASoC: soc-component: add soc_component_pin() and share code
  ASoC: soc-component: move snd_soc_component_xxx_regmap() to soc-component
  ASoC: soc-component: move snd_soc_component_initialize() to soc-component.c
  ASoC: soc-component: add soc_component_err()
  ASoC: soc-component: add snd_soc_pcm_component_prepare()
  ASoC: soc-component: add snd_soc_pcm_component_hw_params()
  ASoC: soc-component: add snd_soc_pcm_component_hw_free()
  ASoC: soc-component: add snd_soc_pcm_component_trigger()
  ASoC: soc-component: add snd_soc_component_init()
  ASoC: soc-component: merge soc-io.c into soc-component.c
  ASoC: soc-component: merge soc_pcm_trigger_start/stop()
  ASoC: soc-component: tidyup Copyright

 include/sound/soc-component.h |  29 +-
 sound/soc/Makefile            |   2 +-
 sound/soc/soc-component.c     | 666 ++++++++++++++++++++++++----------
 sound/soc/soc-core.c          | 102 +-----
 sound/soc/soc-io.c            | 202 -----------
 sound/soc/soc-pcm.c           | 114 ++----
 6 files changed, 531 insertions(+), 584 deletions(-)
 delete mode 100644 sound/soc/soc-io.c

--
2.17.1

4 years agoASoC: AMD: Use mixer control to switch between DMICs
Akshu Agrawal [Sat, 30 May 2020 09:55:06 +0000 (15:25 +0530)]
ASoC: AMD: Use mixer control to switch between DMICs

Having mixer control to switch between DMICs prevents user to
initiate capture simultaneously on both the DMIcs.
Earlier 2 separate devices, one for each DMIC, gave an option of
using them simultaneously, which is not supported.

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Link: https://lore.kernel.org/r/20200530095519.24324-1-akshu.agrawal@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: max98390: Add Amp init common setting func.
Steve Lee [Thu, 11 Jun 2020 09:47:18 +0000 (18:47 +0900)]
ASoC: max98390: Add Amp init common setting func.

 Add amp common init function to gather common init setting and finaize.
  - add max98390_init_regs func
  - move amp setting to max98390_init_regs func.
  - removed unneceary setting and finalize common register values.

Signed-off-by: Steve Lee <steves.lee@maximintegrated.com>
Link: https://lore.kernel.org/r/20200611094718.18371-1-steves.lee@maximintegrated.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agodt-bindings: Added device tree binding for max98390
Steve Lee [Tue, 2 Jun 2020 08:43:37 +0000 (17:43 +0900)]
dt-bindings: Added device tree binding for max98390

Add DT binding of max98390 amplifier driver.

Signed-off-by: Steve Lee <steves.lee@maximintegrated.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200602084337.22116-1-steves.lee@maximintegrated.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: rt5682: DAI wclk supports 44100 Hz output
derek.fang [Fri, 12 Jun 2020 05:15:24 +0000 (13:15 +0800)]
ASoC: rt5682: DAI wclk supports 44100 Hz output

DAI Wclk of rt5682 only supports 48000Hz output so far,
this patch lets it support 44100Hz.

Signed-off-by: derek.fang <derek.fang@realtek.com>
Link: https://lore.kernel.org/r/1591938925-1070-4-git-send-email-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: rt5682: Let PLL2 support the freq conversion for 44100Hz sample rate
derek.fang [Fri, 12 Jun 2020 05:15:23 +0000 (13:15 +0800)]
ASoC: rt5682: Let PLL2 support the freq conversion for 44100Hz sample rate

PLL2 of rt5682 only supports the freq conversion for 48000Hz
sample rate so far, this patch lets it support 44100Hz.

Signed-off-by: derek.fang <derek.fang@realtek.com>
Link: https://lore.kernel.org/r/1591938925-1070-3-git-send-email-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: rl6231: Add new supports on rl6231
derek.fang [Fri, 12 Jun 2020 05:15:22 +0000 (13:15 +0800)]
ASoC: rl6231: Add new supports on rl6231

Add pll preset maps for Realtek codecs' PLL2 freq conversions.

Signed-off-by: derek.fang <derek.fang@realtek.com>
Link: https://lore.kernel.org/r/1591938925-1070-2-git-send-email-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: img-parallel-out: Fix a reference count leak
Qiushi Wu [Sun, 14 Jun 2020 03:33:43 +0000 (22:33 -0500)]
ASoC: img-parallel-out: Fix a reference count leak

pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code, causing incorrect ref count if
pm_runtime_put_noidle() is not called in error handling paths.
Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails.

Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Link: https://lore.kernel.org/r/20200614033344.1814-1-wu000273@umn.edu
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: img: Fix a reference count leak in img_i2s_in_set_fmt
Qiushi Wu [Sun, 14 Jun 2020 03:37:48 +0000 (22:37 -0500)]
ASoC: img: Fix a reference count leak in img_i2s_in_set_fmt

pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code, causing incorrect ref count if
pm_runtime_put_noidle() is not called in error handling paths.
Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails.

Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Link: https://lore.kernel.org/r/20200614033749.2975-1-wu000273@umn.edu
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: wm8960: Support headphone jack detection function
Shengjiu Wang [Wed, 3 Jun 2020 10:26:53 +0000 (18:26 +0800)]
ASoC: wm8960: Support headphone jack detection function

Add two platform variables for headphone jack detection.
"hp_cfg" is for configuration of heaphone jack detection.
"gpio_cfg" is for configuration of gpio, the gpio is used
for plug & unplug interrupt on SoC.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1591180013-12416-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: bindings: wm8960: Add property for headphone detection
Shengjiu Wang [Wed, 3 Jun 2020 10:26:52 +0000 (18:26 +0800)]
ASoC: bindings: wm8960: Add property for headphone detection

Add two properties for headphone detection.

wlf,hp-cfg: A list of headphone jack detect configuration register values
wlf,gpio-cfg: A list of GPIO configuration register values

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1591180013-12416-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: Add bindings for Samsung Aries audio complex
Jonathan Bakker [Sun, 14 Jun 2020 20:24:10 +0000 (13:24 -0700)]
ASoC: Add bindings for Samsung Aries audio complex

The audio system on S5PV210 Aries boards have a wm8994 codec connected
to the Samsung I2S0 DAI.  Jack detection is done via GPIOs, an ADC, and
an extcon device (fsa9480).

There are two main variants, one with an FM radio and where the wm8994 is
the master for the modem audio and the other without FM and the modem is
the master.

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Link: https://lore.kernel.org/r/BN6PR04MB0660866A9B5FD4B9E74D7C31A39F0@BN6PR04MB0660.namprd04.prod.outlook.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: Document wm8994 endpoints
Jonathan Bakker [Sun, 14 Jun 2020 20:24:09 +0000 (13:24 -0700)]
ASoC: Document wm8994 endpoints

The wm8994 exposes several inputs and outputs that can be used by
machine drivers in their routing.  Add them to the documention so
they don't have been duplicated in any machine drivers bindings.

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Link: https://lore.kernel.org/r/BN6PR04MB066019A8783D22F1C4A588B7A39F0@BN6PR04MB0660.namprd04.prod.outlook.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: samsung: Add driver for Aries boards
Jonathan Bakker [Sun, 14 Jun 2020 20:24:11 +0000 (13:24 -0700)]
ASoC: samsung: Add driver for Aries boards

Samsung Aries boards have a WM8994 codec connected to the Samsung
I2S controller, the BT codec, and the cellular modem.  Jack detection
is done by a combination of an ADC, GPIOs, and an extcon device for
the USB dock.  There is also a GPIO for selection between the Mic
path and the TV out path on the headphone jack.

There are two main variants, one with an FM radio and where the modem
is the master and one without a radio and the modem is the slave.

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Link: https://lore.kernel.org/r/BN6PR04MB06608CBF03EF27B70B175978A39F0@BN6PR04MB0660.namprd04.prod.outlook.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: wm0010: Use kmemdup rather than duplicating its implementation
Fuqian Huang [Wed, 3 Jul 2019 16:32:24 +0000 (00:32 +0800)]
ASoC: wm0010: Use kmemdup rather than duplicating its implementation

kmemdup is introduced to duplicate a region of memory in a neat way.
Rather than kmalloc/kzalloc + memcpy, which the programmer needs to
write the size twice (sometimes lead to mistakes), kmemdup improves
readability, leads to smaller code and also reduce the chances of mistakes.
Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
Acked-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20190703163224.1029-1-huangfq.daxian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: Add documentation for KeemBay i2s
Sia Jee Heng [Tue, 9 Jun 2020 06:06:23 +0000 (14:06 +0800)]
ASoC: Add documentation for KeemBay i2s

Document Intel KeemBay i2s DT bindings.

Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com>
Link: https://lore.kernel.org/r/1591682783-1923-4-git-send-email-jee.heng.sia@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: Intel: Add makefiles and kconfig changes for KeemBay
Sia Jee Heng [Tue, 9 Jun 2020 06:06:22 +0000 (14:06 +0800)]
ASoC: Intel: Add makefiles and kconfig changes for KeemBay

Add makefile and kconfig changes for Intel KeemBay platform driver.

Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com>
Link: https://lore.kernel.org/r/1591682783-1923-3-git-send-email-jee.heng.sia@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: Intel: Add KeemBay platform driver
Sia Jee Heng [Tue, 9 Jun 2020 06:06:21 +0000 (14:06 +0800)]
ASoC: Intel: Add KeemBay platform driver

Add KeemBay ASoC platform driver which initialize the i2s controller
and uses i2s to capture and transmit pcm data to external codec.
The i2s is running in polling mode.

Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com>
Link: https://lore.kernel.org/r/1591682783-1923-2-git-send-email-jee.heng.sia@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: dt-bindings: mediatek: mt6358: add dmic-mode property
Jiaxin Yu [Fri, 5 Jun 2020 10:33:42 +0000 (18:33 +0800)]
ASoC: dt-bindings: mediatek: mt6358: add dmic-mode property

Adds dmic-mode property and updates example.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1591353222-18576-3-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: mediatek: mt6358: support DMIC one-wire mode
Jiaxin Yu [Fri, 5 Jun 2020 10:33:41 +0000 (18:33 +0800)]
ASoC: mediatek: mt6358: support DMIC one-wire mode

Supports DMIC one-wire mode. Uses a DT property "dmic-mode" to select.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1591353222-18576-2-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: fsl_easrc: Fix "Function parameter not described" warnings
Shengjiu Wang [Wed, 3 Jun 2020 03:39:41 +0000 (11:39 +0800)]
ASoC: fsl_easrc: Fix "Function parameter not described" warnings

Obtained with:
$ make W=1

sound/soc/fsl/fsl_easrc.c:403: warning: Function parameter or member 'easrc' not described in 'fsl_easrc_normalize_filter'
sound/soc/fsl/fsl_easrc.c:403: warning: Function parameter or member 'infilter' not described in 'fsl_easrc_normalize_filter'
sound/soc/fsl/fsl_easrc.c:403: warning: Function parameter or member 'outfilter' not described in 'fsl_easrc_normalize_filter'
sound/soc/fsl/fsl_easrc.c:403: warning: Function parameter or member 'shift' not described in 'fsl_easrc_normalize_filter'

Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/d166b868e6d294de47a89857be03758ec82a0a61.1591155860.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: fsl_easrc: Fix -Wunused-but-set-variable
Shengjiu Wang [Wed, 3 Jun 2020 03:39:40 +0000 (11:39 +0800)]
ASoC: fsl_easrc: Fix -Wunused-but-set-variable

Obtained with:
$ make W=1

  unsigned int int_bits;
               ^
  struct device *dev;
                 ^
  struct device *dev;
                 ^

Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
sound/soc/fsl/fsl_easrc.c: In function 'fsl_easrc_set_rs_ratio':
sound/soc/fsl/fsl_easrc.c:182:15: warning: variable 'int_bits' set but not used [-Wunused-but-set-variable]
sound/soc/fsl/fsl_easrc.c: In function 'fsl_easrc_set_ctx_organziation':
sound/soc/fsl/fsl_easrc.c:1204:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
sound/soc/fsl/fsl_easrc.c: In function 'fsl_easrc_release_context':
sound/soc/fsl/fsl_easrc.c:1294:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
Link: https://lore.kernel.org/r/91ceb59e3bce31c9e93abba06f5156692ff5c71e.1591155860.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: fsl_easrc: Fix -Wmissing-prototypes warning
Shengjiu Wang [Wed, 3 Jun 2020 03:39:39 +0000 (11:39 +0800)]
ASoC: fsl_easrc: Fix -Wmissing-prototypes warning

Obtained with:
$ make W=1

sound/soc/fsl/fsl_easrc.c:967:5: warning: no previous prototype for function 'fsl_easrc_config_context' [-Wmissing-prototypes]
int fsl_easrc_config_context(struct fsl_asrc *easrc, unsigned int ctx_id)
    ^
sound/soc/fsl/fsl_easrc.c:967:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int fsl_easrc_config_context(struct fsl_asrc *easrc, unsigned int ctx_id)
^
static
sound/soc/fsl/fsl_easrc.c:1128:5: warning: no previous prototype for function 'fsl_easrc_set_ctx_format' [-Wmissing-prototypes]
int fsl_easrc_set_ctx_format(struct fsl_asrc_pair *ctx,
    ^
sound/soc/fsl/fsl_easrc.c:1128:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int fsl_easrc_set_ctx_format(struct fsl_asrc_pair *ctx,
^
static
sound/soc/fsl/fsl_easrc.c:1201:5: warning: no previous prototype for function 'fsl_easrc_set_ctx_organziation' [-Wmissing-prototypes]
int fsl_easrc_set_ctx_organziation(struct fsl_asrc_pair *ctx)
    ^
sound/soc/fsl/fsl_easrc.c:1201:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int fsl_easrc_set_ctx_organziation(struct fsl_asrc_pair *ctx)
^
static
sound/soc/fsl/fsl_easrc.c:1245:5: warning: no previous prototype for function 'fsl_easrc_request_context' [-Wmissing-prototypes]
int fsl_easrc_request_context(int channels, struct fsl_asrc_pair *ctx)
    ^
sound/soc/fsl/fsl_easrc.c:1245:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int fsl_easrc_request_context(int channels, struct fsl_asrc_pair *ctx)
^
static
sound/soc/fsl/fsl_easrc.c:1290:6: warning: no previous prototype for function 'fsl_easrc_release_context' [-Wmissing-prototypes]
void fsl_easrc_release_context(struct fsl_asrc_pair *ctx)
     ^
sound/soc/fsl/fsl_easrc.c:1290:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void fsl_easrc_release_context(struct fsl_asrc_pair *ctx)
^
static
sound/soc/fsl/fsl_easrc.c:1317:5: warning: no previous prototype for function 'fsl_easrc_start_context' [-Wmissing-prototypes]
int fsl_easrc_start_context(struct fsl_asrc_pair *ctx)
    ^
sound/soc/fsl/fsl_easrc.c:1317:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int fsl_easrc_start_context(struct fsl_asrc_pair *ctx)
^
static
sound/soc/fsl/fsl_easrc.c:1335:5: warning: no previous prototype for function 'fsl_easrc_stop_context' [-Wmissing-prototypes]
int fsl_easrc_stop_context(struct fsl_asrc_pair *ctx)
    ^
sound/soc/fsl/fsl_easrc.c:1335:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int fsl_easrc_stop_context(struct fsl_asrc_pair *ctx)
^
static
sound/soc/fsl/fsl_easrc.c:1382:18: warning: no previous prototype for function 'fsl_easrc_get_dma_channel' [-Wmissing-prototypes]
struct dma_chan *fsl_easrc_get_dma_channel(struct fsl_asrc_pair *ctx,
                 ^
sound/soc/fsl/fsl_easrc.c:1382:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct dma_chan *fsl_easrc_get_dma_channel(struct fsl_asrc_pair *ctx,
^
static

Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/ab1b83a56c71f4159a98e6da5602c2c36fe59f4d.1591155860.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: soc-component: tidyup Copyright
Kuninori Morimoto [Thu, 4 Jun 2020 08:08:24 +0000 (17:08 +0900)]
ASoC: soc-component: tidyup Copyright

This patch add missing company copyright

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87eeqvw8w8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: soc-component: merge soc_pcm_trigger_start/stop()
Kuninori Morimoto [Thu, 4 Jun 2020 08:08:12 +0000 (17:08 +0900)]
ASoC: soc-component: merge soc_pcm_trigger_start/stop()

Now, soc_pcm_trigger_start/stop() are simple enough.
Let's merge these into soc_pcm_trigger().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87ftbbw8wj.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: soc-component: merge soc-io.c into soc-component.c
Kuninori Morimoto [Thu, 4 Jun 2020 08:08:03 +0000 (17:08 +0900)]
ASoC: soc-component: merge soc-io.c into soc-component.c

soc-io.c has snd_soc_component_xxx() functions for I/O.
We have soc-componennt.c for it.
Let's merge soc-io.c into soc-component.c

By this patch, original soc-io.c functions start to use
soc_component_err() when error case.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87h7vrw8ws.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: soc-component: add snd_soc_component_init()
Kuninori Morimoto [Thu, 4 Jun 2020 08:07:54 +0000 (17:07 +0900)]
ASoC: soc-component: add snd_soc_component_init()

we wantn't to directly access to component related parameter
as much as possible to keep encapsulation.
This patch adds snd_soc_component_init() for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87img7w8x2.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: soc-component: add snd_soc_pcm_component_trigger()
Kuninori Morimoto [Thu, 4 Jun 2020 08:07:40 +0000 (17:07 +0900)]
ASoC: soc-component: add snd_soc_pcm_component_trigger()

We have 2 type of component functions
snd_soc_component_xxx()     is focusing to component itself,
snd_soc_pcm_component_xxx() is focusing to rtd related component.

Now we can update snd_soc_component_trigger() to
snd_soc_pcm_component_trigger(). This patch do it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87k10nw8xf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: soc-component: add snd_soc_pcm_component_hw_free()
Kuninori Morimoto [Thu, 4 Jun 2020 08:07:24 +0000 (17:07 +0900)]
ASoC: soc-component: add snd_soc_pcm_component_hw_free()

We have 2 type of component functions
snd_soc_component_xxx()     is focusing to component itself,
snd_soc_pcm_component_xxx() is focusing to rtd related component.

Now we can update snd_soc_component_hw_free() to
snd_soc_pcm_component_hw_free(). This patch do it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87lfl3w8xv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: soc-component: add snd_soc_pcm_component_hw_params()
Kuninori Morimoto [Thu, 4 Jun 2020 08:07:11 +0000 (17:07 +0900)]
ASoC: soc-component: add snd_soc_pcm_component_hw_params()

We have 2 type of component functions
snd_soc_component_xxx()     is focusing to component itself,
snd_soc_pcm_component_xxx() is focusing to rtd related component.

Now we can update snd_soc_component_hw_params() to
snd_soc_pcm_component_hw_params(). This patch do it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87mu5jw8y8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: soc-component: add snd_soc_pcm_component_prepare()
Kuninori Morimoto [Thu, 4 Jun 2020 08:06:58 +0000 (17:06 +0900)]
ASoC: soc-component: add snd_soc_pcm_component_prepare()

We have 2 type of component functions
snd_soc_component_xxx()     is focusing to component itself,
snd_soc_pcm_component_xxx() is focusing to rtd related component.

Now we can update snd_soc_component_prepare() to
snd_soc_pcm_component_prepare(). This patch do it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87o8pzw8yl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: soc-component: add soc_component_err()
Kuninori Morimoto [Thu, 4 Jun 2020 08:06:41 +0000 (17:06 +0900)]
ASoC: soc-component: add soc_component_err()

At soc-component.c, it is good idea to indicate error function and
its component name if there was error.
This patch adds soc_component_err() for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87pnafw8z2.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>