Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310095
b: refs/heads/master
c: 4a1b09b
h: refs/heads/master
i:
  310093: 8c889ea
  310091: d9a4af1
  310087: e826c02
  310079: 31090bc
v: v3
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed May 30, 2012
1 parent 65fcfe2 commit 8157437
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 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: e42bb9bfbb43366cd1899c9564d043c41ebd8852
refs/heads/master: 4a1b09b79b07cf70c72a091e8fe0660f68541f30
18 changes: 9 additions & 9 deletions trunk/sound/soc/sh/fsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,13 @@ static int fsi_dma_quit(struct fsi_priv *fsi, struct fsi_stream *io)
return 0;
}

static dma_addr_t fsi_dma_get_area(struct fsi_stream *io)
{
struct snd_pcm_runtime *runtime = io->substream->runtime;

return io->dma + samples_to_bytes(runtime, io->buff_sample_pos);
}

static void fsi_dma_complete(void *data)
{
struct fsi_stream *io = (struct fsi_stream *)data;
Expand All @@ -1061,7 +1068,7 @@ static void fsi_dma_complete(void *data)
enum dma_data_direction dir = fsi_stream_is_play(fsi, io) ?
DMA_TO_DEVICE : DMA_FROM_DEVICE;

dma_sync_single_for_cpu(dai->dev, io->dma,
dma_sync_single_for_cpu(dai->dev, fsi_dma_get_area(io),
samples_to_bytes(runtime, io->period_samples), dir);

io->buff_sample_pos += io->period_samples;
Expand All @@ -1078,13 +1085,6 @@ static void fsi_dma_complete(void *data)
snd_pcm_period_elapsed(io->substream);
}

static dma_addr_t fsi_dma_get_area(struct fsi_stream *io)
{
struct snd_pcm_runtime *runtime = io->substream->runtime;

return io->dma + samples_to_bytes(runtime, io->buff_sample_pos);
}

static void fsi_dma_do_tasklet(unsigned long data)
{
struct fsi_stream *io = (struct fsi_stream *)data;
Expand All @@ -1110,7 +1110,7 @@ static void fsi_dma_do_tasklet(unsigned long data)
len = samples_to_bytes(runtime, io->period_samples);
buf = fsi_dma_get_area(io);

dma_sync_single_for_device(dai->dev, io->dma, len, dir);
dma_sync_single_for_device(dai->dev, buf, len, dir);

sg_init_table(&sg, 1);
sg_set_page(&sg, pfn_to_page(PFN_DOWN(buf)),
Expand Down

0 comments on commit 8157437

Please sign in to comment.