Skip to content

Commit d12ca6d

Browse files
TE-N-ShengjiuWangbroonie
authored andcommitted
ASoC: fsl_asrc_m2m: only handle pairs for m2m in the suspend
ASRC memory to memory cases and memory to peripheral cases are sharing the same pair pools, the pairs got for m2m suspend function may be used for memory to peripheral, which is handled memory to peripheral driver and can't be handled in memory to memory suspend function. Use the "pair->dma_buffer" as a flag for memory to memory case, when it is allocated, handle the suspend operation for the related pairs. Fixes: 24a0171 ("ASoC: fsl_asrc_m2m: Add memory to memory function") Signed-off-by: Shengjiu Wang <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent fee89dd commit d12ca6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/fsl/fsl_asrc_m2m.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ int fsl_asrc_m2m_suspend(struct fsl_asrc *asrc)
633633

634634
for (i = 0; i < PAIR_CTX_NUM; i++) {
635635
pair = asrc->pair[i];
636-
if (!pair)
636+
if (!pair || !pair->dma_buffer[IN].area || !pair->dma_buffer[OUT].area)
637637
continue;
638638
if (!completion_done(&pair->complete[IN])) {
639639
if (pair->dma_chan[IN])

0 commit comments

Comments
 (0)