All of lore.kernel.org
 help / color / mirror / Atom feed
* ASoC: Two codecs on a single CPU DAI
@ 2014-05-20 13:08 Petr Kulhavy
  2014-05-20 13:46 ` Lars-Peter Clausen
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Kulhavy @ 2014-05-20 13:08 UTC (permalink / raw)
  To: alsa-devel

Hi,

I'm writing a driver for a custom DaVinci board, which has two codecs 
(Wolfson and STA323 amplifier) connected to the same CPU DAI. The 
intention is that both codecs always play the same audio, only the 
volume/mixer settings are controlled separately. In addition to that the 
design is atypical by the fact, that the Wolfson is the clock master. So 
in order to play audio on the amplifier the Wolfson must be initialized 
as well.

My question is: how to reflect this architecture in a SOC platform driver?

As the first approach I tried to create two DAI links, one for each 
codec. That worked if audio was first played on the Wolfson link (clock 
master was initialized) and then on the second link, using the same 
sampling rate.

But in fact I would need only one DAI link to both. So then I tried to 
make just one link to Wolfson and put the amplifier as an "aux_dev". 
However there I need to set hw_params and format for the amplifier codec 
DAI and those functions were not called. In fact there was no codec DAI 
created for the amplifier. I've also seen that one can define rtd_aux 
runtimes, but have nowhere found how to use it.

Could someone please help me?

Thanks a lot
Petr


-- 
Petr Kulhavy, MSc
System Architect
BARIX AG

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

* Re: ASoC: Two codecs on a single CPU DAI
  2014-05-20 13:08 ASoC: Two codecs on a single CPU DAI Petr Kulhavy
@ 2014-05-20 13:46 ` Lars-Peter Clausen
  2014-05-21 11:29   ` Benoit Cousson
  0 siblings, 1 reply; 4+ messages in thread
From: Lars-Peter Clausen @ 2014-05-20 13:46 UTC (permalink / raw)
  To: Petr Kulhavy; +Cc: alsa-devel, Benoit Cousson

On 05/20/2014 03:08 PM, Petr Kulhavy wrote:
> Hi,
>
> I'm writing a driver for a custom DaVinci board, which has two codecs
> (Wolfson and STA323 amplifier) connected to the same CPU DAI. The intention
> is that both codecs always play the same audio, only the volume/mixer
> settings are controlled separately. In addition to that the design is
> atypical by the fact, that the Wolfson is the clock master. So in order to
> play audio on the amplifier the Wolfson must be initialized as well.
>
> My question is: how to reflect this architecture in a SOC platform driver?
>
> As the first approach I tried to create two DAI links, one for each codec.
> That worked if audio was first played on the Wolfson link (clock master was
> initialized) and then on the second link, using the same sampling rate.
>
> But in fact I would need only one DAI link to both. So then I tried to make
> just one link to Wolfson and put the amplifier as an "aux_dev". However
> there I need to set hw_params and format for the amplifier codec DAI and
> those functions were not called. In fact there was no codec DAI created for
> the amplifier. I've also seen that one can define rtd_aux runtimes, but have
> nowhere found how to use it.
>
> Could someone please help me?

Hi,

Benoit is currently working on adding support for this to the ASoC 
framework, see this patch series: 
http://comments.gmane.org/gmane.linux.alsa.devel/122160

- Lars

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

* Re: ASoC: Two codecs on a single CPU DAI
  2014-05-20 13:46 ` Lars-Peter Clausen
@ 2014-05-21 11:29   ` Benoit Cousson
  2014-05-22 13:49     ` Petr Kulhavy
  0 siblings, 1 reply; 4+ messages in thread
From: Benoit Cousson @ 2014-05-21 11:29 UTC (permalink / raw)
  To: Petr Kulhavy; +Cc: alsa-devel, Lars-Peter Clausen

Hi Petr,

I'm about to release a v4, but you can used the previous version that 
was working fine for my setup.

I'm glad to have more users for the series, because my setup is so 
simple that I cannot validate all the code I'm about to change :-(

Bottom line; The more, the merrier.

Regards,
Benoit


