[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4069b76e-cc15-2ad9-b241-caabee7e33e3@nvidia.com>
Date: Fri, 2 Oct 2020 14:29:06 +0530
From: Sameer Pujar <spujar@...dia.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
CC: <broonie@...nel.org>, <lgirdwood@...il.com>, <robh+dt@...nel.org>,
<pierre-louis.bossart@...ux.intel.com>, <perex@...ex.cz>,
<tiwai@...e.com>, <thierry.reding@...il.com>,
<jonathanh@...dia.com>, <alsa-devel@...a-project.org>,
<devicetree@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <sharadg@...dia.com>,
<mkumard@...dia.com>, <viswanathl@...dia.com>,
<rlokhande@...dia.com>, <dramesh@...dia.com>,
<atalambedu@...dia.com>, <nwartikar@...dia.com>,
<swarren@...dia.com>, <nicoleotsuka@...il.com>
Subject: Re: [PATCH v3 06/13] ASoC: simple-card-utils: Expose new members for
asoc_simple_priv
>> diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h
>> index 86a1e95..9825308 100644
>> --- a/include/sound/simple_card_utils.h
>> +++ b/include/sound/simple_card_utils.h
>> @@ -56,6 +56,10 @@ struct asoc_simple_priv {
>> struct asoc_simple_dai *dais;
>> struct snd_soc_codec_conf *codec_conf;
>> struct gpio_desc *pa_gpio;
>> + const struct snd_soc_ops *ops;
>> + unsigned int force_dpcm:1;
>> + uintptr_t dpcm_selectable;
>> + void *data;
>> };
> I have opinions about these.
>
> About dpcm_selectable, indeed current audio-graph is using it as "uintptr_t",
> but as you know, it checks whether it was non-NULL or not only.
> This means we can use it as bit-field.
Yes that is true. Something like this would work?
graph_probe(...)
{
...
if (of_device_get_match_data(dev))
priv->dpcm_selectable = 1;
...
}
>
> BTW, do we need to have dpcm_selectable at priv ?
Tegra audio graph driver does not require this because already it is
populating 'force_dpcm' flag and having 'selectable' does not make much
sense for it.
>
> One note is that, -scu- user is only me (locally),
> and it will be removed when audio-graph2 was created.
> (My plan is keep code for you, but remove compatible)
Right now I am just keeping it to allow current code work. Later you can
remove this during graph2.
>
> About *data, I think we can avoid *data
> if driver side priv includes asoc_simple_priv ?
>
> struct my_priv {
> struct asoc_simple_priv *simple;
> ...
> };
>
> #define simple_to_priv(_simple) container_of((_simple), struct my_priv, simple)
>
This seems like a better plan, will do this.
Powered by blists - more mailing lists