diff options
author | Cezary Rojewski <cezary.rojewski@intel.com> | 2022-12-02 16:28:33 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-12-05 14:05:25 +0000 |
commit | f7de161fc8d5e1ebac3c361a37b1d748e7086330 (patch) | |
tree | e5e70c42a5752ebcafe03fcfdb250311a7c10e87 /sound/soc/intel/avs/apl.c | |
parent | b3eefa5d8dbfe5286c3308fa706fc9c45b38fe19 (diff) |
ASoC: Intel: avs: Drop usage of debug members in non-debug code
Switch to debug-context aware wrappers instead of accessing debug
members directly allowing for readable separation of debug and non-debug
related code. Duplicates are removed along the way.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221202152841.672536-9-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/avs/apl.c')
-rw-r--r-- | sound/soc/intel/avs/apl.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/soc/intel/avs/apl.c b/sound/soc/intel/avs/apl.c index beef308c9428..02683dce277a 100644 --- a/sound/soc/intel/avs/apl.c +++ b/sound/soc/intel/avs/apl.c @@ -59,21 +59,18 @@ static int apl_log_buffer_status(struct avs_dev *adev, union avs_notify_msg *msg memcpy_fromio(&layout, addr, sizeof(layout)); - if (!kfifo_initialized(&adev->dbg.trace_fifo)) + if (!avs_logging_fw(adev)) /* consume the logs regardless of consumer presence */ goto update_read_ptr; buf = apl_log_payload_addr(addr); if (layout.read_ptr > layout.write_ptr) { - __kfifo_fromio(&adev->dbg.trace_fifo, buf + layout.read_ptr, - apl_log_payload_size(adev) - layout.read_ptr); + avs_dump_fw_log(adev, buf + layout.read_ptr, + apl_log_payload_size(adev) - layout.read_ptr); layout.read_ptr = 0; } - __kfifo_fromio(&adev->dbg.trace_fifo, buf + layout.read_ptr, - layout.write_ptr - layout.read_ptr); - - wake_up(&adev->dbg.trace_waitq); + avs_dump_fw_log_wakeup(adev, buf + layout.read_ptr, layout.write_ptr - layout.read_ptr); update_read_ptr: writel(layout.write_ptr, addr); |