微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 硬件电路设计 > TI模拟硬件电路设计 > dm8168 tlv320音频实时回放报错

dm8168 tlv320音频实时回放报错

时间:10-02 整理:3721RD 点击:

环境:

1、平台:DM8168 evm

2、sdk:DVRRDK_03.00.00.00

3、linux:2.6.37

4、音频芯片:tlv320aic3106

问题描述:

 我在做音频采集并实时回放的测试,首先依次打开音频采集、播放,然后将采集后的音频,缓存大于等于1000帧则回放,但是总有Underrun发生或者是直接writei返回资源无效。谢谢!

调试信息如下:

++++++++ Audio_DrvOpen start! ++++++++AUDIO Rate requested 44100Hz, get 44100Hz)

AUDIO CAPTURE: period size = 1000 frames

AUDIO CAPTURE: period time = 22675 us

AUDIO CAPTURE: buffer_size = 16000

++++++++ Audio_DrvOpen end! ++++++++ 

audio play init start

AUDIO_PLAY >> opened device

AUDIO PLAYBACK: period size = 1000 frames

AUDIO PLAYBACK: period time = 22675 us

AUDIO PLAYBACK: buffer_size = 16000

audio play init end!

AUDIO >> audio play wait............

 

Audio_playMain, 238: audio play pcm 174000

hwptr_update: pcmC0D0p:0: pos=36/1000/16000, hwptr=36/0/36/0

hwptr_update: pcmC0D0p:0: pos=337/1000/16000, hwptr=301/36/337/0 

hwptr_update: pcmC0D0p:0: pos=662/1000/16000, hwptr=325/337/662/0

hwptr_update: pcmC0D0p:0: pos=979/1000/16000, hwptr=317/662/979/0

hwptr_update: pcmC0D0p:0: pos=1248/1000/16000, hwptr=2/1246/1248/0

hwptr_update: pcmC0D0p:0: pos=1522/1000/16000, hwptr=274/1248/1522/0

hwptr_update: pcmC0D0p:0: pos=1802/1000/16000, hwptr=280/1522/1802/0

hwptr_update: pcmC0D0p:0: pos=2083/1000/16000, hwptr=2/2081/2083/0

hwptr_update: pcmC0D0p:0: pos=2356/1000/16000, hwptr=273/2083/2356/0

hwptr_update: pcmC0D0p:0: pos=2637/1000/16000, hwptr=281/2356/2637/0

hwptr_update: pcmC0D0p:0: pos=2918/1000/16000, hwptr=281/2637/2918/0

hwptr_update: pcmC0D0p:0: pos=3199/1000/16000, hwptr=2/3197/3199/0

hwptr_update: pcmC0D0p:0: pos=3472/1000/16000, hwptr=273/3199/3472/0

hwptr_update: pcmC0D0p:0: pos=3753/1000/16000, hwptr=281/3472/3753/0

hwptr_update: pcmC0D0p:0: pos=4034/1000/16000, hwptr=2/4032/4034/0

hwptr_update: pcmC0D0p:0: pos=4307/1000/16000, hwptr=273/4034/4307/0

hwptr_update: pcmC0D0p:0: pos=4588/1000/16000, hwptr=281/4307/4588/0

hwptr_update: pcmC0D0p:0: pos=4868/1000/16000, hwptr=280/4588/4868/0

hwptr_update: pcmC0D0p:0: pos=5149/1000/16000, hwptr=2/5147/5149/0

hwptr_update: pcmC0D0p:0: pos=5421/1000/16000, hwptr=272/5149/5421/0

hwptr_update: pcmC0D0p:0: pos=5702/1000/16000, hwptr=281/5421/5702/0

AUDIO >> error from writei: Resource temporarily unavailable

 AUDIO >>  PLAYBACK ERROR <174000 bytes> Resource temporarily unavailable, playback wont continue...

Hi Ferris:

Please help to check two things:

1. Please make sure the recording and playback bit resolution and sample rate are all the same;

2. It is better to setup  ping-pong buffers to achieve glitch-free realtime loopback.

Fabian 

1、ping-pong buffers  在8168上没有支持。

2、我目前问题主要是回放延时较大(秒级),是否驱动需要优化?

您好

1) 测试的时候,视频是否有打开?如果有,请只运行音频看是否有问题?

2) 看看接受和发送fifo现在设置的是多大,调整一下,看是否有帮助?

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top