- 25 Nov, 2022 5 commits
-
-
Mark Brown authored
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: Use EXPORT_SYMBOL_NS_GPL() instead of EXPORT_SYMBOL_GPL() and patch the three drivers that use cs_dsp to add the MODULE_IMPORT_NS(). To make the namespace more specific the KConfig symbol for cs_dsp is changed from CS_DSP to FW_CS_DSP.
-
Mark Brown authored
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: The code in drivers/soundwire/intel_init.c is hardware-dependent and the code does not apply to new generations starting with MeteorLake. Refactor and clean-up the code to make this intel_init.c hardware-agnostic and move all hardware-dependencies in the SOF driver using chip descriptors.
-
Mark Brown authored
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: Writing a firmware control should be returning 1 if the control value changed, so these two patches add that. Though this is an ALSA requirement it is also useful for non-ALSA clients of cs_dsp to know if the control value changed, so the main handling is implemented in cs_dsp. TLV controls are specifically an ALSA thing so they are handled specially in wm_adsp. Simon Trimmer (2): firmware: cs_dsp: cs_dsp_coeff_write_ctrl() should report changed ASoC: wm_adsp: Return whether changed when writing controls drivers/firmware/cirrus/cs_dsp.c | 17 ++++++++++++----- sound/soc/codecs/wm_adsp.c | 27 ++++++++++++++++++--------- 2 files changed, 30 insertions(+), 14 deletions(-) -- 2.30.2
-
Richard Fitzgerald authored
Move all the exports into a namespace. This also adds the MODULE_IMPORT_NS to the 3 drivers that use the exported functions. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20221124134556.3343784-3-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
Qualify the KConfig symbol for cs_dsp by adding a FW_ prefix so that it is more explicit what is being referred to. This is preparation for using the symbol to namespace the exports. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20221124134556.3343784-2-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 24 Nov, 2022 10 commits
-
-
Uwe Kleine-König authored
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20221118224540.619276-604-uwe@kleine-koenig.orgReviewed-by: Matt Flax <flatmax@flatmax.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-
Uwe Kleine-König authored
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20221118224540.619276-603-uwe@kleine-koenig.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Uwe Kleine-König authored
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20221118224540.619276-605-uwe@kleine-koenig.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Uwe Kleine-König authored
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20221118224540.619276-602-uwe@kleine-koenig.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge branch 'i2c/client_device_id_helper-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into HEAD so we can apply I2C cleanups.
-
Jiaxin Yu authored
In mt8186 platform, I2S2 should be the main I2S port that provide the clock, on the contrary I2S3 should be the second I2S port that use this clock. Fixes: 9986bdae ("ASoC: mediatek: mt8186: Configure shared clocks") Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20221124023050.4470-1-jiaxin.yu@mediatek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
David Lin authored
The audio amplifier NAU8318 is almost functionally identical to NAU8315. Adds compatible string "nuvoton,nau8318" for driver reuse. Signed-off-by: David Lin <CTLIN0@nuvoton.com> Link: https://lore.kernel.org/r/20221124055658.53828-2-CTLIN0@nuvoton.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
David Lin authored
Add new acpi id and compatible id for nau8315. Signed-off-by: David Lin <CTLIN0@nuvoton.com> Link: https://lore.kernel.org/r/20221124055658.53828-1-CTLIN0@nuvoton.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivas Kandagatla authored
SND_SOC_QCOM_COMMON depends on SOUNDWIRE for some symbols but this is not explicitly specified using Kconfig depends. On the other hand SND_SOC_QCOM_COMMON is also directly selected by the sound card Kconfigs, this could result in various combinations and some symbols ending up in modules and soundcard that uses those symbols as in-build driver. Fix these issues by explicitly specifying the dependencies of SND_SOC_QCOM_COMMON and also use imply a to select SND_SOC_QCOM_COMMON so that the symbol is selected based on its dependencies. Also remove dummy stubs in common.c around CONFIG_SOUNDWIRE Fixes: 3bd975f3 ("ASoC: qcom: sm8250: move some code to common") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221124140351.407506-1-srinivas.kandagatla@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yuan Can authored
As the devm_kcalloc may return NULL, the return value needs to be checked to avoid NULL poineter dereference. Fixes: 24caf8d9 ("ASoC: qcom: lpass-sc7180: Add platform driver for lpass audio") Signed-off-by: Yuan Can <yuancan@huawei.com> Link: https://lore.kernel.org/r/20221124140510.63468-1-yuancan@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 23 Nov, 2022 13 commits
-
-
Simon Trimmer authored
Functions that update cs_dsp controls need to handle return codes that indicate whether the control value changed. A return code of 1 indicates a change, 0 indicates no-change and a negative value is an error condition. Acked controls implicitly change value when written so a successful write shall always report that the value changed. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20221123165811.3014472-3-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Simon Trimmer authored
ALSA callers need to know whether there was a change to the value so that they can report a control write change correctly. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20221123165811.3014472-2-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
There's no reason to delay the multi-link parsing, this can be done earlier before checking the SoundWire capabilities. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20221111042653.45520-9-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
The number of links is checked with a chip-dependent helper in the caller, remove the check in drivers/soundwire/intel_init.c This change makes intel_init.c hardware-agnostic - which is quite fitting for a layer that only creates auxiliary devices. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Acked-By: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20221111042653.45520-8-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
The functionality is implemented with per-chip callbacks, there are no users of this symbol, remove the code. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Acked-By: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20221111042653.45520-7-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
The number of links is stored in different registers depending on the IP version, add sdw_check_lcount() callback. This callback only checks that the number of links supported in hardware is compatible with the number of links exposed in ACPI _DSD properties. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20221111042653.45520-6-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
There's no real rationale for enabling the SoundWire interrupt in the init, this can be done from the enable_sdw_irq() callback. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20221111042653.45520-5-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
The offsets and sequences are identical for interrupt enabling and disabling, we can refactor the code with a single routine and a boolean. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20221111042653.45520-4-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Different generations of Intel hardware rely on different programming sequences to enable SoundWire IP. In existing hardware, the SoundWire interrupt is enabled with a register field in the DSP register space. With HDaudio multi-link extensions registers, the SoundWire interrupt will be enabled with a generic interrupt enable field in LCTL, without any dependency on the DSP being enabled. Add a per-chip callback following the example of the check_sdw_irq() model already upstream. Note that the callback is not populated yet for MeteorLake (MTL) since the interrupts are already enabled in the init. A follow-up patch will move the functionality to this callback after a couple of cleanups. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20221111042653.45520-3-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
When the code reaches the SoundWire interrupt thread handling, the interrupt was enabled already, and there is no code that disables it -> this is a no-op sequence. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Acked-By: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20221111042653.45520-2-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: Two fixes that are result of the recent discussions [1][2]. First adds missing locking around snd_pcm_stop() while the second fix sets substream state to DISCONNECTED if any suspend/resume related operation fails so that userspace has means to be aware that something went wrong during said operation.
-
Richard Fitzgerald authored
For a BE link snd_soc_link_be_hw_params_fixup() is called by dpcm_be_dai_hw_params() to initialize the params before it passes them to __soc_pcm_hw_params(). Then __soc_pcm_hw_params() refines params to match the BE codec and passes that to snd_soc_dai_hw_params(). The second call of snd_soc_link_be_hw_params_fixup() within snd_soc_dai_hw_params() was overwriting the refined params with the original BE CPU DAI params. This would then lead to various problems, for example passing an invalid number of channels to the codec driver hw_params(), or enabling more AIF widgets on the codec than are actually mapped by TDM slots. These errors may not be noticed on a simple 1:1 link between one CPU DAI and one codec DAI, because most likely they have the same DAI config (though this is not necessarily true, for example if the CPU end has dummy TDM slots to achieve a desirable BCLK). For 1:N mappings there are likely to be multiple codecs using different subsets of the TDM slots and this overwriting of the refined params can cause incorrect configuration of each codec on the link. The erroneous extra call to the BE fixup function() was introduced by: commit a655de80 ("ASoC: core: Allow topology to override machine driver FE DAI link config.") at that time, the call to the BE fixup was already done by dpcm_be_dai_hw_params(), which was introduced several years earlier by: commit 01d7584c ("ASoC: dpcm: Add Dynamic PCM core operations.") The erroneous code has changed and moved to a different source file since the patch that introduced it, so this fix patch won't directly apply as a fix on top of code older than: commit 8b4ba1d3 ("ASoC: soc-dai: fix up hw params only if it is needed") though it can be applied with some minor adjustment to code before that patch but after: commit aa6166c2 ("ASoC: soc-dai: mv soc_dai_hw_params() to soc-dai") On any tree older than that the code is in soc-pcm.c. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20221104160252.166114-1-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
Some HALO-based codecs need some additional custom setup in the pre_run stage of cs_dsp. Implement the callback in wm_adsp to call an optional codec driver callback. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20221109165331.29332-11-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 22 Nov, 2022 11 commits
-
-
Cezary Rojewski authored
To improve performance and overall system stability, suspend/resume operations for ASoC cards always return success status and defer the actual work. Because of that, if a substream fails to resume, userspace may still attempt to invoke commands on it as from their perspective the operation completed successfully. Set substream's state to DISCONNECTED to ensure no further commands are attempted. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221116115550.1100398-3-cezary.rojewski@intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Cezary Rojewski authored
snd_pcm_stop() shall be called with stream lock held to prevent any races between nonatomic streaming operations. Fixes: 2f1f570c ("ASoC: Intel: avs: Coredump and recovery flow") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221116115550.1100398-2-cezary.rojewski@intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Alicja Michalska authored
KBL platform is missing the definition of 'max98357a' audio amplifier. This amplifier is used on many KBL Chromebooks, for instance variant 'nami' of 'Google/poppy' baseboard. Reported-by: CoolStar <coolstarorganization@gmail.com> Signed-off-by: Alicja Michalska <ahplka19@gmail.com> Link: https://lore.kernel.org/r/Y3wHyJ/EcsLRHGr3@toraSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: Add Dell SKU 0C11 support with rt1318 codec.
-
Gongjun Song authored
Audio hardware configuration of SKU 0C11 product is rt711 on link0, two rt1318s on link1 and link2, rt714 on link3 Signed-off-by: Gongjun Song <gongjun.song@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20221117002758.496211-4-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Gongjun Song authored
SKU 0C11 product supports a SoundWire headset codec, SoundWire capture from local microphones and two SoundWire amplifiers. Signed-off-by: Gongjun Song <gongjun.song@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20221117002758.496211-3-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Gongjun Song authored
Add rt1318 sdca codec support in sof_sdw machine driver. Signed-off-by: Gongjun Song <gongjun.song@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20221117002758.496211-2-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Lili Li authored
Commit e4746d94 ("ASoC: Intel: Skylake: Introduce HDA codec init and exit routines") introduced HDA codec init routine which depends on SND_HDA. Select SND_SOC_HDAC_HDA unconditionally to fix following compile error: ERROR: modpost: "snd_hda_codec_device_init" [sound/soc/intel/skylake/snd-soc-skl.ko] undefined! Fixes: e4746d94 ("ASoC: Intel: Skylake: Introduce HDA codec init and exit routines") Reviewed-by: Junxiao Chang <junxiao.chang@intel.com> Suggested-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Lili Li <lili.li@intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221121104742.1007486-1-lili.li@intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
David Lin authored
This patch is to use saradc to check the jack type when auto detection is still failure. Signed-off-by: David Lin <CTLIN0@nuvoton.com> Link: https://lore.kernel.org/r/20221122073855.43024-2-CTLIN0@nuvoton.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
David Lin authored
This patch is to rasie up internal clock during jack detection. The fast clock will accelerate charge and discharge effect. So this mechanism will make jack detection more robust. Signed-off-by: David Lin <CTLIN0@nuvoton.com> Link: https://lore.kernel.org/r/20221122073855.43024-1-CTLIN0@nuvoton.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Gongjun Song authored
SKU 0C4F product supports a SoundWire headset codec, SoundWire capture from local microphones and two SoundWire amplifiers. Signed-off-by: Gongjun Song <gongjun.song@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20221122052052.687281-1-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 18 Nov, 2022 1 commit
-
-
Cezary Rojewski authored
Flows leading to link->init() and link->exit() are not symmetric. Currently the relevant part of card probe sequence goes as: for_each_card_rtds(card, rtd) for_each_rtd_components(rtd, i, component) component->probe() for_each_card_rtds(card, rtd) for_each_rtd_dais(rtd, i, dai) dai->probe() for_each_card_rtds(card, rtd) rtd->init() On the other side, equivalent remove sequence goes as: for_each_card_rtds(card, rtd) for_each_rtd_dais(rtd, i, dai) dai->remove() for_each_card_rtds(card, rtd) for_each_rtd_components(rtd, i, component) component->remove() for_each_card_rtds(card, rtd) rtd->exit() what can lead to errors as link->exit() may still operate on resources owned by its components despite the probability of them being freed during the component->remove(). This change modifies the remove sequence to: for_each_card_rtds(card, rtd) rtd->exit() for_each_card_rtds(card, rtd) for_each_rtd_dais(rtd, i, dai) dai->remove() for_each_card_rtds(card, rtd) for_each_rtd_components(rtd, i, component) component->remove() so code found in link->exit() is safe to touch any component stuff as component->remove() has not been called yet. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20221027085840.1562698-1-cezary.rojewski@intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-