Re: [alsa-devel] DPCM: skip DAPM_STREAM_STOP event to BE, if still used by other FE
If this isn't happening that seems like a bug, I'm a bit surprised nobody else ran into it? Shouldn't the counts of stream events that happen be symmetric (ie, we get as many stops as starts), or are we possibly missing some from things being switched in and out or
something?
This idea is same as the DPCM BE state control, in
int dpcm_be_dai_hw_free(..) { ...... /* do not free hw if this BE is used by other FE */ if (be->dpcm[stream].users > 1) continue;
and
int dpcm_be_dai_shutdown(...) { .... if (--be->dpcm[stream].users != 0) continue;
The BE receiving SND_SOC_DAPM_STREAM_STOP event, while still used by a FE who is in STREAM_START state. The DAPM will just inactive BE related widget/dai without checking. This just doesn't seems right.
And the last FE using the BE calls in to dpcm_fe_dai_shutdown(), will run the process normally.
Actually, i trace the log, when one of the FE sent stop event to "still in use BE", the BE power state will not be changed. Until the system goes into SNDRV_CTL_POWER_D3cold, the BE will be shutdown (i did set the ignore_suspend=1). I didn't check why the BE is not turned off at the point when receiving the stop event.
I'm also curious why no one seems to have the same issue. Probably there is not much DPCM architecture system yet on the Linux?
On Sun, Jun 05, 2016 at 02:58:59PM +0800, Kai Chieh Chuang wrote:
The BE receiving SND_SOC_DAPM_STREAM_STOP event, while still used by a FE who is in STREAM_START state. The DAPM will just inactive BE related widget/dai without checking. This just doesn't seems right.
Why not? The backend is still active and running, why would it expect to be stopped unless it's supposed to actually stop?
Actually, i trace the log, when one of the FE sent stop event to "still in use BE", the BE power state will not be changed. Until the system
Sure, until all the users stop using it it should stay running. What would you expect it to do?
participants (2)
-
Kai Chieh Chuang
-
Mark Brown