ASoC: rsnd: add CTU (Channel Transfer Unit) prototype support
This patch adds CTU (Channel Transfer Unit) support for rsnd driver. But, it does nothing to data at this point, but is required for MIX support. CTU design is a little different from other IPs (CTU0 is including CTU00 - CTU03, and CTU1 is including CTU10 - CTU13, these have different register mapping) We need to care about it on this driver. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:

committed by
Mark Brown

parent
7dfb491945
commit
9269e3c3cf
@@ -426,7 +426,8 @@ rsnd_gen2_dma_addr(struct rsnd_dai_stream *io,
|
||||
phys_addr_t src_reg = rsnd_gen_get_phy_addr(priv, RSND_GEN2_SCU);
|
||||
int is_ssi = !!(rsnd_io_to_mod_ssi(io) == mod);
|
||||
int use_src = !!rsnd_io_to_mod_src(io);
|
||||
int use_dvc = !!rsnd_io_to_mod_dvc(io);
|
||||
int use_cmd = !!rsnd_io_to_mod_dvc(io) ||
|
||||
!!rsnd_io_to_mod_ctu(io);
|
||||
int id = rsnd_mod_id(mod);
|
||||
struct dma_addr {
|
||||
dma_addr_t out_addr;
|
||||
@@ -464,7 +465,7 @@ rsnd_gen2_dma_addr(struct rsnd_dai_stream *io,
|
||||
};
|
||||
|
||||
/* it shouldn't happen */
|
||||
if (use_dvc && !use_src)
|
||||
if (use_cmd && !use_src)
|
||||
dev_err(dev, "DVC is selected without SRC\n");
|
||||
|
||||
/* use SSIU or SSI ? */
|
||||
@@ -472,8 +473,8 @@ rsnd_gen2_dma_addr(struct rsnd_dai_stream *io,
|
||||
is_ssi++;
|
||||
|
||||
return (is_from) ?
|
||||
dma_addrs[is_ssi][is_play][use_src + use_dvc].out_addr :
|
||||
dma_addrs[is_ssi][is_play][use_src + use_dvc].in_addr;
|
||||
dma_addrs[is_ssi][is_play][use_src + use_cmd].out_addr :
|
||||
dma_addrs[is_ssi][is_play][use_src + use_cmd].in_addr;
|
||||
}
|
||||
|
||||
static dma_addr_t rsnd_dma_addr(struct rsnd_dai_stream *io,
|
||||
@@ -504,6 +505,7 @@ static void rsnd_dma_of_path(struct rsnd_dma *dma,
|
||||
struct rsnd_mod *this = rsnd_dma_to_mod(dma);
|
||||
struct rsnd_mod *ssi = rsnd_io_to_mod_ssi(io);
|
||||
struct rsnd_mod *src = rsnd_io_to_mod_src(io);
|
||||
struct rsnd_mod *ctu = rsnd_io_to_mod_ctu(io);
|
||||
struct rsnd_mod *dvc = rsnd_io_to_mod_dvc(io);
|
||||
struct rsnd_mod *mod[MOD_MAX];
|
||||
struct rsnd_mod *mod_start, *mod_end;
|
||||
@@ -543,6 +545,9 @@ static void rsnd_dma_of_path(struct rsnd_dma *dma,
|
||||
if (src) {
|
||||
mod[i] = src;
|
||||
src = NULL;
|
||||
} else if (ctu) {
|
||||
mod[i] = ctu;
|
||||
ctu = NULL;
|
||||
} else if (dvc) {
|
||||
mod[i] = dvc;
|
||||
dvc = NULL;
|
||||
|
Reference in New Issue
Block a user