From: Daniel Mack <daniel@caiaq.org>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] asoc tlv320aic3x: add GPIO support
Date: Sat, 19 Apr 2008 14:18:38 +0200 [thread overview]
Message-ID: <20080419121838.GA1680@buzzloop.caiaq.de> (raw)
In-Reply-To: <20080419112425.GA18877@sirena.org.uk>
Hi Mark,
On Sat, Apr 19, 2008 at 12:24:26PM +0100, Mark Brown wrote:
> > the registers in questions are purely in its scope. So the idea is to
> > set up the GPIO's functions via alsa controls and handle its events in
> > some board-related code as this is really not abstractable. One could,
> > however, do this setup in machine-related code within the asoc
> > environment.
>
> The usual approach is to have multi-function pins on CODECs are
> controlled by the ASoC codec driver based on configuration supplied by
> the machine driver.
I was looking for a mechanism to pass such information around but didn't
manage to find any. Which way would you suggest? The approach in my
patch causes as less overhead as possible at it simply reuses the asoc's
widgets, I though.
> Their use tends to be heavily constrained by the
> board design so it usually makes more sense to let the machine driver
> set things up and deal with exposing controls for any configurability
> that user space can exercise.
Ok, but why not let the codec driver expose all the functionality it can
offer for setting up a certain GPIO and use this alsa control either
from user space or from the asoc machine part? I think that's the most
flexible way at all, no?
And when it comes to setting or getting a GPIO's state I see no way to
access such special purpose functions of the codec driver. At least,
'struct snd_soc_codec' doesn't give me any hints how to achive that.
> Most of the time when GPIO lines on CODECs are used they tend to be
> controlling other bits of the audio subsystem anyway (eg, power for
> simple amplifiers) - most SoCs have plenty of GPIOs on-board and they're
> usually much easier to work with due to being memory mapped on the CPU.
Well, I didn't implement that just because it wasn't done yet ;) In the
setup I'm working on, one GPIO is needed to control peripherals next to
it in the board layout where routing constraints become part of the
game. And the other one is connected to one of the processor's GPIO to
catch an interrupt from the AIC3x when a headset is plugged in. Thus, we
really need to support them both. Others may have different use for
them, just have a look at the possible functions of those GPIOs.
Best regards,
Daniel
next prev parent reply other threads:[~2008-04-19 12:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-18 18:12 [PATCH] asoc tlv320aic3x: add GPIO support Daniel Mack
[not found] ` <bd7b27490804181326v311f192bi8454c9c0661427d2@mail.gmail.com>
2008-04-19 0:41 ` Daniel Mack
2008-04-19 11:24 ` Mark Brown
2008-04-19 12:18 ` Daniel Mack [this message]
2008-04-19 14:50 ` Mark Brown
2008-04-19 16:24 ` Daniel Mack
2008-04-19 18:51 ` Mark Brown
2008-04-21 13:41 ` Jarkko Nikula
2008-04-22 9:52 ` Mark Brown
2008-04-22 10:04 ` Daniel Mack
2008-04-22 10:32 ` Mark Brown
2008-04-21 14:38 ` pHilipp Zabel
2008-04-21 14:51 ` Mark Brown
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=20080419121838.GA1680@buzzloop.caiaq.de \
--to=daniel@caiaq.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
/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.