public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Gilles <gilles@whospot.com>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>
Subject: Re: Audio codec with multiple I2C devices
Date: Tue, 08 Apr 2014 08:40:25 +0200	[thread overview]
Message-ID: <534399D9.3020709@metafoo.de> (raw)
In-Reply-To: <81C8B318-CBB6-4862-A779-E0EBFACA48C6@whospot.com>

On 04/07/2014 09:29 PM, Gilles wrote:
> On Apr 7, 2014, at 12:03 , Lars-Peter Clausen <lars@metafoo.de> wrote:
>
>> On 04/07/2014 08:32 PM, Gilles wrote:
>> [...]
>>> Doesn't it make perfect sense to have the Volume be a control of the Codec driver even if it's provided by a separate chip on the same sound card?
>>
>> Not if they are standalone components that can also be used in different configurations on different sound cards. E.g. you code suggests that you are using a AK4113 and a DAC121C085. The CODEC driver is not the sound card driver, the sound card driver is the piece of code that glues all the different components that are found on the sound card together.
>>
>> i2c_new_dummy() is typically used for devices with multiple I2C addresses. Or where you have e.g. multiple devices with different addresses on the same die so they become a inseparable unit.
>>
>> - Lars
>
> Yes, but the functionality is very specific to the way the components are wired on the hardware. They are wired to work in conjunction with the ASIC Codec.
>
> The DAC121C085 is a very specific case as the DAC is actually wired to control the voltage of 4 quadrant multiplier which is hardwired to the Codec ASIC. This is a prototype. In the final product, the DAC chip may be built into the ASIC. For this one, I feel like the "Volume" should be a control of the same driver as the ASIC.
>
> This said I see your point about the AK4113 which is a generic multi channel receiver. In this specific application it is wired so only inputs 1,2 and 3 are hard wired (this actually isn't a sound card, but rather a finished product using Linux as the SoC OS as can be seen on the home page of http://birdland.com right now).
>
> There is already a working prototype, but as of now, the inputs are selected by the application talking directly to the I2C AKM. I'm just in the process of streamlining the code, and naturally, I envisioned the input selection be part of the sound card codec as I'd much rather have the sound card have a enum control with the 4 inputs shown by name show under amixer (this would enable my application to be more generic).
>
> Can you please point me to an example of a Sound board driver that uses multiple codecs? I suppose I can modify my sound board driver to use a codec for the audio and another for the AKM input selector).

Anything that uses aux devs. E.g. samsung/speyside.c
There is also this series https://lkml.org/lkml/2014/4/5/92 which adds DT 
support for aux devs.

- Lars

      parent reply	other threads:[~2014-04-08  6:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.300.1396595329.806.alsa-devel@alsa-project.org>
2014-04-04 22:02 ` Audio codec with multiple I2C devices Gilles
2014-04-06  9:15   ` Lars-Peter Clausen
2014-04-07 11:37     ` Mark Brown
2014-04-07 18:32       ` Gilles
     [not found]         ` <5342F68B.9060801@metafoo.de>
     [not found]           ` <81C8B318-CBB6-4862-A779-E0EBFACA48C6@whospot.com>
2014-04-08  6:40             ` Lars-Peter Clausen [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=534399D9.3020709@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=gilles@whospot.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox