All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, liam.r.girdwood@linux.intel.com,
	broonie@kernel.org, pierre-louis.bossart@linux.intel.com
Subject: [RFC PATCH 2/3] ASoC: intel: skylake: add remove() callback for component driver
Date: Thu,  4 Apr 2019 17:30:39 -0700	[thread overview]
Message-ID: <20190405003040.8709-3-ranjani.sridharan@linux.intel.com> (raw)
In-Reply-To: <20190405003040.8709-1-ranjani.sridharan@linux.intel.com>

Topology is not unloaded in the core during unregister_component()
anymore. So, add the remove() callback that will unload the
topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 sound/soc/intel/skylake/skl-pcm.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index 56099db8f86d..57031b6d4d45 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -1462,9 +1462,16 @@ static int skl_platform_soc_probe(struct snd_soc_component *component)
 	return 0;
 }
 
+static void skl_pcm_remove(struct snd_soc_component *component)
+{
+	/* remove topology */
+	snd_soc_tplg_component_remove(component, SND_SOC_TPLG_INDEX_ALL);
+}
+
 static const struct snd_soc_component_driver skl_component  = {
 	.name		= "pcm",
 	.probe		= skl_platform_soc_probe,
+	.remove		= skl_pcm_remove,
 	.ops		= &skl_platform_ops,
 	.pcm_new	= skl_pcm_new,
 	.pcm_free	= skl_pcm_free,
-- 
2.17.1

  parent reply	other threads:[~2019-04-05  0:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05  0:30 [RFC PATCH 0/3] Fixes for component unregister and remove Ranjani Sridharan
2019-04-05  0:30 ` [RFC PATCH 1/3] ASoC: core: do not unload topology in unregister_component() Ranjani Sridharan
2019-04-05  2:17   ` Mark Brown
2019-04-05  2:23     ` Ranjani Sridharan
2019-04-05  2:28       ` Mark Brown
2019-04-05  2:33         ` Ranjani Sridharan
2019-04-05  2:36           ` Mark Brown
2019-04-05  0:30 ` Ranjani Sridharan [this message]
2019-04-05  2:43   ` Applied "ASoC: intel: skylake: add remove() callback for component driver" to the asoc tree Mark Brown
2019-04-05  0:30 ` [RFC PATCH 3/3] ASoC: core: remove link components before cleaning up card resources Ranjani Sridharan
2019-04-05  2:43   ` Applied "ASoC: core: remove link components before cleaning up card resources" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190405003040.8709-3-ranjani.sridharan@linux.intel.com \
    --to=ranjani.sridharan@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.