Commit graph

998104 commits

Author SHA1 Message Date
Christophe JAILLET cdf20c3ef0
ASoC: cs35l36: Fix an error handling path in 'cs35l36_i2c_probe()'
If 'devm_regmap_init_i2c()' fails, there is no need to goto err. We should
return directly as already done by the surrounding error handling paths.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/9fec48e75bc1d3c92626e6f6aca2344bda223379.1618145790.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 14:12:55 +01:00
Christophe JAILLET 38c694e98f
ASoC: cs35l35: Fix an error handling path in 'cs35l35_i2c_probe()'
If 'devm_regmap_init_i2c()' fails, there is no need to goto err. We should
return directly as already done by the surrounding error handling paths.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/15720439769ba94ffb65c90217392b0758b08f61.1618145369.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 14:12:54 +01:00
Mark Brown 637251bcfe
Merge series "ASoC: simple-card-utils: prepare for multi support" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

This patch-set is for v2 of Multi-CPU/Codec support,
and some cleanups.
v1 had patch-conflict on simple-card / audio-graph with below.
v2 was solved it.

	fa74c223b6
	("ASoC: simple-card: fix possible uninitialized single_cpu local variable")

I want to add new audio-graph-card2 driver which can support
not only DPCM, but also Multi-CPU/Codec, and Codec2Codec.
And it is also supporting audio-graph-card2 base custom driver.

But before supporting such driver, we need to cleanup existing
simple-card / audio-graph, because these and new driver are
sharing code.

Link: https://lore.kernel.org/r/87wntmod33.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/20210408141639.GA39604@sirena.org.uk

Kuninori Morimoto (12):
  ASoC: simple-card-utils: setup dai_props cpu_dai/codec_dai at initial timing
  ASoC: simple-card-utils: remove li->dais/li->conf
  ASoC: simple-card-utils: use for_each_prop_xxx()
  ASoC: simple-card-utils: remove asoc_simple_parse_xxx()
  ASoC: simple-card-utils: care multi DAI at asoc_simple_clean_reference()
  ASoC: simple-card-utils: indicate dai_fmt if exist
  ASoC: simple-card-utils: indicate missing CPU/Codec numbers for debug
  ASoC: simple-card-utils: add simple_props_to_xxx() macro
  ASoC: simple-card-utils: multi support at asoc_simple_canonicalize_cpu/platform()
  ASoC: simple-card-utils: tidyup debug info for clock
  ASoC: simple-card-utils: tidyup dev_dbg() to use 1 line
  ASoC: simple-card-utils: tidyup asoc_simple_parse_convert()

 include/sound/simple_card_utils.h     | 107 ++++++++++------
 sound/soc/generic/audio-graph-card.c  |  64 ++++------
 sound/soc/generic/simple-card-utils.c | 174 ++++++++++++++++----------
 sound/soc/generic/simple-card.c       |  70 ++++-------
 4 files changed, 226 insertions(+), 189 deletions(-)

