aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/sdca/sdca_class_function.c
AgeCommit message (Collapse)AuthorFilesLines
2026-04-09ASoC: Yet another round of SDCA fixesMark Brown1-0/+17
Charles Keepax <ckeepax@opensource.cirrus.com> says: Another round of SDCA fixes a couple of fix to the IRQ cleanup from Richard, and a minor tweak to the IRQ handling from me.
2026-04-08ASoC: SDCA: Unregister IRQ handlers on module removeRichard Fitzgerald1-1/+9
Ensure that all interrupt handlers are unregistered before the parent regmap_irq is unregistered. sdca_irq_cleanup() was only called from the component_remove(). If the module was loaded and removed without ever being component probed the FDL interrupts would not be unregistered and this would hit a WARN when devm called regmap_del_irq_chip() during the removal of the parent IRQ. Fixes: 4e53116437e9 ("ASoC: SDCA: Fix errors in IRQ cleanup") Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260408093835.2881486-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-06ASoC: SDCA: Fix errors in IRQ cleanupCharles Keepax1-0/+9
IRQs are enabled through sdca_irq_populate() from component probe using devm_request_threaded_irq(), this however means the IRQs can persist if the sound card is torn down. Some of the IRQ handlers store references to the card and the kcontrols which can then fail. Some detail of the crash was explained in [1]. Generally it is not advised to use devm outside of bus probe, so the code is updated to not use devm. The IRQ requests are not moved to bus probe time as it makes passing the snd_soc_component into the IRQs very awkward and would the require a second step once the component is available, so it is simpler to just register the IRQs at this point, even though that necessitates some manual cleanup. Link: https://lore.kernel.org/linux-sound/20260310183829.2907805-1-gaggery.tsai@intel.com/ [1] Fixes: b126394d9ec6 ("ASoC: SDCA: Generic interrupt support") Reported-by: Gaggery Tsai <gaggery.tsai@intel.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260316141449.2950215-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-03ASoC: SDCA: Add RJ support to class driverCharles Keepax1-1/+11
Add the retaskable jack Function to the list of Functions supported by the class driver, it shouldn't require anything that isn't already supported. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260327162732.877257-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-21ASoC: SDCA: Add NO_DIRECT_COMPLETE flag to class driverCharles Keepax1-0/+2
The SDCA class driver currently expects the device will be fully powered down on system suspend but not on runtime suspend. This is typically required as when audio is not active (ie. runtime suspend) jack detect is expected to still function, but when the whole system is hibernated there is no need to recognise audio jack events. This means the class driver needs to always be informed of a system suspend, so the direct complete optimisation (where PM will skip calling system suspend if the device is runtime suspended) is not appropriate for the SDCA class driver. Add the NO_DIRECT_COMPLETE flag to prevent this optimisation from running against this driver. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> link: https://github.com/thesofproject/linux/blob/ec0e6c69113f4b342ee8eabec286dea33d98a7cc/drivers/soundwire/intel_auxdevice.c#L568 Link: https://patch.msgid.link/20260115131727.373738-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-14ASoC: SDCA: Add lock to serialise the Function initialisationCharles Keepax1-0/+5
To avoid issues on some devices serialise the boot of each SDCA Function from the others. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20260109145206.3456151-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-14ASoC: SDCA: Device boot into the system suspend processCharles Keepax1-22/+50
When system suspending the device may be powered off, this means all state will be lost and the firmware may need to be re-downloaded. Add the necessary calls to bring the device back up. This also requires that that the FDL (firmware download) IRQ handler is modified to allow it to run before runtime PM has been fully restored. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20260109145206.3456151-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-14ASoC: SDCA: Add basic system suspend supportCharles Keepax1-0/+51
Add basic system suspend support. Disable the IRQs and force runtime suspend, during system suspend, because the device will likely fully power down during suspend. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20260109145206.3456151-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22ASoC: SDCA: Add ASoC jack hookup in class driverCharles Keepax1-0/+13
Add the necessary calls to the class driver to connect the ASoC jack from the machine driver. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20251215153650.3913117-4-ckeepax@opensource.cirrus.com Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-20ASoC: SDCA: Add basic SDCA function driverCharles Keepax1-0/+460
Add a driver to support the individual SDCA functions within the class driver. Use the SDCA helpers to parse the DisCo information and register a function driver based on those properties. Manage the boot of the function, reset, FDL, defaults. Manage the function level register map. Co-developed-by: Maciej Strozek <mstrozek@opensource.cirrus.com> Tested-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Maciej Strozek <mstrozek@opensource.cirrus.com> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Tested-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20251120153023.2105663-14-ckeepax@opensource.cirrus.com Reviewed-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>