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

Yang, Libin libin.yang at intel.com
Wed Mar 22 09:12:39 CET 2017


>-----Original Message-----
>From: Takashi Iwai [mailto:tiwai at suse.de]
>Sent: Wednesday, March 22, 2017 12:51 AM
>To: Yang, Libin <libin.yang at intel.com>
>Cc: alsa-devel at alsa-project.org; Lin, Mengdong <mengdong.lin at intel.com>;
>infernix at infernix.net
>Subject: Re: [alsa-devel] [PATCH] ALSA: hda - set intel audio clock to a properly
>value
>
>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).

Get it. I will use (A != B)

Regards,
Libin

>
>
>Takashi


More information about the Alsa-devel mailing list