Unverified Commit 66e384d8 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: ASRC support on Tegra186 and later

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

This series adds support for Asynchronous Sample Rate Converter (ASRC)
module on Tegra186 and later generations of SoCs. ASRC is a client of
AHUB. The driver and DT support is added to make it work with Tegra
audio graph card. The module can be plugged into audio path using ALSA
mixer controls.

ASRC supports two modes of operation, where it gets the ratio info
from SW and ratio detector module. Presently the support is added for
SW mode.
parents bcb3d072 76821c13
Loading
Loading
Loading
Loading
+81 −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,tegra186-asrc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Tegra186 ASRC Device Tree Bindings

description: |
  Asynchronous Sample Rate Converter (ASRC) converts the sampling frequency
  of the input signal from one frequency to another. It can handle over a
  wide range of sample rate ratios (freq_in/freq_out) from 1:24 to 24:1.
  ASRC has two modes of operation. One where ratio can be programmed in SW
  and the other where it gets the information from ratio estimator module.

  It supports  sample rate conversions in the range of 8 to 192 kHz and
  supports 6 streams upto 12 total channels. The input data size can be
  16, 24 and 32 bits.

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

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

properties:
  $nodename:
    pattern: "^asrc@[0-9a-f]*$"

  compatible:
    oneOf:
      - const: nvidia,tegra186-asrc
      - items:
          - enum:
              - nvidia,tegra234-asrc
              - nvidia,tegra194-asrc
          - const: nvidia,tegra186-asrc

  reg:
    maxItems: 1

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

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    description: |
      ASRC has seven input ports and six output ports. Accordingly ACIF
      (Audio Client Interfaces) port nodes are defined to represent the
      ASRC inputs (port 0 to 6) and outputs (port 7 to 12). These are
      connected to corresponding ports on AHUB (Audio Hub). Additional
      input (port 6) is for receiving ratio information from estimator.

    patternProperties:
      '^port@[0-6]':
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: ASRC ACIF input ports
      '^port@[7-9]|1[1-2]':
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: ASRC ACIF output ports

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |

    asrc@2910000 {
        compatible = "nvidia,tegra186-asrc";
        reg = <0x2910000 0x2000>;
        sound-name-prefix = "ASRC1";
    };

...
+4 −0
Original line number Diff line number Diff line
@@ -106,6 +106,10 @@ patternProperties:
    type: object
    $ref: nvidia,tegra210-mixer.yaml#

  '^asrc@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra186-asrc.yaml#

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

config SND_SOC_TEGRA186_ASRC
	tristate "Tegra186 ASRC module"
	help
	  Config to enable the Asynchronous Sample Rate Converter (ASRC),
	  which converts the sampling frequency of the input signal from
	  one frequency to another. It can handle over a wide range of
	  sample rate ratios (freq_in/freq_out) from 1:24 to 24:1.
	  ASRC has two modes of operation. One where ratio can be programmed
	  in SW and the other where it gets information from ratio estimator
	  module.
	  Say Y or M if you want to add support for Tegra186 ASRC module.

config SND_SOC_TEGRA186_DSPK
	tristate "Tegra186 DSPK module"
	help
+2 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ snd-soc-tegra30-i2s-objs := tegra30_i2s.o
snd-soc-tegra210-ahub-objs := tegra210_ahub.o
snd-soc-tegra210-dmic-objs := tegra210_dmic.o
snd-soc-tegra210-i2s-objs := tegra210_i2s.o
snd-soc-tegra186-asrc-objs := tegra186_asrc.o
snd-soc-tegra186-dspk-objs := tegra186_dspk.o
snd-soc-tegra210-admaif-objs := tegra210_admaif.o
snd-soc-tegra210-mvc-objs := tegra210_mvc.o
@@ -29,6 +30,7 @@ obj-$(CONFIG_SND_SOC_TEGRA30_I2S) += snd-soc-tegra30-i2s.o
obj-$(CONFIG_SND_SOC_TEGRA210_DMIC) += snd-soc-tegra210-dmic.o
obj-$(CONFIG_SND_SOC_TEGRA210_AHUB) += snd-soc-tegra210-ahub.o
obj-$(CONFIG_SND_SOC_TEGRA210_I2S) += snd-soc-tegra210-i2s.o
obj-$(CONFIG_SND_SOC_TEGRA186_ASRC) += snd-soc-tegra186-asrc.o
obj-$(CONFIG_SND_SOC_TEGRA186_DSPK) += snd-soc-tegra186-dspk.o
obj-$(CONFIG_SND_SOC_TEGRA210_ADMAIF) += snd-soc-tegra210-admaif.o
obj-$(CONFIG_SND_SOC_TEGRA210_MVC) += snd-soc-tegra210-mvc.o
+1046 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading