An error occurred fetching the project authors.
- 11 Sep, 2023 5 commits
-
-
Cristian Ciocaltea authored
Use dev_err_probe() helper where possible, to simplify error handling during probe. Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by:
Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20230907171010.1447274-8-cristian.ciocaltea@collabora.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Cristian Ciocaltea authored
According to the documentation, drivers are responsible for undoing at removal time all runtime PM changes done during probing. Hence, add the missing calls to pm_runtime_dont_use_autosuspend(), which are necessary for undoing pm_runtime_use_autosuspend(). Note this would have been handled implicitly by devm_pm_runtime_enable(), but there is a need to continue using pm_runtime_enable()/pm_runtime_disable() in order to ensure the runtime PM is disabled as soon as the remove() callback is entered. Fixes: f517ba49 ("ASoC: cs35l41: Add support for hibernate memory retention mode") Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by:
Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20230907171010.1447274-7-cristian.ciocaltea@collabora.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Cristian Ciocaltea authored
The interrupt handler invokes pm_runtime_get_sync() without checking the returned error code. Add a proper verification and switch to pm_runtime_resume_and_get(), to avoid the need to call pm_runtime_put_noidle() for decrementing the PM usage counter before returning from the error condition. Fixes: f517ba49 ("ASoC: cs35l41: Add support for hibernate memory retention mode") Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by:
Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20230907171010.1447274-6-cristian.ciocaltea@collabora.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Cristian Ciocaltea authored
Enabling the active/passive shared boosts requires setting SYNC_EN, but *not* before receiving the PLL Lock signal. Due to improper error handling, it was not obvious that waiting for the completion operation times out and, consequently, the shared boost is never activated. Further investigations revealed the signal is triggered while snd_pcm_start() is executed, right after receiving the SNDRV_PCM_TRIGGER_START command, which happens long after the SND_SOC_DAPM_PRE_PMU event handler is invoked as part of snd_pcm_prepare(). That is where cs35l41_global_enable() is called from. Increasing the wait duration doesn't help, as it only causes an unnecessary delay in the invocation of snd_pcm_start(). Moving the wait and the subsequent regmap operations to the SNDRV_PCM_TRIGGER_START callback is not a solution either, since they would be executed in an IRQ-off atomic context. Solve the issue by setting the SYNC_EN bit in PWR_CTRL3 register right after receiving the PLL Lock interrupt. Additionally, drop the unnecessary writes to PWR_CTRL1 register, part of the original mdsync_up_seq, which would have toggled GLOBAL_EN with unwanted consequences on PLL locking behavior. Fixes: f5030564 ("ALSA: cs35l41: Add shared boost feature") Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by:
David Rhodes <david.rhodes@cirrus.com> Reviewed-by:
Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20230907171010.1447274-5-cristian.ciocaltea@collabora.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Cristian Ciocaltea authored
Technically, an interrupt handler can be called before probe() finishes its execution, hence ensure the pll_lock completion object is always initialized before being accessed in cs35l41_irq(). Fixes: f5030564 ("ALSA: cs35l41: Add shared boost feature") Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by:
Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20230907171010.1447274-4-cristian.ciocaltea@collabora.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
- 23 Aug, 2023 1 commit
-
-
Charles Keepax authored
The current analog gain TLV seems to have completely incorrect values in it. The gain starts at 0.5dB, proceeds in 1dB steps, and has no mute value, correct the control to match. Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230823085308.753572-1-ckeepax@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
- 24 Jul, 2023 2 commits
-
-
Stefan Binding authored
To ensure the chip has correctly powered up or down before continuing, the driver will now poll a register, rather than wait a fixed delay. Acked-by:
Mark Brown <broonie@kernel.org> Signed-off-by:
Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230721151816.2080453-3-sbinding@opensource.cirrus.comSigned-off-by:
Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
To enable the speaker output in external boost mode, 2 registers must be set, one after another. The longer the time between the writes of the two registers, the more likely, and more loudly a pop may occur. To minimize this, an mbox command can be used to allow the firmware to perform this action, minimizing any delay between write, thus minimizing any pop or click as a result. The old method will remain when running without firmware. Acked-by:
Mark Brown <broonie@kernel.org> Signed-off-by:
Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230721151816.2080453-2-sbinding@opensource.cirrus.comSigned-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 20 Mar, 2023 1 commit
-
-
Jianhua Lu authored
There are 8 cs35l41 speaker amplifier connected to TDM in my Xiaomi Mi Pad 5 Pro tablet. In this case, it's necessary to set 12288000 (48000 * 32 * 8) clk freq for it. rate=48000, slot_width=32, slots=8. Signed-off-by:
Jianhua Lu <lujianhua000@gmail.com> Reviewed-by:
David Rhodes <David.Rhodes@cirrus.com> Link: https://lore.kernel.org/r/20230318141440.29023-1-lujianhua000@gmail.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
- 09 Mar, 2023 1 commit
-
-
Lucas Tanure authored
Add support for Steam Deck bios old properties. If a Steam deck didn't upgrade the BIOS, the driver should be able to handle the previous properties for shared boost types. Signed-off-by:
Lucas Tanure <lucas.tanure@collabora.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230309140051.945329-1-lucas.tanure@collabora.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
- 05 Mar, 2023 3 commits
-
-
Lucas Tanure authored
Shared boost allows two amplifiers to share a single boost circuit by communicating on the MDSYNC bus. The passive amplifier does not control the boost and receives data from the active amplifier. Shared Boost is not supported in HDA Systems. Based on David Rhodes shared boost patches. Signed-off-by:
Lucas Tanure <lucas.tanure@collabora.com> Reviewed-by:
David Rhodes <david.rhodes@cirrus.com> Link: https://lore.kernel.org/r/20230223084324.9076-4-lucas.tanure@collabora.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Lucas Tanure authored
Add cs35l41_error_release function to handle error release sequences. Signed-off-by:
Lucas Tanure <lucas.tanure@collabora.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by:
David Rhodes <david.rhodes@cirrus.com> Link: https://lore.kernel.org/r/20230223084324.9076-3-lucas.tanure@collabora.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Lucas Tanure authored
In error situations, only the internal boost case should be disabled and re-enabled. Also, for other boost cases re-enabling the boost to the default internal boost config is incorrect. Fixes: 6450ef55 ("ASoC: cs35l41: CS35L41 Boosted Smart Amplifier") Signed-off-by:
Lucas Tanure <lucas.tanure@collabora.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by:
David Rhodes <david.rhodes@cirrus.com> Link: https://lore.kernel.org/r/20230223084324.9076-2-lucas.tanure@collabora.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
- 15 Jul, 2022 1 commit
-
-
Stefan Binding authored
When loading firmware, wm_adsp uses a number of parameters to determine the path of the firmware and tuning files to load. One of these parameters is system_name. Add support in cs35l41 to read this system name from the ACPI _SUB ID in order to uniquely identify the firmware and tuning mapped to a particular system. Signed-off-by:
Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220707151037.3901050-3-sbinding@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
- 24 Jun, 2022 1 commit
-
-
Charles Keepax authored
Various boolean controls on cs35l41 are missing the required "Switch" in the name, add these. Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220621102041.1713504-3-ckeepax@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
- 21 Jun, 2022 1 commit
-
-
Charles Keepax authored
Various boolean controls on cs35l41 are missing the required "Switch" in the name, add these. Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220621102041.1713504-3-ckeepax@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
- 06 Jun, 2022 2 commits
-
-
Stefan Binding authored
Since the CS35L41 HDA driver also support hibernation, it makes sense to move code from the ASoC driver to enter hibernation into common code. Since HDA must support laptops which do not support hibernation due to lack of external boost GPIO it is necessary to ensure the function returns an error when an unsupported boost type is in use. Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by:
Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by:
Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220525131638.5512-12-vitalyr@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Stefan Binding authored
CS35L41 HDA Driver will support hibernation using DSP firmware, move the exit hibernate function into shared code so this can be reused. Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by:
Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by:
Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220525131638.5512-10-vitalyr@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
- 16 May, 2022 3 commits
-
-
Stefan Binding authored
This can then be used by HDA code to configure cs_dsp. Signed-off-by:
Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by:
Vitaly Rodionov <vitalyr@opensource.cirrus.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220509214703.4482-9-vitalyr@opensource.cirrus.comSigned-off-by:
Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
This sequence is required to setup firmware, and will be needed for hda driver. Signed-off-by:
Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by:
Vitaly Rodionov <vitalyr@opensource.cirrus.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220509214703.4482-8-vitalyr@opensource.cirrus.comSigned-off-by:
Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
This function is used to control the DSP Firmware for cs35l41, and will be needed by the cs35l41 hda driver, when firmware support is added. Signed-off-by:
Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by:
Vitaly Rodionov <vitalyr@opensource.cirrus.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220509214703.4482-7-vitalyr@opensource.cirrus.comSigned-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 09 May, 2022 1 commit
-
-
Charles Keepax authored
The endianness flag is used on the CODEC side to specify an ambivalence to endian, typically because it is lost over the hardware link. This device receives audio over an I2S DAI and as such should have endianness applied. Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220504170905.332415-15-ckeepax@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
- 13 Apr, 2022 4 commits
-
-
Lucas Tanure authored
Add support for external boost voltage, where GPIO1 must control a switch to isolate CS35L41 from the external Boost Voltage Signed-off-by:
Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by:
Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220413083728.10730-17-tanureal@opensource.cirrus.comSigned-off-by:
Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
ASoC and HDA can use a single function to configure the chip gpios. Signed-off-by:
Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-4-tanureal@opensource.cirrus.comSigned-off-by:
Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
The driver can receive an empty hw_config, so mark as valid if successfully read from device tree/ACPI or set by the driver itself. Platforms not marked with a valid hw config will not be supported. Signed-off-by:
Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-3-tanureal@opensource.cirrus.comSigned-off-by:
Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
Both ASoC and HDA require to configure the GPIOs and Boost, so create a single shared struct for hardware configuration. Signed-off-by:
Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-2-tanureal@opensource.cirrus.comSigned-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 07 Mar, 2022 5 commits
-
-
Lucas Tanure authored
cs35l41_private is not used on cs35l41_handle_pdata Signed-off-by:
Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220304150721.3802-5-tanureal@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Lucas Tanure authored
This device only has 4 TX channels. Fixes: fe1024d5 ("ASoC: cs35l41: Combine adjacent register writes") Signed-off-by:
Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220304150721.3802-3-tanureal@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Lucas Tanure authored
Global enable must happen before CSPL_MBOX_CMD_RESUME command is sent. Move it to PRE_PMU as both events use SND_SOC_DAPM_OUT_DRV_E macro. Signed-off-by:
Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220303173059.269657-4-tanureal@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Lucas Tanure authored
This device only has 4 TX channels. Fixes: fe1024d5 ("ASoC: cs35l41: Combine adjacent register writes") Signed-off-by:
Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220303173059.269657-3-tanureal@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
David Rhodes authored
Fix GPIO2 polarity and direction configuration Fixes: fe1024d5 ("ASoC: cs35l41: Combine adjacent register writes") Signed-off-by:
David Rhodes <drhodes@opensource.cirrus.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220303173059.269657-2-tanureal@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
- 07 Jan, 2022 2 commits
-
-
Charles Keepax authored
The cs35l41 supports a low power DSP memory retention mode. Add support for entering this mode when then device is not in use. Co-authored-by:
David Rhodes <david.rhodes@cirrus.com> Signed-off-by:
David Rhodes <david.rhodes@cirrus.com> Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220107160636.6555-3-ckeepax@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
In preparation for the addition of PM runtime support move the test key out of the register patches themselves. This is necessary to allow the test key to be held during cache synchronisation, which is required by the OTP settings which were unpacked from the device and written by the driver. Also whilst at it, the driver uses a mixture of accessing the test key register by name and by address, consistently use the name. Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220107160636.6555-2-ckeepax@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
- 05 Jan, 2022 2 commits
-
-
Charles Keepax authored
The wm_adsp_event should be called before the early_event on power down, event stops the core running and early_event then powers down the core. Additionally, the core should only be stopped if it was actually running in the first place. Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220105113026.18955-4-ckeepax@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
The IRQ is not used for the PDN_DONE bit, this is polled during the DAPM sequence, remove the misleading comment. Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220105113026.18955-3-ckeepax@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
- 31 Dec, 2021 5 commits
-
-
Lucas Tanure authored
ASoC and HDA will use the same registers to configure internal boost for the device Signed-off-by:
Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211217115708.882525-7-tanureal@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Lucas Tanure authored
ASoC and HDA will use the same register to set channels for the device Signed-off-by:
Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211217115708.882525-6-tanureal@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Lucas Tanure authored
ASoC and HDA systems require the same errata patches, so move it to the shared code using a function the correctly applies the patches by revision Also, move CS35L41_DSP1_CCM_CORE_CTRL write to errata patch function as is required to be written at boot, but not in regmap_register_patch sequence as will affect waking up from hibernation Signed-off-by:
Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211217115708.882525-5-tanureal@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Lucas Tanure authored
ASoC and HDA systems for all revisions of CS35L41 will benefit from having this initialization, so add it to reg_sequence of each revision By moving to reg_sequence all gains are set to zero. And boost, monitoring parts, and class D amplifier are disabled. Signed-off-by:
Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211217115708.882525-4-tanureal@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-
Lucas Tanure authored
ASoC and HDA will do the same cs35l41_otp_unpack, so move it to shared code Signed-off-by:
Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211217115708.882525-3-tanureal@opensource.cirrus.comSigned-off-by:
Mark Brown <broonie@kernel.org>
-