Re: unnecessary test?

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

 



On Wed, 06 Jun 2018 14:39:05 +0200,
Julia Lawall wrote:
> 
> In the file sound/pci/ctxfi/cthw20k1.c, the function daio_mgr_dao_init
> contains:
> 
> set_field(&ctl->spoctl, SPOCTL_OS << (idx*8),
>           ((conf >> 3) & 0x1) ? 2 : 2); /* Raw */
> 
> Could the second argument just be 2?  It's true that the preceeding call
> contains conf >> ..., but in a more useful way, so perhaps it could be
> useful for uniformity?

I guess this is a typo of "2 : 0".  The code seems toggling the
control bit depending on the S/PDIF passthru mode.  It might be
reversed, but I bet 1 for non-audio from a common sense.

Ditto for cthw20k1.c.  This one is likely 1, not 2, though.


thanks,

Takashi
_______________________________________________
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