summaryrefslogtreecommitdiff
path: root/sound/soc/sh/fsi.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-02-03 12:59:02 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-03 15:55:40 +0400
commit83344027cacf1944fe180907fa98ee4116ef33ea (patch)
treeee617c9c9d5a148eeb290d53862ea54d4e3c8146 /sound/soc/sh/fsi.c
parentfec691e73bf20e1c8e6ecd8e3725e4745bec4e21 (diff)
downloadlinux-83344027cacf1944fe180907fa98ee4116ef33ea.tar.xz
ASoC: fsi: add .init/.quit handler support
This is preparation for DMAEngine support 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/fsi.c')
-rw-r--r--sound/soc/sh/fsi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 75d0cda4bad4..79a0afb78725 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -201,6 +201,8 @@ struct fsi_priv {
};
struct fsi_stream_handler {
+ int (*init)(struct fsi_priv *fsi, struct fsi_stream *io);
+ int (*quit)(struct fsi_priv *fsi, struct fsi_stream *io);
int (*probe)(struct fsi_priv *fsi, struct fsi_stream *io);
int (*transfer)(struct fsi_priv *fsi, struct fsi_stream *io);
int (*remove)(struct fsi_priv *fsi, struct fsi_stream *io);
@@ -474,6 +476,7 @@ static void fsi_stream_init(struct fsi_priv *fsi,
io->sample_width = samples_to_bytes(runtime, 1);
io->oerr_num = -1; /* ignore 1st err */
io->uerr_num = -1; /* ignore 1st err */
+ fsi_stream_handler_call(io, init, fsi, io);
spin_unlock_irqrestore(&master->lock, flags);
}
@@ -491,6 +494,7 @@ static void fsi_stream_quit(struct fsi_priv *fsi, struct fsi_stream *io)
if (io->uerr_num > 0)
dev_err(dai->dev, "under_run = %d\n", io->uerr_num);
+ fsi_stream_handler_call(io, quit, fsi, io);
io->substream = NULL;
io->buff_sample_capa = 0;
io->buff_sample_pos = 0;