From: Sasha Levin Date: Wed, 20 May 2026 14:31:57 +0000 (-0400) Subject: Fixes for all trees X-Git-Tag: v6.6.141~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0491e7658b5654097a52ee0609c5e43c5a808801;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for all trees Signed-off-by: Sasha Levin --- diff --git a/queue-6.6/asoc-sof-intel-hda-dai-add-support-for-dspless-mode-.patch b/queue-6.6/asoc-sof-intel-hda-dai-add-support-for-dspless-mode-.patch new file mode 100644 index 0000000000..e993752313 --- /dev/null +++ b/queue-6.6/asoc-sof-intel-hda-dai-add-support-for-dspless-mode-.patch @@ -0,0 +1,68 @@ +From 55e9f35907b5f13a009e1e13c36fbc0d1236c1b2 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 20 May 2026 11:08:01 +0800 +Subject: ASoC: SOF: Intel: hda-dai: add support for dspless mode beyond + HDAudio +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Pierre-Louis Bossart + +[ Upstream commit 2065610b5ddd5b58eed1dc3b3c3db27a26ebd4b6 ] + +For SoundWire/ALH, we need to have a dai configured, but we don't want +to send a DMA_TLV to firmware. Add additional code branches. + +Signed-off-by: Pierre-Louis Bossart +Reviewed-by: Péter Ujfalusi +Reviewed-by: Bard Liao +Signed-off-by: Peter Ujfalusi +Link: https://msgid.link/r/20240213101247.28887-16-peter.ujfalusi@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Alva Lan +Signed-off-by: Sasha Levin +--- + sound/soc/sof/intel/hda-dai.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c +index f5bfa17bf6505..1fe7cce160913 100644 +--- a/sound/soc/sof/intel/hda-dai.c ++++ b/sound/soc/sof/intel/hda-dai.c +@@ -83,6 +83,11 @@ hda_dai_get_ops(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai + + sdev = widget_to_sdev(w); + ++ if (!swidget) { ++ dev_err(sdev->dev, "%s: swidget is NULL\n", __func__); ++ return NULL; ++ } ++ + if (sdev->dspless_mode_selected) + return hda_select_dai_widget_ops(sdev, swidget); + +@@ -364,8 +369,11 @@ static int non_hda_dai_hw_params(struct snd_pcm_substream *substream, + return ret; + } + +- /* get stream_id */ + sdev = widget_to_sdev(w); ++ if (sdev->dspless_mode_selected) ++ goto skip_tlv; ++ ++ /* get stream_id */ + hext_stream = ops->get_hext_stream(sdev, cpu_dai, substream); + + if (!hext_stream) { +@@ -398,6 +406,7 @@ static int non_hda_dai_hw_params(struct snd_pcm_substream *substream, + dma_config->dma_stream_channel_map.device_count = 0; /* mapping not used */ + dma_config->dma_priv_config_size = 0; + ++skip_tlv: + return 0; + } + +-- +2.53.0 + diff --git a/queue-6.6/asoc-sof-intel-hda-dai-remove-dspless-special-case.patch b/queue-6.6/asoc-sof-intel-hda-dai-remove-dspless-special-case.patch new file mode 100644 index 0000000000..79df2a2f30 --- /dev/null +++ b/queue-6.6/asoc-sof-intel-hda-dai-remove-dspless-special-case.patch @@ -0,0 +1,49 @@ +From c63ee3b8893abcf0e68c87faabe3fb1daca571c0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 20 May 2026 11:08:00 +0800 +Subject: ASoC: SOF: Intel: hda-dai: remove dspless special case +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Pierre-Louis Bossart + +[ Upstream commit daa09d0615ce9c781777802874cffa4380f883c3 ] + +The existing code forces a parameter to be NULL but that parameter is +not used yet. Remove the special case in preparation for additional +changes. + +Signed-off-by: Pierre-Louis Bossart +Reviewed-by: Péter Ujfalusi +Reviewed-by: Bard Liao +Signed-off-by: Peter Ujfalusi +Link: https://msgid.link/r/20240213101247.28887-9-peter.ujfalusi@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Alva Lan +Signed-off-by: Sasha Levin +--- + sound/soc/sof/intel/hda-dai.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c +index 19ec1a45737ea..f5bfa17bf6505 100644 +--- a/sound/soc/sof/intel/hda-dai.c ++++ b/sound/soc/sof/intel/hda-dai.c +@@ -83,12 +83,8 @@ hda_dai_get_ops(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai + + sdev = widget_to_sdev(w); + +- /* +- * The swidget parameter of hda_select_dai_widget_ops() is ignored in +- * case of DSPless mode +- */ + if (sdev->dspless_mode_selected) +- return hda_select_dai_widget_ops(sdev, NULL); ++ return hda_select_dai_widget_ops(sdev, swidget); + + sdai = swidget->private; + +-- +2.53.0 + diff --git a/queue-6.6/asoc-sof-intel-hda-fix-null-pointer-dereference.patch b/queue-6.6/asoc-sof-intel-hda-fix-null-pointer-dereference.patch new file mode 100644 index 0000000000..be66b4210d --- /dev/null +++ b/queue-6.6/asoc-sof-intel-hda-fix-null-pointer-dereference.patch @@ -0,0 +1,63 @@ +From 9cd3b17ef79fcf8429604d5ac633700a20fa7883 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 20 May 2026 11:08:02 +0800 +Subject: ASoC: SOF: Intel: hda: Fix NULL pointer dereference + +From: Ranjani Sridharan + +[ Upstream commit 16c589567a956d46a7c1363af3f64de3d420af20 ] + +If there's a mismatch between the DAI links in the machine driver and +the topology, it is possible that the playback/capture widget is not +set, especially in the case of loopback capture for echo reference +where we use the dummy DAI link. Return the error when the widget is not +set to avoid a null pointer dereference like below when the topology is +broken. + +RIP: 0010:hda_dai_get_ops.isra.0+0x14/0xa0 [snd_sof_intel_hda_common] + +Signed-off-by: Ranjani Sridharan +Reviewed-by: Bard Liao +Reviewed-by: Liam Girdwood +Reviewed-by: Mateusz Redzynia +Signed-off-by: Peter Ujfalusi +Link: https://patch.msgid.link/20260204081833.16630-10-peter.ujfalusi@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Alva Lan +Signed-off-by: Sasha Levin +--- + sound/soc/sof/intel/hda-dai.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c +index 1fe7cce160913..a3d0b6d721aaf 100644 +--- a/sound/soc/sof/intel/hda-dai.c ++++ b/sound/soc/sof/intel/hda-dai.c +@@ -77,12 +77,22 @@ static const struct hda_dai_widget_dma_ops * + hda_dai_get_ops(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) + { + struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget(cpu_dai, substream->stream); +- struct snd_sof_widget *swidget = w->dobj.private; ++ struct snd_sof_widget *swidget; + struct snd_sof_dev *sdev; + struct snd_sof_dai *sdai; + +- sdev = widget_to_sdev(w); ++ /* ++ * this is unlikely if the topology and the machine driver DAI links match. ++ * But if there's a missing DAI link in topology, this will prevent a NULL pointer ++ * dereference later on. ++ */ ++ if (!w) { ++ dev_err(cpu_dai->dev, "%s: widget is NULL\n", __func__); ++ return NULL; ++ } + ++ sdev = widget_to_sdev(w); ++ swidget = w->dobj.private; + if (!swidget) { + dev_err(sdev->dev, "%s: swidget is NULL\n", __func__); + return NULL; +-- +2.53.0 + diff --git a/queue-6.6/series b/queue-6.6/series index 4a349e11c1..f4f10cf5fa 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -460,3 +460,6 @@ kvm-reject-wrapped-offset-in-kvm_reset_dirty_gfn.patch kvm-s390-pci-fix-gait-table-indexing-due-to-double-scaling-pointer-arithmetic.patch kvm-x86-fix-xen-hypercall-tracepoint-argument-assignment.patch netfilter-nf_tables-unconditionally-bump-set-nelems-.patch +asoc-sof-intel-hda-dai-remove-dspless-special-case.patch +asoc-sof-intel-hda-dai-add-support-for-dspless-mode-.patch +asoc-sof-intel-hda-fix-null-pointer-dereference.patch