Commit 5bd70440 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: soc-dai: revert all changes to DAI startup/shutdown sequence

On Baytrail/Cherrytrail, the Atom/SST driver fails miserably:

[    9.741953] intel_sst_acpi 80860F28:00: FW Version 01.0c.00.01
[    9.832992] intel_sst_acpi 80860F28:00: FW sent error response 0x40034
[    9.833019] intel_sst_acpi 80860F28:00: FW alloc failed ret -4
[    9.833028] intel_sst_acpi 80860F28:00: sst_get_stream returned err -5
[    9.833033] sst-mfld-platform sst-mfld-platform: ASoC: DAI prepare error: -5
[    9.833037]  Baytrail Audio Port: ASoC: prepare FE Baytrail Audio Port failed
[    9.853942] intel_sst_acpi 80860F28:00: FW sent error response 0x40034
[    9.853974] intel_sst_acpi 80860F28:00: FW alloc failed ret -4
[    9.853984] intel_sst_acpi 80860F28:00: sst_get_stream returned err -5
[    9.853990] sst-mfld-platform sst-mfld-platform: ASoC: DAI prepare error: -5
[    9.853994]  Baytrail Audio Port: ASoC: prepare FE Baytrail Audio Port failed

Commit b56be800 ("ASoC: soc-pcm: call
snd_soc_dai_startup()/shutdown() once") was the initial problematic
commit.

Commit 1ba616bd ("ASoC: soc-dai: fix DAI startup/shutdown sequence")
was an attempt to fix things but it does not work on Baytrail,
reverting all changes seems necessary for now.

Fixes: 1ba616bd ("ASoC: soc-dai: fix DAI startup/shutdown sequence")
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20200415030437.23803-1-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 26d87881
...@@ -351,7 +351,6 @@ struct snd_soc_dai { ...@@ -351,7 +351,6 @@ struct snd_soc_dai {
/* bit field */ /* bit field */
unsigned int probed:1; unsigned int probed:1;
unsigned int started[SNDRV_PCM_STREAM_LAST + 1];
}; };
static inline struct snd_soc_pcm_stream * static inline struct snd_soc_pcm_stream *
......
...@@ -295,24 +295,17 @@ int snd_soc_dai_startup(struct snd_soc_dai *dai, ...@@ -295,24 +295,17 @@ int snd_soc_dai_startup(struct snd_soc_dai *dai,
{ {
int ret = 0; int ret = 0;
if (!dai->started[substream->stream] && if (dai->driver->ops->startup)
dai->driver->ops->startup)
ret = dai->driver->ops->startup(substream, dai); ret = dai->driver->ops->startup(substream, dai);
if (ret == 0)
dai->started[substream->stream] = 1;
return ret; return ret;
} }
void snd_soc_dai_shutdown(struct snd_soc_dai *dai, void snd_soc_dai_shutdown(struct snd_soc_dai *dai,
struct snd_pcm_substream *substream) struct snd_pcm_substream *substream)
{ {
if (dai->started[substream->stream] && if (dai->driver->ops->shutdown)
dai->driver->ops->shutdown)
dai->driver->ops->shutdown(substream, dai); dai->driver->ops->shutdown(substream, dai);
dai->started[substream->stream] = 0;
} }
int snd_soc_dai_prepare(struct snd_soc_dai *dai, int snd_soc_dai_prepare(struct snd_soc_dai *dai,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment