summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/cs35l41_hda.h
diff options
context:
space:
mode:
authorVitaly Rodionov <vitaly.rodionov@cirrus.com>2022-06-30 02:23:25 +0200
committerTakashi Iwai <tiwai@suse.de>2022-07-14 11:22:55 +0200
commit2e81e1fffd53ba108481f2f14388b628884efe61 (patch)
tree3b8ebaf3fcd21dd2bdbf40838c8a383de98d4a47 /sound/pci/hda/cs35l41_hda.h
parentALSA: hda: cs35l41: Save codec object inside component struct (diff)
downloadlinux-2e81e1fffd53ba108481f2f14388b628884efe61.tar.xz
linux-2e81e1fffd53ba108481f2f14388b628884efe61.zip
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>
Diffstat (limited to 'sound/pci/hda/cs35l41_hda.h')
-rw-r--r--sound/pci/hda/cs35l41_hda.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/pci/hda/cs35l41_hda.h b/sound/pci/hda/cs35l41_hda.h
index aaf9e16684c2..5814af050944 100644
--- a/sound/pci/hda/cs35l41_hda.h
+++ b/sound/pci/hda/cs35l41_hda.h
@@ -15,6 +15,9 @@
#include <linux/device.h>
#include <sound/cs35l41.h>
+#include <linux/firmware/cirrus/cs_dsp.h>
+#include <linux/firmware/cirrus/wmfw.h>
+
enum cs35l41_hda_spk_pos {
CS35l41_LEFT,
CS35l41_RIGHT,
@@ -39,7 +42,17 @@ struct cs35l41_hda {
int channel_index;
unsigned volatile long irq_errors;
const char *amp_name;
+ struct mutex fw_mutex;
struct regmap_irq_chip_data *irq_data;
+ bool firmware_running;
+ bool halo_initialized;
+ struct cs_dsp cs_dsp;
+};
+
+enum halo_state {
+ HALO_STATE_CODE_INIT_DOWNLOAD = 0,
+ HALO_STATE_CODE_START,
+ HALO_STATE_CODE_RUN
};
int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int irq,