From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Ben Dooks <ben-alsa@fluff.org>
Cc: alsa-devel@alsa-project.org
Subject: Re: Advice on ASoC support for series of boards
Date: Fri, 15 May 2009 20:56:53 +0100 [thread overview]
Message-ID: <20090515195653.GA16607@sirena.org.uk> (raw)
In-Reply-To: <20090515193406.GD23895@trinity.fluff.org>
On Fri, May 15, 2009 at 08:34:06PM +0100, Ben Dooks wrote:
> Is there a standard method for binding an AMP to an driver, or is it
> necessary to have the AMPs in the driver itself? If not, what would
> people recommend to be the best example of this?
There's several drivers involved in an ASoC system - these things are
generally handled in the machine driver.
For power control for things like amplifiers this is done by providing
an event callback for one of the widgets for an output (eg, a
SND_SOC_DAPM_SPK()) and doing whatever is required to enable or disalbe
the device (usually updating a GPIO) in the callback. This ensures that
the power control is integrated with DAPM power sequencing. See the Mic
Jack handling in spitz.c for a mainline example of this.
For non-power control (eg, a mute controlled by a GPIO) a regular
control would be registered by the machine driver - the _EXT() controls
ASoC provides are designed for use here, allowing callbacks to be
registered to update GPIOs or do whatever other changes are required.
Of course, it's also possible to register normal ALSA controls as normal
without any ASoC specific stuff if desired. Spitz also has some
examples of this.
I'm not sure if that answers your question?
prev parent reply other threads:[~2009-05-15 19:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-15 19:34 Advice on ASoC support for series of boards Ben Dooks
2009-05-15 19:56 ` Mark Brown [this message]
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=20090515195653.GA16607@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=ben-alsa@fluff.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.