diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-02 09:08:23 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-02 09:08:23 +0300 |
commit | b4103333d7904310d34de18d85e51e3d74f00a3b (patch) | |
tree | dd5fff309659f023fd5540896cb2db30562abaa6 /sound/pci/pcxhr/pcxhr.c | |
parent | 59ed2f59e4ea6a32f9591e378da7935f713a7000 (diff) | |
parent | 1494a92f4c2b1d5abdaa1f823dd19f797bb137de (diff) | |
download | linux-b4103333d7904310d34de18d85e51e3d74f00a3b.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa
Diffstat (limited to 'sound/pci/pcxhr/pcxhr.c')
-rw-r--r-- | sound/pci/pcxhr/pcxhr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index b8c0853a8278..b2cba75b6b16 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c @@ -454,7 +454,7 @@ static int pcxhr_update_r_buffer(struct pcxhr_stream *stream) is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE); stream_num = is_capture ? 0 : subs->number; - snd_printdd("pcxhr_update_r_buffer(pcm%c%d) : addr(%p) bytes(%x) subs(%d)\n", + snd_printdd("pcxhr_update_r_buffer(pcm%c%d) : addr(%p) bytes(%zx) subs(%d)\n", is_capture ? 'c' : 'p', chip->chip_idx, (void*)subs->runtime->dma_addr, subs->runtime->dma_bytes, subs->number); @@ -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) */ |