mirror_ubuntu-kernels/sound/soc/intel/avs
Kuninori Morimoto c403dcd8b0
ASoC: soc-core.c: setup rtd->pmdown_time at soc_new_pcm_runtime()
Almost all default rtd->xxx are setup at soc_new_pcm_runtime()
which is sub-function of snd_soc_add_pcm_runtime() (A).
But "rtd->pmdown_time" is setup at soc_init_pcm_runtime() (B).
It is very random timing setup. This patch setup it at (A),
same as other rtd->xxx.

	static int snd_soc_bind_card(...)
	{
		...
		for_each_card_prelinks(...) {
(A)			ret = snd_soc_add_pcm_runtime(...);
			...
		}
		...
		for_each_card_rtds(...) {
(B)			ret = soc_init_pcm_runtime(...);
			...
		}
		...
	}

One note is that current topology/intel are directly calling
snd_soc_add_pcm_runtime() (A) without calling soc_init_pcm_runtime() (B).
This means, its "rtd->pmdown_time settings" was 0, but will have default
value by this patch.

"rtd->pmdown_time settings" will be used at
snd_soc_runtime_ignore_pmdown_time(). This patch adds
"ignore_pmdown_time" to these driver to keep compatibility.

	bool snd_soc_runtime_ignore_pmdown_time(...)
	{
		...
=>		if (!rtd->pmdown_time || rtd->dai_link->ignore_pmdown_time)
			return true;
		...
	}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875yhxmjjd.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19 17:52:41 +01:00
..
boards ASoC: soc-core.c: setup rtd->pmdown_time at soc_new_pcm_runtime() 2022-09-19 17:52:41 +01:00
apl.c ASoC: Intel: avs: APL-based platforms support 2022-05-17 11:58:08 +01:00
avs.h ASoC: Intel: avs: APL-based platforms support 2022-05-17 11:58:08 +01:00
board_selection.c ASoC: Intel: avs: Fix build error on arc, m68k and sparc 2022-05-30 16:08:33 +02:00
cldma.c ASoC: Intel: avs: Replace hardcodes with SD_CTL_STREAM_RESET 2022-07-08 18:53:26 +01:00
cldma.h ASoC: Intel: avs: Implement CLDMA transfer 2022-03-11 16:24:08 +00:00
core.c ASoC: Intel: avs: Use helper function to set up DMA 2022-07-08 18:53:24 +01:00
dsp.c ASoC: Intel: avs: Relax DSP core transition timings 2022-07-08 18:53:19 +01:00
ipc.c ASoC: Intel: avs: Copy only as many RX bytes as necessary 2022-07-08 18:53:20 +01:00
loader.c ASoC: Intel: avs: Update AVS_FW_INIT_TIMEOUT_US declaration 2022-07-08 18:53:29 +01:00
Makefile ASoC: Intel: avs: Add HDAudio machine board 2022-06-06 12:33:12 +01:00
messages.c ASoC: Intel: avs: Lower UNLOAD_MULTIPLE_MODULES IPC timeout 2022-07-08 18:53:28 +01:00
messages.h ASoC: Intel: avs: APL-based platforms support 2022-05-17 11:58:08 +01:00
path.c ASoC: Intel: avs: Use lookup table to create modules 2022-07-22 13:40:02 +01:00
path.h ASoC: Intel: avs: Configure modules according to their type 2022-04-19 12:04:04 +01:00
pcm.c ASoC: Intel: avs: Fix potential buffer overflow by snprintf() 2022-08-05 12:57:22 +01:00
registers.h ASoC: Intel: avs: APL-based platforms support 2022-05-17 11:58:08 +01:00
skl.c ASoC: Intel: avs: SKL-based platforms support 2022-05-17 11:58:07 +01:00
topology.c ASoC: Intel: avs: Assign I2S gateway when parsing topology 2022-07-08 18:53:18 +01:00
topology.h ASoC: Intel: avs: Add topology loading operations 2022-04-19 12:03:56 +01:00
trace.c ASoC: Intel: avs: Event tracing 2022-05-17 11:58:01 +01:00
trace.h ASoC: Intel: avs: Event tracing 2022-05-17 11:58:01 +01:00
utils.c ASoC: Intel: avs: Prepare for firmware tracing 2022-05-17 11:57:59 +01:00