RE: [EXTERNAL] Re: [PATCH v1] ASoC: tas2781: mark const variables tas2563_dvc_table as __maybe_unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy
Glad to answer your question.

> -----Original Message-----
> From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Sent: Friday, August 23, 2024 9:34 PM
> To: Ding, Shenghao <shenghao-ding@xxxxxx>
> Cc: broonie@xxxxxxxxxx; lgirdwood@xxxxxxxxx; perex@xxxxxxxx; pierre-
> louis.bossart@xxxxxxxxxxxxxxx; 13916275206@xxxxxxx; zhourui@xxxxxxxxxx;
> alsa-devel@xxxxxxxxxxxxxxxx; Salazar, Ivan <i-salazar@xxxxxx>;
> liam.r.girdwood@xxxxxxxxx; Yue, Jaden <jaden-yue@xxxxxx>; yung-
> chuan.liao@xxxxxxxxxxxxxxx; Rao, Dipa <dipa@xxxxxx>; yuhsuan@xxxxxxxxxx;
> Lo, Henry <henry.lo@xxxxxx>; tiwai@xxxxxxx; Xu, Baojun <baojun.xu@xxxxxx>;
> Baojun.Xu@xxxxxxx; judyhsiao@xxxxxxxxxx; Navada Kanyana, Mukund
> <navada@xxxxxx>; cujomalainey@xxxxxxxxxx; Kutty, Aanya <aanya@xxxxxx>;
> Mahmud, Nayeem <nayeem.mahmud@xxxxxx>;
> savyasanchi.shukla@xxxxxxxxxxxxx; flaviopr@xxxxxxxxxxxxx; Ji, Jesse <jesse-
> ji@xxxxxx>; darren.ye@xxxxxxxxxxxx; antheas.dk@xxxxxxxxx;
> Jerry2.Huang@xxxxxxxxxxxxxxxxxx; jim.shil@xxxxxxxxxxx
> Subject: Re: [EXTERNAL] Re: [PATCH v1] ASoC: tas2781: mark const variables
> tas2563_dvc_table as __maybe_unused
> 
> On Fri, Aug 23, 2024 at 02: 24: 17AM +0000, Ding, Shenghao wrote: > > From:
> Andy Shevchenko <andriy. shevchenko@ linux. intel. com> > > Sent: Thursday,
> August 22, 2024 9: 37 PM > > To: Ding, Shenghao <shenghao-ding@ ti. com>
> ZjQcmQRYFpfptBannerStart This message was sent from outside of Texas
> Instruments.
> Do not click links or open attachments unless you recognize the source of this
> email and know the content is safe.
> <https://us-phishalarm-
> ewt.proofpoint.com/EWT/v1/G3vK!uBdnVXyjfyERgskkNHnsf5Dc4Bsz5NHYOuS
> CAlM-ECmPvE_-JJDdyUZvDKmnC7E4RAAbEbIHMFCFDpmf6-o$>
> Report Suspicious
> 
> ZjQcmQRYFpfptBannerEnd
> On Fri, Aug 23, 2024 at 02:24:17AM +0000, Ding, Shenghao wrote:
> > > From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> > > Sent: Thursday, August 22, 2024 9:37 PM
> > > To: Ding, Shenghao <shenghao-ding@xxxxxx> On Thu, Aug 22, 2024 at
> > > 02:32:02PM +0800, Shenghao Ding wrote:
> 
> ...
> 
> > > >  /* pow(10, db/20) * pow(2,30) */
> > > > -static const unsigned char tas2563_dvc_table[][4] = {
> > > > +static const __maybe_unused unsigned char tas2563_dvc_table[][4]
> > > > += {
> > > >  	{ 0X00, 0X00, 0X00, 0X00 }, /* -121.5db */
> > > >  	{ 0X00, 0X00, 0X03, 0XBC }, /* -121.0db */
> > > >  	{ 0X00, 0X00, 0X03, 0XF5 }, /* -120.5db */
> > >
> > > As far as I can see in the latest Linux Next the above mentioned
> > > table is used solely in sound/soc/codecs/tas2781-i2c.c. Why not
> > > moving it to the C file instead?
> > We have a big plan to implement the digital gain for tas2563 in the
> > side codec driver too, so abstracted this table into a separated header file.
> 
> So, this __maybe_unused is a temporary stub, correct? Just don't forget to
> remove it when the mentioned functionality will be ready.
> 
> Thanks for the explanation.
To add __maybe_unused is not temporary, because this driver support both 
tas2563 and tas2781, if the hardware only contains tas2781 chips, 
tas2563_dvc_table is obviously useless, so marked it as __maybe_unused.
> 
> --
> With Best Regards,
> Andy Shevchenko
> 





[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux