aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/pcxhr/pcxhr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/pcxhr/pcxhr.c')
-rw-r--r--sound/pci/pcxhr/pcxhr.c9
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)
454 is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE); 454 is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE);
455 stream_num = is_capture ? 0 : subs->number; 455 stream_num = is_capture ? 0 : subs->number;
456 456
457 snd_printdd("pcxhr_update_r_buffer(pcm%c%d) : addr(%p) bytes(%x) subs(%d)\n", 457 snd_printdd("pcxhr_update_r_buffer(pcm%c%d) : addr(%p) bytes(%zx) subs(%d)\n",
458 is_capture ? 'c' : 'p', 458 is_capture ? 'c' : 'p',
459 chip->chip_idx, (void*)subs->runtime->dma_addr, 459 chip->chip_idx, (void*)subs->runtime->dma_addr,
460 subs->runtime->dma_bytes, subs->number); 460 subs->runtime->dma_bytes, subs->number);
@@ -744,13 +744,14 @@ static int pcxhr_prepare(struct snd_pcm_substream *subs)
744 /* only the first stream can choose the sample rate */ 744 /* only the first stream can choose the sample rate */
745 /* the further opened streams will be limited to its frequency (see open) */ 745 /* the further opened streams will be limited to its frequency (see open) */
746 /* set the clock only once (first stream) */ 746 /* set the clock only once (first stream) */
747 if (mgr->sample_rate == 0) { 747 if (mgr->sample_rate != subs->runtime->rate) {
748 err = pcxhr_set_clock(mgr, subs->runtime->rate); 748 err = pcxhr_set_clock(mgr, subs->runtime->rate);
749 if (err) 749 if (err)
750 break; 750 break;
751 if (mgr->sample_rate == 0)
752 /* start the DSP-timer */
753 err = pcxhr_hardware_timer(mgr, 1);
751 mgr->sample_rate = subs->runtime->rate; 754 mgr->sample_rate = subs->runtime->rate;
752
753 err = pcxhr_hardware_timer(mgr, 1); /* start the DSP-timer */
754 } 755 }
755 } while(0); /* do only once (so we can use break instead of goto) */ 756 } while(0); /* do only once (so we can use break instead of goto) */
756 757