[Sound-open-firmware] [PATCH] host: host-gw: only check first_copy for playback

Keyon Jie yang.jie at linux.intel.com
Tue Mar 6 15:22:04 CET 2018


For capture, we don't need produce empty bytes, here add
check to fix capture can't start issue.

Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
---
 src/audio/host.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/audio/host.c b/src/audio/host.c
index a76e340..7a7c153 100644
--- a/src/audio/host.c
+++ b/src/audio/host.c
@@ -851,7 +851,8 @@ static int host_copy(struct comp_dev *dev)
 		return 0;
 
 #if defined CONFIG_DMA_GW
-	if (hd->first_copy) {
+	if (dev->params.direction == SOF_IPC_STREAM_PLAYBACK &&
+	    hd->first_copy) {
 		/*
 		 * host dma will not start copy at this point yet, just produce
 		 * empty period bytes for it.
-- 
2.14.1



More information about the Sound-open-firmware mailing list