Skip to content

Commit

Permalink
[ALSA] pcxhr - Fix the sample rate changes
Browse files Browse the repository at this point in the history
Modules: Digigram PCXHR driver

Fix the hardware set up when the sample rate is changed multiple times.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jan 22, 2006
1 parent d298139 commit 8937fd8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sound/pci/pcxhr/pcxhr.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,13 +744,14 @@ static int pcxhr_prepare(struct snd_pcm_substream *subs)
/* only the first stream can choose the sample rate */
/* the further opened streams will be limited to its frequency (see open) */
/* 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);
if (err)
break;
if (mgr->sample_rate == 0)
/* start the DSP-timer */
err = pcxhr_hardware_timer(mgr, 1);
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) */

Expand Down

0 comments on commit 8937fd8

Please sign in to comment.