Mark Brown [Mon, 19 Apr 2021 17:18:45 +0000 (18:18 +0100)]
Merge series "ASoC: rt286/rt298: Fixes for DMIC2 config and combo jack" from David Ward <david.ward@gatech.edu>:
The last two patches in this series fix a longstanding issue that prevented
the ALC3263 codec from using a headset mic. This codec can be found on Dell
systems including the Latitude 13 7350, Venue 11 Pro 7140, and XPS 13 9343.
In fact, there is an ACPI quirk for the XPS 13 9343, which forces it to use
legacy HD Audio just to avoid this issue:
This may allow that ACPI quirk to be removed. Either way, the other systems
mentioned above do not support this quirk and already use the ASoC driver,
so this fix is necessary for headset mic support on those systems.
Note: there is likely other handling for this codec that only exists in the
HDA driver, but which also belongs in the ASoC driver. Commit 394c97f824fa
("ALSA: hda/realtek - Change EAPD to verb control") describes an issue that
does not seem to be resolved in the ASoC driver, to give an example.
Other patches in this series are not specific to the ALC3263. These patches
set the correct combo jack configuration when headphones are inserted, and
fix a misaligned value set in the DMIC2 Configuration Default register.
David Ward [Sun, 18 Apr 2021 13:46:58 +0000 (09:46 -0400)]
ASoC: rt286: Generalize support for ALC3263 codec
The ALC3263 codec on the XPS 13 9343 is also found on the Latitude 13 7350
and Venue 11 Pro 7140. They require the same handling for the combo jack to
work with a headset: GPIO pin 6 must be set.
The HDA driver always sets this pin on the ALC3263, which it distinguishes
by the codec vendor/device ID 0x10ec0288 and PCI subsystem vendor ID 0x1028
(Dell). The ASoC driver does not use PCI, so adapt this check to use DMI to
determine if Dell is the system vendor.
David Ward [Sun, 18 Apr 2021 13:46:56 +0000 (09:46 -0400)]
ASoC: rt298: Configure combo jack for headphones
During jack detection, the combo jack is configured for a CTIA headset, and
then for an OMTP headset, while sensing the mic connection. If a mic is not
found in either case, the combo jack should be re-configured for headphones
only. This is consistent with the HDA driver behavior.
David Ward [Sun, 18 Apr 2021 13:46:55 +0000 (09:46 -0400)]
ASoC: rt286: Configure combo jack for headphones
During jack detection, the combo jack is configured for a CTIA headset, and
then for an OMTP headset, while sensing the mic connection. If a mic is not
found in either case, the combo jack should be re-configured for headphones
only. This is consistent with the HDA driver behavior.
ASoC: sigmadsp: Disable cache mechanism for readbacks
The ALSA control readback functionality only works for non-volatile
controls, i.e. control values that does not change on their own without
driver interaction.
This doesn't work for readbacks since the DSP firmware updates the
control value. Disable the cache mechanism in the driver if the control
name matches the prefix used for readbacks to ensure that the control
value is valid.
David Ward [Sun, 18 Apr 2021 13:46:54 +0000 (09:46 -0400)]
ASoC: rt286: Fix upper byte in DMIC2 configuration
This HDA verb sets the upper byte of the Configuration Default register, so
only an 8-bit value should be used. For the rt298, the same fix was applied
in commit f8f2dc4a7127 ("ASoC: rt298: fix wrong setting of gpio2_en").
sound/soc/codecs/rt5682.c:2404:42: style: Boolean result is used in
bitwise operation. Clarify expression with
parentheses. [clarifyCondition]
(pll_code.m_bp << RT5682_PLL_M_BP_SFT | RT5682_PLL_RST));
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210416191144.27006-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/lpass-rx-macro.c:1626:9: warning: Identical condition
and return expression 'ret', return value is always 0
[identicalConditionAfterEarlyExit]
return ret;
^
sound/soc/codecs/lpass-rx-macro.c:1623:6: note: If condition 'ret' is
true, the function will return/exit
if (ret)
^
sound/soc/codecs/lpass-rx-macro.c:1626:9: note: Returning identical
expression 'ret'
return ret;
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210416191144.27006-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c:2784:6: style: Condition '!num_routes' is always
false [knownConditionTrueFalse]
if (!num_routes) {
^
sound/soc/soc-core.c:2777:17: note: Assuming that condition
'num_routes<0' is not redundant
if (num_routes < 0 || num_routes & 1) {
^
sound/soc/soc-core.c:2783:2: note: Compound assignment '/=', assigned
value is 0
num_routes /= 2;
^
sound/soc/soc-core.c:2784:6: note: Condition '!num_routes' is always
false
if (!num_routes) {
^
The documentation for of_property_count_string reads
"
* Returns the number of strings on
* success, -EINVAL if the property does not exist, -ENODATA if property
* does not have a value, and -EILSEQ if the string is not null-terminated
* within the length of the property data.
"
Since the case for num_routes == 0 is not possible, let's remove this
test.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210416191144.27006-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c:2237:13: warning: %x in format string (no. 1)
requires 'unsigned int *' but the argument type is 'signed
int *'. [invalidScanfArgType_int]
} else if (sscanf(name, "%x-%x", &id1, &id2) == 2) {
^
sound/soc/soc-core.c:2237:13: warning: %x in format string (no. 2)
requires 'unsigned int *' but the argument type is 'signed
int *'. [invalidScanfArgType_int]
} else if (sscanf(name, "%x-%x", &id1, &id2) == 2) {
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210416191144.27006-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
value that is never used. [unreadVariable]
acpi_status status = AE_OK;
^
sound/soc/soc-acpi.c:37:21: style: Variable 'status' is assigned a Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210416191144.27006-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Fri, 16 Apr 2021 15:55:32 +0000 (16:55 +0100)]
Merge series "ASoC: Intel: add new TGL/ADL configurations" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
Very little code but quite a few descriptors to add TigerLake (TGL)
/AlderLake (ADL) ACPI match tables for I2S and SoundWire devices, new
dailinks for Bluetooth offload. Some day this will be read from
platform firmware.
Also clarify how microphones are handled for SoundWire devices, and
create modules to avoid linking the same code multiple times.
Pierre-Louis Bossart (5):
ASoC: Intel: soc-acpi: add ADL SoundWire base configurations
ASoC: Intel: soc-acpi: add ADL jack-less SoundWire configurations
ASoC: Intel: sof_sdw: add mutual exclusion between PCH DMIC and RT715
ASoC: Intel: boards: handle hda-dsp-common as a module
ASoC: Intel: boards: create sof-maxim-common module
Vamshi Krishna Gopal (3):
ASoC: Intel: soc-acpi: add entries for i2s machines in ADL match table
ASoC: Intel: sof_sdw: add quirk for new ADL-P Rvp
ASoC: Intel: boards: add support for adl boards in sof-rt5682
ASoC: simple-card-utils: Propagate errors on too many links
The DAI counting code doesn't propagate errors when the number of
maximum links is exceeded, which causes subsequent initialization code
to continue to run and that eventually leads to memory corruption with
the code trying to access memory that is out of bounds.
Fix this by propagating errors when the maximum number of links is
reached, which ensures that the driver fails to load and prevents the
memory corruption.
Fixes: f2138aed231c ("ASoC: simple-card-utils: enable flexible CPU/Codec/Platform") Signed-off-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20210416071147.2149109-1-thierry.reding@gmail.com Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
symmetric_rate : DAI_Link / CPU / Codec
symmetric_channels : DAI_Link / CPU / Codec
symmetric_sample_bits : DAI_Link / CPU / Codec
v5.7 - v5.11 (= Generation-2): (= because of bug by (A))
symmetric_rate : DAI_Link / CPU
symmetric_channels : DAI_Link / CPU / Codec
symmetric_sample_bits : DAI_Link / CPU / Codec
v5.12 - (= Generation-3): (= back by (B))
symmetric_rate : DAI_Link / CPU / Codec
symmetric_channels : DAI_Link / CPU / Codec
symmetric_sample_bits : DAI_Link / CPU / Codec
OTOH, we can use DPCM which is configured by FE / BE.
Both FE / BE uses dummy-DAI.
FE: CPU <-> dummy-DAI
BE: dummy-DAI <-> Codec
One note is that we can use .be_hw_params_fixup in DPCM case.
This means BE settings might be fixuped/updated by FE.
This feature is used for example on MIXer case.
It can be happen not only for rate, but for channels/sample_bits too.
Because of these reasons, below issue happen on
Generation-1 / Generation-3, if...
1) Sound Card used DPCM
2) It exchanges rate to 48kHz by using .be_hw_params_fixup()
3) Codec had symmetric_rate = 1
I didn't confirm, but maybe same things happen
if it exchanged channels/sample_bits at Generation-1/2/3 too.
if (symmetry)
for_each_rtd_cpu_dais(rtd, i, cpu_dai)
if (cpu_dai->xxx && cpu_dai->xxx != d.xxx) {
dev_err(rtd->dev, "...");
return -EINVAL;
}
Because of above reason 3) (= Codec had symmetric_rate = 1)
BE can't ignore "if (symmetric)".
At 1st aplay, soc_pcm_params_symmetry() ignores it,
because dummy-DAI->rate is 0.
After this check, each DAI sets/keep settings.
In above sample case, BE gets 48000 and FE gets 44100,
and it happen BE -> FE order.
Because DPCM is sharing *same* dummy-DAI,
dummy-DAI sets as 48000 by BE, and is overwrote by 44100 by FE.
This settings never be cleaned (= a) after 1st aplay,
because dummy-DAI is used from FE/BE, never be last user (b).
static int soc_pcm_hw_clean(...)
{
...
for_each_rtd_dais(rtd, i, dai) {
...
(b) if (snd_soc_dai_active(dai) == 1)
(a) soc_pcm_set_dai_params(dai, NULL);
...
}
...
}
At 2nd aplay, BE gets 48000 but dummy-DAI is keeping 44100,
soc_pcm_params_symmetry() checks will fail.
To solve this issue, this patch ignores dummy-DAI
at soc_pcm_params_symmetry()
Daniel Baluta [Wed, 14 Apr 2021 10:12:12 +0000 (13:12 +0300)]
ASoC: core: Don't set platform name when of_node is set
A DAI link has 3 components:
* CPU
* platform
* codec(s)
A component is specified via:
* name
* of_node
* dai_name
In order to avoid confusion when building a sound card we disallow
matching by both name and of_node (1).
soc_check_tplg_fes allows overriding certain BE links by overriding
BE link name. This doesn't work well if BE link was specified via DT,
because we end up with a link with both name and of_node specified
which is conflicting with (1).
In order to fix this we need to:
* override of_node if component was specified via DT
* override name, otherwise.
Recently, the sof_pcm_dai_link_fixup() function was
updated to match SSP config with the PCM hw_params
and set the current_config for the DAI widget.
But the sof_restore_pipelines() function still chooses the
default config for the DAI widget upon resuming. Fix this
to use the last used config when setting up the DAI widget
during resume.
Fixes: c943a586f6e49 ("ASoC: SOF: match SSP config with pcm hw params") Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210415162107.130963-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: audio-graph: use simple_props_to_xxx() macro
We shouldn't use dai_props->cpus/codecs directly,
because these are array now to supporting multi CPU/Codec/Platform.
This patch uses simple_props_to_xxx() macro for it.
We shouldn't use dai_link->cpus/codecs/platforms directly,
because these are array now to supporting multi CPU/Codec/Platform.
This patch uses asoc_link_to_xxx() macro for it.
ASoC: simple-card: use simple_props_to_xxx() macro
We shouldn't use dai_props->cpus/codecs directly,
because these are array now to supporting multi CPU/Codec/Platform.
This patch uses simple_props_to_xxx() macro for it.
We shouldn't use dai_link->cpus/codecs/platforms directly,
because these are array now to supporting multi CPU/Codec/Platform.
This patch uses asoc_link_to_xxx() macro for it.
ASoC: simple-card: remove unused variable from simple_parse_of()
commit d9ffff696c5b4 ("ASoC: simple-card: Use snd_soc_of_parse_aux_devs()")
switched to use snd_soc_of_parse_aux_devs() on simple_parse_of().
Thus noone is using *top anymore. Let's cleanup unused variable.
Mark Brown [Wed, 14 Apr 2021 15:29:35 +0000 (16:29 +0100)]
Merge series "kunit: Fix formatting of KUNIT tests to meet the standard" from Nico Pache <npache@redhat.com>:
There are few instances of KUNIT tests that are not properly defined.
This commit focuses on correcting these issues to match the standard
defined in the Documentation.
Issues Fixed:
- tests should end in KUNIT_TEST, some fixes have been applied to
correct issues were KUNIT_TESTS is used or KUNIT is not mentioned.
- Tests should default to KUNIT_ALL_TESTS
- Tests configs tristate should have if !KUNIT_ALL_TESTS
No functional changes other than CONFIG name changes
Changes since v2:
- Split patch 1 by subcomponents
- fix issues where config was *KUNIT_TEST_TEST
- properly threaded/chained messages
Nico Pache (6):
kunit: ASoC: topology: adhear to KUNIT formatting standard
kunit: software node: adhear to KUNIT formatting standard
kunit: ext4: adhear to KUNIT formatting standard
kunit: lib: adhear to KUNIT formatting standard
kunit: mptcp: adhear to KUNIT formatting standard
m68k: update configs to match the proper KUNIT syntax
Current ssi.c has duplicated code to control BUSIF
over/under run interrupt.
This patch adds new rsnd_ssi_busif_err_irq_enable/disable()
and share the code.
Current ssi.c clears BUSIF error status at __rsnd_ssi_interrupt(),
but its code is verbose.
This patch off-load it to rsnd_ssi_busif_err_status_clear().
commit 66c705d07d784 ("SoC: rsnd: add interrupt support for SSI BUSIF
buffer") adds __rsnd_ssi_interrupt() checks for BUSIF status,
but is using "break" at for loop.
This means it is not checking all status. Let's check all BUSIF status.
ASoC: rsnd: call rsnd_ssi_master_clk_start() from rsnd_ssi_init()
Current rsnd needs to call .prepare (P) for clock settings,
.trigger for playback start (S) and stop (E).
It should be called as below from SSI point of view.
P -> S -> E -> P -> S -> E -> ...
But, if you used MIXer, below case might happen
(2)
1: P -> S ---> E -> ...
2: P ----> S -> ...
(1) (3)
P(1) setups clock, but E(2) resets it. and starts playback (3).
In such case, it will reports "SSI parent/child should use same rate".
rsnd_ssi_master_clk_start() which is the main function at (P)
was called from rsnd_ssi_init() (= S) before,
but was moved by below patch to rsnd_soc_dai_prepare() (= P) to avoid
using clk_get_rate() which shouldn't be used under atomic context.
commit 4d230d1271064 ("ASoC: rsnd: fixup not to call clk_get/set
under non-atomic")
Because of above patch, rsnd_ssi_master_clk_start() is now called at (P)
which is for non atomic context. But (P) is assuming that spin lock is
*not* used.
One issue now is rsnd_ssi_master_clk_start() is checking ssi->xxx
which should be protected by spin lock.
After above patch, adg.c had below patch for other reasons.
commit 06e8f5c842f2d ("ASoC: rsnd: don't call clk_get_rate()
under atomic context")
clk_get_rate() is used at probe() timing by this patch.
In other words, rsnd_ssi_master_clk_start() is no longer using
clk_get_rate() any more.
This means we can call it from rsnd_ssi_init() (= S) again which is
protected by spin lock.
This patch re-move it to under spin lock, and solves
1. checking ssi->xxx without spin lock issue.
2. clk setting / device start / device stop race condition.
Mark Brown [Tue, 13 Apr 2021 13:11:53 +0000 (14:11 +0100)]
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.
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()
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.
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.
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.
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.
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".
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.
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>
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>
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>
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>
Peter Ujfalusi [Fri, 9 Apr 2021 22:09:59 +0000 (15:09 -0700)]
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>
Peter Ujfalusi [Fri, 9 Apr 2021 22:09:58 +0000 (15:09 -0700)]
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>
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.
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.
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.
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.
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.
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.
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.
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.
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.
Gyeongtaek Lee [Wed, 7 Apr 2021 04:14:04 +0000 (13:14 +0900)]
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.
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.
Mark Brown [Thu, 8 Apr 2021 16:39:58 +0000 (17:39 +0100)]
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()
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.
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.
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.