]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Added REFINE_DEBUG
authorJaroslav Kysela <perex@perex.cz>
Mon, 19 Nov 2001 15:52:45 +0000 (15:52 +0000)
committerJaroslav Kysela <perex@perex.cz>
Mon, 19 Nov 2001 15:52:45 +0000 (15:52 +0000)
src/pcm/pcm_params.c

index a66d652ecc086bb6e114498a60c321b422f4d81f..3257073fb8848553984e86d770fa10aa9e7af0ed 100644 (file)
@@ -2037,10 +2037,28 @@ static int snd_pcm_sw_params_default(snd_pcm_t *pcm, snd_pcm_sw_params_t *params
        return 0;
 }
 
+#if 0
+#define REFINE_DEBUG
+#endif
+
 int snd_pcm_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
 {
+       int res;
+#ifdef REFINE_DEBUG
+       snd_output_t *log;
+       snd_output_stdio_attach(&log, stderr, 0);
+#endif
        assert(pcm && params);
-       return pcm->ops->hw_refine(pcm->op_arg, params);
+#ifdef REFINE_DEBUG
+       snd_output_printf(log, "REFINE called:\n");
+       snd_pcm_hw_params_dump(params, log);
+#endif
+       res = pcm->ops->hw_refine(pcm->op_arg, params);
+#ifdef REFINE_DEBUG
+       snd_output_printf(log, "refine done - result = %i\n", res);
+       snd_output_close(log);
+#endif
+       return res;
 }
 
 /* Install one of the configurations present in configuration