All of lore.kernel.org
 help / color / mirror / Atom feed
* How to activate DAI link to dummy codec?
@ 2015-07-10 21:50 Anatol Pomozov
  2015-07-11  9:58 ` Lars-Peter Clausen
  0 siblings, 1 reply; 3+ messages in thread
From: Anatol Pomozov @ 2015-07-10 21:50 UTC (permalink / raw)
  To: alsa-devel@alsa-project.org; +Cc: Lars-Peter Clausen

Hi

I have following hardware configuration

[SoC] <=> [RT5677] <=> [MAX98357A]

MAX98357A is a simple speaker amplifier with I2S data interface and no
I2C control. The chip automatically configures itself (rate/block
frequency) when I2S is started streaming to the chip. This chip does
not need a driver (there is nothing to configure) and we can use
"dummy-codec" for it.

There is a DAI link between RT5677 and MAX and it should be configured
from RT5677 side. RT5677 is master here and it need to set I2S bus
parameters. Configuration happens in rt5677 hw_params() function and
it is triggered by dai link activation.

My question is how to tell DAPM that I need to activate this link?

If MAX98357A was a real codec then it would have an OUTPUT widget that
I can activate, this would trigger dai link in between to be activated
as well. But dummy codec does not have any widgets, so how I suppose
to activate link to dummy codec?

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

* Re: How to activate DAI link to dummy codec?
  2015-07-10 21:50 How to activate DAI link to dummy codec? Anatol Pomozov
@ 2015-07-11  9:58 ` Lars-Peter Clausen
  2015-07-11 23:37   ` Anatol Pomozov
  0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2015-07-11  9:58 UTC (permalink / raw)
  To: Anatol Pomozov, alsa-devel@alsa-project.org

On 07/10/2015 11:50 PM, Anatol Pomozov wrote:
> Hi
>
> I have following hardware configuration
>
> [SoC] <=> [RT5677] <=> [MAX98357A]
>
> MAX98357A is a simple speaker amplifier with I2S data interface and no
> I2C control. The chip automatically configures itself (rate/block
> frequency) when I2S is started streaming to the chip. This chip does
> not need a driver (there is nothing to configure) and we can use
> "dummy-codec" for it.

The dummy CODEC is only meant to be used in situations where there is no 
actual hardware.

If there is actual hardware even if it does not have a control bus the 
hardware will still have constraints like supported samplerates, etc. which 
should be modeled. And the data flow graph also should be modeled using DAPM.

>
> There is a DAI link between RT5677 and MAX and it should be configured
> from RT5677 side. RT5677 is master here and it need to set I2S bus
> parameters. Configuration happens in rt5677 hw_params() function and
> it is triggered by dai link activation.
>
> My question is how to tell DAPM that I need to activate this link?
>
> If MAX98357A was a real codec then it would have an OUTPUT widget that
> I can activate, this would trigger dai link in between to be activated
> as well. But dummy codec does not have any widgets, so how I suppose
> to activate link to dummy codec?

You just gave the answer yourself, make it a real CODEC :)

- Lars

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

* Re: How to activate DAI link to dummy codec?
  2015-07-11  9:58 ` Lars-Peter Clausen
@ 2015-07-11 23:37   ` Anatol Pomozov
  0 siblings, 0 replies; 3+ messages in thread
From: Anatol Pomozov @ 2015-07-11 23:37 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: alsa-devel@alsa-project.org

Hi

On Sat, Jul 11, 2015 at 2:58 AM, Lars-Peter Clausen <lars@metafoo.de> wrote:
> On 07/10/2015 11:50 PM, Anatol Pomozov wrote:
>>
>> Hi
>>
>> I have following hardware configuration
>>
>> [SoC] <=> [RT5677] <=> [MAX98357A]
>>
>> MAX98357A is a simple speaker amplifier with I2S data interface and no
>> I2C control. The chip automatically configures itself (rate/block
>> frequency) when I2S is started streaming to the chip. This chip does
>> not need a driver (there is nothing to configure) and we can use
>> "dummy-codec" for it.
>
>
> The dummy CODEC is only meant to be used in situations where there is no
> actual hardware.

Thanks Lars-Peter, this is the answer I was looking for.

I created a simple driver for MAX98357 and it works fine. Will share
it later after more testing.

>
> If there is actual hardware even if it does not have a control bus the
> hardware will still have constraints like supported samplerates, etc. which
> should be modeled. And the data flow graph also should be modeled using
> DAPM.
>
>>
>> There is a DAI link between RT5677 and MAX and it should be configured
>> from RT5677 side. RT5677 is master here and it need to set I2S bus
>> parameters. Configuration happens in rt5677 hw_params() function and
>> it is triggered by dai link activation.
>>
>> My question is how to tell DAPM that I need to activate this link?
>>
>> If MAX98357A was a real codec then it would have an OUTPUT widget that
>> I can activate, this would trigger dai link in between to be activated
>> as well. But dummy codec does not have any widgets, so how I suppose
>> to activate link to dummy codec?
>
>
> You just gave the answer yourself, make it a real CODEC :)

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

end of thread, other threads:[~2015-07-11 23:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-10 21:50 How to activate DAI link to dummy codec? Anatol Pomozov
2015-07-11  9:58 ` Lars-Peter Clausen
2015-07-11 23:37   ` Anatol Pomozov

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.