[alsa-devel] Streaming wake-up buffer from DSP to SoC over SPI

Dylan Reid dgreid at google.com
Tue Dec 16 03:45:37 CET 2014


What is the right way to model a bursty, SPI based audio transfer?
There could be hours between samples, then several seconds of audio
will be ready.

The codec, an rt5677, is attached to the SoC with both an IIS bus and
a SPI bus.  The IIS bus is used for normal audio playback and record.
The SPI bus is used for transferring audio that caused a voice wake,
"OK Google" in this case.

When the codec detects the wake up phrase, the SoC will read out two
plus seconds of buffered data over the SPI bus and continue to stream
audio data over SPI for the rest of the query.  Nexus 9 has a custom
ioctl to access rt5677-spi and some user-space smarts to poll for more
data.

I was thinking of making a separate PCM device.  The odd things are
that it would have to originate from soc/codecs, the codec would own
the codec and cpu end of the link, and the hw_ptr position would need
to be queried over SPI.  But it would make userspace access to it more
standard looking.

Thanks for any opinions or thoughts.

Dylan


More information about the Alsa-devel mailing list