diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2018-09-12 10:15:00 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-09-12 11:09:04 +0100 |
commit | e894efef9ac7c10b7727798dcc711cccf07569f9 (patch) | |
tree | 6d729a5ab1e1224afe4eb77ca06964be60cb85c6 /include/sound | |
parent | e1e38ea14ea3294546e6350d05a1376197a73589 (diff) | |
download | linux-e894efef9ac7c10b7727798dcc711cccf07569f9.tar.bz2 |
ASoC: core: add support to card rebind
Current behaviour of ASoC core w.r.t to component removal is that it
unregisters dependent sound card totally. There is no support to
rebind the card if the component comes back.
Typical use case is DSP restart or kernel modules itself.
With this patch, core now maintains list of cards that are unbind due to
any of its depended components are removed and card not unregistered yet.
This list is cleared when the card is rebind successfully or when the
card is unregistered from machine driver.
This list of unbind cards are tried to bind once again after every new
component is successfully added, giving a fair chance for card bind
to be successful.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index e17a7ae9a155..1e093b399bc0 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1097,6 +1097,7 @@ struct snd_soc_card { /* lists of probed devices belonging to this card */ struct list_head component_dev_list; + struct list_head list; struct list_head widgets; struct list_head paths; @@ -1373,6 +1374,7 @@ static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card) INIT_LIST_HEAD(&card->dapm_list); INIT_LIST_HEAD(&card->aux_comp_list); INIT_LIST_HEAD(&card->component_dev_list); + INIT_LIST_HEAD(&card->list); } static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc) |