[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87cygvwgks.wl-kuninori.morimoto.gx@renesas.com>
Date: Fri, 10 Jan 2025 02:25:23 +0000
From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To: Laurentiu Mihalcea <laurentiumihalcea111@...il.com>
Cc: Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] ASoC: simple-card-utils: fix priv->dai_props indexing
Hi Laurentiu
Thank you for your reply
> > - simple_priv_to_props(priv, rtd->id);
> > + simple_priv_to_props(priv, rtd);
>
> ah, thanks for the clarification! correct me if I'm wrong here but the issue
> that I see with the suggested approach is that we have some places in which
> simple_priv_to_props() is used before the RTD is created.
>
> Example scenario: in audio-graph-card2 we call graph_link_init() (which uses simple_priv_to_props)
> before the card is registered (during which the RTD is created).
Do you mean like this ?
Before created RTD: ID is not yet updated : use simple_priv_to_props()
After created RTD: ID is updated : use runtime_simple_priv_to_props()
Is this correct ?
If so, do we need to use them differently ?
In the end, it end up doing the same thing, I think.
If my understanding was correct, it will just makes people confuse, and I
don't want to makes code complex. I think just adding comment why it
don't/can't use rtd->id directly is simple and enough (almost all user
don't care small detail of macros :) but what do you think ?
Thank you for your help !!
Best regards
---
Kuninori Morimoto
Powered by blists - more mailing lists