ZHDA175 June   2026 AM625 , AM625SIP , AM62D-Q1 , AM62L , AM62P

 

  1.   1
  2.   摘要
  3.   商标
  4. 1 简介
    1. 1.1 主要亮点:
    2. 1.2 基本概念:
      1. 1.2.1 PipeWire 服务器
      2. 1.2.2 PipeWire 客户端
      3. 1.2.3 会话管理器
      4. 1.2.4 节点、端口和链接
    3. 1.3 PipeWire 主要组件
  5. 2 Linux 音频栈
  6. 3 通过 Yocto 构建支持 PipeWire 的 SDK 映像
    1. 3.1 在主机上运行 Yocto 构版建的步骤
      1. 3.1.1 必要条件(一次性设置)
    2. 3.2 克隆 oe 层设置
    3. 3.3 下载并应用 PipeWire 补丁
    4. 3.4 构建 PipeWire 映像
  7. 4 在 Sitara 器件上设置 PipeWire
    1. 4.1 硬件
      1. 4.1.1 SK-AM62B-P1
      2. 4.1.2 TMDS62LEVM
      3. 4.1.3 AUDIO-AM62D-EVM
    2. 4.2 配置 EVM 引导模式
      1. 4.2.1 SK-AM62B-P1
      2. 4.2.2 TMDS62LEVM
      3. 4.2.3 AUDIO-AM62D-EVM
    3. 4.3 UART 控制台设置
    4. 4.4 刷写 SD 卡映像
    5. 4.5 使用 SD 卡引导 EVM
  8. 5 使用 PipeWire
    1. 5.1 检查服务状态
    2. 5.2 启用 PipeWire 和 Wireplumber
    3. 5.3 启动 PipeWire 和 WirePlumber
    4. 5.4 常规 PipeWire 命令
      1. 5.4.1 列出 PipeWire 服务器中当前的所有对象
      2. 5.4.2 仅列出节点
      3. 5.4.3 检查特定对象
    5. 5.5 播放和录制立体声音频
  9. 6 配置
    1. 6.1 接收端和源端配置
    2. 6.2 WirePlumber 配置
  10. 7 性能基准测试
    1. 7.1 延迟
    2. 7.2 CPU 和内存使用情况
    3. 7.3 重新采样后的 CPU 和内存使用情况
    4. 7.4 观察结果
  11. 8 总结
  12. 9 参考资料
  13. 10重要声明和免责声明

延迟

该测试可测量 PulseAudio 和 PipeWire 的播放延迟。

对于 PulseAudio,延迟是使用 pactl 报告的接收端延迟来测量的,反映了在音频输出中观察到的有效播放延迟。

root@<machine>: pactl list sinks | grep Latency
Latency: 1370744 usec, configured 1837500 usec

对于 PipeWire,对通过 pw-top 命令获得的活动流和接收节点的缓冲区持续时间(时间片)求和来估算延迟,表示应用程序和器件缓冲。

root@<machine>: pw-top
S ID QUANT RATE WAIT BUSY W/Q B/Q ERR FORMAT NAME
S 29 0 0 --- --- --- --- 0 Dummy-Driver
S 30 0 0 --- --- --- --- 0 Freewheel-Driver
R 31 2048 48000 19.1us 504.7us 0.00 0.01 0 S32LE 8 48000 alsa_audio_sink
R 77 4800 48000 28.9us 125.1us 0.00 0.00 0 S16LE 8 48000 = pw-play
S 32 0 0 --- --- --- --- 0 alsa_audio_source
S 68 0 0 --- --- --- --- 0 alsa_output.platform-sound.stereo-fallback
S 69 0 0 --- --- --- --- 0 alsa_input.platform-sound.stereo-fallback

使用下方公式,根据时间片和速率计算延迟:

方程式 1. Latency ( ms ) = quantum rate × 1000
表 7-1 默认延迟
器件 音频服务器 延时 (ms)
SK-AM62B-P1PulseAudio大约 1837ms
PipeWire大约 143ms
TMDS62LEVMPulseAudio大约 1837ms
PipeWire大约 143ms
AUDIO-AM62D-EVMPulseAudio大约 1837ms
PipeWire大约 143ms

通过更改配置(例如时间片、时钟速率、片段数量、片段大小等),可以进一步减小这些延迟值。