1
Index: alsa-lib-1.0.15/src/pcm/pcm_ioplug.c
2
===================================================================
3
--- alsa-lib-1.0.15.orig/src/pcm/pcm_ioplug.c 2008-03-11 18:22:04.000000000 -0400
4
+++ alsa-lib-1.0.15/src/pcm/pcm_ioplug.c 2008-03-11 18:25:07.000000000 -0400
9
- /* periods = buffer_bytes / periods */
10
+ /* periods = buffer_bytes / period_bytes */
11
err = rule_div(params, SND_PCM_HW_PARAM_PERIODS,
12
SND_PCM_HW_PARAM_BUFFER_BYTES,
13
SND_PCM_HW_PARAM_PERIOD_BYTES);
18
+ /* period_bytes = buffer_bytes / periods */
19
+ err = rule_div(params, SND_PCM_HW_PARAM_PERIOD_BYTES,
20
+ SND_PCM_HW_PARAM_BUFFER_BYTES,
21
+ SND_PCM_HW_PARAM_PERIODS);
25
+ /* update period_size and period_time */
27
+ err = snd_ext_parm_interval_refine(hw_param_interval(params, SND_PCM_HW_PARAM_PERIOD_BYTES),
28
+ io->params, SND_PCM_IOPLUG_HW_PERIOD_BYTES);
31
+ err = refine_back_time_and_size(params, SND_PCM_HW_PARAM_PERIOD_TIME,
32
+ SND_PCM_HW_PARAM_PERIOD_SIZE,
33
+ SND_PCM_HW_PARAM_PERIOD_BYTES);
38
params->info = SND_PCM_INFO_BLOCK_TRANSFER;
39
p = &io->params[SND_PCM_IOPLUG_HW_ACCESS];
43
ioplug_priv_t *io = pcm->private_data;
44
static snd_pcm_state_t states[2] = {
45
- SND_PCM_STATE_PAUSED, SND_PCM_STATE_RUNNING
46
+ SND_PCM_STATE_RUNNING, SND_PCM_STATE_PAUSED