FAILED: patch "[PATCH] ASoC: renesas: rz-ssi: Fix" failed to apply to 6.12-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 2bae7beda19f3b2dc6ab2062c94df19c27923712
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026010516-urologist-conch-2dd6@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 2bae7beda19f3b2dc6ab2062c94df19c27923712 Mon Sep 17 00:00:00 2001
From: Biju Das <[email protected]>
Date: Fri, 14 Nov 2025 07:37:06 +0000
Subject: [PATCH] ASoC: renesas: rz-ssi: Fix
rz_ssi_priv::hw_params_cache::sample_width
The strm->sample_width is not filled during rz_ssi_dai_hw_params(). This wrong value is used for caching sample_width in struct hw_params_cache. Fix this issue by replacing 'strm->sample_width'->'params_width(params)' in rz_ssi_dai_hw_params(). After this drop the variable sample_width from struct rz_ssi_stream as it is unused.
sound/soc/renesas/rz-ssi.c +4 -9
@@ -13,6 +13,7 @@#include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/reset.h> +#include <sound/pcm_params.h> #include <sound/soc.h> /* REGISTER OFFSET */
@@ -87,7 +88,6 @@ struct rz_ssi_stream {int dma_buffer_pos;/* The address for the next DMA descriptor */ int completed_dma_buf_pos;/* The address of the last completed DMA descriptor. */ int period_counter;/* for keeping track of periods transferred */ -int sample_width;int buffer_pos;/* current frame position in the buffer */ int running;/* 0=stopped, 1=running */
@@ -217,10 +217,7 @@ static inline bool rz_ssi_is_stream_running(struct rz_ssi_stream *strm)static void rz_ssi_stream_init (struct rz_ssi_stream *strm,struct snd_pcm_substream *substream) { -struct snd_pcm_runtime *runtime = substream->runtime; -rz_ssi_set_substream (strm, substream); - strm->sample_width =samples_to_bytes (runtime,1 ); strm->dma_buffer_pos =0 ; strm->completed_dma_buf_pos =0 ; strm->period_counter =0 ;
@@ -978,9 +975,9 @@ static int rz_ssi_dai_hw_params(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) {struct rz_ssi_priv *ssi =snd_soc_dai_get_drvdata (dai); -struct rz_ssi_stream *strm =rz_ssi_stream_get (ssi, substream);unsigned int sample_bits =hw_param_interval (params,SNDRV_PCM_HW_PARAM_SAMPLE_BITS )->min; +unsigned int sample_width =params_width (params);unsigned int channels =params_channels (params);unsigned int rate =params_rate (params);int ret;
@@ -999,16 +996,14 @@ static int rz_ssi_dai_hw_params(struct snd_pcm_substream *substream,if (rz_ssi_is_stream_running (&ssi->playback) ||rz_ssi_is_stream_running (&ssi->capture)) { -if (rz_ssi_is_valid_hw_params (ssi, rate, channels, - strm->sample_width, sample_bits)) +if (rz_ssi_is_valid_hw_params (ssi, rate, channels, sample_width, sample_bits))return 0 ;dev_err (ssi->dev,"Full duplex needs same HW params\n" );return -EINVAL ; } -rz_ssi_cache_hw_params (ssi, rate, channels, strm->sample_width, - sample_bits); +rz_ssi_cache_hw_params (ssi, rate, channels, sample_width, sample_bits); ret =rz_ssi_swreset (ssi);if (ret)
Sasha Levin
maintainerPATCH 1/1 ASoC: renesas: rz-ssi: Fix rz_ssi_priv::hw_params_cache::sample_width
From: Biju Das <[email protected]>
[ Upstream commit 2bae7beda19f3b2dc6ab2062c94df19c27923712 ]
The strm->sample_width is not filled during rz_ssi_dai_hw_params(). This wrong value is used for caching sample_width in struct hw_params_cache. Fix this issue by replacing 'strm->sample_width'->'params_width(params)' in rz_ssi_dai_hw_params(). After this drop the variable sample_width from struct rz_ssi_stream as it is unused.
--- sound/soc/sh/rz-ssi.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
sound/soc/sh/rz-ssi.c +4 -9
@@ -12,6 +12,7 @@#include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/reset.h> +#include <sound/pcm_params.h> #include <sound/soc.h> /* REGISTER OFFSET */
@@ -85,7 +86,6 @@ struct rz_ssi_stream {int fifo_sample_size;/* sample capacity of SSI FIFO */ int dma_buffer_pos;/* The address for the next DMA descriptor */ int period_counter;/* for keeping track of periods transferred */ -int sample_width;int buffer_pos;/* current frame position in the buffer */ int running;/* 0=stopped, 1=running */
@@ -225,10 +225,7 @@ static inline bool rz_ssi_is_stream_running(struct rz_ssi_stream *strm)static void rz_ssi_stream_init (struct rz_ssi_stream *strm,struct snd_pcm_substream *substream) { -struct snd_pcm_runtime *runtime = substream->runtime; -rz_ssi_set_substream (strm, substream); - strm->sample_width =samples_to_bytes (runtime,1 ); strm->dma_buffer_pos =0 ; strm->period_counter =0 ; strm->buffer_pos =0 ;
@@ -927,9 +924,9 @@ static int rz_ssi_dai_hw_params(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) {struct rz_ssi_priv *ssi =snd_soc_dai_get_drvdata (dai); -struct rz_ssi_stream *strm =rz_ssi_stream_get (ssi, substream);unsigned int sample_bits =hw_param_interval (params,SNDRV_PCM_HW_PARAM_SAMPLE_BITS )->min; +unsigned int sample_width =params_width (params);unsigned int channels =params_channels (params);unsigned int rate =params_rate (params);
@@ -947,16 +944,14 @@ static int rz_ssi_dai_hw_params(struct snd_pcm_substream *substream,if (rz_ssi_is_stream_running (&ssi->playback) ||rz_ssi_is_stream_running (&ssi->capture)) { -if (rz_ssi_is_valid_hw_params (ssi, rate, channels, - strm->sample_width, sample_bits)) +if (rz_ssi_is_valid_hw_params (ssi, rate, channels, sample_width, sample_bits))return 0 ;dev_err (ssi->dev,"Full duplex needs same HW params\n" );return -EINVAL ; } -rz_ssi_cache_hw_params (ssi, rate, channels, strm->sample_width, - sample_bits); +rz_ssi_cache_hw_params (ssi, rate, channels, sample_width, sample_bits);return rz_ssi_clk_setup (ssi, rate, channels); }
Signature · 1 line
2.51.0