Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'asoc-fix-v6.7-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.7

I recently got a LibreTech Sapphire board for my CI and while
integrating it found and fixed some issues, including crashes for the
enum validation. There's also a couple of patches adding quirks for
another x86 laptop from Hans and an error handling fix for the Freescale
rpmsg driver.

+20 -5
+8 -2
sound/soc/fsl/fsl_rpmsg.c
··· 238 238 ret = devm_snd_soc_register_component(&pdev->dev, &fsl_component, 239 239 &fsl_rpmsg_dai, 1); 240 240 if (ret) 241 - return ret; 241 + goto err_pm_disable; 242 242 243 243 rpmsg->card_pdev = platform_device_register_data(&pdev->dev, 244 244 "imx-audio-rpmsg", ··· 248 248 if (IS_ERR(rpmsg->card_pdev)) { 249 249 dev_err(&pdev->dev, "failed to register rpmsg card\n"); 250 250 ret = PTR_ERR(rpmsg->card_pdev); 251 - return ret; 251 + goto err_pm_disable; 252 252 } 253 253 254 254 return 0; 255 + 256 + err_pm_disable: 257 + pm_runtime_disable(&pdev->dev); 258 + return ret; 255 259 } 256 260 257 261 static void fsl_rpmsg_remove(struct platform_device *pdev) 258 262 { 259 263 struct fsl_rpmsg *rpmsg = platform_get_drvdata(pdev); 264 + 265 + pm_runtime_disable(&pdev->dev); 260 266 261 267 if (rpmsg->card_pdev) 262 268 platform_device_unregister(rpmsg->card_pdev);
+1 -1
sound/soc/mediatek/mt8186/mt8186-dai-adda.c
··· 499 499 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), 500 500 501 501 SND_SOC_DAPM_SUPPLY_S("AUD_PAD_TOP", SUPPLY_SEQ_ADDA_AUD_PAD_TOP, 502 - 0, 0, 0, 502 + AFE_AUD_PAD_TOP, RG_RX_FIFO_ON_SFT, 0, 503 503 mtk_adda_pad_top_event, 504 504 SND_SOC_DAPM_PRE_PMU), 505 505 SND_SOC_DAPM_SUPPLY_S("ADDA_MTKAIF_CFG", SUPPLY_SEQ_ADDA_MTKAIF_CFG,
+4 -1
sound/soc/meson/g12a-toacodec.c
··· 71 71 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 72 72 unsigned int mux, reg; 73 73 74 + if (ucontrol->value.enumerated.item[0] >= e->items) 75 + return -EINVAL; 76 + 74 77 mux = snd_soc_enum_item_to_val(e, ucontrol->value.enumerated.item[0]); 75 78 regmap_field_read(priv->field_dat_sel, &reg); 76 79 ··· 104 101 105 102 snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL); 106 103 107 - return 0; 104 + return 1; 108 105 } 109 106 110 107 static SOC_ENUM_SINGLE_DECL(g12a_toacodec_mux_enum, TOACODEC_CTRL0,
+7 -1
sound/soc/meson/g12a-tohdmitx.c
··· 45 45 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 46 46 unsigned int mux, changed; 47 47 48 + if (ucontrol->value.enumerated.item[0] >= e->items) 49 + return -EINVAL; 50 + 48 51 mux = snd_soc_enum_item_to_val(e, ucontrol->value.enumerated.item[0]); 49 52 changed = snd_soc_component_test_bits(component, e->reg, 50 53 CTRL0_I2S_DAT_SEL, ··· 96 93 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 97 94 unsigned int mux, changed; 98 95 96 + if (ucontrol->value.enumerated.item[0] >= e->items) 97 + return -EINVAL; 98 + 99 99 mux = snd_soc_enum_item_to_val(e, ucontrol->value.enumerated.item[0]); 100 100 changed = snd_soc_component_test_bits(component, TOHDMITX_CTRL0, 101 101 CTRL0_SPDIF_SEL, ··· 118 112 119 113 snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL); 120 114 121 - return 0; 115 + return 1; 122 116 } 123 117 124 118 static SOC_ENUM_SINGLE_DECL(g12a_tohdmitx_spdif_mux_enum, TOHDMITX_CTRL0,