Skip to content
Snippets Groups Projects

Draft: bluez5: rate match whole ISO group as one

Open P V requested to merge pvir/pipewire:iso-ratematch into master
  1. Feb 26, 2024
    • P V's avatar
      bluez5: rate match whole ISO group as one · 12286514
      P V authored
      Now that all nodes in the ISO group set node.group and are scheduled
      together with same clock, do rate matching to ISO rate in a better way.
      
      - Pick one node as 'leader' that rate matches as usual
      
      - Other nodes resync playback position with that node (drop samples /
        insert silence to align), and use the same rate correction.
      
      - When the driver is one of the nodes of the group, turn off rate
        matching in all nodes, as it's not needed.
      
      Playback position resync only occurs when some node fails to be
      scheduled, but then we have a playback glitch in any case. Resync occurs
      also at playback start.
      
      This avoids TWS left/right playback sync oscillating for a brief time at
      playback start or when there are scheduling glitches, as the nodes
      previously rate matched independently. (This does not address the HW
      issue that causes persistent desync, though.)
      
      The nodes may be one sample off if the resamplers are not aligned.
      12286514
Loading