]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
snd_uaudio(4): Adapt buffer length to buffer_ms tunable.
authorFlorian Walpen <dev@submerge.ch>
Mon, 12 Feb 2024 11:04:57 +0000 (13:04 +0200)
committerChristos Margiolis <christos@FreeBSD.org>
Mon, 12 Feb 2024 11:06:19 +0000 (13:06 +0200)
commitb2e97edffdab6ad1e9103a6bbe90300d78a961ed
tree92587337804b5210f7d2881afdc352f4b3819239
parent53c768e6836a32c8dcd0b0b422a169ef7a82a3ab
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
sys/dev/sound/usb/uaudio.c