Re: [PATCH 2/2] ASoC: mediatek: mt8192: support rt1015p_rt5682s

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

 



On Wed, Mar 02, 2022 at 12:07:39PM +0800, Jiaxin Yu wrote:
> On Tue, 2022-03-01 at 17:03 +0800, Tzung-Bi Shih wrote:
> > After seeing the code, I am starting to wonder if the reuse is
> > overkill.  If
> > they (RT5682 vs. RT5682S) only have some minor differences, probably
> > it could
> > reuse more by:
> > 
> > SND_SOC_DAILINK_DEFS(i2s8, ...
> > SND_SOC_DAILINK_DEFS(i2s9, ...
> > 
> > ...
> > 
> > if (card == &mt8192_mt6359_rt1015p_rt5682s_card) {
> >         i2s8_codecs.name = RT5682S_DEV0_NAME;
> >         i2s8_codecs.dai_name = RT5682S_CODEC_DAI;
> >         ...
> > }
> > 
> > Or even uses of_device_is_compatible() if it would like to reuse the
> > struct
> > snd_soc_card.
> If we reuse the struct snd_soc_card, the card .name will be same.
> Should I change the card .name through of_device_is_compatible()?

Exactly yes.



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux