Skip to content

Commit 4365303

Browse files
Sugar Zhangrkhuangtao
authored andcommitted
ASoC: rockchip: vad: optimize vad process
* support vad preprocess * support buffer-time config * support channel map * support data convert Change-Id: I0728838b3bb2c8a0537560483cab1fb3dd8a4d9c Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
1 parent e36f505 commit 4365303

4 files changed

Lines changed: 233 additions & 57 deletions

File tree

Documentation/devicetree/bindings/sound/rockchip,vad.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Required properties:
99
- clock-names: should contain following:
1010
- interrupts: should contain the vad interrupt.
1111
- rockchip,audio-src: the audio src for vad.
12+
- rockchip,buffer-time-ms: vad sram buffer time msec.
1213
- rockchip,det-channel: the channel(0~7) is used for detection.
1314
- rockchip,mode: vad work mode.
1415
- 0: begin to store the data after voice detected.

include/sound/pcm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,8 @@ snd_pcm_uframes_t snd_pcm_vad_avail(struct snd_pcm_substream *substream);
14161416
* Result is true for attached or false for detached
14171417
*/
14181418
bool snd_pcm_vad_attached(struct snd_pcm_substream *substream);
1419+
int snd_pcm_vad_preprocess(struct snd_pcm_substream *substream,
1420+
void *buf, snd_pcm_uframes_t size);
14191421
#endif
14201422

14211423
/* printk helpers */

0 commit comments

Comments
 (0)