ASoC: soc-xxx: add asoc_substream_to_rtd()
Current soc-xxx are getting rtd from substream by rtd = substream->private_data; But, getting data from "private_data" is very unclear. This patch adds asoc_substream_to_rtd() macro which is easy to understand that rtd from substream. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87wo2z0yve.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:

committed by
Mark Brown

parent
0c5b270b2e
commit
0ceef681e3
@@ -66,7 +66,7 @@ static const struct snd_pcm_hardware dummy_dma_hardware = {
|
||||
static int dummy_dma_open(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
|
||||
/* BE's dont need dummy params */
|
||||
if (!rtd->dai_link->no_pcm)
|
||||
|
Reference in New Issue
Block a user