[alsa-devel] [PATCH] ALSA: HDA: hda_local: Less magic numbers.

Robin H. Johnson robbat2 at gentoo.org
Mon Sep 15 22:16:15 CEST 2008


On Mon, Sep 15, 2008 at 09:10:10AM +0930, Jonathan Woithe wrote:
> Shrug.  In my opinion the above patch simply reworks the explanation,
> shifting the "magic" from the PIN_* definitions to the AC_PINCTL_* defines.
> One could take things one step further and replace the PIN_* defines with
> AC_PINCTL_* references throughout the code, but this would make the code far
> more verbose and harder to follow.
> 
> At the end of the day I'm not fussed either way.  Having said that, I don't
> really see the practical advantage of the change but if Takashi et al thing
> it's a good idea then I wouldn't oppose it.
A quick glance at the codebase shows:

AC_PINCTL* long form:
patch_conexant.c
patch_realtek.c
patch_sigmatel.c

/PIN_(VREF|IN|OUT|HP)/
hda_codec.c
patch_analog.c
patch_atihdmi.c
patch_cmedia.c
patch_conexant.c
patch_realtek.c
patch_sigmatel.c
patch_via.c

Raw hex for AC_VERB_SET_PIN_WIDGET_CONTROL verbs:
patch_analog.c
patch_realtek.c (LOTS)
patch_via.c (LOTS)

The raw hex ones SHOULD be replaced, but the rest of them I'm not fussed either
way. Takashi can make a decision as to which variant is preferred, I don't mind
doing the cleanup.

-- 
Robin Hugh Johnson
Gentoo Linux Developer & Infra Guy
E-Mail     : robbat2 at gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 329 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20080915/b81b64bd/attachment.sig 


More information about the Alsa-devel mailing list