Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6567
b: refs/heads/master
c: 7153a55
h: refs/heads/master
i:
  6565: 3992355
  6563: 6d750c2
  6559: 01a9b50
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Aug 30, 2005
1 parent 657bab5 commit 6e49073
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: e0c93cf311b3eaa04bfb5769cff38861d4e748c8
refs/heads/master: 7153a558ad598ff521f1d9430982e2a4a6865126
11 changes: 8 additions & 3 deletions trunk/sound/core/pcm_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static int snd_pcm_ioctl_sw_params_compat(snd_pcm_substream_t *substream,
err = snd_pcm_sw_params(substream, &params);
if (err < 0)
return err;
if (put_user(boundary, &src->boundary))
if (boundary && put_user(boundary, &src->boundary))
return -EFAULT;
return err;
}
Expand Down Expand Up @@ -252,8 +252,11 @@ static int snd_pcm_ioctl_hw_params_compat(snd_pcm_substream_t *substream,
goto error;
}

if (! refine)
runtime->boundary = recalculate_boundary(runtime);
if (! refine) {
unsigned int new_boundary = recalculate_boundary(runtime);
if (new_boundary)
runtime->boundary = new_boundary;
}
error:
kfree(data);
return err;
Expand Down Expand Up @@ -408,6 +411,8 @@ static int snd_pcm_ioctl_sync_ptr_compat(snd_pcm_substream_t *substream,
status = runtime->status;
control = runtime->control;
boundary = recalculate_boundary(runtime);
if (! boundary)
boundary = 0x7fffffff;
snd_pcm_stream_lock_irq(substream);
/* FIXME: we should consider the boundary for the sync from app */
if (!(sflags & SNDRV_PCM_SYNC_PTR_APPL))
Expand Down

0 comments on commit 6e49073

Please sign in to comment.