public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ALSA: hda: Component should be unbound before deconstruction
@ 2024-06-13 13:37 Simon Trimmer
  2024-06-13 13:37 ` [PATCH 1/3] ALSA: hda: cs35l56: " Simon Trimmer
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Simon Trimmer @ 2024-06-13 13:37 UTC (permalink / raw)
  To: tiwai
  Cc: linux-sound, alsa-devel, linux-kernel, patches, soyer,
	shenghao-ding, kevin-lu, baojun.xu, Simon Trimmer

Small chain of fixes to correct hda drivers using the hda component
infrastructure so that they unregister their component before proceeding
to deconstruct the driver.

These three patches been separated from the chain "[PATCH v2 0/7] ALSA:
hda: Improvements to hda_component"

Simon Trimmer (3):
  ALSA: hda: cs35l56: Component should be unbound before deconstruction
  ALSA: hda: cs35l41: Component should be unbound before deconstruction
  ALSA: hda: tas2781: Component should be unbound before deconstruction

 sound/pci/hda/cs35l41_hda.c     | 4 ++--
 sound/pci/hda/cs35l56_hda.c     | 4 ++--
 sound/pci/hda/tas2781_hda_i2c.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] ALSA: hda: cs35l56: Component should be unbound before deconstruction
  2024-06-13 13:37 [PATCH 0/3] ALSA: hda: Component should be unbound before deconstruction Simon Trimmer
@ 2024-06-13 13:37 ` Simon Trimmer
  2024-06-13 13:37 ` [PATCH 2/3] ALSA: hda: cs35l41: " Simon Trimmer
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Simon Trimmer @ 2024-06-13 13:37 UTC (permalink / raw)
  To: tiwai
  Cc: linux-sound, alsa-devel, linux-kernel, patches, soyer,
	shenghao-ding, kevin-lu, baojun.xu, Simon Trimmer

The interface associated with the hda_component should be deactivated
before the driver is deconstructed during removal.

Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier")
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
---
 sound/pci/hda/cs35l56_hda.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
index 0923e2589f5f..e134ede6c5aa 100644
--- a/sound/pci/hda/cs35l56_hda.c
+++ b/sound/pci/hda/cs35l56_hda.c
@@ -1077,12 +1077,12 @@ void cs35l56_hda_remove(struct device *dev)
 {
 	struct cs35l56_hda *cs35l56 = dev_get_drvdata(dev);
 
+	component_del(cs35l56->base.dev, &cs35l56_hda_comp_ops);
+
 	pm_runtime_dont_use_autosuspend(cs35l56->base.dev);
 	pm_runtime_get_sync(cs35l56->base.dev);
 	pm_runtime_disable(cs35l56->base.dev);
 
-	component_del(cs35l56->base.dev, &cs35l56_hda_comp_ops);
-
 	cs_dsp_remove(&cs35l56->cs_dsp);
 
 	kfree(cs35l56->system_name);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] ALSA: hda: cs35l41: Component should be unbound before deconstruction
  2024-06-13 13:37 [PATCH 0/3] ALSA: hda: Component should be unbound before deconstruction Simon Trimmer
  2024-06-13 13:37 ` [PATCH 1/3] ALSA: hda: cs35l56: " Simon Trimmer
