mirror_ubuntu-kernels/sound/soc/intel/avs/boards
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
..
da7219.c ASoC: Intel: avs: Add da7219 machine board 2022-06-06 12:33:23 +01:00
dmic.c ASoC: Intel: avs: Add DMIC machine board 2022-06-06 12:33:12 +01:00
hdaudio.c ASoC: soc-core.c: setup rtd->pmdown_time at soc_new_pcm_runtime() 2022-09-19 17:52:41 +01:00
i2s_test.c ASoC: Intel: avs: Fix i2s_test card name initialization 2022-07-06 12:10:48 +01:00
Kconfig ASoC: Intel: avs: Add da7219 machine board 2022-06-06 12:33:23 +01:00
Makefile ASoC: Intel: avs: correct config reference for I2S test board 2022-07-05 16:44:32 +01:00
max98357a.c ASoC: Intel: avs: Add max98357a machine board 2022-06-06 12:33:21 +01:00
max98373.c ASoC: Intel: avs: Add max98373 machine board 2022-06-06 12:33:22 +01:00
nau8825.c ASoC: Intel: avs: Add nau8825 machine board 2022-06-06 12:33:18 +01:00
rt274.c ASoC: Intel: avs: Add rt274 machine board 2022-06-06 12:33:14 +01:00
rt286.c ASoC: Intel: avs: Add rt286 machine board 2022-06-06 12:33:16 +01:00
rt298.c ASoC: Intel: avs: Add rt298 machine board 2022-06-06 12:33:16 +01:00
rt5682.c ASoC: Intel: avs: Add rt5682 machine board 2022-06-06 12:33:17 +01:00
ssm4567.c ASoC: Intel: avs: Add ssm4567 machine board 2022-06-06 12:33:19 +01:00