summaryrefslogtreecommitdiff
path: root/sound/pci/hda/cs35l41_hda_spi.c
diff options
context:
space:
mode:
authorStefan Binding <sbinding@opensource.cirrus.com>2023-12-21 16:25:17 +0300
committerTakashi Iwai <tiwai@suse.de>2023-12-29 16:28:29 +0300
commitd110858a6925827609d11db8513d76750483ec06 (patch)
tree2453efe3723baa170fad3e1967002f1ab07281e9 /sound/pci/hda/cs35l41_hda_spi.c
parentee694e7db47e1af00ffb29f569904a9ed576868f (diff)
downloadlinux-d110858a6925827609d11db8513d76750483ec06.tar.xz
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>
Diffstat (limited to 'sound/pci/hda/cs35l41_hda_spi.c')
-rw-r--r--sound/pci/hda/cs35l41_hda_spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/cs35l41_hda_spi.c b/sound/pci/hda/cs35l41_hda_spi.c
index eb287aa5f782..b76c0dfd5fef 100644
--- a/sound/pci/hda/cs35l41_hda_spi.c
+++ b/sound/pci/hda/cs35l41_hda_spi.c
@@ -26,7 +26,7 @@ static int cs35l41_hda_spi_probe(struct spi_device *spi)
return -ENODEV;
return cs35l41_hda_probe(&spi->dev, device_name, spi_get_chipselect(spi, 0), spi->irq,
- devm_regmap_init_spi(spi, &cs35l41_regmap_spi));
+ devm_regmap_init_spi(spi, &cs35l41_regmap_spi), SPI);
}
static void cs35l41_hda_spi_remove(struct spi_device *spi)