aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-11-05 08:25:21 +0100
committerMax Kellermann <max@duempel.org>2010-11-05 10:35:46 +0100
commit5a263206803556a600a75dd5e1813feb510af268 (patch)
treee4d98f96916f58a3ce70a763e9c144a1c4b66779 /src/output
parent90dc880e67bcadd50a05afdd60d33545e699e2f4 (diff)
downloadmpd-5a263206803556a600a75dd5e1813feb510af268.tar.gz
mpd-5a263206803556a600a75dd5e1813feb510af268.tar.xz
mpd-5a263206803556a600a75dd5e1813feb510af268.zip
output/alsa: dump buffer and period limits
Diffstat (limited to '')
-rw-r--r--src/output/alsa_plugin.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/output/alsa_plugin.c b/src/output/alsa_plugin.c
index 8c36e32bd..9177fabe4 100644
--- a/src/output/alsa_plugin.c
+++ b/src/output/alsa_plugin.c
@@ -408,6 +408,26 @@ configure_hw:
}
audio_format->sample_rate = sample_rate;
+ snd_pcm_uframes_t buffer_size_min, buffer_size_max;
+ snd_pcm_hw_params_get_buffer_size_min(hwparams, &buffer_size_min);
+ snd_pcm_hw_params_get_buffer_size_max(hwparams, &buffer_size_max);
+ unsigned buffer_time_min, buffer_time_max;
+ snd_pcm_hw_params_get_buffer_time_min(hwparams, &buffer_time_min, 0);
+ snd_pcm_hw_params_get_buffer_time_max(hwparams, &buffer_time_max, 0);
+ g_debug("buffer: size=%u..%u time=%u..%u",
+ (unsigned)buffer_size_min, (unsigned)buffer_size_max,
+ buffer_time_min, buffer_time_max);
+
+ snd_pcm_uframes_t period_size_min, period_size_max;
+ snd_pcm_hw_params_get_period_size_min(hwparams, &period_size_min, 0);
+ snd_pcm_hw_params_get_period_size_max(hwparams, &period_size_max, 0);
+ unsigned period_time_min, period_time_max;
+ snd_pcm_hw_params_get_period_time_min(hwparams, &period_time_min, 0);
+ snd_pcm_hw_params_get_period_time_max(hwparams, &period_time_max, 0);
+ g_debug("period: size=%u..%u time=%u..%u",
+ (unsigned)period_size_min, (unsigned)period_size_max,
+ period_time_min, period_time_max);
+
if (ad->buffer_time > 0) {
buffer_time = ad->buffer_time;
cmd = "snd_pcm_hw_params_set_buffer_time_near";