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: <s5him3eizdf.wl-tiwai@suse.de>
Date:   Wed, 19 May 2021 16:15:08 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     Codrin Ciubotariu <codrin.ciubotariu@...rochip.com>
Cc:     <alsa-devel@...a-project.org>, <linux-kernel@...r.kernel.org>,
        <perex@...ex.cz>, <tiwai@...e.com>,
        <pierre-louis.bossart@...ux.intel.com>, <broonie@...nel.org>,
        <joe@...ches.com>, <lgirdwood@...il.com>, <lars@...afoo.de>,
        <kuninori.morimoto.gx@...esas.com>, <nicolas.ferre@...rochip.com>,
        <Cristian.Birsan@...rochip.com>
Subject: Re: [RFC PATCH 0/6] soc-pcm: Add separate snd_pcm_runtime for BEs

On Wed, 19 May 2021 12:48:36 +0200,
Codrin Ciubotariu wrote:
> 
> This patchset adds a different snd_pcm_runtime in the BE's substream,
> replacing the FE's snd_pcm_runtime. With a different structure, the BE
> HW capabilities and constraints will no longer merge with the FE ones.
> This allows for error detection if the be_hw_params_fixup() applies HW
> parameters not supported by the BE DAIs. Also, it calculates values
> needed for mem-to-dev/dev-to-mem DMA transfers, such as buffer size and
> period size, if needed.
> 
> The first 4 patches are preparatory patches, that just group and export
> functions used to allocate and initialize the snd_pcm_runtime. Also, the
> functions that set and apply the HW constraints are exported.
> The 5th patch does (almost) everything need to create the new snd_pcm_runtime
> for BEs, which includes allocation, initializing the HW capabilities,
> HW constraints and HW parameters. The BE HW parameters are no longer
> copied from the FE. They are recalculated, based on HW capabilities,
> constraints and the be_hw_params_fixup() callback.
> The 6th and last patch basically adds support for the PCM generic
> dmaengine to be used as a platform driver for BE DAI links. It allocates
> a buffer, needed by the DMA transfers that do not support dev-to-dev
> transfers between FE and BE DAIs.
> 
> This is a superset of
> https://mailman.alsa-project.org/pipermail/alsa-devel/2021-March/182630.html
> which only handles the BE HW constraints. This patchset aims to be more
> complete, defining a a snd_pcm_runtime between each FE and BE and can
> be used between any DAI link connection. I am sure I am not handling all
> the needed members of snd_pcm_runtime (such as handling
> struct snd_pcm_mmap_status *status), but I would like to have your
> feedback regarding this idea.

I'm also concerned about the handling of other fields in runtime
object, maybe allocating a complete runtime object for each BE is an
overkill and fragile.  Could it be rather only hw_constraints to be
unique for each BE, instead?

Also, the last patch allows only IRAM type, which sounds already
doubtful.  The dmaengine code should be generic.

Last but not least, one minor nitpick: please use EXPORT_SYMBOL_GPL()
for the newly introduced symbols.


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