Dear all,
I have some questions about behavior of ALSA library on DM368 DVSDK.
We have constructed audio recording system with DM368 +
TLV320AIC3101(same as DM368 Evaluation Module, TMDXEVM368) on DVSDK +
ALSA. (I will describe detailed conditions in last section)
Usually it works, but rarely, captured PCM data(got by
'snd_pcm_readi') is REWOUND about 1 second at some point in time. At
this point,
1. The following PCM data after REWIND is correct and continuous.
2. snd_pcm_readi returns with no error.
(amount of the captured data is equal to the request)
3. No XRUN condition is detected.
(snd_pcm_state is called after snd_pcm_readi, and it always returns
'SND_PCM_STATE_RUNNING')
Does anyone know some information about this? Also I want to know how
to avoid this REWIND happening, and effective checkpoint.
The following, there are some information I can find until now. The
data is got under the condition bellow.
o sampling frequency is 44.1kHz
o amount of request data on one call of snd_pcm_readi, are 1024
samples.
1. 1st process of snd_pcm_readi takes about 90ms
2. 2nd, 3rd, 4th process of snd_pcm_readi takes under 1ms
3. On regular condition, 5th process takes about 90ms
4. On irregular condition, 5th process takes under 1ms
(I think, it occurs lack of sampling PCM data)
5. It seems that this REWIND happening may be avoidable by dropping
PCM data of No.4 till next 'snd_pcm_readi processes over 1ms.'
(Now we are testing this)
I guess, No.4 occurs because of load of the DM368 or memory
transmission. The system processes not only audio capture but video
capture/encode.
Thank you.
Masahiro Iwase
DVSDK version: 4.02(dvsdk_dm368-evm_4_02_00_06)
linux kernel version: 2.6.32.17
psp version: 03.01.01.39
PCM format: SND_PCM_FORMAT_S16_LE
sampling rate: 44.1, 22.05, 11.025, 32, 16kHz
channels: 2