summaryrefslogtreecommitdiff
path: root/src/pcm/pcm_plug.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcm/pcm_plug.c')
-rw-r--r--src/pcm/pcm_plug.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pcm/pcm_plug.c b/src/pcm/pcm_plug.c
index 67f6b097..ebf7a526 100644
--- a/src/pcm/pcm_plug.c
+++ b/src/pcm/pcm_plug.c
@@ -488,6 +488,8 @@ static int snd_pcm_plug_hw_refine_cchange(snd_pcm_t *pcm ATTRIBUTE_UNUSED,
interval_t t;
const interval_t *sbuffer_size;
const interval_t *srate, *crate;
+ unsigned int rate_min, srate_min;
+ int rate_mindir, srate_mindir;
format_mask = snd_pcm_hw_param_value_mask(params,
SND_PCM_HW_PARAM_FORMAT);
sformat_mask = snd_pcm_hw_param_value_mask(sparams,
@@ -512,6 +514,15 @@ static int snd_pcm_plug_hw_refine_cchange(snd_pcm_t *pcm ATTRIBUTE_UNUSED,
if (err < 0)
return err;
+ /* This is a temporary hack, waiting for a better solution */
+ rate_min = snd_pcm_hw_param_value_min(params, SND_PCM_HW_PARAM_RATE, &rate_mindir);
+ srate_min = snd_pcm_hw_param_value_min(sparams, SND_PCM_HW_PARAM_RATE, &srate_mindir);
+ if (rate_min == srate_min && srate_mindir > rate_mindir) {
+ err = _snd_pcm_hw_param_min(params, SND_PCM_HW_PARAM_RATE, srate_min, srate_mindir);
+ if (err < 0)
+ return err;
+ }
+
sbuffer_size = snd_pcm_hw_param_value_interval(sparams, SND_PCM_HW_PARAM_BUFFER_SIZE);
crate = snd_pcm_hw_param_value_interval(params, SND_PCM_HW_PARAM_RATE);
srate = snd_pcm_hw_param_value_interval(sparams, SND_PCM_HW_PARAM_RATE);