Re: [PATCH] ALSA: hda - set intel audio clock to a properly value

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

 



On Tue, 21 Mar 2017 17:11:27 +0100,
Yang, Libin wrote:
> 
> >> +	 * Any deviation may result in undefined behavior.
> >> +	 */
> >> +	if (((val & AZX_MLCTL_SPA) >> AZX_MLCTL_SPA_SHIFT) ^
> >> +		((val & AZX_MLCTL_CPA) >> AZX_MLCTL_CPA_SHIFT))
> >
> >Should it be better with "==" instead of XOR here? 
> 
> AZX_MLCTL_SPA bit value should be the same with AZX_MLCTL_CPA bit
> value before operation. If they are different, we should not touch this
> register. So if XOR is true, we should return directly.

I meant that (A != B) is more understandable than (A ^ B).


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