Hi Jiadayes, it can be replaced with *busif instead,
SSI may use different busif for data transfer, this patch(snip)
adds busif property to each dai stream, to indicate the
busif used by playback/capture stream.
+ io_playback->busif = rsnd_busif_get(priv, dai_i);(snip)
+ io_capture->busif = rsnd_busif_get(priv, rsnd_rdai_nr(priv) + dai_i);
+ busif = devm_kcalloc(dev, 2 * nr, sizeof(*busif), GFP_KERNEL);(snip)
@@ -456,6 +456,7 @@ struct rsnd_dai_stream {It looks very complex to me.
struct rsnd_mod *dma;
struct rsnd_dai *rdai;
struct device *dmac_dev; /* for IPMMU */
+ struct rsnd_kctrl_cfg_s *busif;
u32 parent_ssi_status;
};
Why don't you just have "busif" on rsnd_dai_stream, instead of "*busif" ?
int rsnd_ssi_get_busif(struct rsnd_dai_stream *io)Who/How update val ?
{
- return 0; /* BUSIF0 only for now */
+ if (!rsnd_ssi_use_busif(io))
+ return 0;
+
+ return io->busif->val;
}