#
d110858a |
|
21-Dec-2023 |
Stefan Binding <sbinding@opensource.cirrus.com> |
ALSA: hda: cs35l41: Prevent firmware load if SPI speed too low Some laptops without _DSD have the SPI speed set very low in the BIOS. Since the SPI controller uses this speed as its max speed, the SPI transactions are very slow. Firmware download writes to many registers, and if the SPI speed is too slow, it can take a long time to download. For this reason, disable firmware loading if the maximum SPI speed is too low. Without Firmware, audio playback will work, but the volume will be low to ensure safe operation of the CS35L41. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Cc: <stable@vger.kernel.org> # v6.7+ Link: https://lore.kernel.org/r/20231221132518.3213-3-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
8c4c216d |
|
18-Dec-2023 |
Stefan Binding <sbinding@opensource.cirrus.com> |
ALSA: hda: cs35l41: Add config table to support many laptops without _DSD This make use of the CS35L41 HDA Property framework, which supports laptops which do not have the _DSD properties in their ACPI. Add configuration table to be able to use a generic function which allows laptops to be supported just by adding an entry into the table. Use configuration table function for existing system 103C89C6. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231218151221.388745-2-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
447106e9 |
|
21-Sep-2023 |
Stefan Binding <sbinding@opensource.cirrus.com> |
ALSA: hda: cs35l41: Support mute notifications for CS35L41 HDA Some laptops require a hardware based mute system, where when a hotkey is pressed, it forces the amp to be muted. For CS35L41, when the hotkey is pressed, an acpi notification is sent to the CS35L41 Device Node. The driver needs to handle this notification and call a _DSM function to retrieve the mute state. Since the amp is only muted during playback, the driver will only mute or unmute if playback is occurring, otherwise it will save the mute state for when playback starts. This uses the ACPI Notification mechanism, where a handler has been registered in the component master, which notifies each amp through the component binding. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230921162849.1988124-4-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
ef4ba63f |
|
15-Aug-2023 |
Stefan Binding <sbinding@opensource.cirrus.com> |
ALSA: hda: cs35l41: Support systems with missing _DSD properties Some systems using CS35L41 with HDA were released without some required _DSD properties in ACPI. To support these special cases, add an api to configure the correct properties for systems with this issue. This initial commit moves the no _DSD support for Lenovo Legion Laptops (CLSA0100, CLSA0101) into a new framework which can be extended to support additional laptops in the future. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230815161033.3519-1-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
47ceabd9 |
|
29-Jun-2022 |
Stefan Binding <sbinding@opensource.cirrus.com> |
ALSA: hda: cs35l41: Support Firmware switching and reloading This is required to support CS35L41 calibration. By default, speaker protection firmware will be loaded, if available. However, different firmware is required to run the calibration sequence, so it is necessary to add support to be able to unload, switch and reload firmware. This patch adds 2 ALSA Controls for each amp: "DSP1 Firmware Load" "DSP1 Firmware Type" "DSP1 Firmware Load" can be used to unload and load the firmware. "DSP1 Firmware Type" can be used to switch the target firmware to be loaded by "DSP1 Firmware Load" Since loading firmware can add new ALSA controls, it is necessary to ensure the firmware loading is run asynchronously from the ALSA control itself to prevent deadlocks. Note: When switching between firmwares, an ALSA control is only added if it has not previously existed. If it had existed previously, it will be re-enabled instead. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-14-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
3e34e2ae |
|
29-Jun-2022 |
Stefan Binding <sbinding@opensource.cirrus.com> |
ALSA: hda: cs35l41: Read Speaker Calibration data from UEFI variables Speaker Calibration data, specific to an individual speaker is stored inside UEFI variables during calibration, and can be used by the DSP. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-11-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
1873ebd3 |
|
29-Jun-2022 |
Stefan Binding <sbinding@opensource.cirrus.com> |
ALSA: hda: cs35l41: Support Hibernation during Suspend CS35L41 supports hibernation during suspend when using DSP firmware. When the driver suspends it will hibernate the part, if firmware is running, and resume will wake from hibernation. CS35L41 driver will suspend/resume when requested by hda driver. Note that suspend/resume and hibernation is only supported when firmware is running. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-10-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
63f4b99f |
|
29-Jun-2022 |
Stefan Binding <sbinding@opensource.cirrus.com> |
ALSA: hda: cs35l41: Support Speaker ID for laptops Some Laptops use a number of gpios to define which vendor is used for a particular laptop. Different coefficient files are used for different vendors. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-9-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
e99f3c7e |
|
29-Jun-2022 |
Stefan Binding <sbinding@opensource.cirrus.com> |
ALSA: hda: cs35l41: Save Subsystem ID inside CS35L41 Driver The Subsystem ID is read from the HDA driver, and will be used by the CS35L41 driver to be able to uniquely identify the laptop, which is required to be able to define firmware to be used by specific models. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-6-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
2e81e1ff |
|
29-Jun-2022 |
Vitaly Rodionov <vitaly.rodionov@cirrus.com> |
ALSA: hda: cs35l41: Add initial DSP support and firmware loading This patch adds support for the CS35L41 DSP. The DSP allows for extra features, such as running speaker protection algorithms and hibernations. To utilize these features, the driver must load firmware into the DSP, as well as various tuning files which allow for customization for specific models. [ Slightly simplified Kconfig changes by tiwai ] Signed-off-by: Vitaly Rodionov <vitaly.rodionov@cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-5-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
22d5cbd2 |
|
29-Jun-2022 |
Stefan Binding <sbinding@opensource.cirrus.com> |
ALSA: hda: cs35l41: Save codec object inside component struct This is required for ALSA control support. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220630002335.366545-4-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
00f87ec7 |
|
09-May-2022 |
Stefan Binding <sbinding@opensource.cirrus.com> |
ALSA: hda: cs35l41: Add Amp Name based on channel and index This will be used to identify ALSA controls and firmware. The Amp Name will be a channel identifier (L or R), and an index, which identifies which amp for that channel. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220509214703.4482-10-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
aa4a38af |
|
09-May-2022 |
Stefan Binding <sbinding@opensource.cirrus.com> |
ALSA: hda: cs35l41: Add Support for Interrupts The CS35L41 can produce interrupts on error. When the interrupts occur, the driver will report the error, but errors will only be fixed after playback finishes. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220509214703.4482-5-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
fabcf7f1 |
|
13-Apr-2022 |
Lucas Tanure <tanureal@opensource.cirrus.com> |
ALSA: hda: cs35l41: Remove cs35l41_hda_reg_sequence struct Remove cs35l41_hd_reg_sequence as it adds a layer of flexibility not needed. As cs35l41_hda_(start/stop)_bst is a single register, it can be replaced by regmap_update_bits with usleep_range to wait for the same 3000us that reg_sequence had. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-12-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
f7f20737 |
|
13-Apr-2022 |
Lucas Tanure <tanureal@opensource.cirrus.com> |
ALSA: cs35l41: Unify hardware configuration 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.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
85c25662 |
|
17-Jan-2022 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
ALSA: hda: cs35l41: Make cs35l41_hda_remove() return void Up to now cs35l41_hda_remove() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c and spi remove callbacks is ignored anyway. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220117220055.120955-1-u.kleine-koenig@pengutronix.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
8c286a0f |
|
17-Jan-2022 |
Lucas Tanure <tanureal@opensource.cirrus.com> |
ALSA: hda: cs35l41: Tidyup code Clean up and simplify cs35l41_hda_bind function Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220117160830.709403-6-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
7b2f3eb4 |
|
17-Dec-2021 |
Lucas Tanure <tanureal@opensource.cirrus.com> |
ALSA: hda: cs35l41: Add support for CS35L41 in HDA systems Add support for CS35L41 using a new separated driver that can be used in all upcoming designs Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211217115708.882525-8-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
|