I have a embedded platform with two audiocodec. One is a tlv320aic3x (I2S) codec and the other is a USB Codec. The scenario is that a rtp stream is forwarded with a PjProject conferencer to the two codecs. When the call is established there is a underrun for both codecs. The pjmedia part detects the underrun and prepares and starts the codecs new. There is no Problem with the USB codec but the I2S codec has sometimes no playback after the new start. The playback callback for the codec blocks in the function snd_pcm_wait_nocheck in the poll call. I think the problem is that he waits until the file descriptor is ready to be written but the driver is not read out the data. Does anybody knows the problem or can give me a hint where i can find the problem?!
Asked
Active
Viewed 194 times
0
-
Sounds like a bug in the driver. – CL. Jun 28 '18 at 14:25
-
I debugged the whole situation in more detail and i found out that when a underrun happen after the prepare function the snd_pcm_dshare_start function is called because we use the dshare plugin. That is ok and is no problem but sometimes also the snd_pcm_hw_start function is called and this stopps the playback path. Is this normal? – fresh Jun 29 '18 at 20:38
-
`snd_pcm_hw_start` making it stop indeed sounds like a bug. Is the driver's `trigger` callback called? – CL. Jun 29 '18 at 20:42
-
I found out that the record path is working when the playback stops so the codec is still running. We use alsa virtual devices and the dshare plugin and the snd_pcm_dshare_start function is called twice. The snd_pcm_hw_start is only called once. When only one channel has the underrun than there is no problem. – fresh Jul 02 '18 at 13:57
-
So the Problem is not caused by the snd_pcm_hw_start. Also when this function is not called in case of not available record path the playback stops. So only the snd_pcm_prepare function is called multiple times. So the playback data is not longer fetched. So the function pb_thread_func for the playback path is no longer called and stocks in the poll function. – fresh Jul 10 '18 at 09:52