alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Peter Hsiang <Peter.Hsiang@maxim-ic.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: user space control app driver interface for sound soc
Date: Thu, 30 Sep 2010 19:37:29 -0700	[thread overview]
Message-ID: <20101001023728.GK4175@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <B2150E1E4418E1438554A300EA5040E40D46F92B44@ITSVLEX06.it.maxim-ic.internal>

On Thu, Sep 30, 2010 at 06:56:58PM -0700, Peter Hsiang wrote:
> On Thu, Sep 30, 2010, Mark Brown wrote:

> > 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)

That's still not really answering the questions about how and when the
values will be generated which are important here.

> for custom parameters, and also larger amounts (order of kilo bytes) 
> for firmware image.

For firmware there's request_firmware().

> 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?

It seems likely that the behaviour should have some sort of higher level
interface wrapped around it - for example, firmwares will add certain
features to the chip, coefficients will set the chip into a given mode.
Presenting these things uninterpreted to userspace would be really bad
for usability since they're not likely to be things that make sense to
users directly.

If the values are calculated ahead of time specifically for a given
system then platform data is probably the most appropriate way to get
the data into the driver.  If the values are very large then treating
them as a firmware image may be the best approach.  It really does
depend on what the things that need to be set do and where they come
from how they should be set.

> > 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?

With request_firmware() to userspace the firmware is loaded into the
kernel by a userspace application.

  reply	other threads:[~2010-10-01  2:37 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-29  2:34 [PATCH] ASoC: Add max98088 CODEC driver Peter Hsiang
2010-09-29  3:37 ` Mark Brown
2010-09-29 21:42   ` Peter Hsiang
2010-09-29 22:18     ` Mark Brown
2010-09-30  0:52       ` Peter Hsiang
2010-09-30  0:58         ` Mark Brown
2010-09-30  1:20           ` Peter Hsiang
2010-09-30 17:23           ` user space control app driver interface for sound soc Peter Hsiang
2010-09-30 20:31             ` Mark Brown
2010-09-30 21:55               ` Peter Hsiang
2010-09-30 22:09                 ` Mark Brown
2010-09-30 23:10                   ` Peter Hsiang
2010-09-30 23:34                     ` Mark Brown
2010-10-01  1:56                       ` Peter Hsiang
2010-10-01  2:37                         ` Mark Brown [this message]
2010-10-01  6:56                           ` Clemens Ladisch
2010-10-01  7:12                             ` Mark Brown
2010-10-01 13:42                               ` Takashi Iwai
2010-10-01 17:35                                 ` Mark Brown
2010-10-01 21:57                                 ` Peter Hsiang
2010-10-03  9:09                                   ` Takashi Iwai
2010-10-13  1:20 ` [PATCH] ASoC: Add max98088 CODEC driver Peter Hsiang
2010-10-13  1:47   ` Joe Perches
2010-10-13  8:24     ` Mark Brown
2010-10-13 12:10       ` [PATCH] sound/soc: rename vol to volatile_register as appropriate Joe Perches
2010-10-13 12:33         ` Mark Brown
2010-10-13 12:55           ` Joe Perches
2010-10-13 15:11             ` Mark Brown
2010-10-13 15:27               ` Joe Perches
2010-10-13 15:29                 ` Mark Brown
2010-10-13 15:35                   ` Joe Perches
2010-10-13 19:10                   ` [RFC PATCH] sound/soc/codecs/wm8962.c: Use register index, save 100kb text Joe Perches
2010-10-13 19:40                     ` Mark Brown
2010-10-13 20:06                       ` Joe Perches
2010-10-13 20:29                         ` Mark Brown
2010-10-13 15:19           ` [PATCH] sound/soc/codecs/wm8994.c: Remove unused vol Joe Perches
2010-10-15 10:08             ` Liam Girdwood
2010-10-15 10:39             ` Mark Brown
2010-10-13 10:32   ` [PATCH] ASoC: Add max98088 CODEC driver Mark Brown
2010-10-14  3:18     ` Peter Hsiang
2010-10-14  3:30   ` Peter Hsiang
2010-10-15 10:04     ` Liam Girdwood
2010-10-15 10:55     ` Mark Brown
2010-10-15 17:23       ` Peter Hsiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101001023728.GK4175@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=Peter.Hsiang@maxim-ic.com \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).