Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257458
b: refs/heads/master
c: 2da6589
h: refs/heads/master
v: v3
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed May 24, 2011
1 parent b143697 commit 643ce28
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9478e0b60fb4a7adde72d4a86b826d396b607a61
refs/heads/master: 2da658927c9e28425ecb6b6a7a03094a012e8620
8 changes: 8 additions & 0 deletions trunk/sound/soc/sh/fsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,21 +394,28 @@ static void fsi_stream_push(struct fsi_priv *fsi,
{
struct fsi_stream *io = fsi_get_stream(fsi, is_play);
struct snd_pcm_runtime *runtime = substream->runtime;
struct fsi_master *master = fsi_get_master(fsi);
unsigned long flags;

spin_lock_irqsave(&master->lock, flags);
io->substream = substream;
io->buff_sample_capa = fsi_frame2sample(fsi, runtime->buffer_size);
io->buff_sample_pos = 0;
io->period_samples = fsi_frame2sample(fsi, runtime->period_size);
io->period_pos = 0;
io->oerr_num = -1; /* ignore 1st err */
io->uerr_num = -1; /* ignore 1st err */
spin_unlock_irqrestore(&master->lock, flags);
}

static void fsi_stream_pop(struct fsi_priv *fsi, int is_play)
{
struct fsi_stream *io = fsi_get_stream(fsi, is_play);
struct snd_soc_dai *dai = fsi_get_dai(io->substream);
struct fsi_master *master = fsi_get_master(fsi);
unsigned long flags;

spin_lock_irqsave(&master->lock, flags);

if (io->oerr_num > 0)
dev_err(dai->dev, "over_run = %d\n", io->oerr_num);
Expand All @@ -423,6 +430,7 @@ static void fsi_stream_pop(struct fsi_priv *fsi, int is_play)
io->period_pos = 0;
io->oerr_num = 0;
io->uerr_num = 0;
spin_unlock_irqrestore(&master->lock, flags);
}

static int fsi_get_current_fifo_samples(struct fsi_priv *fsi, int is_play)
Expand Down

0 comments on commit 643ce28

Please sign in to comment.