diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-02-03 03:59:02 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-03 06:55:40 -0500 |
commit | 83344027cacf1944fe180907fa98ee4116ef33ea (patch) | |
tree | ee617c9c9d5a148eeb290d53862ea54d4e3c8146 | |
parent | fec691e73bf20e1c8e6ecd8e3725e4745bec4e21 (diff) |
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>
-rw-r--r-- | sound/soc/sh/fsi.c | 4 |
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 { | |||
201 | }; | 201 | }; |
202 | 202 | ||
203 | struct fsi_stream_handler { | 203 | struct fsi_stream_handler { |
204 | int (*init)(struct fsi_priv *fsi, struct fsi_stream *io); | ||
205 | int (*quit)(struct fsi_priv *fsi, struct fsi_stream *io); | ||
204 | int (*probe)(struct fsi_priv *fsi, struct fsi_stream *io); | 206 | int (*probe)(struct fsi_priv *fsi, struct fsi_stream *io); |
205 | int (*transfer)(struct fsi_priv *fsi, struct fsi_stream *io); | 207 | int (*transfer)(struct fsi_priv *fsi, struct fsi_stream *io); |
206 | int (*remove)(struct fsi_priv *fsi, struct fsi_stream *io); | 208 | int (*remove)(struct fsi_priv *fsi, struct fsi_stream *io); |
@@ -474,6 +476,7 @@ static void fsi_stream_init(struct fsi_priv *fsi, | |||
474 | io->sample_width = samples_to_bytes(runtime, 1); | 476 | io->sample_width = samples_to_bytes(runtime, 1); |
475 | io->oerr_num = -1; /* ignore 1st err */ | 477 | io->oerr_num = -1; /* ignore 1st err */ |
476 | io->uerr_num = -1; /* ignore 1st err */ | 478 | io->uerr_num = -1; /* ignore 1st err */ |
479 | fsi_stream_handler_call(io, init, fsi, io); | ||
477 | spin_unlock_irqrestore(&master->lock, flags); | 480 | spin_unlock_irqrestore(&master->lock, flags); |
478 | } | 481 | } |
479 | 482 | ||
@@ -491,6 +494,7 @@ static void fsi_stream_quit(struct fsi_priv *fsi, struct fsi_stream *io) | |||
491 | if (io->uerr_num > 0) | 494 | if (io->uerr_num > 0) |
492 | dev_err(dai->dev, "under_run = %d\n", io->uerr_num); | 495 | dev_err(dai->dev, "under_run = %d\n", io->uerr_num); |
493 | 496 | ||
497 | fsi_stream_handler_call(io, quit, fsi, io); | ||
494 | io->substream = NULL; | 498 | io->substream = NULL; |
495 | io->buff_sample_capa = 0; | 499 | io->buff_sample_capa = 0; |
496 | io->buff_sample_pos = 0; | 500 | io->buff_sample_pos = 0; |