[alsa-devel] [PATCH] asoc tlv320aic3x: add GPIO support

Mark Brown broonie at opensource.wolfsonmicro.com
Sat Apr 19 13:24:26 CEST 2008

On Sat, Apr 19, 2008 at 02:41:03AM +0200, Daniel Mack 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.  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.

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.

More information about the Alsa-devel mailing list