Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182799
b: refs/heads/master
c: 1c418d1
h: refs/heads/master
i:
  182797: d7d3e4d
  182795: b89c125
  182791: 3124151
  182783: 67f1d11
v: v3
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Dec 30, 2009
1 parent 257d657 commit 885d42c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 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: 5b61735534193ab357636d5b56c098f0bbe8bac8
refs/heads/master: 1c418d1f623438147a485db987de296ab372e0f3
20 changes: 12 additions & 8 deletions trunk/sound/soc/sh/fsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,22 +373,24 @@ static int fsi_data_push(struct fsi_priv *fsi)
int fifo_free;
int width;
u8 *start;
int i;
int i, over_period;

if (!fsi ||
!fsi->substream ||
!fsi->substream->runtime)
return -EINVAL;

runtime = fsi->substream->runtime;
over_period = 0;
substream = fsi->substream;
runtime = substream->runtime;

/* FSI FIFO has limit.
* So, this driver can not send periods data at a time
*/
if (fsi->byte_offset >=
fsi->period_len * (fsi->periods + 1)) {

substream = fsi->substream;
over_period = 1;
fsi->periods = (fsi->periods + 1) % runtime->periods;

if (0 == fsi->periods)
Expand Down Expand Up @@ -429,7 +431,7 @@ static int fsi_data_push(struct fsi_priv *fsi)

fsi_irq_enable(fsi, 1);

if (substream)
if (over_period)
snd_pcm_period_elapsed(substream);

return 0;
Expand All @@ -443,22 +445,24 @@ static int fsi_data_pop(struct fsi_priv *fsi)
int fifo_fill;
int width;
u8 *start;
int i;
int i, over_period;

if (!fsi ||
!fsi->substream ||
!fsi->substream->runtime)
return -EINVAL;

runtime = fsi->substream->runtime;
over_period = 0;
substream = fsi->substream;
runtime = substream->runtime;

/* FSI FIFO has limit.
* So, this driver can not send periods data at a time
*/
if (fsi->byte_offset >=
fsi->period_len * (fsi->periods + 1)) {

substream = fsi->substream;
over_period = 1;
fsi->periods = (fsi->periods + 1) % runtime->periods;

if (0 == fsi->periods)
Expand Down Expand Up @@ -498,7 +502,7 @@ static int fsi_data_pop(struct fsi_priv *fsi)

fsi_irq_enable(fsi, 0);

if (substream)
if (over_period)
snd_pcm_period_elapsed(substream);

return 0;
Expand Down

0 comments on commit 885d42c

Please sign in to comment.