/* ACE3+ Mic privacy control and status register */ #define SDW_SHIM2_INTEL_VS_PVCCS 0x10
/** * struct sdw_intel_stream_params_data: configuration passed during * the @params_stream callback, e.g. for interaction with DSP * firmware.
*/ struct sdw_intel_stream_params_data { struct snd_pcm_substream *substream; struct snd_soc_dai *dai; struct snd_pcm_hw_params *hw_params; int link_id; int alh_stream_id;
};
/** * struct sdw_intel_stream_free_data: configuration passed during * the @free_stream callback, e.g. for interaction with DSP * firmware.
*/ struct sdw_intel_stream_free_data { struct snd_pcm_substream *substream; struct snd_soc_dai *dai; int link_id;
};
/** * struct sdw_intel_ops: Intel audio driver callback ops *
*/ struct sdw_intel_ops { int (*params_stream)(struct device *dev, struct sdw_intel_stream_params_data *params_data); int (*free_stream)(struct device *dev, struct sdw_intel_stream_free_data *free_data); int (*trigger)(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai);
};
/** * struct sdw_intel_acpi_info - Soundwire Intel information found in ACPI tables * @handle: ACPI controller handle * @count: link count found with "sdw-master-count" or "sdw-manager-list" property * @link_mask: bit-wise mask listing links enabled by BIOS menu * * this structure could be expanded to e.g. provide all the _ADR * information in case the link_mask is not sufficient to identify * platform capabilities.
*/ struct sdw_intel_acpi_info {
acpi_handle handle; int count;
u32 link_mask;
};
/* * Force the clock to remain on during pm_runtime suspend. This might * be needed if Slave devices do not have an alternate clock source or * if the latency requirements are very strict.
*/ #define SDW_INTEL_CLK_STOP_NOT_ALLOWED BIT(0)
/* * Stop the bus during pm_runtime suspend. If set, a complete bus * reset and re-enumeration will be performed when the bus * restarts. This mode shall not be used if Slave devices can generate * in-band wakes.
*/ #define SDW_INTEL_CLK_STOP_TEARDOWN BIT(1)
/* * Stop the bus during pm_suspend if Slaves are not wake capable * (e.g. speaker amplifiers). The clock-stop mode is typically * slightly higher power than when the IP is completely powered-off.
*/ #define SDW_INTEL_CLK_STOP_WAKE_CAPABLE_ONLY BIT(2)
/* * Require a bus reset (and complete re-enumeration) when exiting * clock stop modes. This may be needed if the controller power was * turned off and all context lost. This quirk shall not be used if a * Slave device needs to remain enumerated and keep its context, * e.g. to provide the reasons for the wake, report acoustic events or * pass a history buffer.
*/ #define SDW_INTEL_CLK_STOP_BUS_RESET BIT(3)
struct hdac_bus;
/** * struct sdw_intel_ctx - context allocated by the controller * driver probe * @count: link count * @mmio_base: mmio base of SoundWire registers, only used to check * hardware capabilities after all power dependencies are settled. * @link_mask: bit-wise mask listing SoundWire links reported by the * Controller * @handle: ACPI parent handle * @ldev: information for each link (controller-specific and kept * opaque here) * @link_list: list to handle interrupts across all links * @shim_lock: mutex to handle concurrent rmw access to shared SHIM registers. * @shim_mask: flags to track initialization of SHIM shared registers * @shim_base: sdw shim base. * @alh_base: sdw alh base. * @peripherals: array representing Peripherals exposed across all enabled links
*/ struct sdw_intel_ctx { int count; void __iomem *mmio_base;
u32 link_mask;
acpi_handle handle; struct sdw_intel_link_dev **ldev; struct list_head link_list; struct mutex shim_lock; /* lock for access to shared SHIM registers */
u32 shim_mask;
u32 shim_base;
u32 alh_base; struct sdw_peripherals *peripherals;
};
/** * struct sdw_intel_res - Soundwire Intel global resource structure, * typically populated by the DSP driver * * @hw_ops: abstraction for platform ops * @count: link count * @mmio_base: mmio base of SoundWire registers * @irq: interrupt number * @handle: ACPI parent handle * @parent: parent device * @ops: callback ops * @dev: device implementing hwparams and free callbacks * @link_mask: bit-wise mask listing links selected by the DSP driver * This mask may be a subset of the one reported by the controller since * machine-specific quirks are handled in the DSP driver. * @clock_stop_quirks: mask array of possible behaviors requested by the * DSP driver. The quirks are common for all links for now. * @shim_base: sdw shim base. * @alh_base: sdw alh base. * @ext: extended HDaudio link support * @mic_privacy: ACE version supports microphone privacy * @hbus: hdac_bus pointer, needed for power management * @eml_lock: mutex protecting shared registers in the HDaudio multi-link * space
*/ struct sdw_intel_res { conststruct sdw_intel_hw_ops *hw_ops; int count; void __iomem *mmio_base; int irq;
acpi_handle handle; struct device *parent; conststruct sdw_intel_ops *ops; struct device *dev;
u32 link_mask;
u32 clock_stop_quirks;
u32 shim_base;
u32 alh_base; bool ext; bool mic_privacy; struct hdac_bus *hbus; struct mutex *eml_lock;
};
/* * On Intel platforms, the SoundWire IP has dependencies on power * rails shared with the DSP, and the initialization steps are split * in three. First an ACPI scan to check what the firmware describes * in DSDT tables, then an allocation step (with no hardware * configuration but with all the relevant devices created) and last * the actual hardware configuration. The final stage is a global * interrupt enable which is controlled by the DSP driver. Splitting * these phases helps simplify the boot flow and make early decisions * on e.g. which machine driver to select (I2S mode, HDaudio or * SoundWire).
*/ int sdw_intel_acpi_scan(acpi_handle parent_handle, struct sdw_intel_acpi_info *info);
/* struct intel_sdw_hw_ops - SoundWire ops for Intel platforms. * @debugfs_init: initialize all debugfs capabilities * @debugfs_exit: close and cleanup debugfs capabilities * @get_link_count: fetch link count from hardware registers * @register_dai: read all PDI information and register DAIs * @check_clock_stop: throw error message if clock is not stopped. * @start_bus: normal start * @start_bus_after_reset: start after reset * @start_bus_after_clock_stop: start after mode0 clock stop * @stop_bus: stop all bus * @link_power_up: power-up using chip-specific helpers * @link_power_down: power-down with chip-specific helpers * @shim_check_wake: check if a wake was received * @shim_wake: enable/disable in-band wake management * @pre_bank_switch: helper for bus management * @post_bank_switch: helper for bus management * @sync_arm: helper for multi-link synchronization * @sync_go_unlocked: helper for multi-link synchronization - * shim_lock is assumed to be locked at higher level * @sync_go: helper for multi-link synchronization * @sync_check_cmdsync_unlocked: helper for multi-link synchronization * and bank switch - shim_lock is assumed to be locked at higher level * @program_sdi: helper for codec command/control based on dev_num
*/ struct sdw_intel_hw_ops { void (*debugfs_init)(struct sdw_intel *sdw); void (*debugfs_exit)(struct sdw_intel *sdw);
int (*get_link_count)(struct sdw_intel *sdw);
int (*register_dai)(struct sdw_intel *sdw);
void (*check_clock_stop)(struct sdw_intel *sdw); int (*start_bus)(struct sdw_intel *sdw); int (*start_bus_after_reset)(struct sdw_intel *sdw); int (*start_bus_after_clock_stop)(struct sdw_intel *sdw); int (*stop_bus)(struct sdw_intel *sdw, bool clock_stop);
int (*link_power_up)(struct sdw_intel *sdw); int (*link_power_down)(struct sdw_intel *sdw);
int (*shim_check_wake)(struct sdw_intel *sdw); void (*shim_wake)(struct sdw_intel *sdw, bool wake_enable);
int (*pre_bank_switch)(struct sdw_intel *sdw); int (*post_bank_switch)(struct sdw_intel *sdw);
void (*sync_arm)(struct sdw_intel *sdw); int (*sync_go_unlocked)(struct sdw_intel *sdw); int (*sync_go)(struct sdw_intel *sdw); bool (*sync_check_cmdsync_unlocked)(struct sdw_intel *sdw);
void (*program_sdi)(struct sdw_intel *sdw, int dev_num);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.