Do we need to check state for hw_free ?
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Mon Aug 22 08:42:00 CEST 2022
Hi ALSA ML
I wonder do we need to check state (A) during dpcm_be_dai_hw_free() ?
I think users count check (B) is very enough...
void dpcm_be_dai_hw_free()
{
...
(B) if (be->dpcm[stream].users > 1)
continue;
^ if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) &&
| (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) &&
| (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) &&
(A) (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) &&
| (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) &&
| (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND))
v continue;
...
__soc_pcm_hw_free(be, be_substream);
}
Thank you for your help !!
Best regards
---
Kuninori Morimoto
More information about the Alsa-devel
mailing list