diff options
author | Simon Trimmer <simont@opensource.cirrus.com> | 2024-06-18 15:00:11 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-06-18 16:26:55 +0200 |
commit | 634f3b4e7dde3827e3b81306416ec306b323e39b (patch) | |
tree | 29bc17c24f4a313b550d59677ad28469a6250e9c /sound/pci/hda/cs35l56_hda.h | |
parent | ALSA: spi: Drop NULL check for snd_ctl_remove() (diff) | |
download | linux-634f3b4e7dde3827e3b81306416ec306b323e39b.tar.xz linux-634f3b4e7dde3827e3b81306416ec306b323e39b.zip |
ALSA: hda: cs35l56: Perform firmware download in the background
It is possible that during system boot when there multiple devices
attempting simultaneous initialization on a slow control bus the
download of firmware and tuning data may take a user perceivable amount
of time (a slow I2C bus with 4 amps this work could take over 2
seconds).
Adopt a pattern used in the ASoC driver and perform this activity in a
background thread so that interactive performance is not impaired. The
system_long_wq is a parallel workqueue and driver instances will perform
their firmware downloads in parallel to make best use of available bus
bandwidth.
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/20240618130011.62860-1-simont@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to '')
-rw-r--r-- | sound/pci/hda/cs35l56_hda.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/hda/cs35l56_hda.h b/sound/pci/hda/cs35l56_hda.h index 464e4aa63cd1..c40d159507c2 100644 --- a/sound/pci/hda/cs35l56_hda.h +++ b/sound/pci/hda/cs35l56_hda.h @@ -14,6 +14,7 @@ #include <linux/firmware/cirrus/cs_dsp.h> #include <linux/firmware/cirrus/wmfw.h> #include <linux/regulator/consumer.h> +#include <linux/workqueue.h> #include <sound/cs35l56.h> struct dentry; @@ -21,6 +22,8 @@ struct dentry; struct cs35l56_hda { struct cs35l56_base base; struct hda_codec *codec; + struct work_struct dsp_work; + struct work_struct control_work; int index; const char *system_name; |