Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ed05eda
ALSA: compress: pin card module while stream is open
ujfalusi Apr 24, 2026
cc11ca2
ALSA: compress: stop active streams on disconnect
ujfalusi Apr 24, 2026
54afdb9
ASoC: soc-pcm: Allocate be_substream->runtime for compressed streams
ujfalusi Jan 13, 2026
d53d3e8
ASoC: soc-compress: Implement trigger FE-BE sequencing as with normal…
ujfalusi Jan 27, 2026
90369a3
ASoC: soc-compress: Stop running dpcm on free
ujfalusi Feb 3, 2026
930dbb5
ASoC: SOF: compress: Rename compress ops with ipc3 prefix
ranj063 Dec 9, 2025
329ee14
ASoC: SOF: ipc4-pcm: harden pipeline teardown races
ujfalusi Apr 24, 2026
9e5839a
ASoC: SOF: sof-audio: harden recursive widget free walk
ujfalusi Apr 24, 2026
6946767
ASoC: SOF: sof-audio: Expose a couple of functions
ranj063 Dec 9, 2025
9895118
ASoC: SOF: pcm: Modify the signature of a couple of PCM IPC ops
ranj063 Dec 9, 2025
42c61e3
ASoC: SOF: intel: hda-stream: Clear the current position when releasi…
ranj063 Dec 9, 2025
2f8be3c
ASoC: SOF: ops: Add new platform-specific ops for compress
ranj063 Dec 9, 2025
a1a7b17
ASoC: SOF: ipc4: Add definition of module data in init_ext object type
ujfalusi Jan 12, 2026
66c8d8a
ASoC: SOF: ipc4-topology: Support init_ext_module_data for process mo…
ujfalusi Jan 13, 2026
1ae0a3c
ASoC: SOF: ipc4-pcm: Make the timestamp info usable outside of ipc4-p…
ujfalusi Jan 13, 2026
fe8dcb6
ASoC: SOF: ipc4/ipc4-loader: Add SOF_INFO and CODEC_INFO to fw_config…
ujfalusi Jan 14, 2026
99b7de8
ASoC: SOF: ipc4-pcm: Handle COMPR DRAIN triggers as EOS pipeline state
ujfalusi Jan 30, 2026
6be8ed0
ASoC: SOF: ipc4-topology: Set FAST_MODE for host copier in compr mode
ujfalusi Jan 30, 2026
a7e79c7
ASoC: SOF: Add support for IPC4 compressed
ranj063 Dec 9, 2025
4670715
ASoC: SOF: ipc4: Handle compressed drain done notification from firmware
ujfalusi Jan 30, 2026
c319fe0
ASoC: SOF: Intel: Kconfig: Remove redundant IPC version selects
ujfalusi Dec 31, 2025
9ae5254
ASoC: SOF: Intel: Kconfig: Select compress support for TGL+ platforms
ujfalusi Dec 31, 2025
787627d
ASoC: SOF: topology: Add support for decoder and encoder widgets
ranj063 Dec 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 43 additions & 12 deletions sound/soc/sof/ipc4-topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -3065,6 +3065,38 @@ static int sof_ipc4_control_setup(struct snd_sof_dev *sdev, struct snd_sof_contr
return 0;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in commit: "mdoules"

}

static void
sof_ipc4_add_init_ext_module_data(struct snd_sof_dev *sdev,
struct snd_sof_widget *swidget,
u32 *payload, u32 *ext_pos,
struct sof_ipc4_module_init_ext_object **hdr)
{
u32 data_size;
void *data;

if (WIDGET_IS_PROCESS(swidget->id)) {
/* Check if process module uses init_ext_module_data */
struct sof_ipc4_process *process = swidget->private;

if (!process->init_ext_module_size)
return;

data_size = process->init_ext_module_size;
data = process->init_ext_module_data;
} else {
return;
}

*hdr = (struct sof_ipc4_module_init_ext_object *)&payload[*ext_pos];
(*hdr)->header = SOF_IPC4_MOD_INIT_EXT_OBJ_ID(SOF_IPC4_MOD_INIT_DATA_ID_MODULE_DATA) |
SOF_IPC4_MOD_INIT_EXT_OBJ_WORDS(DIV_ROUND_UP(data_size, sizeof(u32)));
*ext_pos += DIV_ROUND_UP(sizeof(*(*hdr)), sizeof(u32));

memcpy(&payload[*ext_pos], data, data_size);

*ext_pos += DIV_ROUND_UP(data_size, sizeof(u32));
}