--
2.25.1
2021-04-13 14:11:53 +01:00
Chen Lifu 462c47c2fc
ASoC: sti: sti_uniperif: add missing MODULE_DEVICE_TABLE
This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Chen Lifu <chenlifu@huawei.com>
Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Link: https://lore.kernel.org/r/20210409015953.259688-1-chenlifu@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:33:45 +01:00
Kuninori Morimoto fcfd763bef
ASoC: simple-card-utils: tidyup asoc_simple_parse_convert()
dev is not used. This patch removes it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87eefgwf8j.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:56 +01:00
Kuninori Morimoto 3919249e80
ASoC: simple-card-utils: tidyup dev_dbg() to use 1 line
We can use 100 char now for 1 line.
This patch tidyup unreadable dev_dbg() message.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87fszwwf8o.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:55 +01:00
Kuninori Morimoto 33cd6b191f
ASoC: simple-card-utils: tidyup debug info for clock
simple-card / audio-graph can use clock as dai->clk or dai->sysclk.
These related information should be indicated at same position.
This patch tidyup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h7kcwf8t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:54 +01:00
Kuninori Morimoto c826ec0391
ASoC: simple-card-utils: multi support at asoc_simple_canonicalize_cpu/platform()
Current asoc_simple_canonicalize_cpu/platform() is assuming single CPU,
single Platform, but we want to support Multi support.
This patch is prepare for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87im4swf8y.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:53 +01:00
Kuninori Morimoto 9830d3e99f
ASoC: simple-card-utils: add simple_props_to_xxx() macro
We shouldn't use dai_props->cpus/codecs/cpu_dai/codec_dai/codec_conf
directly, because these are array to supporting multi CPU/Codec/Platform.
This patch adds asoc_link_to_xxx() macro for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0p8wf9b.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:52 +01:00
Kuninori Morimoto 40d8cbe70e
ASoC: simple-card-utils: indicate missing CPU/Codec numbers for debug
Now ALSA is supporting multi-CPU/Codec,
thus, we want to know number of CPU/Codec when debugging.
This patch indicates it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87lf9owf9g.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:51 +01:00
Kuninori Morimoto ac813c625a
ASoC: simple-card-utils: indicate dai_fmt if exist
link->dai_fmt might be 0.
Don't indicate it in such case when debugging.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mtu4wf9k.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:50 +01:00
Kuninori Morimoto 1cf6805700
ASoC: simple-card-utils: care multi DAI at asoc_simple_clean_reference()
ASoC is now supporting multi DAI, but, current
simple-card / audio-graph are assuming fixed single DAI.

This patch cares multi DAI at asoc_simple_clean_reference()
for of_node_put().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8ekwf9p.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:49 +01:00
Kuninori Morimoto e25704f84c
ASoC: simple-card-utils: remove asoc_simple_parse_xxx()
ASoC is now supporting multi DAI, but, current
simple-card / audio-graph are assuming fixed single DAI.

Now, asoc_simple_parse_xxx() macro is assuming single DAI.
To support multi-CPU/Codec, this patch unpack asoc_simple_parse_xxx()
macro, and uses "&dai_link->cpus[i]" instead of "dai_link->cpus".

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pmz0wf9u.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:48 +01:00
Kuninori Morimoto fafc05aadd
ASoC: simple-card-utils: use for_each_prop_xxx()
ASoC is now supporting multi DAI, but, current
simple-card / audio-graph are assuming fixed single DAI.

This patch uses for_each_prop_xxx() to support multi DAI.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r1jgwf9y.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:47 +01:00
Kuninori Morimoto f899006d55
ASoC: simple-card-utils: remove li->dais/li->conf
li->dais is same as number of CPU + Codec,
li->conf is same as number of Codec when dummy-Codec.

li->dais/li->conf are no longer needed.
This patch removes these.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sg3wwfa3.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:46 +01:00
Kuninori Morimoto 59f5cd96e9
ASoC: simple-card-utils: setup dai_props cpu_dai/codec_dai at initial timing
We couldn't setup dai_props cpu_dai/codec_dai at the initial timing,
because "counting DAIs loop" and "detecting DAIs loop" were different.
But we can do it now, because these are using same loops.

This patch setups dai_props cpu_dai/codec_dai at the initial timing.
It can removes triky code from simple-card / audio-graph.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87tuocwfa8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-13 12:32:45 +01:00
Mark Brown 13a9e21b80
Merge series "ASoC: SOF: Intel: descriptor corrections for TGL and ADL" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
One missed property for TigerLake and need for separate descriptors
between ADL-S and the other flavors.

Libin Yang (1):
  ASoC: SOF: Intel: add missing use_acpi_target_states for TGL platforms

Sathya Prakash M R (1):
  ASoC: SOF: Intel: Update ADL P to use its own descriptor

 sound/soc/sof/intel/pci-tgl.c | 20 +++++++++++++++++++-
 sound/soc/sof/intel/tgl.c     |  2 +-
 2 files changed, 20 insertions(+), 2 deletions(-)

--
2.25.1
2021-04-12 19:56:23 +01:00
Mark Brown 2976eef29e
Merge series "ASoC: SOF: simplify probe and report errors" from Ranjani Sridharan <ranjani.sridharan@linux.intel.com>:
These patches simplify the sof_probe_complete handling and
address reporting of errors during probe.

