mbox series

[v2,00/16] ASoC: Intel: avs: Data probing and fw logging

Message ID 20221202152841.672536-1-cezary.rojewski@intel.com
Headers show
Series ASoC: Intel: avs: Data probing and fw logging | expand

Message

Cezary Rojewski Dec. 2, 2022, 3:28 p.m. UTC
The patchset focuses on debug functionality for the avs-driver.
Two major blocks are covered here: data probing and AudioDSP firmware
logging. Both are configured and controlled through debugfs.

Data probing is a AudioDSP debug functionality which allows for
gathering the actual data that is being routed to or from a module.
Helps in debugging its processing capabilities - navigate to a specific
module which may have caused a glitch within a pipeline (set of modules
bound together).

First few allow for assigning compress stream to a HDAudio stream, what
is currently limited to pcm substreams only. These patches were already
present on this list and reviewed in the past [1].

The next few tidy existing debug-related code up so it's ready for
addition of new functionalities and make it clear which part of the avs
is debug related and which is not. These also simplify the existing
locking around the trace fifo.

Afterward, debug-related IPCs are defined along with stub soc-component
and compress DAI operations. Not much is done there as it's not a
standard PCM streaming scenario. Most code found in compress operations
is inherited from the HOST side of HDAudio streaming found in pcm.c
file of the driver.

Finally, a debugfs file operations are defined. These facilitate
connecting to DSP modules from which the data shall be gathered as well
as control and configuration of firmware logging. Additionally, entries
are added to allow for dumping snapshots of key memory windows.


Changes in v2:
- reordered sign offs in patch 03 as reported by Takashi
- fixed issue reported by ikp - unintilialized 'runtime' variable in
  patch 03
- added missing module_get_upon_open in component driver declaration

[1]: https://lore.kernel.org/alsa-devel/20200124190413.18154-1-cezary.rojewski@intel.com/

Cezary Rojewski (16):
  ALSA: hda: Allow for compress stream to hdac_ext_stream assignment
  ALSA: hda: Prepare for compress stream support
  ALSA: hda: Interrupt servicing and BDL setup for compress streams
  ASoC: Intel: avs: Introduce avs_log_buffer_status_locked()
  ASoC: Intel: avs: Drop fifo_lock
  ASoC: Intel: avs: Introduce debug-context aware helpers
  ASoC: Intel: avs: Make enable_logs() dependent on DEBUG_FS
  ASoC: Intel: avs: Drop usage of debug members in non-debug code
  ASoC: Intel: avs: Add data probing requests
  ASoC: Intel: avs: Probe compress operations
  ASoC: Intel: avs: Data probing soc-component
  ASoC: Intel: avs: Add probe machine board
  ASoC: Intel: avs: Probing and firmware tracing over debugfs
  ASoC: Intel: avs: Gather remaining logs on strace_release()
  ASoC: Intel: avs: Allow for dumping FW_REGS area
  ASoC: Intel: avs: Allow for dumping debug window snapshot

 include/sound/hdaudio_ext.h           |   2 +
 sound/hda/ext/hdac_ext_stream.c       |  41 +++
 sound/hda/hdac_controller.c           |   4 +-
 sound/hda/hdac_stream.c               |  51 +--
 sound/soc/intel/Kconfig               |   1 +
 sound/soc/intel/avs/Makefile          |   4 +
 sound/soc/intel/avs/apl.c             |  24 +-
 sound/soc/intel/avs/avs.h             |  80 ++++-
 sound/soc/intel/avs/board_selection.c |  33 ++
 sound/soc/intel/avs/boards/Kconfig    |   8 +
 sound/soc/intel/avs/boards/Makefile   |   2 +
 sound/soc/intel/avs/boards/probe.c    |  64 ++++
 sound/soc/intel/avs/core.c            |   2 +
 sound/soc/intel/avs/debugfs.c         | 436 ++++++++++++++++++++++++++
 sound/soc/intel/avs/ipc.c             |   2 +-
 sound/soc/intel/avs/messages.c        | 104 +++++-
 sound/soc/intel/avs/messages.h        |  53 ++++
 sound/soc/intel/avs/pcm.c             |   6 +-
 sound/soc/intel/avs/probes.c          | 313 ++++++++++++++++++
 sound/soc/intel/avs/registers.h       |   3 +-
 sound/soc/intel/avs/skl.c             |  17 +-
 sound/soc/intel/avs/utils.c           |  22 --
 22 files changed, 1172 insertions(+), 100 deletions(-)
 create mode 100644 sound/soc/intel/avs/boards/probe.c
 create mode 100644 sound/soc/intel/avs/debugfs.c
 create mode 100644 sound/soc/intel/avs/probes.c

