diff mbox series

ASoC: sti: add missing probe entry for player and reader

Message ID 20240721-sti-audio-fix-v1-1-a8b1ecf61cb4@free.fr (mailing list archive)
State Superseded
Headers show
Series ASoC: sti: add missing probe entry for player and reader | expand

Commit Message

Jerome Audu July 21, 2024, 3:40 p.m. UTC
Restores the audio functionality that was broken
since Linux version 6.6.y by adding the missing probe
functions for the player and reader components.

Fixes: 9f625f5e6cf9 ("ASoC: sti: merge DAI call back functions into ops")
Signed-off-by: Jerome Audu <jau@free.fr>
---
Specifically, the probe function in `sound/soc/sti/sti_uniperif.c:415` is being replaced by another probe function located at `sound/soc/sti/sti_uniperif.c:453`, which should instead be derived from the player and reader components. My patch correctly reinserts the missing probe entries, restoring the intended functionality.

The patch modifies the following files:
- `sound/soc/sti/sti_uniperif.c`: Changes the visibility of `sti_uniperiph_dai_probe` to non-static.
- `sound/soc/sti/uniperif.h`: Adds the declaration of `sti_uniperiph_dai_probe`.
- `sound/soc/sti/uniperif_player.c`: Adds `probe` function to `uni_player_dai_ops`.
- `sound/soc/sti/uniperif_reader.c`: Adds `probe` function to `uni_reader_dai_ops`.

This ensures the correct `probe` functions are utilized, thus fixing the audio regression. 
---
 sound/soc/sti/sti_uniperif.c    | 2 +-
 sound/soc/sti/uniperif.h        | 1 +
 sound/soc/sti/uniperif_player.c | 1 +
 sound/soc/sti/uniperif_reader.c | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)


---
base-commit: 0c3836482481200ead7b416ca80c68a29cfdaabd
change-id: 20240721-sti-audio-fix-1374fffb24e7

Best regards,

Comments

Mark Brown July 22, 2024, 10:52 a.m. UTC | #1
On Sun, Jul 21, 2024 at 05:40:02PM +0200, Jerome Audu wrote:
> Restores the audio functionality that was broken
> since Linux version 6.6.y by adding the missing probe
> functions for the player and reader components.
> 
> Fixes: 9f625f5e6cf9 ("ASoC: sti: merge DAI call back functions into ops")
> Signed-off-by: Jerome Audu <jau@free.fr>
> ---
> Specifically, the probe function in `sound/soc/sti/sti_uniperif.c:415` is being replaced by another probe function located at `sound/soc/sti/sti_uniperif.c:453`, which should instead be derived from the player and reader components. My patch correctly reinserts the missing probe entries, restoring the intended functionality.

This should be in the changelog, your actual changelog doesn't describe
the actual change at all.

> The patch modifies the following files:
> - `sound/soc/sti/sti_uniperif.c`: Changes the visibility of `sti_uniperiph_dai_probe` to non-static.
> - `sound/soc/sti/uniperif.h`: Adds the declaration of `sti_uniperiph_dai_probe`.
> - `sound/soc/sti/uniperif_player.c`: Adds `probe` function to `uni_player_dai_ops`.
> - `sound/soc/sti/uniperif_reader.c`: Adds `probe` function to `uni_reader_dai_ops`.
> 
> This ensures the correct `probe` functions are utilized, thus fixing the audio regression. 

This detail isn't really needed, it just describes the content of the
patch.
Jerome Audu July 22, 2024, 12:31 p.m. UTC | #2
Thanks for the review!

See updated changlog, if ok for you, I will send a V2

Le 22/07/2024 12:52, Mark Brown a écrit :
> This should be in the changelog, your actual changelog doesn't describe
> the actual change at all.
> 

New Changelog:

  This patch addresses a regression in the ASoC STI drivers that was introduced in Linux version 6.6.y.
  The issue originated from a series of patches (see https://lore.kernel.org/all/87wmy5b0wt.wl-kuninori.morimoto.gx@renesas.com/)
  that unintentionally omitted necessary probe functions for the player and reader components.

  Probe function in `sound/soc/sti/sti_uniperif.c:415` is being replaced by another probe function located at 
  `sound/soc/sti/sti_uniperif.c:453`, which should instead be derived from the player and reader components.
  This patch correctly reinserts the missing probe entries, restoring the intended functionality.

> This detail isn't really needed, it just describes the content of the
> patch.

ok, I remove this part.

Regards, 
Jérôme
Mark Brown Aug. 14, 2024, 5:12 p.m. UTC | #3
On Mon, Jul 22, 2024 at 02:31:24PM +0200, jau@free.fr wrote:
> Thanks for the review!
> 
> See updated changlog, if ok for you, I will send a V2

Yes, that's fine.
diff mbox series

Patch

diff --git a/sound/soc/sti/sti_uniperif.c b/sound/soc/sti/sti_uniperif.c
index ba824f14a39c..a7956e5a4ee5 100644
--- a/sound/soc/sti/sti_uniperif.c
+++ b/sound/soc/sti/sti_uniperif.c
@@ -352,7 +352,7 @@  static int sti_uniperiph_resume(struct snd_soc_component *component)
 	return ret;
 }
 
-static int sti_uniperiph_dai_probe(struct snd_soc_dai *dai)
+int sti_uniperiph_dai_probe(struct snd_soc_dai *dai)
 {
 	struct sti_uniperiph_data *priv = snd_soc_dai_get_drvdata(dai);
 	struct sti_uniperiph_dai *dai_data = &priv->dai_data;
diff --git a/sound/soc/sti/uniperif.h b/sound/soc/sti/uniperif.h
index 2a5de328501c..74e51f0ff85c 100644
--- a/sound/soc/sti/uniperif.h
+++ b/sound/soc/sti/uniperif.h
@@ -1380,6 +1380,7 @@  int uni_reader_init(struct platform_device *pdev,
 		    struct uniperif *reader);
 
 /* common */
+int sti_uniperiph_dai_probe(struct snd_soc_dai *dai);
 int sti_uniperiph_dai_set_fmt(struct snd_soc_dai *dai,
 			      unsigned int fmt);
 
diff --git a/sound/soc/sti/uniperif_player.c b/sound/soc/sti/uniperif_player.c
index dd9013c47664..6d1ce030963c 100644
--- a/sound/soc/sti/uniperif_player.c
+++ b/sound/soc/sti/uniperif_player.c
@@ -1038,6 +1038,7 @@  static const struct snd_soc_dai_ops uni_player_dai_ops = {
 		.startup = uni_player_startup,
 		.shutdown = uni_player_shutdown,
 		.prepare = uni_player_prepare,
+		.probe = sti_uniperiph_dai_probe,
 		.trigger = uni_player_trigger,
 		.hw_params = sti_uniperiph_dai_hw_params,
 		.set_fmt = sti_uniperiph_dai_set_fmt,
diff --git a/sound/soc/sti/uniperif_reader.c b/sound/soc/sti/uniperif_reader.c
index 065c5f0d1f5f..05ea2b794eb9 100644
--- a/sound/soc/sti/uniperif_reader.c
+++ b/sound/soc/sti/uniperif_reader.c
@@ -401,6 +401,7 @@  static const struct snd_soc_dai_ops uni_reader_dai_ops = {
 		.startup = uni_reader_startup,
 		.shutdown = uni_reader_shutdown,
 		.prepare = uni_reader_prepare,
+		.probe = sti_uniperiph_dai_probe,
 		.trigger = uni_reader_trigger,
 		.hw_params = sti_uniperiph_dai_hw_params,
 		.set_fmt = sti_uniperiph_dai_set_fmt,