ASoC: SOF - topology - do not change the link triger order for old firmare
Subsystems (3)
Jaroslav Kysela
maintainerPATCH 1/1 ASoC: SOF - topology - do not change the link triger order for old firmare
--- sound/soc/sof/topology.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
sound/soc/sof/topology.c +7 -3
@@ -2935,6 +2935,7 @@ static int sof_link_load(struct snd_soc_component *scomp, int index,struct snd_soc_tplg_private *private = &cfg->priv;struct sof_ipc_dai_config config;struct snd_soc_tplg_hw_config *hw_config; +struct sof_ipc_fw_version *v = &sdev->fw_ready.version;int num_hw_configs;int ret;int i =0 ;
@@ -2952,9 +2953,12 @@ static int sof_link_load(struct snd_soc_component *scomp, int index,if (!link->no_pcm) { link->nonatomic = true; -/* set trigger order */ - link->trigger[0 ] =SND_SOC_DPCM_TRIGGER_POST ; - link->trigger[1 ] =SND_SOC_DPCM_TRIGGER_POST ; +/* this causes DSP panic on firmware v1.3 */ +if (SOF_ABI_VER (v->major, v->minor, v->micro) >SOF_ABI_VER (3 ,7 ,0 )) { +/* set trigger order */ + link->trigger[0 ] =SND_SOC_DPCM_TRIGGER_POST ; + link->trigger[1 ] =SND_SOC_DPCM_TRIGGER_POST ; + }/* nothing more to do for FE dai links */ return 0 ;
Signature · 5 lines
2.20.1 _______________________________________________ Alsa-devel mailing list [email protected] https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 1 line · Jaroslav Kysela
This one is complicated.
The change of the trigger order is required in order to avoid DMA underflows.
But if you make this change, this exposes another issue in the firmware that leads to the a panic on some platforms (I couldn't reproduce it myself on a WHL HDAudio+dmic device), and unfortunately the fix for this DSP panic is not in the released 1.3 firmware.
With this proposal from Jaroslav, users of the older firmware will not see the panic but they are still facing potential underflows.
So long story short, I don't mind if we add this patch to solve the DSP panic, but there should be a clear explanation in the commit message that this is far from ideal and that an update to 1.4 is really desirable.
We may also need to look at different ways to identify the firmware, in this case the problem is not due to the ABI proper but a change in the timing sequences, we may need a different sort of ID here?
Quoted 26 lines
Signed-off-by Jaroslav Kysela <[email protected]>Cc Pierre-Louis Bossart <[email protected]>Cc Mark Brown <[email protected]>--- sound/soc/sof/topology.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)sound/soc/sof/topology.c +1
-2@@ -2935,6 +2935,7 @@ static int sof_link_load(struct snd_soc_component *scomp, int index,struct snd_soc_tplg_private *private = &cfg->priv;struct sof_ipc_dai_config config;struct snd_soc_tplg_hw_config *hw_config; +struct sof_ipc_fw_version *v = &sdev->fw_ready.version;int num_hw_configs;int ret;int i =0 ;@@ -2952,9 +2953,12 @@ static int sof_link_load(struct snd_soc_component *scomp, int index,if (!link->no_pcm) { link->nonatomic = true; -/* set trigger order */ - link->trigger[0 ] =SND_SOC_DPCM_TRIGGER_POST ;
sound/soc/sof/topology.c static int sof_link_load(struct snd_soc_component *scomp, int index, · line 2964
Quoted 10 lines
sound/soc/sof/topology.c +6
-1- link->trigger[1 ] =SND_SOC_DPCM_TRIGGER_POST ; +/* this causes DSP panic on firmware v1.3 */ +if (SOF_ABI_VER (v->major, v->minor, v->micro) >SOF_ABI_VER (3 ,7 ,0 )) { +/* set trigger order */ + link->trigger[0 ] =SND_SOC_DPCM_TRIGGER_POST ; + link->trigger[1 ] =SND_SOC_DPCM_TRIGGER_POST ; + }/* nothing more to do for FE dai links */ return 0 ;
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Mark Brown
maintainerQuoted 2 lines · Pierre-Louis Bossart
With this proposal from Jaroslav, users of the older firmware will not see the panic but they are still facing potential underflows.
Underflows do seem better and more recoverable than panics.
Quoted 3 lines
We may also need to look at different ways to identify the firmware, in this case the problem is not due to the ABI proper but a change in the timing sequences, we may need a different sort of ID here?
Yeah. I guess it depends how widespread the different behaviours of the racy firmware are and what they're influenced by?
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel