All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/20] ASoC: qcom: Add AudioReach support
@ 2021-08-09 11:23 ` Srinivas Kandagatla
  0 siblings, 0 replies; 50+ messages in thread
From: Srinivas Kandagatla @ 2021-08-09 11:23 UTC (permalink / raw)
  To: bjorn.andersson, broonie, robh
  Cc: plai, tiwai, devicetree, perex, alsa-devel, lgirdwood, bgoswami,
	Srinivas Kandagatla

Many thanks for reviewing v3. This version addresses all the comments
raised as part of v3 review.

This patchset adds ASoC driver support to configure signal processing
framework ("AudioReach") which is integral part of Qualcomm next
generation audio SDK and will be deployed on upcoming Qualcomm chipsets.
It makes use of ASoC Topology to load graphs on to the DSP which is then
managed by APM (Audio Processing Manager) service to prepare/start/stop.

Here is simpified high-level block diagram of AudioReach:

 ___________________________________________________________
|                 CPU (Application Processor)               |
|  +---------+          +---------+         +----------+    |
|  |  q6apm  |          |  q6apm  |         |  q6apm   |    |
|  |   dais  | <------> |         | <-----> |lpass-dais|    |
|  +---------+          +---------+         +----------+    |
|                            ^  ^                           |
|                            |  |           +---------+     |
|  +---------+               v  +---------->|topology |     |
|  | q6prm   |          +---------+         |         |     |
|  |         |<-------->|   GPR   |         +---------+     |
|  +---------+          +---------+                         |
|       ^                    ^                              |
|       |                    |                              |
|  +----------+              |                              |
|  |   q6prm  |              |                              |
|  |lpass-clks|              |                              |
|  +----------+              |                              |
|____________________________|______________________________|
                             |  
                             | RPMSG (IPC over GLINK)              
 ____________________________|______________________________
|                            |                              |
|    +-----------------------+                              |
|    |                       |                              |
|    v                       v              q6 (Audio DSP)  |
|+-----+    +----------------------------------+            |
|| PRM |    | APM (Audio Processing Manager)   |            |
|+-----+    |  . Graph Management              |            |  
|           |  . Command Handing               |            |  
|           |  . Event Management              |            |  
|           |  ...                             |            |  
|           +----------------------------------+            |  
|                            ^                              |
|____________________________|______________________________|
                             |  
                             |   LPASS AIF
 ____________________________|______________________________
|                            |            Audio I/O         |
|                            v                              |
|   +--------------------------------------------------+    |
|    |                Audio devices                     |   |
|    | CODEC | HDMI-TX | PCM  | SLIMBUS | I2S |MI2S |...|   |
|    |                                                  |   |
|    +--------------------------------------------------+   |
|___________________________________________________________|

AudioReach has constructs of sub-graph, container and modules.
Each sub-graph can have N containers and each Container can have N Modules
and connections between them can be linear or non-linear.
An audio function can be realized with one or many connected
sub-graphs. There are also control/event paths between modules that can
be wired up while building graph to achieve various control mechanism
between modules. These concepts of Sub-Graph, Containers and Modules
are represented in ASoC topology.

Here is simple I2S graph with a Write Shared Memory and a
Volume control module within a single Subgraph (1) with one Container (1)
and 5 modules.

  ____________________________________________________________
 |                        Sub-Graph [1]                       |
 |  _______________________________________________________   |
 | |                       Container [1]                   |  |
 | | [WR_SH] -> [PCM DEC] -> [PCM CONV] -> [VOL]-> [I2S-EP]|  |
 | |_______________________________________________________|  |
 |____________________________________________________________|

For now this graph is split into two subgraphs to achieve dpcm like below:
 ________________________________________________    _________________
|                Sub-Graph [1]                   |  |  Sub-Graph [2]  |
|  ____________________________________________  |  |  _____________  |
| |              Container [1]                 | |  | |Container [2]| |
| | [WR_SH] -> [PCM DEC] -> [PCM CONV] -> [VOL]| |  | |   [I2S-EP]  | |
| |____________________________________________| |  | |_____________| |
|________________________________________________|  |_________________|

                                                      _________________
                                                    |  Sub-Graph [3]  |
                                                    |  _____________  |
                                                    | |Container [3]| |
                                                    | |  [DMA-EP]   | |
                                                    | |_____________| |
                                                    |_________________|


This patchset adds very minimal support for AudioReach which includes
supporting sub-graphs containing CODEC DMA ports and simple PCM
Decoder/Encoder and Logger Modules. Additional capabilities will
be built over time to expose features offered by AudioReach. 

This patchset is Tested on SM8250 SoC based Qualcomm Robotics Platform RB5
and SM9250 MTP with WSA881X Smart Speaker Amplifiers, DMICs connected via
VA Macro and WCD938x Codec connected via TX and RX Macro and HDMI audio
via I2S.

First 10 Patches are mostly reorganization existing Old QDSP Audio
Framework code and bindings so that we could reuse them on AudioReach.

ASoC topology graphs for DragonBoard RB5 and SM8250 MTP are available at 
https://git.linaro.org/people/srinivas.kandagatla/audioreach-topology.git/

Thanks,
srini

Changes since v3:
- Split some dt-bindings patches for easy review.
- fixed various cppcheck warnings and ignore some bogus ones.
- fixed memory leak in various places in topology
- reordered Kconfig and Makefile changes
- cleaned Kconfig symbols to fit in properly with existing Q6DSP KConfigs
- added lpass suffix to compatible for nodes that are dealing with LPASS IP.
- fix few typos.

Srinivas Kandagatla (20):
  soc: dt-bindings: qcom: apr: convert to yaml
  soc: qcom: apr: make code more reuseable
  soc: dt-bindings: qcom: add gpr bindings
  soc: qcom: apr: Add GPR support
  ASoC: dt-bindings: move LPASS dai related bindings out of q6afe
  ASoC: dt-bindings: move LPASS clocks related bindings out of q6afe
  ASoC: dt-bindings: rename q6afe.h to q6dsp-lpass-ports.h
  ASoC: qdsp6: q6afe-dai: move lpass audio ports to common file
  ASoC: qdsp6: q6afe-clocks: move audio-clocks to common file
  ASoC: dt-bindings: q6dsp: add q6apm-lpass-dai compatible
  ASoC: dt-bindings: lpass-clocks: add q6prm clocks compatible
  ASoC: dt-bindings: add q6apm digital audio stream bindings
  ASoC: qdsp6: audioreach: add basic pkt alloc support
  ASoC: qdsp6: audioreach: add q6apm support
  ASoC: qdsp6: audioreach: add module configuration command helpers
  ASoC: qdsp6: audioreach: add topology support
  ASoC: qdsp6: audioreach: add q6apm-dai support
  ASoC: qdsp6: audioreach: add q6apm lpass dai support
  ASoC: qdsp6: audioreach: add q6prm support
  ASoC: qdsp6: audioreach: add support for q6prm-clocks

 .../devicetree/bindings/soc/qcom/qcom,apr.txt |  134 --
 .../bindings/soc/qcom/qcom,apr.yaml           |  209 +++
 .../devicetree/bindings/sound/qcom,q6afe.txt  |  181 ---
 .../bindings/sound/qcom,q6apm-dai.yaml        |   50 +
 .../sound/qcom,q6dsp-lpass-clocks.yaml        |   74 ++
 .../sound/qcom,q6dsp-lpass-ports.yaml         |  202 +++
 drivers/soc/qcom/Kconfig                      |    8 +
 drivers/soc/qcom/apr.c                        |  286 +++-
 include/dt-bindings/soc/qcom,gpr.h            |   18 +
 include/dt-bindings/sound/qcom,q6afe.h        |  203 +--
 .../sound/qcom,q6dsp-lpass-ports.h            |  208 +++
 include/linux/soc/qcom/apr.h                  |   70 +-
 include/uapi/sound/snd_ar_tokens.h            |  203 +++
 sound/soc/qcom/Kconfig                        |   22 +
 sound/soc/qcom/qdsp6/Makefile                 |   11 +-
 sound/soc/qcom/qdsp6/audioreach.c             | 1170 +++++++++++++++++
 sound/soc/qcom/qdsp6/audioreach.h             |  692 ++++++++++
 sound/soc/qcom/qdsp6/q6afe-clocks.c           |  187 +--
 sound/soc/qcom/qdsp6/q6afe-dai.c              |  687 +---------
 sound/soc/qcom/qdsp6/q6apm-dai.c              |  504 +++++++
 sound/soc/qcom/qdsp6/q6apm-lpass-dais.c       |  266 ++++
 sound/soc/qcom/qdsp6/q6apm.c                  |  916 +++++++++++++
 sound/soc/qcom/qdsp6/q6apm.h                  |  154 +++
 sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c     |  186 +++
 sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.h     |   30 +
 sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c      |  627 +++++++++
 sound/soc/qcom/qdsp6/q6dsp-lpass-ports.h      |   22 +
 sound/soc/qcom/qdsp6/q6prm-clocks.c           |   85 ++
 sound/soc/qcom/qdsp6/q6prm.c                  |  256 ++++
 sound/soc/qcom/qdsp6/q6prm.h                  |   78 ++
 sound/soc/qcom/qdsp6/topology.c               | 1118 ++++++++++++++++
 31 files changed, 7443 insertions(+), 1414 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt
 create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml
 create mode 100644 include/dt-bindings/soc/qcom,gpr.h
 create mode 100644 include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h
 create mode 100644 include/uapi/sound/snd_ar_tokens.h
 create mode 100644 sound/soc/qcom/qdsp6/audioreach.c
 create mode 100644 sound/soc/qcom/qdsp6/audioreach.h
 create mode 100644 sound/soc/qcom/qdsp6/q6apm-dai.c
 create mode 100644 sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
 create mode 100644 sound/soc/qcom/qdsp6/q6apm.c
 create mode 100644 sound/soc/qcom/qdsp6/q6apm.h
 create mode 100644 sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c
 create mode 100644 sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.h
 create mode 100644 sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c
 create mode 100644 sound/soc/qcom/qdsp6/q6dsp-lpass-ports.h
 create mode 100644 sound/soc/qcom/qdsp6/q6prm-clocks.c
 create mode 100644 sound/soc/qcom/qdsp6/q6prm.c
 create mode 100644 sound/soc/qcom/qdsp6/q6prm.h
 create mode 100644 sound/soc/qcom/qdsp6/topology.c

-- 
2.21.0


^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2021-09-01 14:30 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09 11:23 [PATCH v4 00/20] ASoC: qcom: Add AudioReach support Srinivas Kandagatla
2021-08-09 11:23 ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 01/20] soc: dt-bindings: qcom: apr: convert to yaml Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-13 22:23   ` Rob Herring
2021-08-13 22:23     ` Rob Herring
2021-09-01 14:28     ` Srinivas Kandagatla
2021-09-01 14:28       ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 02/20] soc: qcom: apr: make code more reuseable Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 03/20] soc: dt-bindings: qcom: add gpr bindings Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-13 22:32   ` Rob Herring
2021-08-13 22:32     ` Rob Herring
2021-09-01 14:28     ` Srinivas Kandagatla
2021-09-01 14:28       ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 04/20] soc: qcom: apr: Add GPR support Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 05/20] ASoC: dt-bindings: move LPASS dai related bindings out of q6afe Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 06/20] ASoC: dt-bindings: move LPASS clocks " Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 07/20] ASoC: dt-bindings: rename q6afe.h to q6dsp-lpass-ports.h Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 08/20] ASoC: qdsp6: q6afe-dai: move lpass audio ports to common file Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 09/20] ASoC: qdsp6: q6afe-clocks: move audio-clocks " Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 10/20] ASoC: dt-bindings: q6dsp: add q6apm-lpass-dai compatible Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 11/20] ASoC: dt-bindings: lpass-clocks: add q6prm clocks compatible Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 12/20] ASoC: dt-bindings: add q6apm digital audio stream bindings Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 13/20] ASoC: qdsp6: audioreach: add basic pkt alloc support Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 14/20] ASoC: qdsp6: audioreach: add q6apm support Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 15/20] ASoC: qdsp6: audioreach: add module configuration command helpers Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 16/20] ASoC: qdsp6: audioreach: add topology support Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 17/20] ASoC: qdsp6: audioreach: add q6apm-dai support Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 18/20] ASoC: qdsp6: audioreach: add q6apm lpass dai support Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 19/20] ASoC: qdsp6: audioreach: add q6prm support Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 20/20] ASoC: qdsp6: audioreach: add support for q6prm-clocks Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.