mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 01:22:07 +00:00
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>
This commit is contained in:
parent
933cc8cb08
commit
49229850be
@ -412,8 +412,8 @@ static int rsnd_ssi_pio_probe(struct rsnd_mod *mod,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rsnd_ssi_pio_start(struct rsnd_mod *mod,
|
static int rsnd_ssi_start(struct rsnd_mod *mod,
|
||||||
struct rsnd_dai *rdai)
|
struct rsnd_dai *rdai)
|
||||||
{
|
{
|
||||||
struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
|
struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
|
||||||
struct rsnd_dai_stream *io = rsnd_mod_to_io(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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rsnd_ssi_pio_stop(struct rsnd_mod *mod,
|
static int rsnd_ssi_stop(struct rsnd_mod *mod,
|
||||||
struct rsnd_dai *rdai)
|
struct rsnd_dai *rdai)
|
||||||
{
|
{
|
||||||
struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
|
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,
|
.probe = rsnd_ssi_pio_probe,
|
||||||
.init = rsnd_ssi_init,
|
.init = rsnd_ssi_init,
|
||||||
.quit = rsnd_ssi_quit,
|
.quit = rsnd_ssi_quit,
|
||||||
.start = rsnd_ssi_pio_start,
|
.start = rsnd_ssi_start,
|
||||||
.stop = rsnd_ssi_pio_stop,
|
.stop = rsnd_ssi_stop,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
|
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,
|
static int rsnd_ssi_dma_start(struct rsnd_mod *mod,
|
||||||
struct rsnd_dai *rdai)
|
struct rsnd_dai *rdai)
|
||||||
{
|
{
|
||||||
struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
|
struct rsnd_dma *dma = rsnd_mod_to_dma(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));
|
rsnd_ssi_start(mod, rdai);
|
||||||
|
|
||||||
rsnd_ssi_hw_start(ssi, ssi->rdai, io);
|
|
||||||
|
|
||||||
rsnd_dma_start(dma);
|
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,
|
static int rsnd_ssi_dma_stop(struct rsnd_mod *mod,
|
||||||
struct rsnd_dai *rdai)
|
struct rsnd_dai *rdai)
|
||||||
{
|
{
|
||||||
struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
|
struct rsnd_dma *dma = rsnd_mod_to_dma(mod);
|
||||||
struct rsnd_dma *dma = rsnd_mod_to_dma(&ssi->mod);
|
|
||||||
|
|
||||||
rsnd_dma_stop(dma);
|
rsnd_dma_stop(dma);
|
||||||
|
|
||||||
rsnd_ssi_record_error(ssi, rsnd_mod_read(mod, SSISR));
|
rsnd_ssi_stop(mod, rdai);
|
||||||
|
|
||||||
rsnd_ssi_hw_stop(ssi, rdai);
|
|
||||||
|
|
||||||
rsnd_src_ssiu_stop(mod, rdai);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user