HomeFreeBSD

snd_uaudio(4): Adapt buffer length to buffer_ms tunable.

Description

snd_uaudio(4): Adapt buffer length to buffer_ms tunable.

Adapt the length of the driver side audio buffer to the USB transfer
interval, which is adjustable through the buffer_ms tunable. This
eliminates unnecessary latency in USB audio playback.

To reduce power consumption caused by frequent CPU wakeups, increase the
default buffer_ms value to 4ms. In combination with adaptive buffer
length, this still results in less roundtrip latency compared to the
previous 2ms default.

Extend the buffer_ms value range to 1ms for low latency applications.

MFC after: 2 weeks
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D41942

(cherry picked from commit b2e97edffdab6ad1e9103a6bbe90300d78a961ed)

Details

Provenance
dev_submerge.chAuthored on Feb 12 2024, 11:04 AM
christosCommitted on Feb 26 2024, 11:22 PM
Reviewer
christos
Differential Revision
D41942: snd_uaudio(4): Adapt buffer length to buffer_ms tunable.
Parents
rG7e984a34c304: mixer(3): Do not hardcode "/dev/mixer"
Branches
Unknown
Tags
Unknown