From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> commit b6f3fc005a2c8 ("ASoC: simple-card-utils: fixup asoc_simple_card_get_dai_id() counting") fixuped getting DAI ID method. But, we need to consider about endpoint case, too. This patch fixup it. For example) MIXer case DAI0 -+- CPU <--> Codec - DAI0 DAI1 / /* CPU has 2 DAIs */ CPU { port { cpu-ep0: endpint@0 { reg = <0>; /* for DAI0 */ remote-endpoint = <codec-ep0>; }; cpu-ep1: endpint@1 { reg = <1>; /* for DAI1 */ remote-endpoint = <codec-ep1>; }; }; } /* Codec has 1 DAI */ Codec { port { reg = <0>; /* both are for DAI0 */ codec-ep0: endpint@0 { remote-endpoint = <cpu-ep0>; }; codec-ep1: endpint@1 { remote-endpoint = <cpu-ep1>; }; }; } Fixes: commit b6f3fc005a2c8 ("ASoC: simple-card-utils: fixup asoc_simple_card_get_dai_id() counting") Reported-by: Tony Lindgren <tony@xxxxxxxxxxx> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> --- sound/soc/generic/simple-card-utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 17d8aee..fec3bf7 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -284,6 +284,9 @@ static int asoc_simple_card_get_dai_id(struct device_node *ep) if (ret) return -ENXIO; + if (info.id) + return info.id; + return info.port; } -- 2.7.4 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel