Do we need to check state for hw_free ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux