summaryrefslogtreecommitdiff
path: root/sound/soc/intel/avs/messages.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-05-15 10:02:36 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-05-15 10:02:36 -0700
commit33e02dc69afbd8f1b85a51d74d72f139ba4ca623 (patch)
tree419637178f5dc6758703143d73eedf484d5b810e /sound/soc/intel/avs/messages.h
parentd34672777da3ea919e8adb0670ab91ddadf7dea0 (diff)
parentd731b1ed15052580b7b2f40559021012d280f1d9 (diff)
Merge tag 'sound-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "This one became bigger than usual, not in the total size but rather containing lots of small changes all over the places. The majority of changes are about ASoC, especially SOF / Intel stuff, and we see an interesting work for ASoC DAPM graph visualization, while there are many other code cleanup and refactoring, too. Core: - A deadlock fix at device disconnection - A new tool dapm-graph for visualising the DAPM state ASoC: - Large updates throughout the Intel audio drivers - Fixes and clarifications for the DAPM documentation - Cleanups of accessors for driver data, module labelling, and for constification - Modernsation and cleanup work in the Mediatek drivers - Several fixes and features for the DaVinci I2S driver - New drivers for several AMD and Intel platforms, Nuvoton NAU8325, Rockchip RK3308 and Texas Instruments PCM6240 HD-audio: - Cleanup for CONFIG_PM dependencies - Cirrus HD-audio codec fixes and quirks Others: - Series of tree-wide fixes in Makefiles to use *-y - Additions of missing module descriptions - Scarlett2 USB mixer enhancements - A series of legacy emu10k1 fixes and improvements" * tag 'sound-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (603 commits) ALSA: hda/realtek: Drop doubly quirk entry for 103c:8a2e ALSA: hda/realtek - fixed headset Mic not show ASoC: SOF: amd: Fix build error with built-in config ALSA: scarlett2: Increase mixer range to +12dB ALSA: scarlett2: Add S/PDIF source selection controls ALSA: core: Remove superfluous CONFIG_PM ALSA: Fix deadlocks with kctl removals at disconnection ASoC: audio-graph-card2: call of_node_get() before of_get_next_child() ASoC: SOF: amd: Correct spaces in Makefile ASoC: rt715-sdca-sdw: Fix wrong complete waiting in rt715_dev_resume() ASoC: Intel: sof_sdw_rt_amp: use dai parameter ASoC: Intel: sof_sdw: add dai parameter to rtd_init callback ASoC: Intel: sof_sdw: use .controls/.widgets to add controls/widgets ASoC: Intel: sof_sdw: add controls and dapm widgets in codec_info ASoC: Intel: sof_sdw: use generic name for controls/widgets ASoC: Intel: sof_sdw_cs_amp: rename Speakers to Speaker ASoC: Intel: maxim-common: change max98373 data to static ASoC: Intel: sof_sdw: add max98373 dapm routes ASoC: Intel: sof_rt5682: use max_98373_dai_link function ASoC: Intel: sof_nau8825: use max_98373_dai_link function ...
Diffstat (limited to 'sound/soc/intel/avs/messages.h')
-rw-r--r--sound/soc/intel/avs/messages.h49
1 files changed, 46 insertions, 3 deletions
diff --git a/sound/soc/intel/avs/messages.h b/sound/soc/intel/avs/messages.h
index 4e609a08863c..d0bdb7d9266c 100644
--- a/sound/soc/intel/avs/messages.h
+++ b/sound/soc/intel/avs/messages.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
- * Copyright(c) 2021-2022 Intel Corporation. All rights reserved.
+ * Copyright(c) 2021-2022 Intel Corporation
*
* Authors: Cezary Rojewski <cezary.rojewski@intel.com>
* Amadeusz Slawinski <amadeuszx.slawinski@linux.intel.com>
@@ -93,12 +93,14 @@ union avs_global_msg {
} ext;
};
} __packed;
+static_assert(sizeof(union avs_global_msg) == 8);
struct avs_tlv {
u32 type;
u32 length;
u32 value[];
} __packed;
+static_assert(sizeof(struct avs_tlv) == 8);
enum avs_module_msg_type {
AVS_MOD_INIT_INSTANCE = 0,
@@ -155,6 +157,7 @@ union avs_module_msg {
} ext;
};
} __packed;
+static_assert(sizeof(union avs_module_msg) == 8);
#define AVS_IPC_NOT_SUPPORTED 15
@@ -190,6 +193,7 @@ union avs_reply_msg {
} ext;
};
} __packed;
+static_assert(sizeof(union avs_reply_msg) == 8);
enum avs_notify_msg_type {
AVS_NOTIFY_PHRASE_DETECTED = 4,
@@ -226,6 +230,7 @@ union avs_notify_msg {
} ext;
};
} __packed;
+static_assert(sizeof(union avs_notify_msg) == 8);
#define AVS_MSG(hdr) { .val = hdr }
@@ -264,6 +269,7 @@ struct avs_notify_voice_data {
u16 kpd_score;
u16 reserved;
} __packed;
+static_assert(sizeof(struct avs_notify_voice_data) == 4);
struct avs_notify_res_data {
u32 resource_type;
@@ -272,6 +278,7 @@ struct avs_notify_res_data {
u32 reserved;
u32 data[6];
} __packed;
+static_assert(sizeof(struct avs_notify_res_data) == 40);
struct avs_notify_mod_data {
u32 module_instance_id;
@@ -279,6 +286,7 @@ struct avs_notify_mod_data {
u32 data_size;
u32 data[];
} __packed;
+static_assert(sizeof(struct avs_notify_mod_data) == 12);
/* ROM messages */
enum avs_rom_control_msg_type {
@@ -332,6 +340,7 @@ struct avs_dxstate_info {
u32 core_mask; /* which cores are subject for power transition */
u32 dx_mask; /* bit[n]=1 core n goes to D0, bit[n]=0 it goes to D3 */
} __packed;
+static_assert(sizeof(struct avs_dxstate_info) == 8);
int avs_ipc_set_dx(struct avs_dev *adev, u32 core_mask, bool powerup);
int avs_ipc_set_d0ix(struct avs_dev *adev, bool enable_pg, bool streaming);
@@ -367,11 +376,13 @@ struct avs_skl_log_state {
u32 enable;
u32 min_priority;
} __packed;
+static_assert(sizeof(struct avs_skl_log_state) == 8);
struct avs_skl_log_state_info {
u32 core_mask;
struct avs_skl_log_state logs_core[];
} __packed;
+static_assert(sizeof(struct avs_skl_log_state_info) == 4);
struct avs_apl_log_state_info {
u32 aging_timer_period;
@@ -379,6 +390,7 @@ struct avs_apl_log_state_info {
u32 core_mask;
struct avs_skl_log_state logs_core[];
} __packed;
+static_assert(sizeof(struct avs_apl_log_state_info) == 12);
enum avs_icl_log_priority {
AVS_ICL_LOG_CRITICAL = 0,
@@ -403,6 +415,7 @@ struct avs_icl_log_state_info {
u32 enable;
u32 logs_priorities_mask[];
} __packed;
+static_assert(sizeof(struct avs_icl_log_state_info) == 12);
int avs_ipc_set_enable_logs(struct avs_dev *adev, u8 *log_info, size_t size);
@@ -521,6 +534,7 @@ struct avs_module_type {
u32 lib_code:1;
u32 rsvd:24;
} __packed;
+static_assert(sizeof(struct avs_module_type) == 4);
union avs_segment_flags {
u32 ul;
@@ -537,12 +551,14 @@ union avs_segment_flags {
u32 length:16;
};
} __packed;
+static_assert(sizeof(union avs_segment_flags) == 4);
struct avs_segment_desc {
union avs_segment_flags flags;
u32 v_base_addr;
u32 file_offset;
} __packed;
+static_assert(sizeof(struct avs_segment_desc) == 12);
struct avs_module_entry {
u16 module_id;
@@ -559,11 +575,13 @@ struct avs_module_entry {
u16 instance_bss_size;
struct avs_segment_desc segments[3];
} __packed;
+static_assert(sizeof(struct avs_module_entry) == 116);
struct avs_mods_info {
u32 count;
struct avs_module_entry entries[];
} __packed;
+static_assert(sizeof(struct avs_mods_info) == 4);
static inline bool avs_module_entry_is_loaded(struct avs_module_entry *mentry)
{
@@ -577,6 +595,7 @@ struct avs_sys_time {
u32 val_l;
u32 val_u;
} __packed;
+static_assert(sizeof(struct avs_sys_time) == 8);
int avs_ipc_set_system_time(struct avs_dev *adev);
@@ -680,6 +699,7 @@ struct avs_audio_format {
u32 sample_type:8;
u32 reserved:8;
} __packed;
+static_assert(sizeof(struct avs_audio_format) == 24);
struct avs_modcfg_base {
u32 cpc;
@@ -688,12 +708,14 @@ struct avs_modcfg_base {
u32 is_pages;
struct avs_audio_format audio_fmt;
} __packed;
+static_assert(sizeof(struct avs_modcfg_base) == 40);
struct avs_pin_format {
u32 pin_index;
u32 iobs;
struct avs_audio_format audio_fmt;
} __packed;
+static_assert(sizeof(struct avs_pin_format) == 32);
struct avs_modcfg_ext {
struct avs_modcfg_base base;
@@ -703,6 +725,7 @@ struct avs_modcfg_ext {
/* input pin formats followed by output ones */
struct avs_pin_format pin_fmts[];
} __packed;
+static_assert(sizeof(struct avs_modcfg_ext) == 56);
enum avs_dma_type {
AVS_DMA_HDA_HOST_OUTPUT = 0,
@@ -726,6 +749,7 @@ union avs_virtual_index {
u8 instance:3;
} dmic;
} __packed;
+static_assert(sizeof(union avs_virtual_index) == 1);
union avs_connector_node_id {
u32 val;
@@ -735,6 +759,7 @@ union avs_connector_node_id {
u32 rsvd:19;
};
} __packed;
+static_assert(sizeof(union avs_connector_node_id) == 4);
#define INVALID_PIPELINE_ID 0xFF
#define INVALID_NODE_ID \
@@ -747,16 +772,18 @@ union avs_gtw_attributes {
u32 rsvd:31;
};
} __packed;
+static_assert(sizeof(union avs_gtw_attributes) == 4);
struct avs_copier_gtw_cfg {
union avs_connector_node_id node_id;
u32 dma_buffer_size;
u32 config_length;
- struct {
+ union {
union avs_gtw_attributes attrs;
- u32 blob[];
+ DECLARE_FLEX_ARRAY(u32, blob);
} config;
} __packed;
+static_assert(sizeof(struct avs_copier_gtw_cfg) == 16);
struct avs_copier_cfg {
struct avs_modcfg_base base;
@@ -764,6 +791,7 @@ struct avs_copier_cfg {
u32 feature_mask;
struct avs_copier_gtw_cfg gtw_cfg;
} __packed;
+static_assert(sizeof(struct avs_copier_cfg) == 84);
struct avs_volume_cfg {
u32 channel_id;
@@ -772,22 +800,26 @@ struct avs_volume_cfg {
u32 reserved; /* alignment */
u64 curve_duration;
} __packed;
+static_assert(sizeof(struct avs_volume_cfg) == 24);
struct avs_peakvol_cfg {
struct avs_modcfg_base base;
struct avs_volume_cfg vols[];
} __packed;
+static_assert(sizeof(struct avs_peakvol_cfg) == 40);
struct avs_micsel_cfg {
struct avs_modcfg_base base;
struct avs_audio_format out_fmt;
} __packed;
+static_assert(sizeof(struct avs_micsel_cfg) == 64);
struct avs_mux_cfg {
struct avs_modcfg_base base;
struct avs_audio_format ref_fmt;
struct avs_audio_format out_fmt;
} __packed;
+static_assert(sizeof(struct avs_mux_cfg) == 88);
struct avs_updown_mixer_cfg {
struct avs_modcfg_base base;
@@ -796,21 +828,25 @@ struct avs_updown_mixer_cfg {
s32 coefficients[AVS_CHANNELS_MAX];
u32 channel_map;
} __packed;
+static_assert(sizeof(struct avs_updown_mixer_cfg) == 84);
struct avs_src_cfg {
struct avs_modcfg_base base;
u32 out_freq;
} __packed;
+static_assert(sizeof(struct avs_src_cfg) == 44);
struct avs_probe_gtw_cfg {
union avs_connector_node_id node_id;
u32 dma_buffer_size;
} __packed;
+static_assert(sizeof(struct avs_probe_gtw_cfg) == 8);
struct avs_probe_cfg {
struct avs_modcfg_base base;
struct avs_probe_gtw_cfg gtw_cfg;
} __packed;
+static_assert(sizeof(struct avs_probe_cfg) == 48);
struct avs_aec_cfg {
struct avs_modcfg_base base;
@@ -818,6 +854,7 @@ struct avs_aec_cfg {
struct avs_audio_format out_fmt;
u32 cpc_lp_mode;
} __packed;
+static_assert(sizeof(struct avs_aec_cfg) == 92);
struct avs_asrc_cfg {
struct avs_modcfg_base base;
@@ -828,11 +865,13 @@ struct avs_asrc_cfg {
u32 disable_jitter_buffer:1;
u32 rsvd3:27;
} __packed;
+static_assert(sizeof(struct avs_asrc_cfg) == 48);
struct avs_wov_cfg {
struct avs_modcfg_base base;
u32 cpc_lp_mode;
} __packed;
+static_assert(sizeof(struct avs_wov_cfg) == 44);
/* Module runtime parameters */
@@ -845,6 +884,7 @@ struct avs_copier_sink_format {
struct avs_audio_format src_fmt;
struct avs_audio_format sink_fmt;
} __packed;
+static_assert(sizeof(struct avs_copier_sink_format) == 52);
int avs_ipc_copier_set_sink_format(struct avs_dev *adev, u16 module_id,
u8 instance_id, u32 sink_id,
@@ -878,6 +918,7 @@ struct avs_probe_dma {
union avs_connector_node_id node_id;
u32 dma_buffer_size;
} __packed;
+static_assert(sizeof(struct avs_probe_dma) == 8);
enum avs_probe_type {
AVS_PROBE_TYPE_INPUT = 0,
@@ -894,6 +935,7 @@ union avs_probe_point_id {
u32 index:6;
} id;
} __packed;
+static_assert(sizeof(union avs_probe_point_id) == 4);
enum avs_connection_purpose {
AVS_CONNECTION_PURPOSE_EXTRACT = 0,
@@ -906,6 +948,7 @@ struct avs_probe_point_desc {
u32 purpose;
union avs_connector_node_id node_id;
} __packed;
+static_assert(sizeof(struct avs_probe_point_desc) == 12);
int avs_ipc_probe_get_dma(struct avs_dev *adev, struct avs_probe_dma **dmas, size_t *num_dmas);
int avs_ipc_probe_attach_dma(struct avs_dev *adev, struct avs_probe_dma *dmas, size_t num_dmas);