Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81473
b: refs/heads/master
c: dddefd0
h: refs/heads/master
i:
  81471: 0e06ee7
v: v3
  • Loading branch information
Joachim Foerster authored and Jaroslav Kysela committed Jan 31, 2008
1 parent 3b8581a commit e8599af
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9f00d8df2115b396f13ea74b835f18215a871cc
refs/heads/master: dddefd0d706da7d981e8e397231df257f0122a49
6 changes: 2 additions & 4 deletions trunk/sound/drivers/ml403-ac97cr.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@
* accesses to a minimum, because after a variable amount of accesses, the AC97
* controller doesn't raise the register access finished bit anymore ...
*
* - Capture support works - basically, but after ~30s (with rates > ~20kHz)
* ALSA stops reading captured samples from the intermediate buffer and
* therefore a overrun happens - ATM I don't know what's wrong.
*
* - Playback support seems to be pretty stable - no issues here.
* - Capture support "works" now, too. Overruns don't happen any longer so often.
* But there might still be some ...
*/

#include <sound/driver.h>
Expand Down
20 changes: 2 additions & 18 deletions trunk/sound/drivers/pcm-indirect2.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ snd_pcm_indirect2_playback_interrupt(struct snd_pcm_substream *substream,
rec->min_multiple);
rec->mul_elapsed++;
#endif
rec->min_periods = 0;
rec->min_periods = (rec->min_periods % rec->min_multiple);
snd_pcm_period_elapsed(substream);
}
}
Expand Down Expand Up @@ -568,24 +568,8 @@ snd_pcm_indirect2_capture_interrupt(struct snd_pcm_substream *substream,
rec->mul_elapsed_real += (rec->min_periods /
rec->min_multiple);
rec->mul_elapsed++;

if (!(rec->mul_elapsed % 4)) {
struct snd_pcm_runtime *runtime = substream->runtime;
unsigned int appl_ptr =
frames_to_bytes(runtime,
(unsigned int)runtime->control->
appl_ptr) % rec->sw_buffer_size;
int diff = rec->sw_data - appl_ptr;
if (diff < 0)
diff += rec->sw_buffer_size;
snd_printk(KERN_DEBUG
"STAT: mul_elapsed: %d, sw_data: %u, "
"appl_ptr (bytes): %u, diff: %d\n",
rec->mul_elapsed, rec->sw_data, appl_ptr,
diff);
}
#endif
rec->min_periods = 0;
rec->min_periods = (rec->min_periods % rec->min_multiple);
snd_pcm_period_elapsed(substream);
}
}

0 comments on commit e8599af

Please sign in to comment.