[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190124173321.GE5641@sirena.org.uk>
Date: Thu, 24 Jan 2019 17:33:21 +0000
From: Mark Brown <broonie@...nel.org>
To: Jaroslav Kysela <perex@...ex.cz>
Cc: Leo Yan <leo.yan@...aro.org>, Takashi Iwai <tiwai@...e.de>,
alsa-devel@...a-project.org, arnd@...db.de, keescook@...omium.org,
bgoswami@...eaurora.org, sr@...x.de, gustavo@...eddedor.com,
philburk@...gle.com, willy@...radead.org,
mchehab+samsung@...nel.org, sboyd@...nel.org, vkoul@...nel.org,
Baolin Wang <baolin.wang@...aro.org>,
daniel.thompson@...aro.org, mathieu.poirier@...aro.org,
srinivas.kandagatla@...aro.org, anna-maria@...utronix.de,
corbet@....net, jmiller@...erware.com,
ckeepax@...nsource.wolfsonmicro.com, joe@...ches.com,
o-takashi@...amocchi.jp, colyli@...e.de,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] ALSA: core: Add DMA share buffer support
On Thu, Jan 24, 2019 at 02:43:02PM +0100, Jaroslav Kysela wrote:
> If I look to the dma_buf_fd() implementation:
> fd = get_unused_fd_flags(flags);
> fd_install(fd, dmabuf->file);
> .. what if we just add one new ioctl to the ALSA's PCM API which will
> return a new anonymous inode descriptor with the restricted access to
> the main PCM device to satisfy the SELinux requirements / security
> policies? It might be more nice and simple solution than to implement
> the full dma-buf interface for the ALSA's PCM devices.
That certainly works for me so long as the security people are happy.
> Question: The dma-buf also implements the fencing, but I am not able to
> determine, if this mechanism is used in android [1]. It may allow
> concurrent mmap and synchronize apps - but the sound server should
> manage the access to the DMA buffer anyway. In my opinion, it makes much
> sense for the video-pipes when the hardware does some accelerations
> (encoding/decoding).
We had the same discuission off list and couldn't think of a need for
that feature in the audio context but left it in as it's already there
with dma-buf so there's no real cost to implementing it and we weren't
sure we weren't missing something.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists