[alsa-devel] Audio codec with multiple I2C devices

Mark Brown broonie at kernel.org
Mon Apr 7 13:37:10 CEST 2014

On Sun, Apr 06, 2014 at 11:15:11AM +0200, Lars-Peter Clausen wrote:
> On 04/05/2014 12:02 AM, Gilles wrote:

Always CC kernel related mails to relevant maintainers, it's very hit
and miss if things on the list only will get seen.

> >I'm writing an ALSA SoC codec which uses a 3 distinct I2C devices (a
> >DAC, a CAG for volume and a input selector) all 3 at different I2C
> >addresses.

> If those are 3 distinct devices you'd typically implement them as 3
> different drivers and model the interconnections between them at the
> board/machine driver level.

If they're hard wired together then i2c_new_dummy() allows a single
driver to control multiple slaves - have the driver instantiate from one
of the addresses and then register dummies for the other addresses.  The
framework is probably still going to want to see this registered as a
series of CODECs though unless that's extended.  In any case the
internal mappings for the devices ought to at least have helpers
available so machine drivers don't need to reinvent things.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140407/f43ae64b/attachment.sig>

More information about the Alsa-devel mailing list