diff options
author | Mark Brown <broonie@kernel.org> | 2022-07-26 12:29:56 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-07-26 12:29:56 +0100 |
commit | 4782b7cb6ff836b35342a75e217aa6821b1928f5 (patch) | |
tree | 178714d1923b502351d62d9378e78edb4591e9cd /sound/soc | |
parent | f20d5116b7f3d8d40e1248a59be89e667eaabd62 (diff) | |
parent | af468aadf00485a2f5e804fe97db4731bc7a9c24 (diff) | |
download | linux-4782b7cb6ff836b35342a75e217aa6821b1928f5.tar.bz2 |
ASoC: SOF: minor updates for 5.20
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
One sanity check for SSP index reported by NHLT/BIOS and two updates for
Mediatek and Intel Chromebooks related to already-merged firmware
changes.
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/sof/intel/hda.c | 7 | ||||
-rw-r--r-- | sound/soc/sof/ipc3-pcm.c | 3 | ||||
-rw-r--r-- | sound/soc/sof/sof-priv.h | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index d337d55050e2..8639ea63a10d 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -1527,6 +1527,7 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev) if (tplg_fixup && mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER && mach->mach_params.i2s_link_mask) { + const struct sof_intel_dsp_desc *chip = get_chip_info(sdev->pdata); int ssp_num; if (hweight_long(mach->mach_params.i2s_link_mask) > 1 && @@ -1536,6 +1537,12 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev) /* fls returns 1-based results, SSPs indices are 0-based */ ssp_num = fls(mach->mach_params.i2s_link_mask) - 1; + if (ssp_num >= chip->ssp_count) { + dev_err(sdev->dev, "Invalid SSP %d, max on this platform is %d\n", + ssp_num, chip->ssp_count); + return NULL; + } + tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, "%s%s%d", sof_pdata->tplg_filename, diff --git a/sound/soc/sof/ipc3-pcm.c b/sound/soc/sof/ipc3-pcm.c index b97e63d3724a..9c6a84bdeca7 100644 --- a/sound/soc/sof/ipc3-pcm.c +++ b/sound/soc/sof/ipc3-pcm.c @@ -115,6 +115,9 @@ static int sof_ipc3_pcm_hw_params(struct snd_soc_component *component, pcm.params.no_stream_position = 1; } + if (platform_params->cont_update_posn) + pcm.params.cont_update_posn = 1; + dev_dbg(component->dev, "stream_tag %d", pcm.params.stream_tag); /* send hw_params IPC to the DSP */ diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 8bbc94907c62..823583086279 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -126,6 +126,7 @@ struct snd_sof_platform_stream_params { bool use_phy_address; u32 phy_addr; bool no_ipc_position; + bool cont_update_posn; }; /* |