diff options
Diffstat (limited to 'sound/drivers/pcm-indirect2.c')
-rw-r--r-- | sound/drivers/pcm-indirect2.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/sound/drivers/pcm-indirect2.c b/sound/drivers/pcm-indirect2.c index 6a829cd03dde..660157d49422 100644 --- a/sound/drivers/pcm-indirect2.c +++ b/sound/drivers/pcm-indirect2.c | |||
@@ -403,7 +403,7 @@ snd_pcm_indirect2_playback_interrupt(struct snd_pcm_substream *substream, | |||
403 | rec->min_multiple); | 403 | rec->min_multiple); |
404 | rec->mul_elapsed++; | 404 | rec->mul_elapsed++; |
405 | #endif | 405 | #endif |
406 | rec->min_periods = 0; | 406 | rec->min_periods = (rec->min_periods % rec->min_multiple); |
407 | snd_pcm_period_elapsed(substream); | 407 | snd_pcm_period_elapsed(substream); |
408 | } | 408 | } |
409 | } | 409 | } |
@@ -568,24 +568,8 @@ snd_pcm_indirect2_capture_interrupt(struct snd_pcm_substream *substream, | |||
568 | rec->mul_elapsed_real += (rec->min_periods / | 568 | rec->mul_elapsed_real += (rec->min_periods / |
569 | rec->min_multiple); | 569 | rec->min_multiple); |
570 | rec->mul_elapsed++; | 570 | rec->mul_elapsed++; |
571 | |||
572 | if (!(rec->mul_elapsed % 4)) { | ||
573 | struct snd_pcm_runtime *runtime = substream->runtime; | ||
574 | unsigned int appl_ptr = | ||
575 | frames_to_bytes(runtime, | ||
576 | (unsigned int)runtime->control-> | ||
577 | appl_ptr) % rec->sw_buffer_size; | ||
578 | int diff = rec->sw_data - appl_ptr; | ||
579 | if (diff < 0) | ||
580 | diff += rec->sw_buffer_size; | ||
581 | snd_printk(KERN_DEBUG | ||
582 | "STAT: mul_elapsed: %d, sw_data: %u, " | ||
583 | "appl_ptr (bytes): %u, diff: %d\n", | ||
584 | rec->mul_elapsed, rec->sw_data, appl_ptr, | ||
585 | diff); | ||
586 | } | ||
587 | #endif | 571 | #endif |
588 | rec->min_periods = 0; | 572 | rec->min_periods = (rec->min_periods % rec->min_multiple); |
589 | snd_pcm_period_elapsed(substream); | 573 | snd_pcm_period_elapsed(substream); |
590 | } | 574 | } |
591 | } | 575 | } |