]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: Intel: catpt: Specify image names in the device descriptor
authorCezary Rojewski <cezary.rojewski@intel.com>
Fri, 12 Dec 2025 10:38:57 +0000 (11:38 +0100)
committerMark Brown <broonie@kernel.org>
Sun, 14 Dec 2025 10:34:58 +0000 (19:34 +0900)
State files to load explicitly in the device descriptor instead of
hiding the details within a loading function. Apart from readability,
this also reduces the catpt module size slightly.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20251212103858.110701-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/catpt/core.h
sound/soc/intel/catpt/device.c
sound/soc/intel/catpt/loader.c

index d273f24d3d530b8b5d9b37cad5dc7651205e667d..df8a5fd95e13ed3db3d997e788263d5c15b5bf4a 100644 (file)
@@ -62,6 +62,7 @@ struct catpt_module_type {
 struct catpt_spec {
        struct snd_soc_acpi_mach *machines;
        u8 core_id;
+       const char *fw_name;
        u32 host_dram_offset;
        u32 host_iram_offset;
        u32 host_shim_offset;
index d8e0da558495f492acfe4b0cb5405f62c420a53b..0638aecba40de42f09fb658f9ed6d57f9f530ffc 100644 (file)
@@ -348,6 +348,7 @@ static struct snd_soc_acpi_mach wpt_machines[] = {
 static struct catpt_spec lpt_desc = {
        .machines = lpt_machines,
        .core_id = 0x01,
+       .fw_name = "intel/IntcSST1.bin",
        .host_dram_offset = 0x000000,
        .host_iram_offset = 0x080000,
        .host_shim_offset = 0x0E7000,
@@ -363,6 +364,7 @@ static struct catpt_spec lpt_desc = {
 static struct catpt_spec wpt_desc = {
        .machines = wpt_machines,
        .core_id = 0x02,
+       .fw_name = "intel/IntcSST2.bin",
        .host_dram_offset = 0x000000,
        .host_iram_offset = 0x0A0000,
        .host_shim_offset = 0x0FB000,
index 80c4ab335525db7e9fff40ee828fd8bbec0a6626..dc7afe587e6f2636ff1554edd78dfa9d9720f73d 100644 (file)
@@ -580,10 +580,6 @@ release_fw:
 
 static int catpt_load_images(struct catpt_dev *cdev, bool restore)
 {
-       static const char *const names[] = {
-               "intel/IntcSST1.bin",
-               "intel/IntcSST2.bin",
-       };
        struct dma_chan *chan;
        int ret;
 
@@ -591,7 +587,7 @@ static int catpt_load_images(struct catpt_dev *cdev, bool restore)
        if (IS_ERR(chan))
                return PTR_ERR(chan);
 
-       ret = catpt_load_image(cdev, chan, names[cdev->spec->core_id - 1],
+       ret = catpt_load_image(cdev, chan, cdev->spec->fw_name,
                               FW_SIGNATURE, restore);
        if (ret)
                goto release_dma_chan;