From: Jaroslav Kysela Date: Mon, 19 Nov 2001 15:52:45 +0000 (+0000) Subject: Added REFINE_DEBUG X-Git-Tag: v1.0.3~594 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=eb391e81f0ccb81ed9d57bdd6c05bf63540320d2;p=alsa-lib.git Added REFINE_DEBUG --- diff --git a/src/pcm/pcm_params.c b/src/pcm/pcm_params.c index a66d652e..3257073f 100644 --- a/src/pcm/pcm_params.c +++ b/src/pcm/pcm_params.c @@ -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