dapm, device tree, clock control - questions

Eliot Blennerhassett eliot at blennerhassett.gen.nz
Wed Oct 21 11:50:47 CEST 2020


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


More information about the Alsa-devel mailing list