perf(alsa): increase buffer/period to reduce wakeups

This commit is contained in:
vicrodh committed 2026-01-13 01:17:07 -06:00
1 parent 86258f019f
commit bdd6776188
1 file changed
+3 -3
+3 -3
View File
@@ -1067,9 +1067,9 @@ fn set_hw_params_from_format(
// Without them, we are at the mercy of the device.
//
// QBZ note: prefer fewer wakeups during playback to reduce CPU usage.
// 50ms period / 200ms buffer is still reasonable for music playback.
hw_params.set_period_time_near(50_000, alsa::ValueOr::Nearest)?;
hw_params.set_buffer_time_near(200_000, alsa::ValueOr::Nearest)?;
// 100ms period / 400ms buffer is still reasonable for music playback.
hw_params.set_period_time_near(100_000, alsa::ValueOr::Nearest)?;
hw_params.set_buffer_time_near(400_000, alsa::ValueOr::Nearest)?;
}
}