On 20/05/2014 15:46, Lars-Peter Clausen wrote:
> On 05/20/2014 03:08 PM, Petr Kulhavy wrote:
>> Hi,
>>
>> I'm writing a driver for a custom DaVinci board, which has two codecs
>> (Wolfson and STA323 amplifier) connected to the same CPU DAI. The
>> intention
>> is that both codecs always play the same audio, only the volume/mixer
>> settings are controlled separately. In addition to that the design is
>> atypical by the fact, that the Wolfson is the clock master. So in
>> order to
>> play audio on the amplifier the Wolfson must be initialized as well.
>>
>> My question is: how to reflect this architecture in a SOC platform
>> driver?
>>
>> As the first approach I tried to create two DAI links, one for each
>> codec.
>> That worked if audio was first played on the Wolfson link (clock
>> master was
>> initialized) and then on the second link, using the same sampling rate.
>>
>> But in fact I would need only one DAI link to both. So then I tried to
>> make
>> just one link to Wolfson and put the amplifier as an "aux_dev". However
>> there I need to set hw_params and format for the amplifier codec DAI and
>> those functions were not called. In fact there was no codec DAI
>> created for
>> the amplifier. I've also seen that one can define rtd_aux runtimes,
>> but have
>> nowhere found how to use it.
>>
>> Could someone please help me?
>
> Hi,
>
> Benoit is currently working on adding support for this to the ASoC
> framework, see this patch series:
> http://comments.gmane.org/gmane.linux.alsa.devel/122160
>
> - Lars
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


-- 
Benoît Cousson
BayLibre
Embedded Linux Technology Lab
www.baylibre.com

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

* Re: ASoC: Two codecs on a single CPU DAI
  2014-05-21 11:29   ` Benoit Cousson
@ 2014-05-22 13:49     ` Petr Kulhavy
  0 siblings, 0 replies; 4+ messages in thread
From: Petr Kulhavy @ 2014-05-22 13:49 UTC (permalink / raw)
  To: Benoit Cousson; +Cc: alsa-devel, Lars-Peter Clausen

Hi Benoit,

thank you, I will try them out. At the moment I need to focus on other 
projects, but in a few weeks I should be able to get back to the drivers.

Regards
Petr

On 21.05.2014 13:29, Benoit Cousson wrote:
> Hi Petr,
>
> I'm about to release a v4, but you can used the previous version that 
> was working fine for my setup.
>
> I'm glad to have more users for the series, because my setup is so 
> simple that I cannot validate all the code I'm about to change :-(
>
> Bottom line; The more, the merrier.
>
> Regards,
> Benoit
>
>
> On 20/05/2014 15:46, Lars-Peter Clausen wrote:
>> On 05/20/2014 03:08 PM, Petr Kulhavy wrote:
>>> Hi,
>>>
>>> I'm writing a driver for a custom DaVinci board, which has two codecs
>>> (Wolfson and STA323 amplifier) connected to the same CPU DAI. The
>>> intention
>>> is that both codecs always play the same audio, only the volume/mixer
>>> settings are controlled separately. In addition to that the design is
>>> atypical by the fact, that the Wolfson is the clock master. So in
>>> order to
>>> play audio on the amplifier the Wolfson must be initialized as well.
>>>
>>> My question is: how to reflect this architecture in a SOC platform
>>> driver?
>>>
>>> As the first approach I tried to create two DAI links, one for each
>>> codec.
>>> That worked if audio was first played on the Wolfson link (clock
>>> master was
>>> initialized) and then on the second link, using the same sampling rate.
>>>
>>> But in fact I would need only one DAI link to both. So then I tried to
>>> make
>>> just one link to Wolfson and put the amplifier as an "aux_dev". However
>>> there I need to set hw_params and format for the amplifier codec DAI 
>>> and
>>> those functions were not called. In fact there was no codec DAI
>>> created for
>>> the amplifier. I've also seen that one can define rtd_aux runtimes,
>>> but have
>>> nowhere found how to use it.
>>>
>>> Could someone please help me?
>>
>> Hi,
>>
>> Benoit is currently working on adding support for this to the ASoC
>> framework, see this patch series:
>> http://comments.gmane.org/gmane.linux.alsa.devel/122160
>>
>> - Lars
>>
>> _______________________________________________
>> Alsa-devel mailing list
>> Alsa-devel@alsa-project.org
>> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
>

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

end of thread, other threads:[~2014-05-22 13:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-20 13:08 ASoC: Two codecs on a single CPU DAI Petr Kulhavy
2014-05-20 13:46 ` Lars-Peter Clausen
2014-05-21 11:29   ` Benoit Cousson
2014-05-22 13:49     ` Petr Kulhavy

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.