1
0
Fork 0

ASoC: soc-core: care .ignore_suspend for Component suspend

Card dai_link has .ignore_suspend, and ALSA SoC cares it when suspend.
For example, like this

	for_each_card_rtds(card, rtd) {
		if (rtd->dai_link->ignore_suspend)
			continue;
		...
	}

But in snd_soc_suspend(), it doesn't care about
it when suspending Component. This patch cares it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/877e20t4vh.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
alistair/sensors
Kuninori Morimoto 2020-01-10 11:36:02 +09:00 committed by Mark Brown
parent 12b052327d
commit 1272063a7e
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 17 additions and 7 deletions

View File

@ -562,15 +562,25 @@ int snd_soc_suspend(struct device *dev)
snd_soc_dapm_sync(&card->dapm);
/* suspend all COMPONENTs */
for_each_card_components(card, component) {
struct snd_soc_dapm_context *dapm =
for_each_card_rtds(card, rtd) {
if (rtd->dai_link->ignore_suspend)
continue;
for_each_rtd_components(rtd, i, component) {
struct snd_soc_dapm_context *dapm =
snd_soc_component_get_dapm(component);
/*
* If there are paths active then the COMPONENT will be held
* with bias _ON and should not be suspended.
*/
if (!snd_soc_component_is_suspended(component)) {
/*
* ignore if component was already suspended
*/
if (snd_soc_component_is_suspended(component))
continue;
/*
* If there are paths active then the COMPONENT will be
* held with bias _ON and should not be suspended.
*/
switch (snd_soc_dapm_get_bias_level(dapm)) {
case SND_SOC_BIAS_STANDBY:
/*