Skip to content

ASoC: SOF: Data probing

Cezary Rojewski alsa-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest9 patches 4 repliesIn review
  2. v411 patches 4 repliesSuperseded
  3. v311 patches 19 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v211 patches10 repliesSuperseded
v112 patches16 repliesSuperseded

Changes in v4 from the cover letter

- No changes to ALSA core and hda patches

- 'probe' source added in patch "ASoC: SOF: Implement Probe IPC API" now only compiled if SND_SOC_SOF_DEBUG_PROBES is enabled. Said kconfig initial declaration has been moved to that patch too
- 'extractor_stream_tag' field now decorated with _DEBUG_PROBES to account for the change above
- Debugfs probe handlers now check if extractor stream is running before continuing. To achieve this, 'extractor_stream_tag' is both initialized and set to SOF_PROBE_INVALID_NODE_ID on sof_probe_compr_free(). Suggestion provided by Pierre

- Reverted SND_SOC_SOF_HDA_LINK requirement-removal change for HDA probes. Code requires SND_HDA_EXT_CORE in order to function on Intel platforms
- Relocated probe-compress related code from /sof/pcm.c directly to /sof/compress.c as requested by Daniel

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9ALSA: core: Expand DMA buffer informationinclude/sound/compress_driver.h+26 -90 replies
2/9ALSA: core: Implement compress page allocation and free routinesinclude/sound/compress_driver.h sound/core/compress_offload.c+47 -00 replies
3/9ASoC: SOF: Intel: Account for compress streams when servicing IRQsinclude/sound/hdaudio.h sound/soc/sof/intel/hda-stream.c+25 -21 reply
4/9ASoC: SOF: Implement Probe IPC APIinclude/sound/sof/header.h sound/soc/sof/Kconfig sound/soc/sof/Makefile +3 more+394 -10 replies
5/9ASoC: SOF: Generic probe compress operationssound/soc/sof/Kconfig sound/soc/sof/Makefile sound/soc/sof/compress.c +4 more+246 -10 replies
6/9ASoC: SOF: Intel: Expose SDnFMT helperssound/soc/sof/intel/hda-pcm.c sound/soc/sof/intel/hda.h+6 -41 reply
7/9ASoC: SOF: Intel: Probe compress operationssound/soc/sof/intel/Kconfig sound/soc/sof/intel/Makefile sound/soc/sof/intel/apl.c +3 more+166 -01 reply
8/9ASoC: SOF: Provide probe debugfs supportsound/soc/sof/debug.c+226 -00 replies
9/9ASoC: SOF: Intel: Add Probe compress CPU DAIssound/soc/sof/compress.c sound/soc/sof/compress.h sound/soc/sof/intel/hda-dai.c +2 more+48 -00 replies

Reviews trailers per patch

5 of 9 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchTakashi IwaiVinod KoulPierre-Louis Bossart
SeriesA-b
1/9R-b A-b
2/9R-b A-b
3/9A-b
4/9
5/9
6/9A-b
7/9A-b
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/9] ASoC: SOF: Data probing

This set of patches achieves few goals in order to enable data probing feature for audio DSP.

First, provide new and alter existing interfaces (page allocation, runtime flow adjustments) to make them compress friendly.

Finally, the end goal which are the probe APIs and usage itself. Probes can be treated as endpoints which allow for data extraction from or injection to target module - a great ally when debugging problematic audio issues such as distortions, glitches or gaps.
Compress streams are a weapon of choice here to provide a lightweight implementation.

While all available IPCs have been defined, current implementation covers extraction only, with injection scheduled for a later date.

Initial review and development of probes can be found under:
https://github.com/thesofproject/linux/pull/1276

with the hda-compress-enable set of patches being separated and reviewed on:
https://github.com/thesofproject/linux/pull/1571

Tested on CML-U with rt5682 i2s board.

Cahnges in v5:
- Removed SND_SOC_SOF_HDA_LINK requirement for hda probes. Instead of sound/hda/ext, sof hda operations are used
- In consequence of above, patches:
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
have been dropped.

- In order to reuse pcm utility functions for hda compress, new patch has been added:
ASoC: SOF: Intel: Expose SDnFMT helpers
- Addressed u64/ u32 concerns from Pierre when calculating bytes transferred during runtime

Changes in v4:
- No changes to ALSA core and hda patches

