asoc: wsa883x: Add dapm ignore suspend for DAIs
Add dapm ignore suspend for playback DAIs to avoid widget down during suspend. Change-Id: I64347f9cb9d425096c5710e802805388adecd68f Signed-off-by: Meng Wang <mengw@codeaurora.org>
This commit is contained in:
@@ -1217,9 +1217,14 @@ static int wsa883x_codec_probe(struct snd_soc_component *component)
|
|||||||
int variant = 0, version = 0;
|
int variant = 0, version = 0;
|
||||||
struct snd_soc_dapm_context *dapm =
|
struct snd_soc_dapm_context *dapm =
|
||||||
snd_soc_component_get_dapm(component);
|
snd_soc_component_get_dapm(component);
|
||||||
|
char w_name[100];
|
||||||
|
|
||||||
if (!wsa883x)
|
if (!wsa883x)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (!component->name_prefix)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
snd_soc_component_init_regmap(component, wsa883x->regmap);
|
snd_soc_component_init_regmap(component, wsa883x->regmap);
|
||||||
|
|
||||||
dev = wsa883x->swr_slave;
|
dev = wsa883x->swr_slave;
|
||||||
@@ -1238,6 +1243,22 @@ static int wsa883x_codec_probe(struct snd_soc_component *component)
|
|||||||
|
|
||||||
snd_soc_dapm_ignore_suspend(dapm,
|
snd_soc_dapm_ignore_suspend(dapm,
|
||||||
wsa883x->dai_driver->playback.stream_name);
|
wsa883x->dai_driver->playback.stream_name);
|
||||||
|
|
||||||
|
memset(w_name, 0, 100);
|
||||||
|
strlcpy(w_name, component->name_prefix, 100);
|
||||||
|
strlcat(w_name, " IN", 100);
|
||||||
|
snd_soc_dapm_ignore_suspend(dapm, w_name);
|
||||||
|
|
||||||
|
memset(w_name, 0, 100);
|
||||||
|
strlcpy(w_name, component->name_prefix, 100);
|
||||||
|
strlcat(w_name, " SWR DAC_PORT", 100);
|
||||||
|
snd_soc_dapm_ignore_suspend(dapm, w_name);
|
||||||
|
|
||||||
|
memset(w_name, 0, 100);
|
||||||
|
strlcpy(w_name, component->name_prefix, 100);
|
||||||
|
strlcat(w_name, " SPKR", 100);
|
||||||
|
snd_soc_dapm_ignore_suspend(dapm, w_name);
|
||||||
|
|
||||||
snd_soc_dapm_sync(dapm);
|
snd_soc_dapm_sync(dapm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user