return 0;
}
-static int snd_pcm_plug_hw_refine_cprepare(snd_pcm_t *pcm ATTRIBUTE_UNUSED, snd_pcm_hw_params_t *params ATTRIBUTE_UNUSED)
+static int snd_pcm_plug_hw_refine_cprepare(snd_pcm_t *pcm ATTRIBUTE_UNUSED, snd_pcm_hw_params_t *params)
{
+ unsigned int rate_min;
+
+ /* HACK: to avoid overflow in PARTBIT_RATE code */
+ rate_min = snd_pcm_hw_param_get_min(params, SND_PCM_HW_PARAM_RATE, NULL);
+ if (rate_min < 4000)
+ _snd_pcm_hw_param_set_min(params, SND_PCM_HW_PARAM_RATE, 4000, 1);
return 0;
}
snd_pcm_format_t format;
snd_interval_t t, buffer_size;
const snd_interval_t *srate, *crate;
- unsigned int srate_min;
if (plug->srate == -2)
links |= SND_PCM_HW_PARBIT_RATE;
else {
snd_pcm_hw_param_refine_near(slave, sparams, SND_PCM_HW_PARAM_RATE,
params);
- /* HACK: to avoid overflow in PARTBIT_RATE code */
- srate_min = snd_pcm_hw_param_get_min(sparams, SND_PCM_HW_PARAM_RATE, NULL);
- if (srate_min < 4000)
- _snd_pcm_hw_param_set_min(sparams, SND_PCM_HW_PARAM_RATE, srate_min, 1);
}
if (plug->schannels == -2)