alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* dapm, device tree, clock control - questions
@ 2020-10-21  9:50 Eliot Blennerhassett
  2020-10-27 20:52 ` Eliot Blennerhassett
  0 siblings, 1 reply; 2+ messages in thread
From: Eliot Blennerhassett @ 2020-10-21  9:50 UTC (permalink / raw)
  To: alsa-devel

Greetings,

First the basic questions, so you can quickly stop reading if this is
not your thing.  Background details follow. Specific answers, or
pointers to relevant reading both appreciated.

1) How do I force a DAI clock to keep running even when no audio is
streaming? Can I do this with DT, or some runtime switch?  OR how do I
disable dapm so everything is powered on all the time?

2) Two devices: one DAC, one dumb digital audio transmitter both
connected to same serial audio data - how to model the second one in DT
(or not)? it has some settings needed after clock starts, must keep
clock running.


I have host CPU imx8mm

DAI is sound/soc/fsl/fsl_sai.c

The codec is sound/soc/codecs/ak4458.c

The digital audio transmitter is CS8406 (no driver yet?).

Both the above are connected to the same DAI signals (MCLK, TXC, TXFS, TXD)

CS8406 needs MCLK before it can be configured, and loses config if clock
stops.  Currently it is configured via I2C from userspace, but this is
completely unaware of stream stop/start.  Is there a way to hook into
stream state events so that this setup can be done after the MCLK starts
before audio starts?

I desire for no discontinuity in analog or digital outputs as streams
stop and start.

I have read
Documentation/sound/soc/dapm.rst and its brothers.
Documentation/devicetree/*
is there elsewhere I should read to get a newbies intro to this stuff?

It must be about 8 years since I did any ALSA development, and then I
wasn't in the ASoC space, so quite a learning curve here.

many thanks

-- 
Eliot

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

* Re: dapm, device tree, clock control - questions
  2020-10-21  9:50 dapm, device tree, clock control - questions Eliot Blennerhassett
@ 2020-10-27 20:52 ` Eliot Blennerhassett
  0 siblings, 0 replies; 2+ messages in thread
From: Eliot Blennerhassett @ 2020-10-27 20:52 UTC (permalink / raw)
  To: alsa-devel

Hello again,

I got no answers last time I posted this

So, the meta-questions are
* Should I be asking somewhere else?
* Should I be reading something else to find my answers?
* Is there a better way to ask these questions?

thanks

On 21/10/20 10:50 pm, Eliot Blennerhassett wrote:
> Greetings,
> 
> First the basic questions, so you can quickly stop reading if this is
> not your thing.  Background details follow. Specific answers, or
> pointers to relevant reading both appreciated.
> 
> 1) How do I force a DAI clock to keep running even when no audio is
> streaming? Can I do this with DT, or some runtime switch?  OR how do I
> disable dapm so everything is powered on all the time?
> 
> 2) Two devices: one DAC, one dumb digital audio transmitter both
> connected to same serial audio data - how to model the second one in DT
> (or not)? it has some settings needed after clock starts, must keep
> clock running.

> I have host CPU imx8mm
>               
> DAI is sound/soc/fsl/fsl_sai.c
> 
> The codec is sound/soc/codecs/ak4458.c
> 
> The digital audio transmitter is CS8406 (no driver yet?).
> 
> Both the above are connected to the same DAI signals (MCLK, TXC, TXFS, TXD)

--------.
imx8mm  |
        |
    SAI *======+======[ ak4458 ]
        |      I      [        ]->Line_Out
   I2C2 *------I--+---[        ]
--------'      I  |
               I  `---[ cs8406 ]
               "======[        ]->iec958_out


> CS8406 needs MCLK before it can be configured, and loses config if clock
> stops.  Currently it is configured via I2C from userspace, but this is
> completely unaware of stream stop/start.  Is there a way to hook into
> stream state events so that this setup can be done after the MCLK starts
> before audio starts?
> 
> I desire for no discontinuity in analog or digital outputs as streams
> stop and start.
> 
> I have read
> Documentation/sound/soc/dapm.rst and its brothers.
> Documentation/devicetree/*
> is there elsewhere I should read to get a newbies intro to this stuff?
> 
> It must be about 8 years since I did any ALSA development, and then I
> wasn't in the ASoC space, so quite a learning curve here.
> 
> many thanks
> 


-- 
Eliot

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

end of thread, other threads:[~2020-10-27 20:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21  9:50 dapm, device tree, clock control - questions Eliot Blennerhassett
2020-10-27 20:52 ` Eliot Blennerhassett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).