ASoC: dpcm: fix BE dai not hw_free and shutdown
authorKai Chieh Chuang <kaichieh.chuang@mediatek.com>
Mon, 28 May 2018 02:18:18 +0000 (10:18 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 29 May 2018 13:56:34 +0000 (14:56 +0100)
commit9c0ac70ad24d76b873c1551e27790c7f6a815d5c
tree891e13ae14a5629eb69dff1939fa0016ce55c333
parent6b116dfb4633a7efce7f96355c2d272d8b16f0fb
ASoC: dpcm: fix BE dai not hw_free and shutdown

In case, one BE is used by two FE1/FE2
FE1--->BE-->
       |
FE2----]
when FE1/FE2 call dpcm_be_dai_hw_free() together
the BE users will be 2 (> 1), hence cannot be hw_free
the be state will leave at, ex. SND_SOC_DPCM_STATE_STOP

later FE1/FE2 call dpcm_be_dai_shutdown(),
will be skip due to wrong state.
leaving the BE not being hw_free and shutdown.

The BE dai will be hw_free later when calling
dpcm_be_dai_shutdown() if still in invalid state.

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-pcm.c