diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-01-10 11:14:49 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-22 16:24:02 +0100 |
commit | 8937fd88558d5a741d6ed29d5f8c327646a4f1db (patch) | |
tree | 31a660a61b6d5969d0876edf8ad586f06afa1f20 | |
parent | d2981393615f9a7adb8223a2ab1e0d7423d5c9dd (diff) | |
download | linux-8937fd88558d5a741d6ed29d5f8c327646a4f1db.tar.bz2 |
[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: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/pcxhr/pcxhr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index b8c0853a8278..57fe9538f5a4 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c @@ -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) */ |