]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: simple-card-utils: check port reg first on graph_get_dai_id()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 3 Dec 2024 02:10:28 +0000 (02:10 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 9 Dec 2024 13:11:44 +0000 (13:11 +0000)
commit76deee29153b8313cc9629d3db45e56024b3dd26
tree0c1b4996a4395a6c0ffee2a3b38f7900e9483f06
parent419d1918105e5d9926ab02f1f834bb416dc76f65
ASoC: simple-card-utils: check port reg first on graph_get_dai_id()

Because DT check when compiling become very strict in these days,
we need to add reg = <x> if it has multi port/endpoint, otherwise
it will get error or warning. But it was not so strict and/or
mandatry before.

Current code uses reg number as DAI ID, but it will use "endpoint"
reg first and use "port" reg 2nd. But it should use port number as 1st (A)
if it was used for multi connected case. There is no priority for
port/endpoint if it was not multi connected (B).

case (A)
port {
/*
 * "port" and "endpoint" are using different reg number.
 * It should use <x> as DAI ID, not <y> not <z>
 */
reg = <x>;
endpoint@y { reg = <y>; ... };
endpoint@z { reg = <z>; ... };
};

case (B)
port {
/*
 * Both port/endpoint are using same reg numer <x>.
 */
reg = <x>;
endpoint { reg = <x>; ... };
};

It will be issue if Audio-Graph-Card is used with Multi Connection.
No issue will be happen with Audio-Graph-Card2 / Simple-Card.

This patch swtich port/endpoint priority.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87plm9fre3.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/simple-card-utils.c