From 16493a3c879e6a527051f9bd38eedd53baaa5a7e Mon Sep 17 00:00:00 2001 From: Bicycle Tsai Date: Tue, 26 Oct 2021 01:14:03 +0000 Subject: [PATCH] Revert "BACKPORT: ASoC: soc-pcm: Get all BEs along DAPM path" This reverts commit c82dbcbec1cfc7bd0a246cf12e9f100f0ca49e8f. Reason for revert: use vendor_hook approach instead of adding a new field. Change-Id: I001dafc1b90cfe4567a13f538c2f8d25a0929504 Signed-off-by: Bicycle Tsai --- include/sound/soc.h | 6 ------ sound/soc/soc-core.c | 8 -------- sound/soc/soc-pcm.c | 6 +----- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 330c82c58afe..63338f68de48 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1105,12 +1105,6 @@ struct snd_soc_card { ANDROID_KABI_RESERVE(3); ANDROID_KABI_RESERVE(4); }; - -struct snd_soc_card_ext { - struct snd_soc_card card; - unsigned int component_chaining:1; -}; - #define for_each_card_prelinks(card, i, link) \ for ((i) = 0; \ ((i) < (card)->num_links) && ((link) = &(card)->dai_link[i]); \ diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 59113d831c39..678547b939e5 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2175,17 +2175,9 @@ EXPORT_SYMBOL_GPL(snd_soc_add_dai_controls); */ int snd_soc_register_card(struct snd_soc_card *card) { - struct snd_soc_card_ext *card_ext; - if (!card->name || !card->dev) return -EINVAL; - card_ext = devm_kzalloc(card->dev, - sizeof(struct snd_soc_card_ext), GFP_KERNEL); - - memcpy(&card_ext->card, card, sizeof(struct snd_soc_card)); - card = &card_ext->card; - dev_set_drvdata(card->dev, card); INIT_LIST_HEAD(&card->widgets); diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 406273166d19..69c78fd59e41 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1274,7 +1274,6 @@ int dpcm_path_get(struct snd_soc_pcm_runtime *fe, int stream, struct snd_soc_dapm_widget_list **list) { struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0); - struct snd_soc_card_ext *card_ext; int paths; if (fe->num_cpus > 1) { @@ -1283,12 +1282,9 @@ int dpcm_path_get(struct snd_soc_pcm_runtime *fe, return -EINVAL; } - card_ext = container_of(fe->card, struct snd_soc_card_ext, card); - /* get number of valid DAI paths and their widgets */ paths = snd_soc_dapm_dai_get_connected_widgets(cpu_dai, stream, list, - card_ext->component_chaining ? - NULL : dpcm_end_walk_at_be); + dpcm_end_walk_at_be); dev_dbg(fe->dev, "ASoC: found %d audio %s paths\n", paths, stream ? "capture" : "playback");