diff mbox series

[J,1/1] Revert "ASoC: soc-pcm: Don't zero TDM masks in __soc_pcm_open()"

Message ID 20230222045150.1969103-2-kai.heng.feng@canonical.com
State New
Headers show
Series Fix audio playback on Intel SoF audio | expand

Commit Message

Kai-Heng Feng Feb. 22, 2023, 4:51 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/2007798

This reverts commit 793e7ce5571a9213c7bc9bd5ea22a3394f4b4d6b.

When the PCM gets opened at second time, the audio playback becomes
silent.

Newer kernels that get this commit via stable update are unaffected.

Instead of finding the implicit dependency that may introduce new
regression, revert the offending commit to fix the issue.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 sound/soc/soc-pcm.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Stefan Bader Feb. 22, 2023, 8:50 a.m. UTC | #1
On 22.02.23 05:51, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/2007798
> 
> This reverts commit 793e7ce5571a9213c7bc9bd5ea22a3394f4b4d6b.
> 
> When the PCM gets opened at second time, the audio playback becomes
> silent.
> 
> Newer kernels that get this commit via stable update are unaffected.
> 
> Instead of finding the implicit dependency that may introduce new
> regression, revert the offending commit to fix the issue.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>   sound/soc/soc-pcm.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> index 3b673477f621..de837bacf219 100644
> --- a/sound/soc/soc-pcm.c
> +++ b/sound/soc/soc-pcm.c
> @@ -759,6 +759,11 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
>   		ret = snd_soc_dai_startup(dai, substream);
>   		if (ret < 0)
>   			goto err;
> +
> +		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
> +			dai->tx_mask = 0;
> +		else
> +			dai->rx_mask = 0;
>   	}
>   
>   	/* Dynamic PCM DAI links compat checks use dynamic capabilities */
Roxana Nicolescu Feb. 22, 2023, 9:23 a.m. UTC | #2
On 22-02-2023 05:51, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/2007798
>
> This reverts commit 793e7ce5571a9213c7bc9bd5ea22a3394f4b4d6b.
>
> When the PCM gets opened at second time, the audio playback becomes
> silent.
>
> Newer kernels that get this commit via stable update are unaffected.
>
> Instead of finding the implicit dependency that may introduce new
> regression, revert the offending commit to fix the issue.
>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>   sound/soc/soc-pcm.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> index 3b673477f621..de837bacf219 100644
> --- a/sound/soc/soc-pcm.c
> +++ b/sound/soc/soc-pcm.c
> @@ -759,6 +759,11 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
>   		ret = snd_soc_dai_startup(dai, substream);
>   		if (ret < 0)
>   			goto err;
> +
> +		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
> +			dai->tx_mask = 0;
> +		else
> +			dai->rx_mask = 0;
>   	}
>   
>   	/* Dynamic PCM DAI links compat checks use dynamic capabilities */
Acked-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
diff mbox series

Patch

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 3b673477f621..de837bacf219 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -759,6 +759,11 @@  static int soc_pcm_open(struct snd_pcm_substream *substream)
 		ret = snd_soc_dai_startup(dai, substream);
 		if (ret < 0)
 			goto err;
+
+		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+			dai->tx_mask = 0;
+		else
+			dai->rx_mask = 0;
 	}
 
 	/* Dynamic PCM DAI links compat checks use dynamic capabilities */