• Qiao Zhou's avatar
    ASoC: soc-pcm: do not hw_free BE if it's still used · 36fba62c
    Qiao Zhou authored
    Do not free BE hw if it's still used by other FE during dpcm runtime
    shutdown. Otherwise the BE runtime state will be STATE_HW_FREE and
    won't be updated to STATE_CLOSE when shutdown ends, because BE dai
    shutdown function won't close pcm when detecting BE is still under
    use. With STATE_HW_FREE, BE can't be triggered start again.
    
    This corner case can easily appear when one BE is used by two FE,
    without this patch "ASoC: dpcm: Fix race between FE/BE updates and
    trigger"(ea9d0d77). One FE tries to
    shutdown but it's raced against xrun on another FE. It improves the
    be dai hw_free logic.
    Signed-off-by: default avatarQiao Zhou <zhouqiao@marvell.com>
    Acked-by: default avatarLiam Girdwood <liam.r.girdwood@linux.intel.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    36fba62c
soc-pcm.c 76.2 KB