Skip to content

Commit

Permalink
ASoC: fsi: Add fsi_dma_get_area
Browse files Browse the repository at this point in the history
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Sep 19, 2010
1 parent c6834dd commit c79eab3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions sound/soc/sh/fsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,11 @@ static int fsi_get_fifo_residue(struct fsi_priv *fsi, int is_play)
return residue;
}

static u8 *fsi_dma_get_area(struct fsi_priv *fsi)
{
return fsi->substream->runtime->dma_area + fsi->byte_offset;
}

/************************************************************************
Expand Down Expand Up @@ -550,8 +555,7 @@ static int fsi_data_push(struct fsi_priv *fsi, int startup)
if (fifo_free < send)
send = fifo_free;

start = runtime->dma_area;
start += fsi->byte_offset;
start = fsi_dma_get_area(fsi);

switch (width) {
case 2:
Expand Down Expand Up @@ -633,8 +637,7 @@ static int fsi_data_pop(struct fsi_priv *fsi, int startup)
if (free < fifo_fill)
fifo_fill = free;

start = runtime->dma_area;
start += fsi->byte_offset;
start = fsi_dma_get_area(fsi);

switch (width) {
case 2:
Expand Down

0 comments on commit c79eab3

Please sign in to comment.