Hi Sir :
I work on DM8148 platform and use DVRRDK_03.00.00.00 to develop our system.
In our system, we use TVP5158 as audio decoder and aic3106 as encoder.
Recently, we find out a problem when recording audio data.
We use PCM 16bit mode to capture audio data through I2S and use G711 to encode audio data.
When we playback the video and audio data, we find out the audio data sometimes is abnormal, in other words, the audio is mute.
We have checked the audio input signal and we find it works fine when the problem above happens.
We also do a software debug, and we find that when this problem happens the below messages shows.
readAlsaAudio => len : 0, err : -32
DumpAlsaPCMstatus ***
state : XRUN
trigger_timedavinci_pcm: marcus : davinci_pcm_prepare
: 1364380618.42969649
tstamp : 1364380618.47227949
delay : 0
avail : 8203
avail_max : 8203
=> CAPTURE ERROR Broken pipe ...
DumpAlsaPCMstatus ###
state : XRUN
trigger_time: 1364380618.42969649
tstamp : 1364380618.61277350
delay : 0
avail : 8203
avail_max : 0
DumpAlsaPCMstatus @@@
state : PREPARED
trigger_time: 1364380618.42969649
tstamp : 1364380618.65683150
delay : 0
avail : 0
avail_max : 0
=> audioRecordLen : 0, expect_audioRecordLen : 320, time : 1364380618
I do not know if the problem is related with broken pipe, because sometimes when this messages shows, the audio data is good.
When broken pipe happens, we use snd_pcm_prepare function to recovery the audio dma.
We have bothered by this problem few weeks, could some one kindly give us some suggestion or some way to find the bug?
Best regards,
Marcus