Peter Ujfalusi (2):
  ASoC: SOF: core: Add missing error prints to device probe operation
  ASoC: SOF: Simplify sof_probe_complete handling for acpi/pci/of

 sound/soc/sof/core.c         |  9 +++++++--
 sound/soc/sof/sof-acpi-dev.c | 18 +++---------------
 sound/soc/sof/sof-of-dev.c   | 18 +++---------------
 sound/soc/sof/sof-pci-dev.c  | 20 ++++----------------
 4 files changed, 17 insertions(+), 48 deletions(-)

--
2.25.1
2021-04-12 19:56:22 +01:00
Mark Brown 6fede18b0c
Merge series "ASoC: SOF: simplify nocodec mode" from Ranjani Sridharan <ranjani.sridharan@linux.intel.com>:
This set of patches simplify the implementation
of nocodec mode in SOF.

Pierre-Louis Bossart (6):
  ASoC: SOF: add Kconfig option for probe workqueues
  ASoC: soc-acpi: add new fields for mach_params
  ASoC: SOF: change signature of set_mach_params() callback
  ASoC: SOF: Intel: update set_mach_params()
  ASoC: SOF: pcm: export snd_pcm_dai_link_fixup
  ASOC: SOF: simplify nocodec mode

 include/sound/soc-acpi.h  |  4 ++++
 include/sound/sof.h       |  3 ---
 sound/soc/sof/Kconfig     | 11 +++++++++++
 sound/soc/sof/intel/bdw.c |  8 ++++++--
 sound/soc/sof/intel/byt.c | 22 +++++++++++++---------
 sound/soc/sof/intel/hda.c |  8 ++++++--
 sound/soc/sof/intel/hda.h |  2 +-
 sound/soc/sof/nocodec.c   | 39 +++++++++++++++++++++------------------
 sound/soc/sof/ops.h       |  6 ++----
 sound/soc/sof/pcm.c       |  1 +
 sound/soc/sof/sof-audio.c | 34 +++++++++++++++-------------------
 sound/soc/sof/sof-priv.h  |  2 +-
 12 files changed, 81 insertions(+), 59 deletions(-)

--
2.25.1
2021-04-12 19:56:21 +01:00
Sathya Prakash M R 4ad03f894b
ASoC: SOF: Intel: Update ADL P to use its own descriptor
ADL P has specific machines and hence having its own
table will help separate the machines and FW

Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210412161519.13508-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 18:03:22 +01:00
Libin Yang 1b9889974c
ASoC: SOF: Intel: add missing use_acpi_target_states for TGL platforms
All Intel TigerLake platforms should support the feature of getting
the system state from acpi to deal with S0ix support.

This was missed in previous commits, likely due to copy/paste from
older code.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210412161519.13508-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 18:03:21 +01:00
Ranjani Sridharan 7459f8b703
ASoC: SOF: topology: remove useless code
The patch "ASoC: SOF: Intel: hda: assign link DMA channel at run-time"
fixed the sof_link_hda_unload() to remove the call to the BE
hw_free op but left the rest of code that become redundant.

So, remove sof_link_hda_unload() along with the link_unload() op
entirely as it is not longer needed.

Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220522.1542865-1-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:06:45 +01:00
Libin Yang b2fe85790d
ASoC: SOF: Kconfig: fix typo of SND_SOC_SOF_PCI
It should be 'endif ## SND_SOC_SOF_PCI' instead of
'endif ## SND_SOC_SOF_INTEL_PCI'

Signed-off-by: Libin Yang <libin.yang@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409221308.1544000-1-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:06:44 +01:00
Pierre-Louis Bossart 4c1cc83fcc
ASOC: SOF: simplify nocodec mode
Replace ugly #if (!IS_ENABLED) by if (!IS_ENABLED), remove
cross-module dependencies and use classic mechanism to pass
information to the machine driver.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220121.1542362-7-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:55 +01:00
Pierre-Louis Bossart f3f3af1743
ASoC: SOF: pcm: export snd_pcm_dai_link_fixup
In preparation of the nocodec refactoring, export the dai-link
fixup. This will also be required when we have more clients and
platform drivers.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220121.1542362-6-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:54 +01:00
Pierre-Louis Bossart 974cccf490
ASoC: SOF: Intel: update set_mach_params()
Add information for num_dai_drivers and dai_drivers[], which will be
used in the refactored nocodec implementation

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220121.1542362-5-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:53 +01:00
Pierre-Louis Bossart 17e9d6b0a3
ASoC: SOF: change signature of set_mach_params() callback
To set additional parameters, we need to have access to sdev, not the
plain vanilla struct device pointer.

