From 2f0674807c39e29234c6ffa3b75cced87306aaab Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Mon, 26 Mar 2012 23:49:16 +0200
Subject: output/alsa: more debug output

---
 src/output/alsa_output_plugin.c | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'src/output')

diff --git a/src/output/alsa_output_plugin.c b/src/output/alsa_output_plugin.c
index d0b0c4a5e..aaf489ea8 100644
--- a/src/output/alsa_output_plugin.c
+++ b/src/output/alsa_output_plugin.c
@@ -441,6 +441,11 @@ configure_hw:
 		return false;
 	}
 
+	snd_pcm_format_t format;
+	if (snd_pcm_hw_params_get_format(hwparams, &format) == 0)
+		g_debug("format=%s (%s)", snd_pcm_format_name(format),
+			snd_pcm_format_description(format));
+
 	err = snd_pcm_hw_params_set_channels_near(ad->pcm, hwparams,
 						  &channels);
 	if (err < 0) {
@@ -644,6 +649,9 @@ alsa_open(struct audio_output *ao, struct audio_format *audio_format, GError **e
 		return false;
 	}
 
+	g_debug("opened %s type=%s", snd_pcm_name(ad->pcm),
+		snd_pcm_type_name(snd_pcm_type(ad->pcm)));
+
 	success = alsa_setup_or_dsd(ad, audio_format, error);
 	if (!success) {
 		snd_pcm_close(ad->pcm);
-- 
cgit v1.2.3