mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 15:46:42 +07:00
ASoC: soc-card: add snd_soc_card_suspend_pre()
Card related function should be implemented at soc-card now. This patch adds it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/87367k25jc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
bf5bb8db5b
commit
130dc08c82
@ -19,6 +19,8 @@ int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type,
|
||||
struct snd_soc_jack *jack,
|
||||
struct snd_soc_jack_pin *pins, unsigned int num_pins);
|
||||
|
||||
int snd_soc_card_suspend_pre(struct snd_soc_card *card);
|
||||
|
||||
/* device driver data */
|
||||
static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,
|
||||
void *data)
|
||||
|
@ -79,3 +79,13 @@ int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type,
|
||||
return soc_card_ret(card, ret);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_soc_card_jack_new);
|
||||
|
||||
int snd_soc_card_suspend_pre(struct snd_soc_card *card)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (card->suspend_pre)
|
||||
ret = card->suspend_pre(card);
|
||||
|
||||
return soc_card_ret(card, ret);
|
||||
}
|
||||
|
@ -561,8 +561,7 @@ int snd_soc_suspend(struct device *dev)
|
||||
snd_pcm_suspend_all(rtd->pcm);
|
||||
}
|
||||
|
||||
if (card->suspend_pre)
|
||||
card->suspend_pre(card);
|
||||
snd_soc_card_suspend_pre(card);
|
||||
|
||||
/* close any waiting streams */
|
||||
snd_soc_flush_all_delayed_work(card);
|
||||
|
Loading…
Reference in New Issue
Block a user