static int sof_ipc4_widget_setup_msg_payload(struct snd_sof_dev *sdev,
struct snd_sof_widget *swidget,
struct sof_ipc4_msg *msg,
Expand All @@ -3073,20 +3105,11 @@ static int sof_ipc4_widget_setup_msg_payload(struct snd_sof_dev *sdev,
{
struct sof_ipc4_mod_init_ext_dp_memory_data *dp_mem_data;
struct sof_ipc4_module_init_ext_init *ext_init;
struct sof_ipc4_module_init_ext_object *hdr;
struct sof_ipc4_module_init_ext_object *hdr = NULL;
int new_size;
u32 *payload;
u32 ext_pos;

/* For the moment the only reason for adding init_ext_init payload is DP
* memory data. If both stack and heap size are 0 (= use default), then
* there is no need for init_ext_init payload.
*/
if (swidget->comp_domain != SOF_COMP_DOMAIN_DP) {
msg->extension &= ~SOF_IPC4_MOD_EXT_EXTENDED_INIT_MASK;
return 0;
}

payload = kzalloc(sdev->ipc->max_payload_size, GFP_KERNEL);
if (!payload)
return -ENOMEM;
Expand All @@ -3101,7 +3124,7 @@ static int sof_ipc4_widget_setup_msg_payload(struct snd_sof_dev *sdev,
/* Add dp_memory_data if comp_domain indicates DP */
if (swidget->comp_domain == SOF_COMP_DOMAIN_DP) {
hdr = (struct sof_ipc4_module_init_ext_object *)&payload[ext_pos];
hdr->header = SOF_IPC4_MOD_INIT_EXT_OBJ_LAST_MASK |
hdr->header =
SOF_IPC4_MOD_INIT_EXT_OBJ_ID(SOF_IPC4_MOD_INIT_DATA_ID_DP_DATA) |
SOF_IPC4_MOD_INIT_EXT_OBJ_WORDS(DIV_ROUND_UP(sizeof(*dp_mem_data),
sizeof(u32)));
Expand All @@ -3113,7 +3136,15 @@ static int sof_ipc4_widget_setup_msg_payload(struct snd_sof_dev *sdev,
ext_pos += DIV_ROUND_UP(sizeof(*dp_mem_data), sizeof(u32));
}

/* If another array object is added, remember clear previous OBJ_LAST bit */
sof_ipc4_add_init_ext_module_data(sdev, swidget, payload, &ext_pos, &hdr);

/* Set last bit for the last object in the array */
if (hdr) {
hdr->header |= SOF_IPC4_MOD_INIT_EXT_OBJ_LAST_MASK;
} else {
kfree(payload);
return 0;
}

/* Calculate final size and check that it fits to max payload size */
new_size = ext_pos * sizeof(u32) + ipc_size;
Expand Down
4 changes: 4 additions & 0 deletions sound/soc/sof/ipc4-topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,8 @@ struct sof_ipc4_base_module_cfg_ext {
* @msg: IPC4 message struct containing header and data info
* @base_config_ext_size: Size of the base config extension data in bytes
* @init_config: Module init config type (SOF_IPC4_MODULE_INIT_CONFIG_TYPE_*)
* @init_ext_module_data: module_data for init_ext object
* @init_ext_module_size: size of init_ext_module_data
*/
struct sof_ipc4_process {
struct sof_ipc4_base_module_cfg base_config;
Expand All @@ -529,6 +531,8 @@ struct sof_ipc4_process {
struct sof_ipc4_msg msg;
u32 base_config_ext_size;
u32 init_config;
void *init_ext_module_data;
size_t init_ext_module_size;
};

bool sof_ipc4_copier_is_single_bitdepth(struct snd_sof_dev *sdev,
Expand Down
1 change: 1 addition & 0 deletions sound/soc/sof/sof-audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#define WIDGET_IS_AIF(id) ((id) == snd_soc_dapm_aif_in || (id) == snd_soc_dapm_aif_out)
#define WIDGET_IS_AIF_OR_DAI(id) (WIDGET_IS_DAI(id) || WIDGET_IS_AIF(id))
#define WIDGET_IS_COPIER(id) (WIDGET_IS_AIF_OR_DAI(id) || (id) == snd_soc_dapm_buffer)
#define WIDGET_IS_PROCESS(id) ((id) == snd_soc_dapm_effect)

#define SOF_DAI_PARAM_INTEL_SSP_MCLK 0
#define SOF_DAI_PARAM_INTEL_SSP_BCLK 1
Expand Down