All of lore.kernel.org
 help / color / mirror / Atom feed
* ASoC: How to connect a single CPU DAI to two codecs?
@ 2014-09-27 13:33 Sergej Sawazki
  2014-09-27 17:17 ` Lars-Peter Clausen
  0 siblings, 1 reply; 3+ messages in thread
From: Sergej Sawazki @ 2014-09-27 13:33 UTC (permalink / raw)
  To: alsa-devel

Hello,

I'm writing an ALSA SoC machine driver for a board that has two mono 
codecs (left and right audio channel). Each codec is controlled over I2C 
and has itsown address.Both codecs are connected to the same I2S CPU DAI 
(as shown below).

     +--------- (adr: 0x1a) -----+
     |                           |
     |             +--------> codec_1 ----> (left channel audio)
     |             |
    I2C    I2S ----+
     |             |
     |             +--------> codec_2 ----> (right channel audio)
     |                           |
     +--------- (adr: 0x1b) -----+

Can someone give me some advice on how to setup the 'snd_soc_card' and 'snd_soc_dai_link' in this case? Do I need two dai_links with the same 'cpu_dai_name' and 'platform_name'?

Are there examples for such a configuration? I didn't had much luck in finding one in the mainline?

Any help would be highly appreciated.  Thanks!

Sergej

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ASoC: How to connect a single CPU DAI to two codecs?
  2014-09-27 13:33 ASoC: How to connect a single CPU DAI to two codecs? Sergej Sawazki
@ 2014-09-27 17:17 ` Lars-Peter Clausen
  2014-09-28 17:20   ` Sergej Sawazki
  0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2014-09-27 17:17 UTC (permalink / raw)
  To: Sergej Sawazki, alsa-devel; +Cc: Benoit Cousson

On 09/27/2014 03:33 PM, Sergej Sawazki wrote:
> Hello,
>
> I'm writing an ALSA SoC machine driver for a board that has two mono codecs
> (left and right audio channel). Each codec is controlled over I2C and has
> itsown address.Both codecs are connected to the same I2S CPU DAI (as shown
> below).
>
>      +--------- (adr: 0x1a) -----+
>      |                           |
>      |             +--------> codec_1 ----> (left channel audio)
>      |             |
>     I2C    I2S ----+
>      |             |
>      |             +--------> codec_2 ----> (right channel audio)
>      |                           |
>      +--------- (adr: 0x1b) -----+
>
> Can someone give me some advice on how to setup the 'snd_soc_card' and
> 'snd_soc_dai_link' in this case? Do I need two dai_links with the same
> 'cpu_dai_name' and 'platform_name'?
>
> Are there examples for such a configuration? I didn't had much luck in
> finding one in the mainline?
>
> Any help would be highly appreciated.  Thanks!

Hi,

Support for multiple CODEC DAIs on the same link has recently been added by 
Benoit. See commit 88bd870f ("ASoC: core: Add initial support for DAI 
multicodec"). You now have the possibility to specify multiple CODEC DAIs in 
the link using the snd_soc_dai_link_component struct.

- Lars

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ASoC: How to connect a single CPU DAI to two codecs?
  2014-09-27 17:17 ` Lars-Peter Clausen
@ 2014-09-28 17:20   ` Sergej Sawazki
  0 siblings, 0 replies; 3+ messages in thread
From: Sergej Sawazki @ 2014-09-28 17:20 UTC (permalink / raw)
  To: Lars-Peter Clausen, Benoit Cousson; +Cc: alsa-devel


Am 27.09.2014 um 19:17 schrieb Lars-Peter Clausen:
> On 09/27/2014 03:33 PM, Sergej Sawazki wrote:
>> Hello,
>>
>> I'm writing an ALSA SoC machine driver for a board that has two mono 
>> codecs
>> (left and right audio channel). Each codec is controlled over I2C and 
>> has
>> itsown address.Both codecs are connected to the same I2S CPU DAI (as 
>> shown
>> below).
>>
>>      +--------- (adr: 0x1a) -----+
>>      |                           |
>>      |             +--------> codec_1 ----> (left channel audio)
>>      |             |
>>     I2C    I2S ----+
>>      |             |
>>      |             +--------> codec_2 ----> (right channel audio)
>>      |                           |
>>      +--------- (adr: 0x1b) -----+
>>
>> Can someone give me some advice on how to setup the 'snd_soc_card' and
>> 'snd_soc_dai_link' in this case? Do I need two dai_links with the same
>> 'cpu_dai_name' and 'platform_name'?
>>
>> Are there examples for such a configuration? I didn't had much luck in
>> finding one in the mainline?
>>
>> Any help would be highly appreciated.  Thanks!
>
> Hi,
>
> Support for multiple CODEC DAIs on the same link has recently been 
> added by Benoit. See commit 88bd870f ("ASoC: core: Add initial support 
> for DAI multicodec"). You now have the possibility to specify multiple 
> CODEC DAIs in the link using the snd_soc_dai_link_component struct.
>
> - Lars
>
>
Lars, Benoit,

many thanks, 'snd_soc_dai_link_component' works like a charm.

  - Sergej

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-28 17:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-27 13:33 ASoC: How to connect a single CPU DAI to two codecs? Sergej Sawazki
2014-09-27 17:17 ` Lars-Peter Clausen
2014-09-28 17:20   ` Sergej Sawazki

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.