aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-09-23ASoC: Intel: skylake: remove unnecessary dev_set_drvdata()Yang Yingliang1-1/+0
Remove unnecessary dev_set_drvdata() in skl_remove(), the driver_data will be set to NULL in device_unbind_cleanup() after calling ->remove(). Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220916140757.681414-1-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: Intel: sof_da7219_mx98360a: Access num_codecs through dai_linkNathan Chancellor1-1/+1
After commit 3989ade2d1e7 ("ASoC: soc.h: remove num_cpus/codecs"), the following build error occurs: sound/soc/intel/boards/sof_da7219_max98373.c:198:27: error: no member named 'num_codecs' in 'struct snd_soc_pcm_runtime' for (j = 0; j < runtime->num_codecs; j++) { ~~~~~~~ ^ 1 error generated. This conversion was missed by the aforementioned change. Do it now to fix the build error. Fixes: 3989ade2d1e7 ("ASoC: soc.h: remove num_cpus/codecs") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220922153752.336193-1-nathan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-20ASoC: Intel: soc-acpi-intel-rpl-match: add rpl_sdca_3_in_1 supportBard Liao1-0/+80
Add rpl_sdca_3_in_1 match information. Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220920074617.10300-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: Intel: sof_rt5682: use devm_kcalloc() instead of devm_kzalloc()ye xingchen1-7/+8
Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc(). Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220916062630.154277-1-ye.xingchen@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: Intel: sof_es8336: use function devm_kcalloc() instead of devm_kzalloc()ye xingchen1-3/+4
Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc(). Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220916062415.153659-1-ye.xingchen@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: soc-core.c: setup rtd->pmdown_time at soc_new_pcm_runtime()Kuninori Morimoto1-0/+1
Almost all default rtd->xxx are setup at soc_new_pcm_runtime() which is sub-function of snd_soc_add_pcm_runtime() (A). But "rtd->pmdown_time" is setup at soc_init_pcm_runtime() (B). It is very random timing setup. This patch setup it at (A), same as other rtd->xxx. static int snd_soc_bind_card(...) { ... for_each_card_prelinks(...) { (A) ret = snd_soc_add_pcm_runtime(...); ... } ... for_each_card_rtds(...) { (B) ret = soc_init_pcm_runtime(...); ... } ... } One note is that current topology/intel are directly calling snd_soc_add_pcm_runtime() (A) without calling soc_init_pcm_runtime() (B). This means, its "rtd->pmdown_time settings" was 0, but will have default value by this patch. "rtd->pmdown_time settings" will be used at snd_soc_runtime_ignore_pmdown_time(). This patch adds "ignore_pmdown_time" to these driver to keep compatibility. bool snd_soc_runtime_ignore_pmdown_time(...) { ... => if (!rtd->pmdown_time || rtd->dai_link->ignore_pmdown_time) return true; ... } Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/875yhxmjjd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: Intel: sof_ssp_amp: use devm_kcalloc() instead of devm_kzalloc()ye xingchen1-7/+8
Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc(). Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220916062549.154114-1-ye.xingchen@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: Intel: sof_cs42l42: use function devm_kcalloc() instead of devm_kzalloc()ye xingchen1-7/+7
Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc(). Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220916062234.153275-1-ye.xingchen@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: Intel: sof_nau8825: use function devm_kcalloc() instead of devm_kzalloc()ye xingchen1-7/+8
Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc(). Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220916062320.153456-1-ye.xingchen@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-13ASoC: Intel: fix unused-variable warning in probe_codecGaosheng Cui1-1/+1
In configurations with CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=n, gcc warns about an unused variable: sound/soc/intel/skylake/skl.c: In function ‘probe_codec’: sound/soc/intel/skylake/skl.c:729:18: error: unused variable ‘skl’ [-Werror=unused-variable] struct skl_dev *skl = bus_to_skl(bus); ^~~ cc1: all warnings being treated as errors Fixes: 3fd63658caed9 ("ASoC: Intel: Drop hdac_ext usage for codec device creation") Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220822035133.2147381-1-cuigaosheng1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-16ASoC: Intel: HSW and BDW updatesMark Brown4-23/+35
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: Sharing this PR as it touches on cross-driver subjects. Four commits yet two subject. Given the small delta, decided to combine within single PR here.
2022-08-16ASoC: Intel: common: add ACPI matching tables for Raptor LakeKai Vehmanen2-1/+52
Initial support for RPL w/ RT711 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Tested-by: Gopal Vamshi Krishna <vamshi.krishna.gopal@intel.com> Link: https://lore.kernel.org/r/20220816130510.190427-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-16ASoC: Intel: Drop legacy HSW/BDW board-match informationCezary Rojewski1-15/+0
With board-matching information for legacy solution moved to local directory, there is no need to expose it globally. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220815165818.3050649-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-16ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependencyCezary Rojewski2-4/+31
catpt-driver does not make use of most of the fields found in the descriptor table and is the sole user of haswell machines list. Move the tables to local directory and clean them up so it's clear what's actually used by the solution. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220815165818.3050649-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-16ASoC: Intel: bdw_rt286: Rename moduleCezary Rojewski1-2/+2
Change kernel module name from snd_soc_sst_broadwell to snd_soc_bdw_rt286 to better reflect its purpose. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220815165818.3050649-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-16ASoC: Intel: hsw_rt5640: Rename moduleCezary Rojewski1-2/+2
Change kernel module name from snd_soc_sst_haswell to snd_soc_hsw_rt5640 to better reflect its purpose. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220815165818.3050649-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-15ASoC: Replace sprintf() with sysfs_emit()Mark Brown3-8/+8
Merge series from Takashi Iwai <tiwai@suse.de>: This is a patch set for rather simple conversions from the plain sprintf() & co to the new helpers, sysfs_emit() and sysfs_emit_at(). No functional changes are expected.
2022-08-15ASoC: Intel: cirrus-common: Use UID to map correct amp to prefixStefan Binding1-43/+49
Since the order of the amps in the ACPI determines the device name, and the ACPI order may change depending on hardware configuration, use UID to dynamically compute the dai links, allowing dynamic assignment of the name_prefix. The UIDs for these amps in ACPI are fixed, and map to a name_prefix, where: UID 0x0 -> WL UID 0x1 -> WR UID 0x2 -> TL UID 0x3 -> TR Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220801094034.3927841-1-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-15ASoC: Intel: skylake: Replace sprintf() with sysfs_emit()Takashi Iwai1-1/+1
For sysfs outputs, it's safer to use a new helper, sysfs_emit(), instead of the raw sprintf() & co. This patch replaces those usages straightforwardly with a new helper, sysfs_emit(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220801170108.26340-6-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-15ASoC: Intel: catpt: Replace sprintf() with sysfs_emit()Takashi Iwai1-3/+3
For sysfs outputs, it's safer to use a new helper, sysfs_emit(), instead of the raw sprintf() & co. This patch replaces those usages straightforwardly with a new helper, sysfs_emit(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220801170108.26340-5-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-15ASoC: Intel: sst: Replace sprintf() with sysfs_emit()Takashi Iwai1-4/+4
For sysfs outputs, it's safer to use a new helper, sysfs_emit(), instead of the raw sprintf() & co. This patch replaces those usages straightforwardly with a new helper, sysfs_emit(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20220801170108.26340-4-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-05ASoC: Intel: fix sof_es8336 probePierre-Louis Bossart1-1/+3
Changes to add HDMI capture support broke the machine driver probe for all other platforms. The commit listed in the Fixes tag added a board_id descriptor but didn't add the default name for the sof_essx8336 machine driver. Add the missing entry and remove the now-useless platform driver alias. Reported-by: Eugene J Markow <ejmarkow@yahoo.com> BugLink: https://github.com/thesofproject/linux/issues/3336 Fixes: 86b1959a2ccb ("ASoC: Intel: sof_es8336: add support for HDMI_In capture") Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220805133332.207932-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-05ASoC: Intel: avs: Fix potential buffer overflow by snprintf()Takashi Iwai1-2/+2
snprintf() returns the would-be-filled size when the string overflows the given buffer size, hence using this value may result in a buffer overflow (although it's unrealistic). This patch replaces it with a safer version, scnprintf() for papering over such a potential issue. Fixes: f1b3b320bd65 ("ASoC: Intel: avs: Generic soc component driver") Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220801165420.25978-2-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-25ASoC: Intel: sof_nau8825: Move quirk check to the front in late probeYong Zhi1-5/+5
The sof_rt5682_quirk check was placed in the middle of hdmi handling code, move it to the front to be consistent with sof_rt5682.c/sof_card_late_probe(). Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220725194909.145418-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-25ASoC: Intel: sof_rt5682: Perform quirk check first in card late probeYong Zhi1-9/+9
The check of sof_rt5682_quirk should not be skipped unless the HDMI handling code exits with error, fix by moving the quirk check to the front. Fixes: 94d2d0897474 ("ASoC: Intel: Boards: tgl_max98373: add dai_trigger function") Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220725194909.145418-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-25ASoC: Intel: sof_rt5682: Add support for mtl_mx98357_rt5682Yong Zhi2-0/+25
This patch adds the driver data for rt5682 codec on SSP0 and max98357a speaker amplifiers on SSP1 for MTL platform. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220725194909.145418-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-25ASoC: Intel: sof_es8336: remove hard-coded SSP selectionPierre-Louis Bossart1-9/+5
For some reason we open-coded the SSP selection and only supported SSP0, 1 and 2. On ApolloLake platforms, the SSP5 can be used as well for the ES8336 hardware link. Remove hard-coded if/else code and align with same code already used in the SOF driver. BugLink: https://github.com/thesofproject/sof/issues/6015 Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220725194909.145418-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-25ASoC: Intel: sof_es8336: reset the num_links during probeMuralidhar Reddy1-1/+2
The number of dai_links for sound cards needs to be reset during probe. This is done in all machine drivers except this one. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Muralidhar Reddy <muralidhar.reddy@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220725194909.145418-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-25ASoC: Intel: sof_es8336: add support for HDMI_In captureMuralidhar Reddy2-20/+118
Adding support for 2 streams of HDMI-In capture via I2S in CBP_CFP configuration (codec provides bit clock and frame sync). Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Muralidhar Reddy <muralidhar.reddy@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220725194909.145418-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-25ASoC: Intel: sof_es8336: ignore GpioInt when looking for speaker/headset GPIO linesAndrey Turkin1-6/+6
This fixes speaker GPIO detection on machines those ACPI tables list their jack detection GpioInt before output GpioIo. GpioInt entry can never be the speaker/headphone amplifier control so it makes sense to only look for GpioIo entries when looking for them. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andrey Turkin <andrey.turkin@gmail.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220725194909.145418-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-25ASoC: Intel: sof_es8336: Fix GPIO quirks set via module optionAndrey Turkin1-11/+12
The two GPIO quirk bits only affected actual GPIO selection when set by the quirks table. They were reported as being in effect when set via module options but actually did nothing. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andrey Turkin <andrey.turkin@gmail.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220725194909.145418-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-25ASoC: Intel: soc-acpi: Add entry for sof_es8336 in ADL match tableMuralidhar Reddy1-0/+13
Adding support for ES83x6 codec in ADL match table Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Muralidhar Reddy <muralidhar.reddy@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220725194909.145418-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-25ASoC: Intel: sof_sdw: add support for Dell SKU 0AF0Pierre-Louis Bossart1-0/+10
Somehow this device was not added in the initial AlderLake batch. From the ACPI definition this looks like a standard SDCA version with RT711 on link0, RT1316 on link1/2 and RT714 on link3. BugLink: https://github.com/thesofproject/linux/issues/3772 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220725194909.145418-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-22ASoC: Intel: avs: Use lookup table to create modulesAmadeusz Sławiński1-25/+29
As reported by Nathan, when building avs driver using clang with: CONFIG_COMPILE_TEST=y CONFIG_FORTIFY_SOURCE=y CONFIG_KASAN=y CONFIG_PCI=y CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_SOC=y CONFIG_SND_SOC_INTEL_AVS=y there are reports of too big stack use, like: sound/soc/intel/avs/path.c:815:18: error: stack frame size (2176) exceeds limit (2048) in 'avs_path_create' [-Werror,-Wframe-larger-than] struct avs_path *avs_path_create(struct avs_dev *adev, u32 dma_id, ^ 1 error generated. This is apparently caused by inlining many calls to guid_equal which inlines fortified memcpy, using 2 size_t variables. Instead of hardcoding many calls to guid_equal, use lookup table with one call, this improves stack usage. Link: https://lore.kernel.org/alsa-devel/YtlzY9aYdbS4Y3+l@dev-arch.thelio-3990X/T/ Link: https://github.com/ClangBuiltLinux/linux/issues/1642 Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reported-by: Nathan Chancellor <nathan@kernel.org> Build-tested-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220722111959.2588597-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-15ASoC: SOF: Intel: add support for SoundWire-based HP Omen16Mark Brown4-0/+44
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: This device exposes a headset codec on link0 and an amplifier on link3. This is a very unusual pin-muxing, usually the microphones are pin-muxed with link2/link3. This resulted in a problematic error handling leading to a kernel oops, and invalidated a hard-coded assumption. Full support for this device requires a DMI quirk shared separately ("soundwire: dmi-quirks: add remapping for HP Omen 16-k0005TX").
2022-07-15ASoC: Intel: sof_sdw: add quirk for HP Omen 16-k0005TXPierre-Louis Bossart1-0/+9
The JD2 jack detection was selected based on similar settings from other platforms based on RT711-SDCA. BugLink: https://github.com/thesofproject/sof/issues/5955 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220715144144.274770-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-15ASoC: Intel: soc-acpi: add table for HP Omen 16-k0005TXPierre-Louis Bossart1-0/+29
This device has an RT711-SDCA headset codec on link0 and an RT1316 amplifier on link3. BugLink: https://github.com/thesofproject/sof/issues/5955 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220715144144.274770-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-15ASoC: Intel: sof_sdw: avoid oops in error handlingPierre-Louis Bossart2-0/+6
While tinkering with ACPI work-arounds for the HP Omen 16 support, we identified a corner case where the headset codec device properties are not set in the codec .init when -EPROBE_DEFER is returned, but released unconditionally in the .exit(). This leads to a kernel oops [ 4.186891] sof_sdw sof_sdw: snd_soc_register_card failed -517 [ 4.186896] BUG: kernel NULL pointer dereference, address: 00000000000003f0 [ 4.186914] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 4.186926] RIP: 0010:dev_fwnode+0x5/0x20 [ 4.186974] device_remove_software_node+0x10/0x80 [ 4.186982] sof_sdw_rt711_exit+0x19/0x30 [snd_soc_sof_sdw] [ 4.186990] mc_dailink_exit_loop+0x94/0xc0 [snd_soc_sof_sdw] [ 4.186996] ? rt711_rtd_init+0x170/0x170 [snd_soc_sof_sdw] A similar error case can occur if the addition of the device property fails. We need to test if the property was successfully added before removing it. BugLink: https://github.com/thesofproject/linux/issues/3727 Fixes: 768ad6d80db2d ("ASoC: Intel: sof_sdw: handle errors on card registration") Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220715144144.274770-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-15ASoC: Intel: bdw_rt5677: Mark BE DAI as nonatomicCezary Rojewski1-0/+1
Address the warning: "Codec: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic" by marking BE DAI as nonatomic. Aligns with what is already done for FE ones. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220624134317.3656128-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-15ASoC: Intel: bdw_rt5650: Mark BE DAI as nonatomicCezary Rojewski1-0/+1
Address the warning: "Codec: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic" by marking BE DAI as nonatomic. Aligns with what is already done for FE ones. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220624134317.3656128-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-15ASoC: Intel: bdw_rt286: Mark BE DAI as nonatomicCezary Rojewski1-0/+1
Address the warning: "Codec: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic" by marking BE DAI as nonatomic. Aligns with what is already done for FE DAIs. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220624134317.3656128-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-15ASoC: Intel: hsw_rt5640: Mark BE DAI as nonatomicCezary Rojewski1-0/+1
Address the warning: "Codec: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic" by marking BE DAI as nonatomic. Aligns with what is already done for FE DAIs. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220624134317.3656128-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-11ASoC: Intel: avs: Updates and cleanupsMark Brown8-22/+64
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: Series consists of loosely connected patches and does not concentrate on one specific subject. First, as generic HDAudio codec driver is now part of ASoC, avs-driver core is updated to register missing ext_bus operations. This completes driver's core implementation. The next change adds the last missing piece for port descriptions coming from topology in formatted string format e.g.: ssp%d have full effect. To do that, the port value needs to be provided to respective copier configuration. Third change relaxes core transition timings so that scenarios where modules are interfering with each other while being on separate cores are not occasionally causing trouble. All other changes are addressing warnings, cleaning things up a little and protecting driver from invalid firmware behavior - while not expected in release binaries, does not hurt to add them.
2022-07-11ASoC: Merge up fixesMark Brown2-20/+30
Needed for the Rockchip driver.
2022-07-08ASoC: Intel: avs: Update AVS_FW_INIT_TIMEOUT_US declarationCezary Rojewski1-1/+1
To reduce the number of places to update if timeouts would have to change, modify the constant declaration. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220707124153.1858249-13-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-08ASoC: Intel: avs: Lower UNLOAD_MULTIPLE_MODULES IPC timeoutCezary Rojewski1-1/+1
Module unloading operation performs memory unmapping and the weight of the opration does not different from any other standard IPC. There is no dependency on secondary task like in module loading scenario where larger message timeout is recommended. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220707124153.1858249-12-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-08ASoC: Intel: avs: Replace hardcodes with SD_CTL_STREAM_RESETCezary Rojewski1-6/+6
Improve readability of CLDMA reset operation by making use of already defined SD_CTL_STREAM_RESET. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220707124153.1858249-11-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-08ASoC: Intel: avs: Recognize FW_CFG_RESERVEDCezary Rojewski1-0/+1
If exposed by firmware, count RESERVED parameter as known one to avoid dumping noise in kernel logs. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220707124153.1858249-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-08ASoC: Intel: avs: Use helper function to set up DMAAmadeusz Sławiński1-6/+2
dma_set_mask() and dma_set_coherent_mask() can be performed with one call to dma_set_mask_and_coherent(), which slightly reduces amount of code on our side. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220707124153.1858249-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-08ASoC: Intel: avs: Set max DMA segment sizeAmadeusz Sławiński1-0/+1
Apparently it is possible for code to allocate large buffers which may cause warnings as reported in [1]. This was fixed for HDA, SOF and skylake in patchset [2], fix it also for avs driver. [1] https://github.com/thesofproject/linux/issues/3430 [2] https://lore.kernel.org/all/20220215132756.31236-1-tiwai@suse.de/ Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220707124153.1858249-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>