[Sound-open-firmware] [PATCH] pipeline: XRUNs: Only transmit XRUN to host when pipeline is running.

Liam Girdwood liam.r.girdwood at linux.intel.com
Wed Sep 6 00:53:57 CEST 2017


ALSA can get confused during preload if we send an XRUN (i.e. before ALSA
has triggered).

Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
 src/audio/pipeline.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/audio/pipeline.c b/src/audio/pipeline.c
index 390e992..26e0295 100644
--- a/src/audio/pipeline.c
+++ b/src/audio/pipeline.c
@@ -923,6 +923,10 @@ void pipeline_xrun(struct pipeline *p, struct comp_dev *dev,
 	if (p->xrun_bytes)
 		return;
 
+	/* only send when we are running */
+	if (dev->state != COMP_STATE_RUNNING)
+		return;
+
 	memset(&posn, 0, sizeof(posn));
 	p->xrun_bytes = posn.xrun_size = bytes;
 	posn.xrun_comp_id = dev->comp.id;
-- 
2.11.0



More information about the Sound-open-firmware mailing list