From 554a34fb958cfa15c00a81671a72079cae00ca5f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 8 Mar 2009 03:55:01 +0100 Subject: alsa: better period_time default value for high sample rates The default values for buffer_time and period_time were both capped by the hardware limits on practically all chips. The result was a period_time which was half as big as the buffer_time. On some chips, this led to lots of underruns when using a high sample rate (192 kHz), because MPD had very little time to send new samples to ALSA. A period time which is one fourth of the buffer time turned out to be much better. If no period_time is configured, see how much buffer_time the hardware accepts, and try to configure one fourth of it as period_time, instead of hard-coding the default period_time value. This is yet another attempt to provide a solution which is valid for all sound chips. Using the SND_PCM_NONBLOCK flag also seemed to solve the underruns, but put a lot more CPU load to MPD. --- NEWS | 1 + 1 file changed, 1 insertion(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 4df9486d7..116d87a21 100644 --- a/NEWS +++ b/NEWS @@ -28,6 +28,7 @@ ver 0.15 - (200?/??/??) - mvp: check for reopen errors - mvp: fixed default device detection - pipe: new audio output plugin which runs a command + - alsa: better period_time default value for high sample rates * commands: - "playlistinfo" supports a range now - added "sticker database", command "sticker", which allows clients -- cgit v1.2.3