- 'probe' source added in patch "ASoC: SOF: Implement Probe IPC API" now only compiled if SND_SOC_SOF_DEBUG_PROBES is enabled. Said kconfig initial declaration has been moved to that patch too
- 'extractor_stream_tag' field now decorated with _DEBUG_PROBES to account for the change above
- Debugfs probe handlers now check if extractor stream is running before continuing. To achieve this, 'extractor_stream_tag' is both initialized and set to SOF_PROBE_INVALID_NODE_ID on sof_probe_compr_free(). Suggestion provided by Pierre

- Reverted SND_SOC_SOF_HDA_LINK requirement-removal change for HDA probes. Code requires SND_HDA_EXT_CORE in order to function on Intel platforms
- Relocated probe-compress related code from /sof/pcm.c directly to /sof/compress.c as requested by Daniel

Changes in v3:
- No changes to ALSA core and hda patches

- Addressed sparse and all doc related warnings as reported by Pierre
- Moved _DEBUG_PROBES config outside of _DEVELOPER_SUPPORT block
- Renamed 'extractor' field to 'extractor_stream_tag' as requested
- Relocated 'extractor_stream_tag' declaration from patch 07 to 08

Changes in v2:
- No changes to ALSA core and hda patches

- Removed "ASoC: Intel: sof_rt5682: Add compress probe DAI links" from the patchset list as requested by Pierre
- updated copyright header for newly added files (dates)
- probes over HDA no longer require SND_SOC_SOF_HDA_LINK enabled
- renamed debugfs probe functions as requested by Pierre

- probe IPC API has been updated to align with newest SOF FW & probe debug app (struct_size macro has been enlisted to make the size calculations transparent). This targets only "ASoC: SOF: Implement Probe IPC API" patch

Cezary Rojewski (9):
ALSA: core: Expand DMA buffer information
ALSA: core: Implement compress page allocation and free routines
ASoC: SOF: Intel: Account for compress streams when servicing IRQs
ASoC: SOF: Implement Probe IPC API
ASoC: SOF: Generic probe compress operations
ASoC: SOF: Intel: Expose SDnFMT helpers
ASoC: SOF: Intel: Probe compress operations
ASoC: SOF: Provide probe debugfs support
ASoC: SOF: Intel: Add Probe compress CPU DAIs

 include/sound/compress_driver.h    |  40 +++-
 include/sound/hdaudio.h            |   2 +
 include/sound/sof/header.h         |  11 ++
 sound/core/compress_offload.c      |  42 +++++
 sound/soc/sof/Kconfig              |   9 +
 sound/soc/sof/Makefile             |   1 +
 sound/soc/sof/compress.c           | 146 +++++++++++++++
 sound/soc/sof/compress.h           |  31 ++++
 sound/soc/sof/core.c               |   6 +
 sound/soc/sof/debug.c              | 226 +++++++++++++++++++++++
 sound/soc/sof/intel/Kconfig        |   9 +
 sound/soc/sof/intel/Makefile       |   1 +
 sound/soc/sof/intel/apl.c          |   9 +
 sound/soc/sof/intel/cnl.c          |   9 +
 sound/soc/sof/intel/hda-compress.c | 114 ++++++++++++
 sound/soc/sof/intel/hda-dai.c      |  28 +++
 sound/soc/sof/intel/hda-ipc.c      |   4 +-
 sound/soc/sof/intel/hda-pcm.c      |   8 +-
 sound/soc/sof/intel/hda-stream.c   |  25 ++-
 sound/soc/sof/intel/hda.h          |  32 ++++
 sound/soc/sof/ops.h                |  43 +++++
 sound/soc/sof/pcm.c                |   7 +
 sound/soc/sof/probe.c              | 286 +++++++++++++++++++++++++++++
 sound/soc/sof/probe.h              |  85 +++++++++
 sound/soc/sof/sof-priv.h           |  25 +++
 25 files changed, 1183 insertions(+), 16 deletions(-)
 create mode 100644 sound/soc/sof/compress.c
 create mode 100644 sound/soc/sof/compress.h
 create mode 100644 sound/soc/sof/intel/hda-compress.c
 create mode 100644 sound/soc/sof/probe.c
 create mode 100644 sound/soc/sof/probe.h
Signature · 1 line
2.17.1