54 lines
1.9 KiB
Markdown
54 lines
1.9 KiB
Markdown
|
- 音频驱动加载报错问题
|
|||
|
- 需要load带v1后缀的
|
|||
|
- 通过i2cdetect观测 带“UU”说明被驱动
|
|||
|
- sa8900在产品板上i2c0和i2c2选贴
|
|||
|
- i2cdetect -r -y 0 或者 i2cdetect -r -y 2
|
|||
|
- 运行sample成功
|
|||
|
- 运行sample
|
|||
|
- sample_audio_mapi -D 0 -i /mnt/sdcard/sdcard1/weight_systest.bin -o /mnt/sdcard/sdcard1/evb_test/1.pcm -r 16000 -b 16 -c 2 -m 2 -f 0 -p 160 -w 10 # 硬直通
|
|||
|
- sample_audio_mapi -D 0 -i /mnt/sdcard/sdcard1/weight_systest.bin -o /mnt/sdcard/sdcard1/evb_test/1.pcm -r 16000 -b 16 -c 2 -m 2 -f 0 -p 160 -w 12
|
|||
|
- 参数解释
|
|||
|
- -i 模型文件 aifile 在测试10和12中就是模型文件
|
|||
|
- -o 采集到的pcm文件
|
|||
|
- -D 0 device 0 8900/WM8978 # 对应AiDev
|
|||
|
- -r 16000 采样率
|
|||
|
- -b 16bit 16bit采样
|
|||
|
- -c channel 左右声道
|
|||
|
- -m 2 mapi soundMode # 对应AiChn
|
|||
|
- -f 0 0:i2s 1:tdm 2:pdm 8900上固定给i2s,应该是固定0
|
|||
|
- -p 160 编码用的 AENC_G_80_SAMPLES_PER_FRAME 编码每帧多少个sample anne用不到
|
|||
|
- -w 10 workindex 就是测试的case
|
|||
|
- 10 AUDIO_SAMPLE_ANNE_I2S0_DIRECT
|
|||
|
- 12 AUDIO_SAMPLE_ANNE_BIND_AI
|
|||
|
- 函数整理
|
|||
|
- SA_MAPI_ANNE_Init
|
|||
|
- 注册了一个结果处理回调 sample_anne_event
|
|||
|
- SA_MAPI_ANNE_LOAD_Modle
|
|||
|
- SA_MAPI_ANNE_SetAttr
|
|||
|
- SA_MAPI_ANNE_Start
|
|||
|
- my_anne_dump_result_task_direct
|
|||
|
- 通过myAnneHandle.anneResultQueue来传递结果 my_attach_anne_result写入结果
|
|||
|
- 调用在init的时候注册的回调
|
|||
|
- my_anne_get_result_task
|
|||
|
- LAPI_ANNE_GetAnneResultsFc
|
|||
|
- my_attach_anne_result
|
|||
|
-
|
|||
|
- sample_auido_StartAi
|
|||
|
- audio_AnneBindAi
|
|||
|
- sample_audio_CreatTrdAiFile
|
|||
|
- sample_audio_DestoryTrdAi
|
|||
|
- sample_audio_StopAi
|
|||
|
- SA_MAPI_ANNE_Stop
|
|||
|
- SA_MAPI_ANNE_DeInit
|
|||
|
- 编写函数
|
|||
|
- 通道转换函数
|
|||
|
- SVP_ADD_CHN
|
|||
|
- SVP_GET_CHN
|
|||
|
- SVP_DEL_CHN
|
|||
|
- SVP_CHECK_PARAM
|
|||
|
- SVP-ANNE函数
|
|||
|
- SVP_ANNE_CreateChn
|
|||
|
- SVP_ANNE_DestroyChn
|
|||
|
- SVP_ANNE_StartChn
|
|||
|
- SVP_ANNE_StopChn
|