[alsa-devel] PATCH - vt1618 7.1 Audio
broonie at sirena.org.uk
Wed Aug 20 21:21:22 CEST 2008
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 at suse.de> 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.
> 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
> > 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 at elf.eng.bsdi.com>
More information about the Alsa-devel