[Sound-open-firmware] [PATCH] pipeline: xrun: fix timestamp to use comp type instead of ID to find DAIs

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


Pipeline should use the comp type to find DAIs and not IDs.

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

diff --git a/src/audio/pipeline.c b/src/audio/pipeline.c
index 49a0c51..390e992 100644
--- a/src/audio/pipeline.c
+++ b/src/audio/pipeline.c
@@ -761,14 +761,13 @@ static int timestamp_downstream(struct comp_dev *start,
 		if (!current->is_endpoint)
 			goto downstream;
 
-		if (current->comp.id == SOF_COMP_DAI ||
-			current->comp.id == SOF_COMP_SG_DAI) {
+		if (current->comp.type == SOF_COMP_DAI ||
+			current->comp.type == SOF_COMP_SG_DAI) {
 			platform_dai_timestamp(current, posn);
 			return 1;
 		}
 	}
 
-
 downstream:
 	/* travel downstream to sink end point(s) */
 	list_for_item(clist, &current->bsink_list) {
@@ -804,8 +803,8 @@ static int timestamp_upstream(struct comp_dev *start,
 		if (!current->is_endpoint)
 			goto upstream;
 
-		if (current->comp.id == SOF_COMP_DAI ||
-			current->comp.id == SOF_COMP_SG_DAI) {
+		if (current->comp.type == SOF_COMP_DAI ||
+			current->comp.type == SOF_COMP_SG_DAI) {
 			platform_dai_timestamp(current, posn);
 			return 1;
 		}
-- 
2.11.0



More information about the Sound-open-firmware mailing list