Comments

Mark Brown Dec. 5, 2022, 7:02 p.m. UTC | #1
On Fri, 2 Dec 2022 16:28:25 +0100, Cezary Rojewski wrote:
> The patchset focuses on debug functionality for the avs-driver.
> Two major blocks are covered here: data probing and AudioDSP firmware
> logging. Both are configured and controlled through debugfs.
> 
> Data probing is a AudioDSP debug functionality which allows for
> gathering the actual data that is being routed to or from a module.
> Helps in debugging its processing capabilities - navigate to a specific
> module which may have caused a glitch within a pipeline (set of modules
> bound together).
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[01/16] ALSA: hda: Allow for compress stream to hdac_ext_stream assignment
        commit: 97d73d978271ade27fc751ad606f23c1c4c43678
[02/16] ALSA: hda: Prepare for compress stream support
        commit: f6b1254664a0a15c8bbe0a17b2c86840aa38d3d7
[03/16] ALSA: hda: Interrupt servicing and BDL setup for compress streams
        commit: 3e9582267e3a06bfd9622dbd2304a8cfac977b43
[04/16] ASoC: Intel: avs: Introduce avs_log_buffer_status_locked()
        commit: bb03099bf2253fcd1a4d57e6f5ee4e8000911e77
[05/16] ASoC: Intel: avs: Drop fifo_lock
        commit: 58029b7734ec84738aeb8fb391e625832bb6b0a6
[06/16] ASoC: Intel: avs: Introduce debug-context aware helpers
        commit: 9e3c15beb8976771f95ba30b3da8bd35dc7188ac
[07/16] ASoC: Intel: avs: Make enable_logs() dependent on DEBUG_FS
        commit: b3eefa5d8dbfe5286c3308fa706fc9c45b38fe19
[08/16] ASoC: Intel: avs: Drop usage of debug members in non-debug code
        commit: f7de161fc8d5e1ebac3c361a37b1d748e7086330
[09/16] ASoC: Intel: avs: Add data probing requests
        commit: dab8d000e25c3e91154efca287434a4f78ab65d2
[10/16] ASoC: Intel: avs: Probe compress operations
        commit: 700462f55493c6831ad71b209eaebe310dcf11fd
[11/16] ASoC: Intel: avs: Data probing soc-component
        commit: ed914a2a45a45e7d8f900ae8997ca4573792afcc
[12/16] ASoC: Intel: avs: Add probe machine board
        commit: e17527e167ae5bd71fc9cb67da4e73bbb050e6f7
[13/16] ASoC: Intel: avs: Probing and firmware tracing over debugfs
        commit: 5a565ba23abe478f3d4c3b0c8798bcb5215b82f5
[14/16] ASoC: Intel: avs: Gather remaining logs on strace_release()
        commit: 34d27c71707c4ed615105376e0f3907d99b1b271
[15/16] ASoC: Intel: avs: Allow for dumping FW_REGS area
        commit: 870f6e5abba95ac78e750b61cf8f3f15be96796f
[16/16] ASoC: Intel: avs: Allow for dumping debug window snapshot
        commit: 85ac9c8c8eed76e8a320a9e017c6d36e2a52745b

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark