summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/cs48l32.c
AgeCommit message (Collapse)Author
2025-07-04treewide: Remove redundantMark Brown
Merge series from Sakari Ailus <sakari.ailus@linux.intel.com>: Late last year I posted a set to switch to __pm_runtime_mark_last_busy() and gradually get rid of explicit pm_runtime_mark_last_busy() calls in drivers, embedding them in the appropriate pm_runtime_*autosuspend*() calls. The overall feedback I got at the time was that this is an unnecessary intermediate step, and removing the pm_runtime_mark_last_busy() calls can be done after adding them to the relevant Runtime PM autosuspend related functions.
2025-07-04ASoC: codecs: Remove redundant pm_runtime_mark_last_busy() callsSakari Ailus
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy(). Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Link: https://patch.msgid.link/20250704075456.3222642-1-sakari.ailus@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: cs48l32: Fix a signedness bug in cs48l32_hw_params()Harshit Mogalapalli
There is a type promotion that can happen when freq(u32) variable is comapared with sclk_target(integer), when sclk_target is a negative value it promotes to a large postive integer which might not be a problem in this particular case as the condition evaluates to false when that happens, but bail out early when sclk_target has negative error codes. cs48l32_sclk_rates[i].freq >= sclk_target Fix this by adding a negative error check when snd_soc_tdm_params_to_bclk() fails Fixes: e2bcbf99d045 ("ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Link: https://patch.msgid.link/20250603214813.197346-1-harshit.m.mogalapalli@oracle.com Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-21ASoC: cs48l32: Use modern PM_OPSNathan Chancellor
When building for a platform that does not support CONFIG_PM, such as s390, cs48l32_runtime_{suspend,resume}() are unused because SET_RUNTIME_PM_OPS does not reference its argument when CONFIG_PM is not set: sound/soc/codecs/cs48l32.c:3822:12: error: 'cs48l32_runtime_suspend' defined but not used [-Werror=unused-function] 3822 | static int cs48l32_runtime_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/cs48l32.c:3779:12: error: 'cs48l32_runtime_resume' defined but not used [-Werror=unused-function] 3779 | static int cs48l32_runtime_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Use RUNTIME_PM_OPS and pm_ptr() to ensure these functions are seen as used by the compiler but be dropped in the final object file when CONFIG_PM is not set, matching the current behavior while clearing up the warnings. Fixes: e2bcbf99d045 ("ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250418-cs48l32-modern-pm_ops-v1-1-640559407619@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-16ASoC: cs48l32: Fix spelling mistake "exceeeds" -> "exceeds"Colin Ian King
There is a spelling mistake in a cs48l32_fll_err message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250416081204.36851-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-15ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSPRichard Fitzgerald
Add a codec driver for the Cirrus Logic CS48L32 audio DSP. The CS48L32 is a low-power audio DSP with microphone inputs for "Always on Voice" (i.e. voice trigger) and voice command processing. It has a programmable Halo Core DSP and a variety of power-efficient fixed-function audio processors, with configurable digital mixing and routing. There are two I2S/TDM audio serial ports. Four analogue inputs are available through IN1. These feed into a 2-channel ADC through an analogue mux. There is an ALSA control for each IN1 ADC channel to select which analogue input to use. A dedicated digital mic (DMIC) PDM input is available on IN2. Two PDM outputs can feed DMIC inputs on another codec or a host DMIC/PDM input. An on-board regulator provides a power supply or bias voltage to attached microphones. Three switchable MICBIAS outputs are fed from this allowing only the microphone in use to be powered-up. There are DAPM widgets for these outputs: MICBIAS1A, MICBIAS1B and MICBIAS1C. The machine driver must create a DAPM route from the required MICBIAS1x widget to the INn input widgets to make the MICBIAS switch on when the audio input is powered-up. For example if the microphone feeding CS48L32 pin IN1LN_1 is powered from MICBIAS1A, the machine driver must create the path: (sink) IN1LN_1 <----- (source) MICBIAS1A Co-developed-by: Stuart Henderson <stuarth@opensource.cirrus.com> Signed-off-by: Stuart Henderson <stuarth@opensource.cirrus.com> Co-developed-by: Qi Zhou <qi.zhou@cirrus.com> Signed-off-by: Qi Zhou <qi.zhou@cirrus.com> Co-developed-by: Piotr Stankiewicz <piotrs@opensource.cirrus.com> Signed-off-by: Piotr Stankiewicz <piotrs@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250415115016.505777-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>