lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e4d96e1f-b988-bb24-b784-b4198d172e40@collabora.com>
Date:   Fri, 17 Jul 2020 11:58:32 +0200
From:   Arnaud Ferraris <arnaud.ferraris@...labora.com>
To:     Nicolin Chen <nicoleotsuka@...il.com>
Cc:     alsa-devel@...a-project.org, Timur Tabi <timur@...nel.org>,
        Xiubo Li <Xiubo.Lee@...il.com>,
        Fabio Estevam <festevam@...il.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>,
        kernel@...labora.com, Shengjiu Wang <shengjiu.wang@...il.com>
Subject: Re: [PATCH v2 2/2] ASoC: fsl_asrc: always use internal ratio



Le 17/07/2020 à 01:37, Nicolin Chen a écrit :
>> @@ -507,8 +507,7 @@ static int fsl_asrc_config_pair(struct fsl_asrc_pair *pair, bool use_ideal_rate)
>>  
>>  	/* Enable Ideal Ratio mode */
> 
> The code is against the comments now -- need to update this line.

It isn't, the following code still enables "Ideal Ratio" mode (see below)

>>  	regmap_update_bits(asrc->regmap, REG_ASRCTR,
>> -			   ASRCTR_IDRi_MASK(index) | ASRCTR_USRi_MASK(index),
>> -			   ASRCTR_IDR(index) | ASRCTR_USR(index));
>> +			   ASRCTR_IDRi_MASK(index), ASRCTR_IDR(index);
> 
> The driver falls back to ideal ratio mode if there is no matched
> clock source. Your change seems to apply internal ratio mode any
> way? Probably would break the fallback routine.

Strictly speaking, internal ratio is only enabled when we have matched
clock sources, and is used in addition to the calculated dividers
(allows the ASRC to better adjust to drifting/inaccurate physical
clocks). "Ideal Ratio" mode is different, and still enabled as a
fallback when no clock source is matched.

Ideal ratio requires both USRi and IDRi bits to be set, and that would
still be the case if there is no matched clock source.

The only difference my patch introduces is that USRi is always set (was
previously cleared for "normal" mode), and therefore only IDRi needs to
be set in order to enable ideal ratio mode.

Regards,
Arnaud

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