summaryrefslogtreecommitdiff
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2010-09-17 13:48:05 +0900
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-09-19 16:10:54 +0100
commitc79eab3ea4e6f769e35005bf77fb4d6acd9c18ea (patch)
tree73a7995874c8142987e89e3722572a9424ac17b8 /sound/soc/sh
parentc6834dd2d20fe607d0a4a98e78a68614e4079492 (diff)
ASoC: fsi: Add fsi_dma_get_area
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r--sound/soc/sh/fsi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index c8a8ddb245aa..aea5adb54e38 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -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;
+}
+
/************************************************************************
@@ -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:
@@ -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: