linux/sound
Ben Zhang a0e0d13542
ASoC: rt5677: Add a PCM device for streaming hotword via SPI
This patch implements a PCM interface for streaming hotword
phrases over SPI. Userspace can open the PCM device at anytime.
The stream is blocked when no hotword is detected. The mic
audio buffer on the DSP is a ~128KByte ring buffer that holds
~4sec of audio samples recorded from the DMIC (S16_LE, mono,
16KHz). After a hotword is detected, previous 2 seconds of audio
(containing the detected hotword) is streamed first, then live
capture continues until userspace closes the PCM stream.

When transferring, copy one period at a time then call
snd_pcm_period_elapsed(). This reduces the latency of transferring
the initial ~2sec of audio after hotword detect since audio samples
are available for userspace earlier.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Link: https://lore.kernel.org/r/20191018200449.141123-2-cujomalainey@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-22 17:55:16 +01:00
..
ac97 ALSA: ac97: Fix double free of ac97_codec_device 2019-07-23 14:16:11 +02:00
aoa ALSA: aoa: onyx: always initialize register read value 2019-07-29 09:21:39 +02:00
arm ASoC: pxa: remove snd_pcm_ops 2019-10-08 13:47:20 +01:00
atmel treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
core ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams 2019-10-01 12:18:25 +01:00
drivers treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
firewire ALSA: dice: fix wrong packet parameter for Alesis iO26 2019-09-16 23:46:14 +02:00
hda Merge branch 'asoc-5.4' into asoc-next 2019-09-15 10:31:44 +01:00
i2c ALSA: i2c: ak4xxx-adda: Fix a possible null pointer dereference in build_adc_controls() 2019-07-26 14:25:37 +02:00
isa ALSA: sb: remove redundant assignment to variable result 2019-08-14 17:44:06 +02:00
mips treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 176 2019-05-30 11:29:19 -07:00
oss sound: dmasound_atari: Mark expected switch fall-through 2019-07-30 09:36:13 +02:00
parisc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 176 2019-05-30 11:29:19 -07:00
pci ALSA: hda - Add laptop imic fixup for ASUS M9V laptop 2019-09-20 15:53:24 +02:00
pcmcia treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ppc ALSA: ps3: Remove Unneeded variable: "ret" 2019-07-10 11:53:31 +02:00
sh treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
soc ASoC: rt5677: Add a PCM device for streaming hotword via SPI 2019-10-22 17:55:16 +01:00
sparc ALSA: sparc: Mark expected switch fall-throughs 2019-07-30 09:37:01 +02:00
spi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
synth treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
usb ALSA: usb-audio: Add DSD support for EVGA NU Audio 2019-09-24 13:58:20 +02:00
x86 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
xen ASoC: Updates for v5.3 2019-07-08 14:45:34 +02:00
ac97_bus.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
Kconfig
last.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
Makefile
sound_core.c sound: fix a memory leak bug 2019-08-08 08:18:32 +02:00