[alsa-devel] [PATCH v4] ASoC: Add MediaTek MT6660 Speaker Amp Driver

Takashi Iwai tiwai at suse.de
Thu Jan 9 19:57:34 CET 2020


On Thu, 09 Jan 2020 18:18:36 +0100,
Sriram Periyasamy wrote:
> 
> On Tue, Jan 07, 2020 at 11:09:05AM +0800, Jeff Chang wrote:
> > From: Jeff Chang <jeff_chang at richtek.com>
> > 
> > The MT6660 is a boosted BTL class-D amplifier with V/I sensing.
> > A built-in DC-DC step-up converter is used to provide efficient
> > power for class-D amplifier with multi-level class-G operation.
> > The digital audio interface supports I2S, left-justified,
> > right-justified, TDM and DSP A/B format for audio in with a data
> > out used for chip information like voltage sense and current
> > sense, which are able to be monitored via DATAO through proper
> > 
> > diff --git a/sound/soc/codecs/mt6660.c b/sound/soc/codecs/mt6660.c
> > new file mode 100644
> > index 0000000..b8fc53b
> > --- /dev/null
> > +++ b/sound/soc/codecs/mt6660.c
> > @@ -0,0 +1,628 @@
> 
> > +
> > +struct codec_reg_val {
> > +	u32 addr;
> > +	u32 mask;
> > +	u32 data;
> > +};
> 
> packed structures could have been better.

It depends.  Packing may break alignment and the performance may
suffer from it.  So, in general, __packed is recommended when the size
matters (e.g. lots of objects / arrays are created) or it's about ABI
that needs the fixed consistent size.


thanks,

Takashi


More information about the Alsa-devel mailing list