Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASoC: SOF: ipc4-mtrace: New implementation #4

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions include/sound/sof/ipc4/header.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@ struct sof_ipc4_dx_state_info {
#define SOF_IPC4_NOTIFICATION_TYPE_GET(x) (((x) & SOF_IPC4_NOTIFICATION_TYPE_MASK) >> \
SOF_IPC4_NOTIFICATION_TYPE_SHIFT)

#define SOF_IPC4_LOG_CORE_SHIFT 12
#define SOF_IPC4_LOG_CORE_MASK GENMASK(15, 12)
#define SOF_IPC4_LOG_CORE_GET(x) (((x) & SOF_IPC4_LOG_CORE_MASK) >> \
SOF_IPC4_LOG_CORE_SHIFT)

/* Value of notification type field - must fit into 8 bits */
enum sof_ipc4_notification_type {
/* Phrase detected (notification from WoV module) */
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sof/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ snd-sof-objs += ipc3.o ipc3-loader.o ipc3-topology.o ipc3-control.o ipc3-pcm.o\
endif
ifneq ($(CONFIG_SND_SOC_SOF_INTEL_IPC4),)
snd-sof-objs += ipc4.o ipc4-loader.o ipc4-topology.o ipc4-control.o ipc4-pcm.o\
ipc4-trace.o
ipc4-mtrace.o
endif

# SOF client support
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/sof/intel/apl.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ int sof_apl_ops_init(struct snd_sof_dev *sdev)
ipc4_data = sdev->private;
ipc4_data->manifest_fw_hdr_offset = SOF_MAN4_FW_HDR_OFFSET;

ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_APL;

/* doorbell */
sof_apl_ops.irq_thread = hda_dsp_ipc4_irq_thread;

Expand Down
2 changes: 2 additions & 0 deletions sound/soc/sof/intel/cnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ int sof_cnl_ops_init(struct snd_sof_dev *sdev)
ipc4_data = sdev->private;
ipc4_data->manifest_fw_hdr_offset = SOF_MAN4_FW_HDR_OFFSET;

ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_APL;

/* doorbell */
sof_cnl_ops.irq_thread = cnl_ipc4_irq_thread;

Expand Down
2 changes: 2 additions & 0 deletions sound/soc/sof/intel/mtl.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,8 @@ int sof_mtl_ops_init(struct snd_sof_dev *sdev)
ipc4_data = sdev->private;
ipc4_data->manifest_fw_hdr_offset = SOF_MAN4_FW_HDR_OFFSET;

ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_TGL;

/* set DAI ops */
hda_set_dai_drv_ops(sdev, &sof_mtl_ops);

Expand Down
2 changes: 2 additions & 0 deletions sound/soc/sof/intel/skl.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ int sof_skl_ops_init(struct snd_sof_dev *sdev)
ipc4_data = sdev->private;
ipc4_data->manifest_fw_hdr_offset = SOF_MAN4_FW_HDR_OFFSET_CAVS_1_5;

ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_SKL;

sof_skl_ops.get_window_offset = skl_dsp_ipc_get_window_offset;
sof_skl_ops.get_mailbox_offset = skl_dsp_ipc_get_mailbox_offset;

Expand Down
2 changes: 2 additions & 0 deletions sound/soc/sof/intel/tgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ int sof_tgl_ops_init(struct snd_sof_dev *sdev)
ipc4_data = sdev->private;
ipc4_data->manifest_fw_hdr_offset = SOF_MAN4_FW_HDR_OFFSET;

ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_TGL;

/* doorbell */
sof_tgl_ops.irq_thread = cnl_ipc4_irq_thread;

Expand Down
3 changes: 3 additions & 0 deletions sound/soc/sof/ipc4-loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ static int sof_ipc4_validate_firmware(struct snd_sof_dev *sdev)

static int sof_ipc4_query_fw_configuration(struct snd_sof_dev *sdev)
{
struct sof_ipc4_fw_data *ipc4_data = sdev->private;
const struct sof_ipc_ops *iops = sdev->ipc->ops;
struct sof_ipc4_fw_version *fw_ver;
struct sof_ipc4_tuple *tuple;
Expand Down Expand Up @@ -190,6 +191,8 @@ static int sof_ipc4_query_fw_configuration(struct snd_sof_dev *sdev)
break;
case SOF_IPC4_FW_CFG_TRACE_LOG_BYTES:
trace_sof_ipc4_fw_config(sdev, "Trace log size", *tuple->value);
ipc4_data->mtrace_log_bytes = *tuple->value;
pr_warn("%s: log bytes: %#x\n", __func__, *tuple->value);
break;
default:
break;
Expand Down
Loading