mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
ASoC: SOF: ipc4: Handle compressed drain done notification from firmware
The decoder module sends a drain done notification when the last chunk of the stream after the EOS from host has been decoded. The notification is a module notification with 0xc0c0 as magic number in event_id upper 16 bit. Call sof_ipc4_compr_drain_done() when the notification arrives to handle it. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Link: https://patch.msgid.link/20261007084955.1256-26-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
782a378dac
commit
176f4f8934
|
|
@ -647,9 +647,10 @@ struct sof_ipc4_notify_module_data {
|
|||
* The event_data contains the struct sof_ipc4_control_msg_payload of the control
|
||||
* which sent the notification.
|
||||
*/
|
||||
#define SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_MAGIC_MASK GENMASK(31, 16)
|
||||
#define SOF_IPC4_NOTIFY_MODULE_EVENTID_SOF_MAGIC_MASK GENMASK(31, 16)
|
||||
#define SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_MAGIC_VAL 0xA15A0000
|
||||
#define SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_PARAMID_MASK GENMASK(15, 0)
|
||||
#define SOF_IPC4_NOTIFY_MODULE_EVENTID_COMPR_MAGIC_VAL 0xC0C00000
|
||||
|
||||
/*
|
||||
* Macros for creating struct sof_ipc4_module_init_ext_init payload
|
||||
|
|
|
|||
|
|
@ -776,12 +776,21 @@ static void sof_ipc4_module_notification_handler(struct snd_sof_dev *sdev,
|
|||
}
|
||||
|
||||
/* Handle ALSA kcontrol notification */
|
||||
if ((data->event_id & SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_MAGIC_MASK) ==
|
||||
SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_MAGIC_VAL) {
|
||||
switch (data->event_id & SOF_IPC4_NOTIFY_MODULE_EVENTID_SOF_MAGIC_MASK) {
|
||||
case SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_MAGIC_VAL:
|
||||
{
|
||||
const struct sof_ipc_tplg_ops *tplg_ops = sdev->ipc->ops->tplg;
|
||||
|
||||
if (tplg_ops->control->update)
|
||||
tplg_ops->control->update(sdev, ipc4_msg);
|
||||
|
||||
break;
|
||||
}
|
||||
case SOF_IPC4_NOTIFY_MODULE_EVENTID_COMPR_MAGIC_VAL:
|
||||
sof_ipc4_compr_drain_done(sdev, ipc4_msg);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user