[alsa-devel] [PATCH 2/8] ASoC: alc5632: Use params_width() rather than memory format

Takashi Iwai tiwai at suse.de
Fri Jan 10 14:51:03 CET 2014


At Fri, 10 Jan 2014 15:44:43 +0200,
Leon Romanovsky wrote:
> 
> On Thu, Jan 9, 2014 at 12:33 PM, Mark Brown <broonie at kernel.org> wrote:
> > On Thu, Jan 09, 2014 at 06:55:17AM +0200, Leon Romanovsky wrote:
> >> On Wed, Jan 8, 2014 at 9:51 PM, Mark Brown <broonie at kernel.org> wrote:
> >
> >> > +       switch (params_width(params)) {
> >> > +       case 16:
> >
> >> May be the better way will be to use define here and not hard coded value?
> >
> > No, it really is actually a number of bits.
> Thanks, I didn't know about it.
> In such case it is really unimportant to introduce define here.

But, it's typo-prone :)

OTOH, the numbers about format bits are small, so it's usually easier
to audit, and not to worry too much.  But large numbers like sample
rates are often mistyped, thus using defined constants may have more
merits.


Takashi


More information about the Alsa-devel mailing list