No functionality change.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220121.1542362-4-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:52 +01:00
Pierre-Louis Bossart ca6a012255
ASoC: soc-acpi: add new fields for mach_params
We currently have an ugly way of handling the SOF nocodec mode, with
blatant violations between layers. To create the nocodec card, let's
add two new fields and the existing mach_params structure, that way
there will be no differences with regular cards.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220121.1542362-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:51 +01:00
Pierre-Louis Bossart e4330cae2a
ASoC: SOF: add Kconfig option for probe workqueues
The probe workqueue is currently used in the HDaudio case, following
the example of the snd-hda-intel driver.

For development and validation, it's useful to enable the probe
workqueue even with ACPI devices or NOCODEC mode.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220121.1542362-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:50 +01:00
Peter Ujfalusi 4d1284cd79
ASoC: SOF: Simplify sof_probe_complete handling for acpi/pci/of
Set the sof_data->sof_probe_complete callback unconditionally of
CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE.

The sof_probe_complete will be called when the sof_probe_continue()
function is successfully executed, called either directly from
snd_sof_device_probe() or from the scheduled work.

Since all error cases within the call chain of snd_sof_device_probe() have
error prints, there is no need to print again in the acpi/pci/of level.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220959.1543456-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:01 +01:00
Peter Ujfalusi 3bcae98e10
ASoC: SOF: core: Add missing error prints to device probe operation
Two error cases in snd_sof_device_probe() and sof_probe_continue() are
missing error prints.
If either of them happens it is not possible to identify the reason for the
failure.

Add dev_err() prints for the cases to aim debugging.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220959.1543456-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-12 17:05:00 +01:00
Vijendar Mukunda 26e33ed9f1
ASoC: amd: Add support for ALC1015P codec in acp3x machine driver
Add ALC1015p codec support for acp3x machine driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/1617886984-9500-1-git-send-email-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 20:03:10 +01:00
Ye Bin 33e12dea13
ASoC: wcd9335: constify static struct snd_soc_dai_ops
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062644.802988-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:55 +01:00
Ye Bin 81df40a080
ASoC: codecs: lpass-tx-macro: constify static struct snd_soc_dai_ops
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062657.803668-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:54 +01:00
Ye Bin 4150cc7306
ASoC: amd: renoir: acp3x-pdm-dma: constify static struct snd_soc_dai_ops
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062658.803724-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:53 +01:00
Ye Bin a893a666b5
ASoC: codecs: lpass-wsa-macro: constify static struct snd_soc_dai_ops
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062642.802846-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:52 +01:00
Jack Yu 4f3b0f8e36
ASoC: rt1019: remove registers to sync with rt1019 datasheet
Remove some registers to synchronize with the latest rt1019 datasheet.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/01e6409f0db0451aa1e45ca7d82cca9c@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:51 +01:00
Ye Bin 3cab801e8b
ASoC: rt711-sdca: Constify static struct snd_soc_dai_ops
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062647.803141-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:50 +01:00
Ye Bin e994cf8268
ASoC: wcd934x: constify static struct snd_soc_dai_ops
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062648.803227-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:49 +01:00
Ye Bin 1f34084cc8
ASoC: rt715-sdca: Constify static struct snd_soc_dai_ops
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062654.803538-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:48 +01:00
Ye Bin a457dd92d1
ASoC: Intel: KMB: Constify static struct snd_soc_dai_ops
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062653.803478-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:47 +01:00
Ye Bin 857b602a34
ASoC: codecs: lpass-rx-macro: constify static struct snd_soc_dai_ops
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062650.803309-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:45 +01:00
Gyeongtaek Lee 45475bf60c
ASoC: soc-compress: lock pcm_mutex to resolve lockdep error
If panic_on_warn=1 is added in bootargs and compress offload playback with
DPCM is started, kernel panic would be occurred because rtd->card->pcm_mutex
isn't held in soc_compr_open_fe() and soc_compr_free_fe() and it generates
lockdep warning in the following code.

