summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel
diff options
context:
space:
mode:
authorNoah Klayman <noah.klayman@intel.com>2022-09-19 14:21:03 +0200
committerMark Brown <broonie@kernel.org>2022-09-19 15:44:04 +0100
commitbaedc6300b3d52c71a06f4bddd426488ec243c2b (patch)
treeaf897a7edd45a2c2b3fd3a76b41984d07a4be7c3 /sound/soc/sof/intel
parentfa6e73d69193d0ba3b794f7c303beae498732f40 (diff)
downloadlwn-baedc6300b3d52c71a06f4bddd426488ec243c2b.tar.gz
lwn-baedc6300b3d52c71a06f4bddd426488ec243c2b.zip
ASoC: SOF: Intel: add HDA interrupt source tracing
The Intel HDaudio controller relies on a single interrupt line which wire-ORs multiple interrupt sources, such as stream, IPC, SoundWire and wakes. This patch adds the ability to trace each event occurrence. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Noah Klayman <noah.klayman@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220919122108.43764-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel')
-rw-r--r--sound/soc/sof/intel/hda.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 6d4ecbe14adf..79df990da1ea 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -31,6 +31,9 @@
#include "../ops.h"
#include "hda.h"
+#define CREATE_TRACE_POINTS
+#include <trace/events/sof_intel.h>
+
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
#include <sound/soc-acpi-intel-match.h>
#endif
@@ -938,17 +941,25 @@ static irqreturn_t hda_dsp_interrupt_thread(int irq, void *context)
struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata;
/* deal with streams and controller first */
- if (hda_dsp_check_stream_irq(sdev))
+ if (hda_dsp_check_stream_irq(sdev)) {
+ trace_sof_intel_hda_irq(sdev, "stream");
hda_dsp_stream_threaded_handler(irq, sdev);
+ }
- if (hda_check_ipc_irq(sdev))
+ if (hda_check_ipc_irq(sdev)) {
+ trace_sof_intel_hda_irq(sdev, "ipc");
sof_ops(sdev)->irq_thread(irq, sdev);
+ }
- if (hda_dsp_check_sdw_irq(sdev))
+ if (hda_dsp_check_sdw_irq(sdev)) {
+ trace_sof_intel_hda_irq(sdev, "sdw");
hda_dsp_sdw_thread(irq, hdev->sdw);
+ }
- if (hda_sdw_check_wakeen_irq(sdev))
+ if (hda_sdw_check_wakeen_irq(sdev)) {
+ trace_sof_intel_hda_irq(sdev, "wakeen");
hda_sdw_process_wakeen(sdev);
+ }
hda_check_for_state_change(sdev);