Re: PATCH - vt1618 7.1 Audio

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

 



On Wed, Aug 20, 2008 at 10:50:49AM -0700, John L. Utz III wrote:
> On Wed, 20 Aug 2008 01:28:39 -0700, Takashi Iwai <tiwai@xxxxxxx> wrote:

> > They must be consistent -- usually 0 = disable, 1 = enable.
> > In general, the controls like "XXX Disable" is bad.  A switch should
> > be to turn on, not to turn off.  If the register bit is to disable
> > something, implement the control element in a reverse way.

> OK.

> note that it makes the code more complex in some places because the chip  
> is inconsistent.

ASoC does this by having a flag in the control specific data saying if
the control is inverted which works pretty well for dealing with this
situation.

> > Avoid too long lines (also in other places).

> OK. 80 column?

Yes.  See Documentation/CodingStyle (and checkpatch).

> > Also, a Windows style variable name should be avoided.  People tend to
> > hate it.

> Why would you call this 'Windows Style?' Is that supposed to be a  
> perjorative comment?

This style is used throughout the Windows API documentation and is
therefore frequently encounterd in Windows code but it's rarely
encountered anywhere else.  It's called Hungarian notation, though in
the form it's normally seen it's very far from what was originally
intended by that.

> Having variable type decorations provides valuable context and (IMHO)  
> makes the code more maintainable.

Many people have forcefuly held views in the opposite direction - google
will turn up a bunch.  I have the following in my fortune database:

prepAs nounOthers verbHave verbNoted, pronThis nounStyle verbIs
verbCalled adjHungarian nounNotation.  pronI verbFind pronIt
advCompletely adjUseless.  pronI verbHope pronYou verbCan verbSee
possMy nounPoint -- verbEspecially nounWhen possThe advPrefixes
conjBecome verbUtterly adjWrong. :-)
                -- Chris Torek <nospam@xxxxxxxxxxxxxxxx>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

  Powered by Linux