Skip to content

Commit e38a80c

Browse files
morimotobroonie
authored andcommitted
ASoC: soc-card: add snd_soc_card_to_dapm()
Because struct snd_soc_dapm_context is soc-dapm framework specific, user driver don't need to access its member directly, we would like to hide them. struct snd_soc_dapm_context will be removed from header in the future. Current dapm of card/component are using "instance", but it will be "pointer" if snd_soc_dapm_context was removed from header. snd_soc_card_to_dapm() is needed to switch to the new style while maintaining compatibility Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/877byex06i.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent a1c99b6 commit e38a80c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

include/sound/soc.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,11 @@ static inline int snd_soc_card_is_instantiated(struct snd_soc_card *card)
11201120
return card && card->instantiated;
11211121
}
11221122

1123+
static inline struct snd_soc_dapm_context *snd_soc_card_to_dapm(struct snd_soc_card *card)
1124+
{
1125+
return &card->dapm;
1126+
}
1127+
11231128
/* SoC machine DAI configuration, glues a codec and cpu DAI together */
11241129
struct snd_soc_pcm_runtime {
11251130
struct device *dev;

0 commit comments

Comments
 (0)