提交 8937fd88 编写于 作者: T Takashi Iwai 提交者: Jaroslav Kysela

[ALSA] pcxhr - Fix the sample rate changes

Modules: Digigram PCXHR driver

Fix the hardware set up when the sample rate is changed multiple times.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 d2981393
...@@ -744,13 +744,14 @@ static int pcxhr_prepare(struct snd_pcm_substream *subs) ...@@ -744,13 +744,14 @@ static int pcxhr_prepare(struct snd_pcm_substream *subs)
/* only the first stream can choose the sample rate */ /* only the first stream can choose the sample rate */
/* the further opened streams will be limited to its frequency (see open) */ /* the further opened streams will be limited to its frequency (see open) */
/* set the clock only once (first stream) */ /* set the clock only once (first stream) */
if (mgr->sample_rate == 0) { if (mgr->sample_rate != subs->runtime->rate) {
err = pcxhr_set_clock(mgr, subs->runtime->rate); err = pcxhr_set_clock(mgr, subs->runtime->rate);
if (err) if (err)
break; break;
if (mgr->sample_rate == 0)
/* start the DSP-timer */
err = pcxhr_hardware_timer(mgr, 1);
mgr->sample_rate = subs->runtime->rate; mgr->sample_rate = subs->runtime->rate;
err = pcxhr_hardware_timer(mgr, 1); /* start the DSP-timer */
} }
} while(0); /* do only once (so we can use break instead of goto) */ } while(0); /* do only once (so we can use break instead of goto) */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册