Unverified Commit ed05d691 authored by Mark Brown's avatar Mark Brown
Browse files

OPE support on Tegra210 and later

Merge series from Sameer Pujar <spujar@nvidia.com>:

This series adds support for Output Prcoessing Module (OPE) module on
Tegra210 and later generations of SoCs. OPE is a client of AHUB and
it has sub blocks of PEQ (Parametric Equalizer) and MBDRC (Multi Band
Dynamic Range Compressor) for data processing.

An ASoC component is registered for OPE, which includes PEQ and MBDRC
functions as well. This can be plugged in audio path using ALSA mixer
controls. The series adds necessary binding documentaion, driver and
DT binding patches to enable OPE module on Jetson platforms.
parents 9f2d5e1e 7ee0910d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -110,6 +110,10 @@ patternProperties:
    type: object
    $ref: nvidia,tegra186-asrc.yaml#

  '^processing-engine@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra210-ope.yaml#

required:
  - compatible
  - reg
+47 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nvidia,tegra210-mbdrc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Tegra210 MBDRC

description:
  The Multi Band Dynamic Range Compressor (MBDRC) is part of Output
  Processing Engine (OPE) which interfaces with Audio Hub (AHUB) via
  Audio Client Interface (ACIF). MBDRC can be used as a traditional
  single full band or a dual band or a multi band dynamic processor.

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Mohan Kumar <mkumard@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

properties:
  compatible:
    oneOf:
      - const: nvidia,tegra210-mbdrc
      - items:
          - enum:
              - nvidia,tegra234-mbdrc
              - nvidia,tegra194-mbdrc
              - nvidia,tegra186-mbdrc
          - const: nvidia,tegra210-mbdrc

  reg:
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    dynamic-range-compressor@702d8200 {
        compatible = "nvidia,tegra210-mbdrc";
        reg = <0x702d8200 0x200>;
    };

...
+87 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nvidia,tegra210-ope.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Tegra210 OPE

description:
  The Output Processing Engine (OPE) is one of the AHUB client. It has
  PEQ (Parametric Equalizer) and MBDRC (Multi Band Dynamic Range Compressor)
  sub blocks for data processing.

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Mohan Kumar <mkumard@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

allOf:
  - $ref: name-prefix.yaml#

properties:
  compatible:
    oneOf:
      - const: nvidia,tegra210-ope
      - items:
          - enum:
              - nvidia,tegra234-ope
              - nvidia,tegra194-ope
              - nvidia,tegra186-ope
          - const: nvidia,tegra210-ope

  reg:
    maxItems: 1

  "#address-cells":
    const: 1

  "#size-cells":
    const: 1

  ranges: true

  sound-name-prefix:
    pattern: "^OPE[1-9]$"

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    properties:
      port@0:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description:
          OPE ACIF (Audio Client Interface) input port. This is connected
          to corresponding ACIF output port on AHUB (Audio Hub).

      port@1:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description:
          OPE ACIF output port. This is connected to corresponding ACIF
          input port on AHUB.

patternProperties:
  '^equalizer@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra210-peq.yaml#

  '^dynamic-range-compressor@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra210-mbdrc.yaml#

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    processing-engine@702d8000 {
        compatible = "nvidia,tegra210-ope";
        reg = <0x702d8000 0x100>;
        sound-name-prefix = "OPE1";
    };

...
+48 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nvidia,tegra210-peq.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Tegra210 PEQ

description:
  The Parametric Equalizer (PEQ) is a cascade of biquad filters with
  each filter tuned based on certain parameters. It can be used to
  equalize the irregularities in the speaker frequency response.
  PEQ sits inside Output Processing Engine (OPE) which interfaces
  with Audio Hub (AHUB) via Audio Client Interface (ACIF).

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Mohan Kumar <mkumard@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

properties:
  compatible:
    oneOf:
      - const: nvidia,tegra210-peq
      - items:
          - enum:
              - nvidia,tegra234-peq
              - nvidia,tegra194-peq
              - nvidia,tegra186-peq
          - const: nvidia,tegra210-peq

  reg:
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    equalizer@702d8100 {
        compatible = "nvidia,tegra210-peq";
        reg = <0x702d8100 0x100>;
    };

...
+9 −0
Original line number Diff line number Diff line
@@ -85,6 +85,15 @@ config SND_SOC_TEGRA210_I2S
	  compatible devices.
	  Say Y or M if you want to add support for Tegra210 I2S module.

config SND_SOC_TEGRA210_OPE
	tristate "Tegra210 OPE module"
	help
	  Config to enable the Output Processing Engine (OPE) which includes
	  Parametric Equalizer (PEQ) and Multi Band Dynamic Range Compressor
	  (MBDRC) sub blocks for data processing. It can support up to 8
	  channels.
	  Say Y or M if you want to add support for Tegra210 OPE module.

config SND_SOC_TEGRA186_ASRC
	tristate "Tegra186 ASRC module"
	help
Loading