[alsa-devel] user space control app driver interface for sound soc
Peter.Hsiang at maxim-ic.com
Fri Oct 1 03:56:58 CEST 2010
On Thu, Sep 30, 2010, Mark Brown wrote:
> On Thu, Sep 30, 2010 at 04:10:15PM -0700, Peter Hsiang wrote:
> > On Thu, Sep 30, 2010, Mark Brown wrote:
> > > For these it depends; frequently these are (like your existing EQ
> > > configuration) included in platform data but it really depends on how
> > > they are generated and if they are custom to a particular system (eg,
> > > dependant on plastics or particular speakers).
> > In addition to the platform data, I would like in the future be
> > able to load in data values that are stored in or generated from the
> > user space. Would I use the ALSA interface for this, or would it
> > need to be a separate interface?
> This would not be idiomatic for ALSA. The particular interface to use
> would depend on the volume of data being configured and the format it is
> provided in. If this is just for test and development purposes then
> adding something to debugfs would be the normal thing.
This will be intended for normal operation.
The volume of data would be both small amounts (say 20 bytes or so)
for custom parameters, and also larger amounts (order of kilo bytes)
for firmware image.
Seems like ALSA does not have build-in interfaces that can be
directly used for these use cases right?
Will it be better to extend on ALSA or setup a separate path?
> > > > binary code image that goes into the chip's memory.
> > > For this use request_firmware() and associated interfaces.
> > Is it more common to load the firmware from the kernel space?
> > Is there an established mechanism for loading from user space?
> Have you looked at request_firmware()? It is the established mechanism
> for doing this and supports both firmware images built into the kernel
> and firmware loaded from userspace, though firmware in userspace is the
> more common approach.
Thanks, yes I see that it's a kernel space only feature, regardless
of where the firmware image is located.
Would it be ok for a user space app to handle the image file directly
and send down the file content for the driver to process?
More information about the Alsa-devel