Ignore:
Timestamp:
Apr 19, 2025, 8:08:37 PM (4 months ago)
Author:
David Azarewicz
Message:

Merge in changes from 6.6-LTS branch.
Fixed additional 25+ problems.

Location:
GPL/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/alsa-kernel/include/sound/sof.h

    r717 r772  
    1717
    1818struct snd_sof_dsp_ops;
     19struct snd_sof_dev;
     20
     21/**
     22 * enum sof_fw_state - DSP firmware state definitions
     23 * @SOF_FW_BOOT_NOT_STARTED:    firmware boot is not yet started
     24 * @SOF_DSPLESS_MODE:           DSP is not used
     25 * @SOF_FW_BOOT_PREPARE:        preparing for boot (firmware loading for exaqmple)
     26 * @SOF_FW_BOOT_IN_PROGRESS:    firmware boot is in progress
     27 * @SOF_FW_BOOT_FAILED:         firmware boot failed
     28 * @SOF_FW_BOOT_READY_FAILED:   firmware booted but fw_ready op failed
     29 * @SOF_FW_BOOT_READY_OK:       firmware booted and fw_ready op passed
     30 * @SOF_FW_BOOT_COMPLETE:       firmware is booted up and functional
     31 * @SOF_FW_CRASHED:             firmware crashed after successful boot
     32 */
     33enum sof_fw_state {
     34        SOF_FW_BOOT_NOT_STARTED = 0,
     35        SOF_DSPLESS_MODE,
     36        SOF_FW_BOOT_PREPARE,
     37        SOF_FW_BOOT_IN_PROGRESS,
     38        SOF_FW_BOOT_FAILED,
     39        SOF_FW_BOOT_READY_FAILED,
     40        SOF_FW_BOOT_READY_OK,
     41        SOF_FW_BOOT_COMPLETE,
     42        SOF_FW_CRASHED,
     43};
     44
     45/* DSP power states */
     46enum sof_dsp_power_states {
     47        SOF_DSP_PM_D0,
     48        SOF_DSP_PM_D1,
     49        SOF_DSP_PM_D2,
     50        SOF_DSP_PM_D3,
     51};
     52
     53/* Definitions for multiple IPCs */
     54enum sof_ipc_type {
     55        SOF_IPC_TYPE_3,
     56        SOF_IPC_TYPE_4,
     57        SOF_IPC_TYPE_COUNT
     58};
     59
     60#define SOF_IPC         SOF_IPC_TYPE_3
     61#define SOF_INTEL_IPC4  SOF_IPC_TYPE_4
    1962
    2063/*
     
    2265 */
    2366struct snd_sof_pdata {
    24         const struct firmware *fw;
    2567        const char *name;
    2668        const char *platform;
    2769
     70        /*
     71         * PCI SSID. As PCI does not define 0 as invalid, the subsystem_id_set
     72         * flag indicates that a value has been written to these members.
     73         */
     74        unsigned short subsystem_vendor;
     75        unsigned short subsystem_device;
     76        bool subsystem_id_set;
     77
    2878        struct device *dev;
    29 
    30         /* indicate how many first bytes shouldn't be loaded into DSP memory. */
    31         size_t fw_offset;
    3279
    3380        /*
     
    4996        const char *tplg_filename;
    5097
     98        /* loadable external libraries available under this directory */
     99        const char *fw_lib_prefix;
     100
    51101        /* machine */
    52102        struct platform_device *pdev_mach;
    53103        const struct snd_soc_acpi_mach *machine;
     104        const struct snd_sof_of_mach *of_machine;
    54105
    55106        void *hw_pdata;
     107
     108        enum sof_ipc_type ipc_type;
    56109};
    57110
     
    63116        /* list of machines using this configuration */
    64117        struct snd_soc_acpi_mach *machines;
     118        struct snd_sof_of_mach *of_machines;
    65119
    66120        /* alternate list of machines using this configuration */
     
    75129        int resindex_imr_base;
    76130        int irqindex_host_ipc;
    77         int resindex_dma_base;
    78 
    79         /* DMA only valid when resindex_dma_base != -1*/
    80         int dma_engine;
    81         int dma_size;
    82131
    83132        /* IPC timeouts in ms */
     
    91140        const char *nocodec_tplg_filename;
    92141
    93         /* defaults paths for firmware and topology files */
    94         const char *default_fw_path;
    95         const char *default_tplg_path;
     142        /* information on supported IPCs */
     143        unsigned int ipc_supported_mask;
     144        enum sof_ipc_type ipc_default;
     145
     146        /* The platform supports DSPless mode */
     147        bool dspless_mode_supported;
     148
     149        /* defaults paths for firmware, library and topology files */
     150        const char *default_fw_path[SOF_IPC_TYPE_COUNT];
     151        const char *default_lib_path[SOF_IPC_TYPE_COUNT];
     152        const char *default_tplg_path[SOF_IPC_TYPE_COUNT];
    96153
    97154        /* default firmware name */
    98         const char *default_fw_filename;
     155        const char *default_fw_filename[SOF_IPC_TYPE_COUNT];
    99156
    100         const struct snd_sof_dsp_ops *ops;
     157        struct snd_sof_dsp_ops *ops;
     158        int (*ops_init)(struct snd_sof_dev *sdev);
     159        void (*ops_free)(struct snd_sof_dev *sdev);
    101160};
    102161
Note: See TracChangeset for help on using the changeset viewer.