我的alsa配置了 Buffer_size = 2048和period_size = 1024
我正在使用IMX6板登机。我在板上运行二进制文件,从模拟输入和多播中捕获音频。其他板作为监听器运行,接收帧并使用" snd_pcm_writei",帧被写入alsa。
现在播放延迟约1分钟,之后开始连续播放。 我不确定是否会迷惑一下。
写入alsa后带有snd_pcm_avail()的日志如下所示。请提供您的反馈。 我怀疑的是,帧被写入alsa但alsa不会播放,因此下一帧被覆盖。
日志:
pcm avail val is :2048
pcm avail val is :-32
(AVB Info) 01:29:01.029202 (Slave) ==> Broken pipe
pcm avail val is :2048
pcm avail val is :-32
(AVB Info) 01:29:02.030307 (Slave) ==> Broken pipe
pcm avail val is :2048
pcm avail val is :-32
(AVB Info) 01:29:03.031376 (Slave) ==> Broken pipe
pcm avail val is :2048
pcm avail val is :-32
(AVB Info) 01:29:04.032432 (Slave) ==> Broken pipe
pcm avail val is :2048
pcm avail val is :-32
(AVB Info) 01:29:05.033494 (Slave) ==> Broken pipe
pcm avail val is :2048
pcm avail val is :-32
(AVB Info) 01:29:06.034551 (Slave) ==> Broken pipe
pcm avail val is :2048
pcm avail val is :-32
(AVB Info) 01:29:07.035603 (Slave) ==> Broken pipe
pcm avail val is :2048
pcm avail val is :-32
(AVB Info) 01:29:08.036680 (Slave) ==> Broken pipe
pcm avail val is :2048
pcm avail val is :-32
(AVB Info) 01:29:09.037726 (Slave) ==> Broken pipe
pcm avail val is :2048
pcm avail val is :-32