void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd,
			    int stream, int action)
{
	struct snd_soc_dai *dai;
	int i;

	lockdep_assert_held(&rtd->card->pcm_mutex);

To prevent lockdep warning but minimize side effect by adding mutex,
pcm_mutex is held just before snd_soc_runtime_activate() and
snd_soc_runtime_deactivate() and is released right after them.

Signed-off-by: Gyeongtaek Lee <gt82.lee@samsung.com>
Link: https://lore.kernel.org/r/1891546521.01617772502282.JavaMail.epsvc@epcpadp3
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:44 +01:00
Ye Bin 3e075e8428
ASoC: amd: raven: acp3x-i2s: Constify static struct snd_soc_dai_ops
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062651.803413-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09 13:39:43 +01:00
Mark Brown 703fe25d11
Merge series "ASoC: simple-card-utils: prepare for multi support" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

I want to add new audio-graph-card2 driver which can support
not only DPCM, but also Multi-CPU/Codec, and Codec2Codec.
And it is also supporting audio-graph-card2 base custom driver.

But before supporting such driver, we need to cleanup existing
simple-card / audio-graph, because these and new driver are
sharing code.

This patch-set are for Multi-CPU/Codec support,
and some cleanups.

Kuninori Morimoto (14):
  ASoC: simple-card-utils: enable flexible CPU/Codec/Platform
  ASoC: simple-card-utils: share dummy DAI and reduce memory
  ASoC: simple-card-utils: setup dai_props cpu_dai/codec_dai at initial timing
  ASoC: simple-card-utils: remove li->dais/li->conf
  ASoC: simple-card-utils: use for_each_prop_xxx()
  ASoC: simple-card-utils: remove asoc_simple_parse_xxx()
  ASoC: simple-card-utils: care multi DAI at asoc_simple_clean_reference()
  ASoC: simple-card-utils: indicate dai_fmt if exist
  ASoC: simple-card-utils: indicate missing CPU/Codec numbers for debug
  ASoC: simple-card-utils: add simple_props_to_xxx() macro
  ASoC: simple-card-utils: multi support at asoc_simple_canonicalize_cpu/platform()
  ASoC: simple-card-utils: tidyup debug info for clock
  ASoC: simple-card-utils: tidyup dev_dbg() to use 1 line
  ASoC: simple-card-utils: tidyup asoc_simple_parse_convert()

 include/sound/simple_card_utils.h     | 116 +++++++----
 sound/soc/generic/audio-graph-card.c  |  90 ++++-----
 sound/soc/generic/simple-card-utils.c | 272 +++++++++++++++++---------
 sound/soc/generic/simple-card.c       | 104 +++++-----
 4 files changed, 352 insertions(+), 230 deletions(-)

--
2.25.1
2021-04-08 17:39:58 +01:00
Ye Bin f2ec1ebb25
ASoC: tas2770: Constify static struct snd_soc_dai_ops
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062646.803053-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:21:55 +01:00
Ye Bin e9a216d8f1
ASoC: cx2072x: constify static struct snd_soc_dai_ops
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062656.803606-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:21:54 +01:00
Ye Bin 5e71e9c14d
ASoC: rt1019: constify static struct snd_soc_dai_ops
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408062701.803865-1-yebin10@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:21:53 +01:00
Muhammad Usama Anjum a93799d55f
ASoC: fsl: sunxi: remove redundant dev_err call
devm_ioremap_resource() prints error message in itself. Remove the
dev_err call to avoid redundant error message.

Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
Link: https://lore.kernel.org/r/20210407095634.GA1379642@LEGION
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:21:52 +01:00
Jiri Prchal 38ec3006ec
ASoC: codecs: tlv320aic3x: add SPI to the DT binding
Added note and example of SPI support.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Link: https://lore.kernel.org/r/20210408060741.6879-1-jiri.prchal@aksignal.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08 15:21:51 +01:00