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: <3fea8912-63df-ff27-0c29-6284a85107ab@collabora.com>
Date:   Tue, 14 Jul 2020 18:20: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>, linux-kernel@...r.kernel.org,
        Takashi Iwai <tiwai@...e.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Brown <broonie@...nel.org>, kernel@...labora.com,
        Fabio Estevam <festevam@...il.com>
Subject: Re: [PATCH 0/4] ASoC: fsl_asrc: allow selecting arbitrary clocks

Hi Nic,

Le 03/07/2020 à 11:38, Arnaud Ferraris a écrit :
> Hi Nic,
> 
> Le 02/07/2020 à 20:42, Nicolin Chen a écrit :
>> Hi Arnaud,
>>
>> On Thu, Jul 02, 2020 at 04:22:31PM +0200, Arnaud Ferraris wrote:
>>> The current ASRC driver hardcodes the input and output clocks used for
>>> sample rate conversions. In order to allow greater flexibility and to
>>> cover more use cases, it would be preferable to select the clocks using
>>> device-tree properties.
>>
>> We recent just merged a new change that auto-selecting internal
>> clocks based on sample rates as the first option -- ideal ratio
>> mode is the fallback mode now. Please refer to:
>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20200702&id=d0250cf4f2abfbea64ed247230f08f5ae23979f0
> 
> That looks interesting, thanks for pointing this out!
> I'll rebase and see how it works for my use-case, will keep you informed.
> 
> Regards,
> Arnaud
> 

I finally got some time to test and debug clock auto-selection on my
system, and unfortunately couldn't get it to work.

Here's some background about my use case: the i.MX6 board acts as a
Bluetooth proxy between a phone and a headset. It has 2 Bluetooth
modules (one for each connected device), with audio connected to SSI1 &
SSI2. Audio sample rate can be either 8 or 16kHz, and bclk can be either
512 or 1024kHz, all depending of the capabilities of the headset and phone.
In our case we want SSI2 to be the input clock to the ASRC and SSI1 the
output clock, but there is no way to force that with auto-selection:
both clocks are multiples of both 8k and 16k, so the algorithm will
always select the SSI1 clock.

I don't think auto-selection can be made smart enough to cover this
case, which is why I believe we still need a way to manually setup the
input and output clocks to be used by ASRC, falling back to
auto-selecting the clocks if not setup manually.
If not using DT bindings, what do you think would be the best way to
implement that?

Regards,
Arnaud

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