ALSA: hda: cs35l41: Prevent firmware load if SPI speed too low
authorStefan Binding <sbinding@opensource.cirrus.com>
Thu, 21 Dec 2023 13:25:17 +0000 (13:25 +0000)
committerTakashi Iwai <tiwai@suse.de>
Fri, 29 Dec 2023 13:28:29 +0000 (14:28 +0100)
commitd110858a6925827609d11db8513d76750483ec06
tree2453efe3723baa170fad3e1967002f1ab07281e9
parentee694e7db47e1af00ffb29f569904a9ed576868f
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>
sound/pci/hda/cs35l41_hda.c
sound/pci/hda/cs35l41_hda.h
sound/pci/hda/cs35l41_hda_i2c.c
sound/pci/hda/cs35l41_hda_property.c
sound/pci/hda/cs35l41_hda_spi.c