18 Jan, 2021
1 commit
-
Change-Id: I42aa8c4cdf7dcf55b4392a5588f6d37d43a1eef7
18 Dec, 2020
2 commits
-
* origin/audio/sof: (28 commits)
LF-3026-2 ASoC: SOF: imx8m: Remove internal priv->suspended variable
LF-3026-1 ASoC: SOF: imx8m: Introduce imx8m_dsp_set_power_state
LF-2605 ASoC: SOF: imx: Use sdev->pdata->hw_pdata for private data
ASoC: SOF: imx8m: Add correct prototype for imx8m_dsp_suspend
ASoC: SOF: imx8m: Use helper functions to enable/disable clocks
... -
* origin/audio/rpmsg: (73 commits)
LF-2225-6 ASoC: codecs: rpmsg_cs42xx8: change to .mute_stream()
LF-2225-5 ASoC: codecs: rpmsg_wm8960: change to .mute_stream()
MLK-23702-4: ASoC: imx-rpmsg: support rpmsg audio for i.MX8MP
MLK-23702-3: ASoC: rpmsg_wm8960: Add i2c interface
MLK-23702-2: ASoC: imx-pcm-rpmsg: Don't register codec driver if it is from DT
...
14 Dec, 2020
3 commits
-
ACPI creates tables with information about the machine driver.
With DT there is no need for such tables because we can directly
get all the information needed from DT file.This patch introduces machine driver property inside dsp node.
Signed-off-by: Daniel Baluta
-
Fix compile issue for upgrade to 5.5 that struct snd_pcm_ops
is removed from struct snd_soc_component_driver.Signed-off-by: Shengjiu Wang
-
In order to support multi-fifo sdma script, the audio driver need to send
the fifo number to dma driver through dma_slave_config, and the cpu_dai
driver should config fifo_num for the audio platform driver, then platform
driver can config fifo_num to dma.
So add new variable fifo_num for struct snd_dmaengine_dai_dma_data.Signed-off-by: Shengjiu Wang
Reviewed-by: Robin Gong
22 Nov, 2020
1 commit
-
…x/kernel/git/jejb/scsi") into android-mainline
Steps on the way to 5.10-rc5
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If85acec5178f1d8317f5ee781ae91ac27df55464
20 Nov, 2020
1 commit
-
…t/broonie/sound into for-linus
ASoC: Fixes for v5.11
A collection of driver specific fixes, mostly for x86 systems (or CODECs
used mostly on x86) and all for relatively minor issues, the biggest one
being fixing S24_LE format on Keem Bay systems.
09 Nov, 2020
1 commit
-
Linux 5.10-rc3
Signed-off-by: Greg Kroah-Hartman
Change-Id: I7884051ea7b86204b2685b51462368e122ad0772
06 Nov, 2020
1 commit
-
Add delay to fix pop noise from speaker.
Signed-off-by: Jack Yu
Reviewed-by: Pierre-Louis Bossart
Link: https://lore.kernel.org/r/20201105030804.31115-1-jack.yu@realtek.com
Signed-off-by: Mark Brown
27 Oct, 2020
1 commit
-
When building with W=2, there are lots of warnings about the
snd_kcontrol_new name field being an array of 'unsigned char'
but initialized to a string:include/sound/soc.h:93:48: warning: pointer targets in initialization of 'const unsigned char *' from 'char *' differ in signedness [-Wpointer-sign]
Make it a regular 'char *' to avoid flooding the build log with this.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Arnd Bergmann
Link: https://lore.kernel.org/r/20201026165715.3723704-1-arnd@kernel.org
Signed-off-by: Takashi Iwai
26 Oct, 2020
2 commits
-
Kernel-doc markups should use this format:
identifier - descriptionThere is a common comment marked, instead, with kernel-doc
notation.Some identifiers have different names between their prototypes
and the kernel-doc markup.Signed-off-by: Mauro Carvalho Chehab
Acked-by: Mark Brown
Link: https://lore.kernel.org/r/535182d6f55d7a7de293dda9676df68f5f60afc6.1603469755.git.mchehab+huawei@kernel.org
Signed-off-by: Takashi Iwai -
…linux/kernel/git/tiwai/sound") into android-mainline
Steps on the way to 5.10-rc1
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2833b58dbd8d715935ac010349f6e28657078bd0
12 Oct, 2020
3 commits
-
…e/sound into for-linus
ASoC: Updates for v5.10
Not a huge amount going on in the core for ASoC this time but quite a
lot of driver activity, especially for the Intel platforms:- Replacement of the DSP driver for some older x86 systems with a new
one which was written with closer reference to the DSP firmware so
should hopefully be more robust and maintainable.
- A big batch of static checker and other fixes for the rest of the x86
DSP drivers.
- Cleanup of the error unwinding code from Morimoto-san, hopefully
making it more robust.
- Helpers for parsing auxiluary devices from the device tree from
Stephan Gerhold.
- New support for AllWinner A64, Cirrus Logic CS4234, Mediatek MT6359
Microchip S/PDIF TX and RX controllers, Realtek RT1015P, and Texas
Instruments J721E, TAS2110, TAS2564 and TAS2764 -
In case HDA controller becomes active, but codec is runtime suspended,
jack detection is not successful and no interrupt is raised. This has
been observed with multiple Realtek codecs and HDA controllers from
different vendors. Bug does not occur if both codec and controller are
active, or both are in suspend. Bug can be easily hit on desktop systems
with no built-in speaker.The problem can be fixed by powering up the codec once after every
controller runtime resume. Even if codec goes back to suspend later, the
jack detection will continue to work. Add a flag to 'hda_codec' to
describe codecs that require this flow from the controller driver.
Modify __azx_runtime_resume() to use pm_request_resume() to make the
intent clearer.Mark all Realtek codecs with the new forced_resume flag.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=209379
Cc: Kailang Yang
Co-developed-by: Kai-Heng Feng
Signed-off-by: Kai-Heng Feng
Signed-off-by: Kai Vehmanen
Cc:
Link: https://lore.kernel.org/r/20201012102704.794423-1-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai
06 Oct, 2020
1 commit
-
byt-rt5640 is deprecated in favor of bytcr_rt5640 used by
sound/soc/intel/atom and SOF solutions both. Remove redundant machine
board and all related code.Signed-off-by: Cezary Rojewski
Reviewed-by: Andy Shevchenko
Acked-by: Liam Girdwood
Link: https://lore.kernel.org/r/20201006064907.16277-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown
29 Sep, 2020
4 commits
-
soc_pcm_open() does rollback when failed (A),
but, it is almost same as soc_pcm_close().static int soc_pcm_open(xxx)
{
...
if (ret < 0)
goto xxx_err;
...
return 0;^ config_err:
| ...
| rtd_startup_err:
(A) ...
| component_err:
| ...
v return ret;
}The difference is
soc_pcm_close() is for all dai/component/substream,
rollback is for succeeded part only.This kind of duplicated code can be a hotbed of bugs,
thus, we want to share soc_pcm_close() and rollback.Now, soc_pcm_open/close() are handling
1) snd_soc_dai_startup/shutdown()
2) snd_soc_link_startup/shutdown()
3) snd_soc_component_module_get/put()
4) snd_soc_component_open/close()
=> 5) pm_runtime_put/get()This patch is for 5) pm_runtime_put/get().
The idea of having bit-flag or counter is not enough for this purpose.
For example if one DAI is used for 2xPlaybacks for some reasons,
and if 1st Playback was succeeded but 2nd Playback was failed,
2nd Playback rollback doesn't need to call shutdown.
But it has succeeded bit-flag or counter via 1st Playback,
thus, 2nd Playback rollback will call unneeded shutdown.
And 1st Playback's necessary shutdown will not be called,
because bit-flag or counter was cleared by wrong 2nd Playback rollback.To avoid such case, this patch marks substream pointer when get() was
succeeded. If rollback needed, it will check rollback flag and marked
substream pointer.One note here is that it cares *current* get() only now.
but we might want to check *whole* marked substream in the future.
This patch is using macro named "push/pop", so that it can be easily
update.Signed-off-by: Kuninori Morimoto
Link: https://lore.kernel.org/r/87h7ribwnb.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown -
soc_pcm_open() does rollback when failed (A),
but, it is almost same as soc_pcm_close().static int soc_pcm_open(xxx)
{
...
if (ret < 0)
goto xxx_err;
...
return 0;^ config_err:
| ...
| rtd_startup_err:
(A) ...
| component_err:
| ...
v return ret;
}The difference is
soc_pcm_close() is for all dai/component/substream,
rollback is for succeeded part only.This kind of duplicated code can be a hotbed of bugs,
thus, we want to share soc_pcm_close() and rollback.Now, soc_pcm_open/close() are handling
1) snd_soc_dai_startup/shutdown()
2) snd_soc_link_startup/shutdown()
=> 3) snd_soc_component_module_get/put()
=> 4) snd_soc_component_open/close()
5) pm_runtime_put/get()This patch is for 3) snd_soc_component_module_get/put()
4) snd_soc_component_open/close().The idea of having bit-flag or counter is not enough for this purpose.
For example if one DAI is used for 2xPlaybacks for some reasons,
and if 1st Playback was succeeded but 2nd Playback was failed,
2nd Playback rollback doesn't need to call shutdown.
But it has succeeded bit-flag or counter via 1st Playback,
thus, 2nd Playback rollback will call unneeded shutdown.
And 1st Playback's necessary shutdown will not be called,
because bit-flag or counter was cleared by wrong 2nd Playback rollback.To avoid such case, this patch marks substream pointer when open() was
succeeded. If rollback needed, it will check rollback flag and marked
substream pointer.One note here is that it cares *current* open() only now.
but we might want to check *whole* marked substream in the future.
This patch is using macro named "push/pop", so that it can be easily
update.Signed-off-by: Kuninori Morimoto
Link: https://lore.kernel.org/r/87imbybwno.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown -
soc_pcm_open() does rollback when failed (A),
but, it is almost same as soc_pcm_close().static int soc_pcm_open(xxx)
{
...
if (ret < 0)
goto xxx_err;
...
return 0;^ config_err:
| ...
| rtd_startup_err:
(A) ...
| component_err:
| ...
v return ret;
}The difference is
soc_pcm_close() is for all dai/component/substream,
rollback is for succeeded part only.This kind of duplicated code can be a hotbed of bugs,
thus, we want to share soc_pcm_close() and rollback.Now, soc_pcm_open/close() are handling
1) snd_soc_dai_startup/shutdown()
=> 2) snd_soc_link_startup/shutdown()
3) snd_soc_component_module_get/put()
4) snd_soc_component_open/close()
5) pm_runtime_put/get()This patch is for 2) snd_soc_link_startup/shutdown().
The idea of having bit-flag or counter is not enough for this purpose.
For example if one DAI is used for 2xPlaybacks for some reasons,
and if 1st Playback was succeeded but 2nd Playback was failed,
2nd Playback rollback doesn't need to call shutdown.
But it has succeeded bit-flag or counter via 1st Playback,
thus, 2nd Playback rollback will call unneeded shutdown.
And 1st Playback's necessary shutdown will not be called,
because bit-flag or counter was cleared by wrong 2nd Playback rollback.To avoid such case, this patch marks substream pointer when startup() was
succeeded. If rollback needed, it will check rollback flag and marked
substream pointer.One note here is that it cares *current* startup() only now.
but we might want to check *whole* marked substream in the future.
This patch is using macro named "push/pop", so that it can be easily
update.Signed-off-by: Kuninori Morimoto
Link: https://lore.kernel.org/r/87k0webwnv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown -
soc_pcm_open() does rollback when failed (A),
but, it is almost same as soc_pcm_close().static int soc_pcm_open(xxx)
{
...
if (ret < 0)
goto xxx_err;
...
return 0;^ config_err:
| ...
| rtd_startup_err:
(A) ...
| component_err:
| ...
v return ret;
}The difference is
soc_pcm_close() is for all dai/component/substream,
rollback is for succeeded part only.This kind of duplicated code can be a hotbed of bugs,
thus, we want to share soc_pcm_close() and rollback.Now, soc_pcm_open/close() are handling
=> 1) snd_soc_dai_startup/shutdown()
2) snd_soc_link_startup/shutdown()
3) snd_soc_component_module_get/put()
4) snd_soc_component_open/close()
5) pm_runtime_put/get()This patch is for 1) snd_soc_dai_startup/shutdown().
The idea of having bit-flag or counter is not enough for this purpose.
For example if one DAI is used for 2xPlaybacks for some reasons,
and if 1st Playback was succeeded but 2nd Playback was failed,
2nd Playback rollback doesn't need to call shutdown.
But it has succeeded bit-flag or counter via 1st Playback,
thus, 2nd Playback rollback will call unneeded shutdown.
And 1st Playback's necessary shutdown will not be called,
because bit-flag or counter was cleared by wrong 2nd Playback rollback.To avoid such case, this patch marks substream pointer when startup() was
succeeded. If rollback needed, it will check rollback flag and marked
substream pointer.One note here is that it cares *current* startup() only now.
but we might want to check *whole* marked substream in the future.
This patch is using macro named "push/pop", so that it can be easily
update.Signed-off-by: Kuninori Morimoto
Link: https://lore.kernel.org/r/87lfgubwoc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown
24 Sep, 2020
1 commit
-
The current SOF machine driver adds a name prefix for each codec,
mainly to differentiate ALSA controls for left and right amplifiers.This is a good idea, but the machine driver duplicates some of the
information that already exists in ACPI descriptors, so add those
prefixes there. Follow-up patches will make use of the information
encoded in these tables and remove duplication.Signed-off-by: Pierre-Louis Bossart
Reviewed-by: Bard Liao
Reviewed-by: Guennadi Liakhovetski
Signed-off-by: Kai Vehmanen
Link: https://lore.kernel.org/r/20200923080514.3242858-4-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown
22 Sep, 2020
3 commits
-
Use set_jack ops to set jack so machine drivers do not need to include
hdmi-codec.h explicitly.Signed-off-by: Cheng-Yi Chiang
Reviewed-by: Tzung-Bi Shih
Link: https://lore.kernel.org/r/20200922062316.1172935-1-cychiang@chromium.org
Signed-off-by: Mark Brown -
To provide backward compatibility to older systems, the SOF HDA driver
allows user to specify which HDMI codec driver to use at runtime via
kernel parameter. This mechanism has a subtle flaw in that it assumes
the codec drivers not to be loaded when the SOF PCI driver is loaded.The problem is rooted in use of the hdev->type field.
snd_hdac_ext_bus_device_init() initializes this field to HDA_DEV_ASOC.
This signals the HDA core that ASoC drivers should be considered in
driver matching (hda_bus_match()). The SOF and SST drivers continue by
overriding this field to HDA_DEV_LEGACY and proceeding to load driver
modules with request_module(). Correct drivers will get loaded and
attached.If however the codec drivers are already loaded when
snd_hdac_ext_bus_device_init() is called, the matching will not work as
expected as device type is still set to HDA_DEV_ASOC. Specifically if
hdac-hdmi is attached when machine driver is configured to use hdac-hda,
this leads to out-of-bounds memory access in
hda_dsp_hdmi_build_controls().Fix the issue by adding codec type as a parameter to
snd_hdac_ext_bus_device_init() and ensuring type is set correctly from
the start.Fixes: 139c7febad1a ("ASoC: SOF: Intel: add support for snd-hda-codec-hdmi")
Signed-off-by: Kai Vehmanen
Reviewed-by: Guennadi Liakhovetski
Reviewed-by: Pierre-Louis Bossart
Link: https://lore.kernel.org/r/20200921100841.2882662-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown -
On i.MX platforms PM is not managed via ACPI although CONFIG_ACPI
can be set. So, in order to correctly set the system target state
we introduce a flag for platforms that require to use acpi target
states.Signed-off-by: Daniel Baluta
Reviewed-by: Pierre-Louis Bossart
Reviewed-by: Ranjani Sridharan
Signed-off-by: Kai Vehmanen
Link: https://lore.kernel.org/r/20200921105038.2909899-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown
21 Sep, 2020
1 commit
-
Linux 5.9-rc6
Signed-off-by: Greg Kroah-Hartman
Change-Id: I3bccdbb773bfc2c604742e6ff5983bf0b61ba0b5
18 Sep, 2020
1 commit
-
Series that adds debug support for IMX platforms, more details to
FW version information, adds missing -EACCESS handling to
pm_runtime_get_sync() calls and a set of minor cosmetic, trace
verbosity and coding style issues.Guennadi Liakhovetski (3):
ASoC: SOF: (cosmetic) remove redundant "ret" variable uses
ASoC: SOF: remove several superfluous type-casts
ASoC: SOF: fix range checksIulian Olaru (1):
ASoC: SOF: imx: Add debug support for imx platformsKarol Trzcinski (1):
ASoC: SOF: Add `src_hash` to `sof_ipc_fw_version` structurePierre-Louis Bossart (3):
ASoC: SOF: debug: update test for pm_runtime_get_sync()
ASoC: SOF: control: update test for pm_runtime_get_sync()
ASoC: SOF: Intel: hda: reduce verbosity of boot error logsinclude/sound/sof/info.h | 4 +-
sound/soc/sof/control.c | 62 +++++++++++++--------------
sound/soc/sof/debug.c | 2 +-
sound/soc/sof/imx/Kconfig | 8 ++++
sound/soc/sof/imx/Makefile | 3 ++
sound/soc/sof/imx/imx-common.c | 72 ++++++++++++++++++++++++++++++++
sound/soc/sof/imx/imx-common.h | 16 +++++++
sound/soc/sof/imx/imx8.c | 23 +++++++++-
sound/soc/sof/imx/imx8m.c | 17 +++++++-
sound/soc/sof/intel/hda-loader.c | 16 +++----
sound/soc/sof/intel/hda.c | 12 ++++--
sound/soc/sof/intel/hda.h | 2 +
sound/soc/sof/sof-audio.c | 6 +--
sound/soc/sof/sof-priv.h | 8 ++++
sound/soc/sof/topology.c | 44 ++++++++++---------
15 files changed, 226 insertions(+), 69 deletions(-)
create mode 100644 sound/soc/sof/imx/imx-common.c
create mode 100644 sound/soc/sof/imx/imx-common.h--
2.27.0
17 Sep, 2020
2 commits
-
This field will be used to compare ldc file with loaded fw version,
to assert validity of trace logs. Value used in sof-logger.Signed-off-by: Karol Trzcinski
Reviewed-by: Guennadi Liakhovetski
Reviewed-by: Pierre-Louis Bossart
Signed-off-by: Kai Vehmanen
Link: https://lore.kernel.org/r/20200917105633.2579047-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown
10 Sep, 2020
2 commits
-
There is no caller in tree, so can remove it.
Signed-off-by: YueHaibing
Link: https://lore.kernel.org/r/20200909135744.33464-1-yuehaibing@huawei.com
Signed-off-by: Takashi Iwai -
The tasklet is an old API that should be deprecated, usually can be
converted to another decent API. In ALSA core timer API, the
callbacks can be offlined to a tasklet when a flag is set in the timer
backend. It can be achieved gracefully with a work queued in the
high-prio system workqueue.This patch replaces the usage of tasklet in ALSA timer API with a
simple work. Currently the tasklet feature is used only in the system
timer and hrtimer backends, so both are patched to use the new flag
name SNDRV_TIMER_HW_WORK, too.Link: https://lore.kernel.org/r/20200903104131.21097-3-tiwai@suse.de
Signed-off-by: Takashi Iwai
07 Sep, 2020
5 commits
-
….vehmanen@linux.intel.com>:
This series adds support for UUID based component identification
in SOF. UUIDs provide a more scalable alternative to the old
component type based approach to identify which DSP components
should be loaded.More detailed description of UUID usage in SOF is available in:
https://thesofproject.github.io/latest/developer_guides/uuid/UUID support is an incremental update to the SOF IPC interface. Driver
remains compatible with pre-UUID (ABI <3.17) firmware versions.Keyon Jie (16):
ASoC: SOF: tokens: add token for component UUID
ASoC: SOF: add comp_ext to struct snd_sof_widget
ASoC: SOF: topology: create component extended tokens
ASoC: SOF: topology: parse comp_ext_tokens for all widgets
ASoC: SOF: use the sof_ipc_comp reserved bytes for extended data
ASoC: SOF: topology: add helper for setting up IPC component
ASoC: SOF: append extended data to sof_ipc_comp_dai
ASoC: SOF: append extended data to sof_ipc_comp_mixer
ASoC: SOF: append extended data to sof_ipc_comp_volume
ASoC: SOF: append extended data to sof_ipc_comp_host
ASoC: SOF: append extended data to sof_ipc_comp_src
ASoC: SOF: append extended data to sof_ipc_comp_asrc
ASoC: SOF: append extended data to sof_ipc_comp_tone
ASoC: SOF: append extended data to sof_ipc_comp_process
ASoC: SOF: append extended data to sof_ipc_comp_mux
ASoC: SOF: topology: make process type optionalinclude/sound/sof/topology.h | 12 +-
include/uapi/sound/sof/tokens.h | 1 +
sound/soc/sof/sof-audio.c | 23 +++-
sound/soc/sof/sof-audio.h | 3 +
sound/soc/sof/topology.c | 208 ++++++++++++++++++++------------
5 files changed, 161 insertions(+), 86 deletions(-)--
2.27.0 -
Use the 32bit reserved member of the struct sof_ipc_comp as the extended
data length, this will help to minimize the ABI change for adding new
extended data to the struct sof_ipc_comp, usually only minor ABI version
bump needed for every update with this new solution.Signed-off-by: Keyon Jie
Reviewed-by: Ranjani Sridharan
Signed-off-by: Kai Vehmanen
Link: https://lore.kernel.org/r/20200904132744.1699575-6-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown -
Add member comp_ext to struct snd_sof_widget, which will be used for
topology extended tokens parsing.Signed-off-by: Keyon Jie
Reviewed-by: Ranjani Sridharan
Signed-off-by: Kai Vehmanen
Link: https://lore.kernel.org/r/20200904132744.1699575-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown -
Previous changes move to use ERR_PTR(-ENOTSUPP), but it's not clear
what implementations can return in case of errors. Explicitly document
that NULL is not a possible return value, only ERR_PTR with a negative
error code is valid.Fixes: 308811a327c38 ('ASoC: soc-dai: return proper error for get_sdw_stream()')
Cc: Srinivas Kandagatla
Reported-by: Bard Liao
Signed-off-by: Pierre-Louis Bossart
Reviewed-by: Rander Wang
Signed-off-by: Bard Liao
Link: https://lore.kernel.org/r/20200904182854.3944-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown -
Introduce for_each_rtd_dais_rollback macro which behaves exactly like
for_each_codec_dais_rollback and its cpu_dais equivalent but for all
dais instead.Use newly added macro to fix soc_pcm_open error path and prevent
uninitialized dais from being cleaned-up.Signed-off-by: Cezary Rojewski
Fixes: 5d9fa03e6c35 ("ASoC: soc-pcm: tidyup soc_pcm_open() order")
Acked-by: Liam Girdwood
Acked-by: Kuninori Morimoto
Link: https://lore.kernel.org/r/20200907111939.16169-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown
28 Aug, 2020
1 commit
-
commit 25612477d20b52 ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper")
added snd_soc_dai_link_set_capabilities().
But it is using snd_soc_find_dai() (A) which is required client_mutex (B).
And client_mutex is soc-core.c local.struct snd_soc_dai *snd_soc_find_dai(xxx)
{
...
(B) lockdep_assert_held(&client_mutex);
...
}void snd_soc_dai_link_set_capabilities(xxx)
{
...
for_each_pcm_streams(direction) {
...
for_each_link_cpus(dai_link, i, cpu) {
(A) dai = snd_soc_find_dai(cpu);
...
}
...
for_each_link_codecs(dai_link, i, codec) {
(A) dai = snd_soc_find_dai(codec);
...
}
}
...
}Because of these background, we will get WARNING if .config has CONFIG_LOCKDEP.
WARNING: CPU: 2 PID: 53 at sound/soc/soc-core.c:814 snd_soc_find_dai+0xf8/0x100
CPU: 2 PID: 53 Comm: kworker/2:1 Not tainted 5.7.0-rc1+ #328
Hardware name: Renesas H3ULCB Kingfisher board based on r8a77951 (DT)
Workqueue: events deferred_probe_work_func
pstate: 60000005 (nZCv daif -PAN -UAO)
pc : snd_soc_find_dai+0xf8/0x100
lr : snd_soc_find_dai+0xf4/0x100
...
Call trace:
snd_soc_find_dai+0xf8/0x100
snd_soc_dai_link_set_capabilities+0xa0/0x16c
graph_dai_link_of_dpcm+0x390/0x3c0
graph_for_each_link+0x134/0x200
graph_probe+0x144/0x230
platform_drv_probe+0x5c/0xb0
really_probe+0xe4/0x430
driver_probe_device+0x60/0xf4snd_soc_find_dai() will be used from (X) CPU/Codec/Platform driver with
mutex lock, and (Y) Card driver without mutex lock.
This snd_soc_dai_link_set_capabilities() is for Card driver,
this means called without mutex.
This patch adds snd_soc_find_dai_with_mutex() to solve it.Fixes: 25612477d20b52 ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper")
Signed-off-by: Kuninori Morimoto
Link: https://lore.kernel.org/r/87blixvuab.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown
27 Aug, 2020
3 commits
-
….sridharan@linux.intel.com>:
This series includes fixes and updates for the FW boot sequence for
Intel platforms.Ranjani Sridharan (7):
ALSA: hda: fix VS_LTRC register name
ASoC: SOF: Intel: hda: Add helper function to program ICCMAX stream
ASoC: SOF: Intel: hda: modify the signature of get_stream_with_tag()
ASoC: SOF: Intel: hda: define macro for code loader stream format
ASoC: SOF: Intel: hda: Define FW boot sequence with ICCMAX
ASoC: SOF: Intel: hda: Add sof_tgl_ops for TGL platforms
ASoC: SOF: Intel: hda: Simplify error handling during FW bootYong Zhi (1):
ASoC: SOF: Intel: hda: Remove unused parameters in cl_dsp_init()include/sound/hda_register.h | 2 +-
sound/soc/sof/intel/Makefile | 2 +-
sound/soc/sof/intel/cnl.c | 23 +----
sound/soc/sof/intel/hda-ipc.h | 4 +
sound/soc/sof/intel/hda-loader.c | 145 ++++++++++++++++++-------------
sound/soc/sof/intel/hda-stream.c | 69 +++++++++++++++
sound/soc/sof/intel/hda.h | 6 ++
sound/soc/sof/intel/tgl.c | 137 +++++++++++++++++++++++++++++
sound/soc/sof/sof-pci-dev.c | 2 +-
9 files changed, 306 insertions(+), 84 deletions(-)
create mode 100644 sound/soc/sof/intel/tgl.c--
2.25.1 -
commit 25612477d20b52 ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper")
added snd_soc_dai_link_set_capabilities().
But it is using snd_soc_find_dai() (A) which is required client_mutex (B).
And client_mutex is soc-core.c local.struct snd_soc_dai *snd_soc_find_dai(xxx)
{
...
(B) lockdep_assert_held(&client_mutex);
...
}void snd_soc_dai_link_set_capabilities(xxx)
{
...
for_each_pcm_streams(direction) {
...
for_each_link_cpus(dai_link, i, cpu) {
(A) dai = snd_soc_find_dai(cpu);
...
}
...
for_each_link_codecs(dai_link, i, codec) {
(A) dai = snd_soc_find_dai(codec);
...
}
}
...
}Because of these background, we will get WARNING if .config has CONFIG_LOCKDEP.
WARNING: CPU: 2 PID: 53 at sound/soc/soc-core.c:814 snd_soc_find_dai+0xf8/0x100
CPU: 2 PID: 53 Comm: kworker/2:1 Not tainted 5.7.0-rc1+ #328
Hardware name: Renesas H3ULCB Kingfisher board based on r8a77951 (DT)
Workqueue: events deferred_probe_work_func
pstate: 60000005 (nZCv daif -PAN -UAO)
pc : snd_soc_find_dai+0xf8/0x100
lr : snd_soc_find_dai+0xf4/0x100
...
Call trace:
snd_soc_find_dai+0xf8/0x100
snd_soc_dai_link_set_capabilities+0xa0/0x16c
graph_dai_link_of_dpcm+0x390/0x3c0
graph_for_each_link+0x134/0x200
graph_probe+0x144/0x230
platform_drv_probe+0x5c/0xb0
really_probe+0xe4/0x430
driver_probe_device+0x60/0xf4snd_soc_find_dai() will be used from (X) CPU/Codec/Platform driver with
mutex lock, and (Y) Card driver without mutex lock.
This snd_soc_dai_link_set_capabilities() is for Card driver,
this means called without mutex.
This patch adds snd_soc_find_dai_with_mutex() to solve it.Fixes: 25612477d20b52 ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper")
Signed-off-by: Kuninori Morimoto
Link: https://lore.kernel.org/r/87blixvuab.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown -
It should be called VS_LTRP instead.
Reviewed-by: Guennadi Liakhovetski
Reviewed-by: Pierre-Louis Bossart
Signed-off-by: Ranjani Sridharan
Reviewed-by: Takashi Iwai
Link: https://lore.kernel.org/r/20200826184532.1612070-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown