Message ID | 20220907142124.2532620-7-luca.ceresoli@bootlin.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add support for the internal RK3308 audio codec | expand |
diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index a0b827f0c2f6..60dab5f68f5e 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -75,6 +75,7 @@ struct asoc_simple_priv { struct snd_soc_dai_link_component dummy; struct snd_soc_codec_conf *codec_conf; struct gpio_desc *pa_gpio; + int (*init)(struct snd_soc_pcm_runtime *rtd); const struct snd_soc_ops *ops; unsigned int dpcm_selectable:1; unsigned int force_dpcm:1; diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index b327372f2e4a..38c05eb1c650 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -263,6 +263,8 @@ static int graph_link_init(struct asoc_simple_priv *priv, dai_link->init = asoc_simple_dai_init; dai_link->ops = &graph_ops; + if (priv->init) + dai_link->init = priv->init; if (priv->ops) dai_link->ops = priv->ops;