@ 2024-06-13 13:37 ` Simon Trimmer
  2024-06-13 13:37 ` [PATCH 3/3] ALSA: hda: tas2781: " Simon Trimmer
  2024-06-14 12:52 ` [PATCH 0/3] ALSA: hda: " Takashi Iwai
  3 siblings, 0 replies; 5+ messages in thread
From: Simon Trimmer @ 2024-06-13 13:37 UTC (permalink / raw)
  To: tiwai
  Cc: linux-sound, alsa-devel, linux-kernel, patches, soyer,
	shenghao-ding, kevin-lu, baojun.xu, Simon Trimmer

The interface associated with the hda_component should be deactivated
before the driver is deconstructed during removal.

Fixes: 7b2f3eb492da ("ALSA: hda: cs35l41: Add support for CS35L41 in HDA systems")
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
---
 sound/pci/hda/cs35l41_hda.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
index d54d4d60b03e..031703f010be 100644
--- a/sound/pci/hda/cs35l41_hda.c
+++ b/sound/pci/hda/cs35l41_hda.c
@@ -2019,6 +2019,8 @@ void cs35l41_hda_remove(struct device *dev)
 {
 	struct cs35l41_hda *cs35l41 = dev_get_drvdata(dev);
 
+	component_del(cs35l41->dev, &cs35l41_hda_comp_ops);
+
 	pm_runtime_get_sync(cs35l41->dev);
 	pm_runtime_dont_use_autosuspend(cs35l41->dev);
 	pm_runtime_disable(cs35l41->dev);
@@ -2026,8 +2028,6 @@ void cs35l41_hda_remove(struct device *dev)
 	if (cs35l41->halo_initialized)
 		cs35l41_remove_dsp(cs35l41);
 
-	component_del(cs35l41->dev, &cs35l41_hda_comp_ops);
-
 	acpi_dev_put(cs35l41->dacpi);
 
 	pm_runtime_put_noidle(cs35l41->dev);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] ALSA: hda: tas2781: Component should be unbound before deconstruction
  2024-06-13 13:37 [PATCH 0/3] ALSA: hda: Component should be unbound before deconstruction Simon Trimmer
  2024-06-13 13:37 ` [PATCH 1/3] ALSA: hda: cs35l56: " Simon Trimmer
  2024-06-13 13:37 ` [PATCH 2/3] ALSA: hda: cs35l41: " Simon Trimmer
@ 2024-06-13 13:37 ` Simon Trimmer
  2024-06-14 12:52 ` [PATCH 0/3] ALSA: hda: " Takashi Iwai
  3 siblings, 0 replies; 5+ messages in thread
From: Simon Trimmer @ 2024-06-13 13:37 UTC (permalink / raw)
  To: tiwai
  Cc: linux-sound, alsa-devel, linux-kernel, patches, soyer,
	shenghao-ding, kevin-lu, baojun.xu, Simon Trimmer

The interface associated with the hda_component should be deactivated
before the driver is deconstructed during removal.

Fixes: 4e7914eb1dae ("ALSA: hda/tas2781: remove sound controls in unbind")
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
---
 sound/pci/hda/tas2781_hda_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index 75f7674c66ee..fdee6592c502 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -777,11 +777,11 @@ static void tas2781_hda_remove(struct device *dev)
 {
 	struct tas2781_hda *tas_hda = dev_get_drvdata(dev);
 
+	component_del(tas_hda->dev, &tas2781_hda_comp_ops);
+
 	pm_runtime_get_sync(tas_hda->dev);
 	pm_runtime_disable(tas_hda->dev);
 
-	component_del(tas_hda->dev, &tas2781_hda_comp_ops);
-
 	pm_runtime_put_noidle(tas_hda->dev);
 
 	tasdevice_remove(tas_hda->priv);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] ALSA: hda: Component should be unbound before deconstruction
  2024-06-13 13:37 [PATCH 0/3] ALSA: hda: Component should be unbound before deconstruction Simon Trimmer
                   ` (2 preceding siblings ...)
  2024-06-13 13:37 ` [PATCH 3/3] ALSA: hda: tas2781: " Simon Trimmer
@ 2024-06-14 12:52 ` Takashi Iwai
  3 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2024-06-14 12:52 UTC (permalink / raw)
  To: Simon Trimmer
  Cc: tiwai, linux-sound, alsa-devel, linux-kernel, patches, soyer,
	shenghao-ding, kevin-lu, baojun.xu

On Thu, 13 Jun 2024 15:37:10 +0200,
Simon Trimmer wrote:
> 
> Small chain of fixes to correct hda drivers using the hda component
> infrastructure so that they unregister their component before proceeding
> to deconstruct the driver.
> 
> These three patches been separated from the chain "[PATCH v2 0/7] ALSA:
> hda: Improvements to hda_component"
> 
> Simon Trimmer (3):
>   ALSA: hda: cs35l56: Component should be unbound before deconstruction
>   ALSA: hda: cs35l41: Component should be unbound before deconstruction
>   ALSA: hda: tas2781: Component should be unbound before deconstruction

Applied to for-linus branch now.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-14 12:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-13 13:37 [PATCH 0/3] ALSA: hda: Component should be unbound before deconstruction Simon Trimmer
2024-06-13 13:37 ` [PATCH 1/3] ALSA: hda: cs35l56: " Simon Trimmer
2024-06-13 13:37 ` [PATCH 2/3] ALSA: hda: cs35l41: " Simon Trimmer
2024-06-13 13:37 ` [PATCH 3/3] ALSA: hda: tas2781: " Simon Trimmer
2024-06-14 12:52 ` [PATCH 0/3] ALSA: hda: " Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox