diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-11-27 08:07:17 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-12-03 18:51:40 +0000 |
commit | 49229850bee539e94f0c085a0f89cbbda7f6074b (patch) | |
tree | e9d394ba933e11cf4d7c5bc2d1927a97171f7eef /sound/soc/sh | |
parent | 933cc8cb08d867459689662cf67017ea6f0c6b53 (diff) |
ASoC: rsnd: share SSI starting method between PIO/DMA mode
Basically, SSI starting method is same between PIO/DMA mode.
Let's share it
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r-- | sound/soc/sh/rcar/ssi.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 292e98b3c98..5af016e730b 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -412,8 +412,8 @@ static int rsnd_ssi_pio_probe(struct rsnd_mod *mod, return ret; } -static int rsnd_ssi_pio_start(struct rsnd_mod *mod, - struct rsnd_dai *rdai) +static int rsnd_ssi_start(struct rsnd_mod *mod, + struct rsnd_dai *rdai) { struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); @@ -427,8 +427,8 @@ static int rsnd_ssi_pio_start(struct rsnd_mod *mod, return 0; } -static int rsnd_ssi_pio_stop(struct rsnd_mod *mod, - struct rsnd_dai *rdai) +static int rsnd_ssi_stop(struct rsnd_mod *mod, + struct rsnd_dai *rdai) { struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); @@ -448,8 +448,8 @@ static struct rsnd_mod_ops rsnd_ssi_pio_ops = { .probe = rsnd_ssi_pio_probe, .init = rsnd_ssi_init, .quit = rsnd_ssi_quit, - .start = rsnd_ssi_pio_start, - .stop = rsnd_ssi_pio_stop, + .start = rsnd_ssi_start, + .stop = rsnd_ssi_stop, }; static int rsnd_ssi_dma_probe(struct rsnd_mod *mod, @@ -508,13 +508,9 @@ static int rsnd_ssi_fallback(struct rsnd_mod *mod, static int rsnd_ssi_dma_start(struct rsnd_mod *mod, struct rsnd_dai *rdai) { - struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); - struct rsnd_dma *dma = rsnd_mod_to_dma(&ssi->mod); - struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); - - rsnd_src_ssiu_start(mod, rdai, rsnd_ssi_use_busif(mod)); + struct rsnd_dma *dma = rsnd_mod_to_dma(mod); - rsnd_ssi_hw_start(ssi, ssi->rdai, io); + rsnd_ssi_start(mod, rdai); rsnd_dma_start(dma); @@ -524,16 +520,11 @@ static int rsnd_ssi_dma_start(struct rsnd_mod *mod, static int rsnd_ssi_dma_stop(struct rsnd_mod *mod, struct rsnd_dai *rdai) { - struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); - struct rsnd_dma *dma = rsnd_mod_to_dma(&ssi->mod); + struct rsnd_dma *dma = rsnd_mod_to_dma(mod); rsnd_dma_stop(dma); - rsnd_ssi_record_error(ssi, rsnd_mod_read(mod, SSISR)); - - rsnd_ssi_hw_stop(ssi, rdai); - - rsnd_src_ssiu_stop(mod, rdai); + rsnd_ssi_stop(mod, rdai); return 0; } |