From: Sasha Levin Date: Fri, 13 Oct 2023 00:02:24 +0000 (-0400) Subject: Fixes for 6.5 X-Git-Tag: v6.1.58~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0e7ade481a2a75db3f849634d570737cb571fa9b;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 6.5 Signed-off-by: Sasha Levin --- diff --git a/queue-6.5/alsa-hda-cs35l41-cleanup-and-fix-double-free-in-firm.patch b/queue-6.5/alsa-hda-cs35l41-cleanup-and-fix-double-free-in-firm.patch new file mode 100644 index 00000000000..f70d56046d9 --- /dev/null +++ b/queue-6.5/alsa-hda-cs35l41-cleanup-and-fix-double-free-in-firm.patch @@ -0,0 +1,206 @@ +From e091e459cafe4cae63bf2a1d00e8f23708c77fda Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 3 Oct 2023 15:21:38 +0100 +Subject: ALSA: hda: cs35l41: Cleanup and fix double free in firmware request + +From: Stefan Binding + +[ Upstream commit 5d542b850d40cb08a38ad4bb2a944dbf1b7b0683 ] + +There is an unlikely but possible double free when loading firmware, +and a missing free calls if a firmware is successfully requested but +the coefficient file request fails, leading to the fallback firmware +request occurring without clearing the previously loaded firmware. + +Fixes: cd40dad2ca91 ("ALSA: hda: cs35l41: Ensure firmware/tuning pairs are always loaded") +Reported-by: kernel test robot +Reported-by: Dan Carpenter +Closes: https://lore.kernel.org/r/202309291331.0JUUQnPT-lkp@intel.com/ +Signed-off-by: Stefan Binding +Link: https://lore.kernel.org/r/20231003142138.180108-1-sbinding@opensource.cirrus.com +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/pci/hda/cs35l41_hda.c | 115 +++++++++++++++++++++++++----------- + 1 file changed, 79 insertions(+), 36 deletions(-) + +diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c +index ce5faa6205170..9ba77e685126a 100644 +--- a/sound/pci/hda/cs35l41_hda.c ++++ b/sound/pci/hda/cs35l41_hda.c +@@ -178,10 +178,14 @@ static int cs35l41_request_firmware_files_spkid(struct cs35l41_hda *cs35l41, + cs35l41->speaker_id, "wmfw"); + if (!ret) { + /* try cirrus/part-dspN-fwtype-sub<-spkidN><-ampname>.bin */ +- return cs35l41_request_firmware_file(cs35l41, coeff_firmware, coeff_filename, +- CS35L41_FIRMWARE_ROOT, +- cs35l41->acpi_subsystem_id, cs35l41->amp_name, +- cs35l41->speaker_id, "bin"); ++ ret = cs35l41_request_firmware_file(cs35l41, coeff_firmware, coeff_filename, ++ CS35L41_FIRMWARE_ROOT, ++ cs35l41->acpi_subsystem_id, cs35l41->amp_name, ++ cs35l41->speaker_id, "bin"); ++ if (ret) ++ goto coeff_err; ++ ++ return 0; + } + + /* try cirrus/part-dspN-fwtype-sub<-ampname>.wmfw */ +@@ -190,10 +194,14 @@ static int cs35l41_request_firmware_files_spkid(struct cs35l41_hda *cs35l41, + cs35l41->amp_name, -1, "wmfw"); + if (!ret) { + /* try cirrus/part-dspN-fwtype-sub<-spkidN><-ampname>.bin */ +- return cs35l41_request_firmware_file(cs35l41, coeff_firmware, coeff_filename, +- CS35L41_FIRMWARE_ROOT, +- cs35l41->acpi_subsystem_id, cs35l41->amp_name, +- cs35l41->speaker_id, "bin"); ++ ret = cs35l41_request_firmware_file(cs35l41, coeff_firmware, coeff_filename, ++ CS35L41_FIRMWARE_ROOT, ++ cs35l41->acpi_subsystem_id, cs35l41->amp_name, ++ cs35l41->speaker_id, "bin"); ++ if (ret) ++ goto coeff_err; ++ ++ return 0; + } + + /* try cirrus/part-dspN-fwtype-sub<-spkidN>.wmfw */ +@@ -208,10 +216,14 @@ static int cs35l41_request_firmware_files_spkid(struct cs35l41_hda *cs35l41, + cs35l41->amp_name, cs35l41->speaker_id, "bin"); + if (ret) + /* try cirrus/part-dspN-fwtype-sub<-spkidN>.bin */ +- return cs35l41_request_firmware_file(cs35l41, coeff_firmware, +- coeff_filename, CS35L41_FIRMWARE_ROOT, +- cs35l41->acpi_subsystem_id, NULL, +- cs35l41->speaker_id, "bin"); ++ ret = cs35l41_request_firmware_file(cs35l41, coeff_firmware, ++ coeff_filename, CS35L41_FIRMWARE_ROOT, ++ cs35l41->acpi_subsystem_id, NULL, ++ cs35l41->speaker_id, "bin"); ++ if (ret) ++ goto coeff_err; ++ ++ return 0; + } + + /* try cirrus/part-dspN-fwtype-sub.wmfw */ +@@ -226,12 +238,50 @@ static int cs35l41_request_firmware_files_spkid(struct cs35l41_hda *cs35l41, + cs35l41->speaker_id, "bin"); + if (ret) + /* try cirrus/part-dspN-fwtype-sub<-spkidN>.bin */ +- return cs35l41_request_firmware_file(cs35l41, coeff_firmware, +- coeff_filename, CS35L41_FIRMWARE_ROOT, +- cs35l41->acpi_subsystem_id, NULL, +- cs35l41->speaker_id, "bin"); ++ ret = cs35l41_request_firmware_file(cs35l41, coeff_firmware, ++ coeff_filename, CS35L41_FIRMWARE_ROOT, ++ cs35l41->acpi_subsystem_id, NULL, ++ cs35l41->speaker_id, "bin"); ++ if (ret) ++ goto coeff_err; ++ } ++ ++ return ret; ++coeff_err: ++ release_firmware(*wmfw_firmware); ++ kfree(*wmfw_filename); ++ return ret; ++} ++ ++static int cs35l41_fallback_firmware_file(struct cs35l41_hda *cs35l41, ++ const struct firmware **wmfw_firmware, ++ char **wmfw_filename, ++ const struct firmware **coeff_firmware, ++ char **coeff_filename) ++{ ++ int ret; ++ ++ /* Handle fallback */ ++ dev_warn(cs35l41->dev, "Falling back to default firmware.\n"); ++ ++ /* fallback try cirrus/part-dspN-fwtype.wmfw */ ++ ret = cs35l41_request_firmware_file(cs35l41, wmfw_firmware, wmfw_filename, ++ CS35L41_FIRMWARE_ROOT, NULL, NULL, -1, "wmfw"); ++ if (ret) ++ goto err; ++ ++ /* fallback try cirrus/part-dspN-fwtype.bin */ ++ ret = cs35l41_request_firmware_file(cs35l41, coeff_firmware, coeff_filename, ++ CS35L41_FIRMWARE_ROOT, NULL, NULL, -1, "bin"); ++ if (ret) { ++ release_firmware(*wmfw_firmware); ++ kfree(*wmfw_filename); ++ goto err; + } ++ return 0; + ++err: ++ dev_warn(cs35l41->dev, "Unable to find firmware and tuning\n"); + return ret; + } + +@@ -247,7 +297,6 @@ static int cs35l41_request_firmware_files(struct cs35l41_hda *cs35l41, + ret = cs35l41_request_firmware_files_spkid(cs35l41, wmfw_firmware, wmfw_filename, + coeff_firmware, coeff_filename); + goto out; +- + } + + /* try cirrus/part-dspN-fwtype-sub<-ampname>.wmfw */ +@@ -260,6 +309,9 @@ static int cs35l41_request_firmware_files(struct cs35l41_hda *cs35l41, + CS35L41_FIRMWARE_ROOT, + cs35l41->acpi_subsystem_id, cs35l41->amp_name, + -1, "bin"); ++ if (ret) ++ goto coeff_err; ++ + goto out; + } + +@@ -279,32 +331,23 @@ static int cs35l41_request_firmware_files(struct cs35l41_hda *cs35l41, + CS35L41_FIRMWARE_ROOT, + cs35l41->acpi_subsystem_id, NULL, -1, + "bin"); ++ if (ret) ++ goto coeff_err; + } + + out: +- if (!ret) +- return 0; ++ if (ret) ++ /* if all attempts at finding firmware fail, try fallback */ ++ goto fallback; + +- /* Handle fallback */ +- dev_warn(cs35l41->dev, "Falling back to default firmware.\n"); ++ return 0; + ++coeff_err: + release_firmware(*wmfw_firmware); + kfree(*wmfw_filename); +- +- /* fallback try cirrus/part-dspN-fwtype.wmfw */ +- ret = cs35l41_request_firmware_file(cs35l41, wmfw_firmware, wmfw_filename, +- CS35L41_FIRMWARE_ROOT, NULL, NULL, -1, "wmfw"); +- if (!ret) +- /* fallback try cirrus/part-dspN-fwtype.bin */ +- ret = cs35l41_request_firmware_file(cs35l41, coeff_firmware, coeff_filename, +- CS35L41_FIRMWARE_ROOT, NULL, NULL, -1, "bin"); +- +- if (ret) { +- release_firmware(*wmfw_firmware); +- kfree(*wmfw_filename); +- dev_warn(cs35l41->dev, "Unable to find firmware and tuning\n"); +- } +- return ret; ++fallback: ++ return cs35l41_fallback_firmware_file(cs35l41, wmfw_firmware, wmfw_filename, ++ coeff_firmware, coeff_filename); + } + + #if IS_ENABLED(CONFIG_EFI) +-- +2.40.1 + diff --git a/queue-6.5/alsa-hda-realtek-change-model-for-intel-rvp-board.patch-12253 b/queue-6.5/alsa-hda-realtek-change-model-for-intel-rvp-board.patch-12253 new file mode 100644 index 00000000000..2efa47ec3be --- /dev/null +++ b/queue-6.5/alsa-hda-realtek-change-model-for-intel-rvp-board.patch-12253 @@ -0,0 +1,46 @@ +From ebd999f97ea29b22b2593a8e6c3f7b88b203867c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 6 Oct 2023 14:47:37 +0800 +Subject: ALSA: hda/realtek: Change model for Intel RVP board + +From: Kailang Yang + +[ Upstream commit ccbd88be057a38531f835e8a04948ebf80cb0c5d ] + +Intel RVP board (0x12cc) has Headset Mic issue for reboot. +If system plugged headset when system reboot the headset Mic was gone. + +Fixes: 1a93f10c5b12 ("ALSA: hda/realtek: Add "Intel Reference board" and "NUC 13" SSID in the ALC256") +Signed-off-by: Kailang Yang +Link: https://lore.kernel.org/r/28112f54c0c6496f97ac845645bc0256@realtek.com +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/pci/hda/patch_realtek.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index 4a13747b2b0f3..333c3664082c7 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -9720,7 +9720,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { + SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), + SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), + SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), +- SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC225_FIXUP_HEADSET_JACK), ++ SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), + SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE), + SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), + SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP), +@@ -9943,7 +9943,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { + SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC), + SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED), + SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10), +- SND_PCI_QUIRK(0x8086, 0x3038, "Intel NUC 13", ALC225_FIXUP_HEADSET_JACK), ++ SND_PCI_QUIRK(0x8086, 0x3038, "Intel NUC 13", ALC295_FIXUP_CHROME_BOOK), + SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE), + + #if 0 +-- +2.40.1 + diff --git a/queue-6.5/arm64-dts-qcom-sm8150-extend-the-size-of-the-pdc-res.patch b/queue-6.5/arm64-dts-qcom-sm8150-extend-the-size-of-the-pdc-res.patch new file mode 100644 index 00000000000..ff4e332dd44 --- /dev/null +++ b/queue-6.5/arm64-dts-qcom-sm8150-extend-the-size-of-the-pdc-res.patch @@ -0,0 +1,40 @@ +From 202d3bd57becdb277539165c206cdd0af45379a5 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 5 Sep 2023 15:19:26 +0200 +Subject: arm64: dts: qcom: sm8150: extend the size of the PDC resource + +From: Dmitry Baryshkov + +[ Upstream commit cf5716acbfc6190b3f97f4614affdf5991aed7b2 ] + +Follow the example of other platforms and extend the PDC resource region +to 0x30000, so that the PDC driver can read the PDC_VERSION register. + +Fixes: 397ad94668c1 ("arm64: dts: qcom: sm8150: Add pdc interrupt controller node") +Reviewed-by: Konrad Dybcio +Signed-off-by: Dmitry Baryshkov +Reviewed-by: Neil Armstrong +Signed-off-by: Neil Armstrong +Signed-off-by: Marc Zyngier +Link: https://lore.kernel.org/r/20230905-topic-sm8x50-upstream-pdc-ver-v4-2-fc633c7df84b@linaro.org +Signed-off-by: Sasha Levin +--- + arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi +index a7c3020a5de49..06c53000bb74d 100644 +--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi +@@ -3958,7 +3958,7 @@ + + pdc: interrupt-controller@b220000 { + compatible = "qcom,sm8150-pdc", "qcom,pdc"; +- reg = <0 0x0b220000 0 0x400>; ++ reg = <0 0x0b220000 0 0x30000>; + qcom,pdc-ranges = <0 480 94>, <94 609 31>, + <125 63 1>; + #interrupt-cells = <2>; +-- +2.40.1 + diff --git a/queue-6.5/asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch-9313 b/queue-6.5/asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch-9313 new file mode 100644 index 00000000000..569a0401550 --- /dev/null +++ b/queue-6.5/asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch-9313 @@ -0,0 +1,58 @@ +From 8ed0ee6c508ed09c7c4190b6d7047c80404c0ad4 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 19 Sep 2023 17:42:13 +0800 +Subject: ASoC: fsl_sai: Don't disable bitclock for i.MX8MP + +From: Shengjiu Wang + +[ Upstream commit 197c53c8ecb34f2cd5922f4bdcffa8f701a134eb ] + +On i.MX8MP, the BCE and TERE bit are binding with mclk +enablement, if BCE and TERE are cleared the MCLK also be +disabled on output pin, that cause the external codec (wm8960) +in wrong state. + +Codec (wm8960) is using the mclk to generate PLL clock, +if mclk is disabled before disabling PLL, the codec (wm8960) +won't generate bclk and frameclk when sysclk switch to +MCLK source in next test case. + +The test case: +$aplay -r44100 test1.wav (PLL source) +$aplay -r48000 test2.wav (MCLK source) +aplay: pcm_write:2127: write error: Input/output error + +Fixes: 269f399dc19f ("ASoC: fsl_sai: Disable bit clock with transmitter") +Signed-off-by: Shengjiu Wang +Link: https://lore.kernel.org/r/1695116533-23287-1-git-send-email-shengjiu.wang@nxp.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/fsl/fsl_sai.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c +index f7676d30c82fd..0497bebae0eca 100644 +--- a/sound/soc/fsl/fsl_sai.c ++++ b/sound/soc/fsl/fsl_sai.c +@@ -710,10 +710,15 @@ static void fsl_sai_config_disable(struct fsl_sai *sai, int dir) + { + unsigned int ofs = sai->soc_data->reg_offset; + bool tx = dir == TX; +- u32 xcsr, count = 100; ++ u32 xcsr, count = 100, mask; ++ ++ if (sai->soc_data->mclk_with_tere && sai->mclk_direction_output) ++ mask = FSL_SAI_CSR_TERE; ++ else ++ mask = FSL_SAI_CSR_TERE | FSL_SAI_CSR_BCE; + + regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx, ofs), +- FSL_SAI_CSR_TERE | FSL_SAI_CSR_BCE, 0); ++ mask, 0); + + /* TERE will remain set till the end of current frame */ + do { +-- +2.40.1 + diff --git a/queue-6.5/asoc-intel-soc-acpi-fix-dell-sku-0b34.patch-6964 b/queue-6.5/asoc-intel-soc-acpi-fix-dell-sku-0b34.patch-6964 new file mode 100644 index 00000000000..3f62c2b1b37 --- /dev/null +++ b/queue-6.5/asoc-intel-soc-acpi-fix-dell-sku-0b34.patch-6964 @@ -0,0 +1,60 @@ +From 0023ccb62f6820097c8ac74f684f8422b3c61596 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 19 Sep 2023 16:36:06 +0800 +Subject: ASoC: Intel: soc-acpi: fix Dell SKU 0B34 + +From: Pierre-Louis Bossart + +[ Upstream commit b399f9706a1cbae42731cc420a46cfb9c3c6b10f ] + +The rule for the SoundWire tables is that the platforms with more +devices need to be added first. We broke that rule with the Dell SKU +0B34, and caused the second amplifier for SKU 0AF3 to be ignored. + +The fix is simple, we need to move the single-amplifier entry after +the two-amplifier one. + +Fixes: b62a1a839b48 ("ASoC: Intel: soc-acpi: add tables for Dell SKU 0B34") +Closes: https://github.com/thesofproject/linux/issues/4559 +Signed-off-by: Pierre-Louis Bossart +Reviewed-by: Chao Song +Signed-off-by: Bard Liao +Link: https://lore.kernel.org/r/20230919083606.1920202-1-yung-chuan.liao@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/intel/common/soc-acpi-intel-adl-match.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c +index bcd66e0094b4b..c4b57cca6b228 100644 +--- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c ++++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c +@@ -648,18 +648,18 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l3.tplg", + }, +- { +- .link_mask = 0x3, /* rt1316 on link1 & rt714 on link0 */ +- .links = adl_sdw_rt1316_link1_rt714_link0, +- .drv_name = "sof_sdw", +- .sof_tplg_filename = "sof-adl-rt1316-l1-mono-rt714-l0.tplg", +- }, + { + .link_mask = 0x7, /* rt714 on link0 & two rt1316s on link1 and link2 */ + .links = adl_sdw_rt1316_link12_rt714_link0, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-adl-rt1316-l12-rt714-l0.tplg", + }, ++ { ++ .link_mask = 0x3, /* rt1316 on link1 & rt714 on link0 */ ++ .links = adl_sdw_rt1316_link1_rt714_link0, ++ .drv_name = "sof_sdw", ++ .sof_tplg_filename = "sof-adl-rt1316-l1-mono-rt714-l0.tplg", ++ }, + { + .link_mask = 0x5, /* 2 active links required */ + .links = adl_sdw_rt1316_link2_rt714_link0, +-- +2.40.1 + diff --git a/queue-6.5/asoc-simple-card-utils-fixup-simple_util_startup-err.patch b/queue-6.5/asoc-simple-card-utils-fixup-simple_util_startup-err.patch new file mode 100644 index 00000000000..b35856b527e --- /dev/null +++ b/queue-6.5/asoc-simple-card-utils-fixup-simple_util_startup-err.patch @@ -0,0 +1,41 @@ +From d9effbd2796d56a25f9486d5471a0d8fa2b984c7 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 19 Sep 2023 01:22:57 +0000 +Subject: ASoC: simple-card-utils: fixup simple_util_startup() error handling + +From: Kuninori Morimoto + +[ Upstream commit 69cf63b6560205a390a736b88d112374655adb28 ] + +It should use "goto" instead of "return" + +Fixes: 5ca2ab459817 ("ASoC: simple-card-utils: Add new system-clock-fixed flag") +Reported-by: kernel test robot +Reported-by: Dan Carpenter +Closes: https://lore.kernel.org/all/202309141205.ITZeDJxV-lkp@intel.com/ +Closes: https://lore.kernel.org/all/202309151840.au9Aa2W4-lkp@intel.com/ +Signed-off-by: Kuninori Morimoto +Link: https://lore.kernel.org/r/87v8c76jnz.wl-kuninori.morimoto.gx@renesas.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/generic/simple-card-utils.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c +index 3019626b05927..a6fe350c3373a 100644 +--- a/sound/soc/generic/simple-card-utils.c ++++ b/sound/soc/generic/simple-card-utils.c +@@ -310,7 +310,8 @@ int asoc_simple_startup(struct snd_pcm_substream *substream) + if (fixed_sysclk % props->mclk_fs) { + dev_err(rtd->dev, "fixed sysclk %u not divisible by mclk_fs %u\n", + fixed_sysclk, props->mclk_fs); +- return -EINVAL; ++ ret = -EINVAL; ++ goto codec_err; + } + ret = snd_pcm_hw_constraint_minmax(substream->runtime, SNDRV_PCM_HW_PARAM_RATE, + fixed_rate, fixed_rate); +-- +2.40.1 + diff --git a/queue-6.5/asoc-sof-amd-fix-for-firmware-reload-failure-after-p.patch b/queue-6.5/asoc-sof-amd-fix-for-firmware-reload-failure-after-p.patch new file mode 100644 index 00000000000..5e73ab77b62 --- /dev/null +++ b/queue-6.5/asoc-sof-amd-fix-for-firmware-reload-failure-after-p.patch @@ -0,0 +1,56 @@ +From 7233d901cac85d61e91fad5f10148c341def5a10 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 27 Sep 2023 12:44:10 +0530 +Subject: ASoC: SOF: amd: fix for firmware reload failure after playback + +From: Vijendar Mukunda + +[ Upstream commit 7e1fe5d9e7eae67e218f878195d1d348d01f9af7 ] + +Setting ACP ACLK as clock source when ACP enters D0 state causing +firmware load failure as mentioned in below scenario. + +- Load snd_sof_amd_rembrandt +- Play or Record audio +- Stop audio +- Unload snd_sof_amd_rembrandt +- Reload snd_sof_amd_rembrandt + +If acp_clkmux_sel register field is set, then clock source will be +set to ACP ACLK when ACP enters D0 state. + +During stream stop, if there is no active stream is running then +acp firmware will set the ACP ACLK value to zero. + +When driver is reloaded and clock source is selected as ACP ACLK, +as ACP ACLK is programmed to zero, firmware loading will fail. + +For RMB platform, remove the clock mux selection field so that +ACP will use internal clock source when ACP enters D0 state. + +Fixes: 41cb85bc4b52 ("ASoC: SOF: amd: Add support for Rembrandt plaform.") +Reported-by: coolstar +Closes: https://github.com/thesofproject/sof/issues/8137 +Signed-off-by: Vijendar Mukunda +Link: https://lore.kernel.org/r/20230927071412.2416250-1-Vijendar.Mukunda@amd.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/sof/amd/pci-rmb.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/sound/soc/sof/amd/pci-rmb.c b/sound/soc/sof/amd/pci-rmb.c +index 58b3092425f1a..874230ffcbcc6 100644 +--- a/sound/soc/sof/amd/pci-rmb.c ++++ b/sound/soc/sof/amd/pci-rmb.c +@@ -34,7 +34,6 @@ static const struct sof_amd_acp_desc rembrandt_chip_info = { + .dsp_intr_base = ACP6X_DSP_SW_INTR_BASE, + .sram_pte_offset = ACP6X_SRAM_PTE_OFFSET, + .hw_semaphore_offset = ACP6X_AXI2DAGB_SEM_0, +- .acp_clkmux_sel = ACP6X_CLKMUX_SEL, + .fusion_dsp_offset = ACP6X_DSP_FUSION_RUNSTALL, + }; + +-- +2.40.1 + diff --git a/queue-6.5/irqchip-renesas-rzg2l-fix-logic-to-clear-tint-interr.patch b/queue-6.5/irqchip-renesas-rzg2l-fix-logic-to-clear-tint-interr.patch new file mode 100644 index 00000000000..b3c66fb2e03 --- /dev/null +++ b/queue-6.5/irqchip-renesas-rzg2l-fix-logic-to-clear-tint-interr.patch @@ -0,0 +1,43 @@ +From 1692a06de1224f1a0946e6a1a1aa33104d737fcf Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 18 Sep 2023 13:24:09 +0100 +Subject: irqchip: renesas-rzg2l: Fix logic to clear TINT interrupt source + +From: Biju Das + +[ Upstream commit 9b8df572ba3f4e544366196820a719a40774433e ] + +The logic to clear the TINT interrupt source in rzg2l_irqc_irq_disable() +is wrong as the mask is correct only for LSB on the TSSR register. +This issue is found when testing with two TINT interrupt sources. So fix +the logic for all TINTs by using the macro TSSEL_SHIFT() to multiply +tssr_offset with 8. + +Fixes: 3fed09559cd8 ("irqchip: Add RZ/G2L IA55 Interrupt Controller driver") +Signed-off-by: Biju Das +Tested-by: Claudiu Beznea +Reviewed-by: Geert Uytterhoeven +Reviewed-by: Claudiu Beznea +Signed-off-by: Marc Zyngier +Link: https://lore.kernel.org/r/20230918122411.237635-2-biju.das.jz@bp.renesas.com +Signed-off-by: Sasha Levin +--- + drivers/irqchip/irq-renesas-rzg2l.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-renesas-rzg2l.c +index 4bbfa2b0a4df9..2cee5477be6b6 100644 +--- a/drivers/irqchip/irq-renesas-rzg2l.c ++++ b/drivers/irqchip/irq-renesas-rzg2l.c +@@ -118,7 +118,7 @@ static void rzg2l_irqc_irq_disable(struct irq_data *d) + + raw_spin_lock(&priv->lock); + reg = readl_relaxed(priv->base + TSSR(tssr_index)); +- reg &= ~(TSSEL_MASK << tssr_offset); ++ reg &= ~(TSSEL_MASK << TSSEL_SHIFT(tssr_offset)); + writel_relaxed(reg, priv->base + TSSR(tssr_index)); + raw_spin_unlock(&priv->lock); + } +-- +2.40.1 + diff --git a/queue-6.5/series b/queue-6.5/series index 97c78e3b616..17544728b54 100644 --- a/queue-6.5/series +++ b/queue-6.5/series @@ -35,3 +35,11 @@ asoc-intel-soc-acpi-add-entry-for-hdmi_in-capture-support-in-mtl-match-table.pat asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch asoc-intel-sof_sdw-add-support-for-sku-0b14.patch asoc-intel-soc-acpi-add-entry-for-sof_es8336-in-mtl-match-table.patch +arm64-dts-qcom-sm8150-extend-the-size-of-the-pdc-res.patch +asoc-intel-soc-acpi-fix-dell-sku-0b34.patch-6964 +asoc-simple-card-utils-fixup-simple_util_startup-err.patch +irqchip-renesas-rzg2l-fix-logic-to-clear-tint-interr.patch +asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch-9313 +asoc-sof-amd-fix-for-firmware-reload-failure-after-p.patch +alsa-hda-cs35l41-cleanup-and-fix-double-free-in-firm.patch +alsa-hda-realtek-change-model-for-intel-rvp-board.patch-12253