| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/sound/fsl,audmix.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: NXP Audio Mixer (AUDMIX). |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Shengjiu Wang <[email protected]> |
| 11 |
- Frank Li <[email protected]> |
| 12 |
|
| 13 |
description: | |
| 14 |
The Audio Mixer is a on-chip functional module that allows mixing of two |
| 15 |
audio streams into a single audio stream. Audio Mixer has two input serial |
| 16 |
audio interfaces. These are driven by two Synchronous Audio interface |
| 17 |
modules (SAI). Each input serial interface carries 8 audio channels in its |
| 18 |
frame in TDM manner. Mixer mixes audio samples of corresponding channels |
| 19 |
from two interfaces into a single sample. Before mixing, audio samples of |
| 20 |
two inputs can be attenuated based on configuration. The output of the |
| 21 |
Audio Mixer is also a serial audio interface. Like input interfaces it has |
| 22 |
the same TDM frame format. This output is used to drive the serial DAC TDM |
| 23 |
interface of audio codec and also sent to the external pins along with the |
| 24 |
receive path of normal audio SAI module for readback by the CPU. |
| 25 |
|
| 26 |
The output of Audio Mixer can be selected from any of the three streams |
| 27 |
- serial audio input 1 |
| 28 |
- serial audio input 2 |
| 29 |
- mixed audio |
| 30 |
|
| 31 |
Mixing operation is independent of audio sample rate but the two audio |
| 32 |
input streams must have same audio sample rate with same number of channels |
| 33 |
in TDM frame to be eligible for mixing. |
| 34 |
|
| 35 |
properties: |
| 36 |
compatible: |
| 37 |
enum: |
| 38 |
- fsl,imx8qm-audmix |
| 39 |
- fsl,imx952-audmix |
| 40 |
|
| 41 |
reg: |
| 42 |
maxItems: 1 |
| 43 |
|
| 44 |
clocks: |
| 45 |
maxItems: 1 |
| 46 |
|
| 47 |
clock-names: |
| 48 |
items: |
| 49 |
- const: ipg |
| 50 |
|
| 51 |
power-domains: |
| 52 |
maxItems: 1 |
| 53 |
|
| 54 |
dais: |
| 55 |
description: contain a list of phandles to AUDMIX connected DAIs. |
| 56 |
$ref: /schemas/types.yaml#/definitions/phandle-array |
| 57 |
minItems: 2 |
| 58 |
items: |
| 59 |
- description: the AUDMIX output |
| 60 |
maxItems: 1 |
| 61 |
- description: serial audio input 1 |
| 62 |
maxItems: 1 |
| 63 |
- description: serial audio input 2 |
| 64 |
maxItems: 1 |
| 65 |
|
| 66 |
ports: |
| 67 |
$ref: /schemas/graph.yaml#/properties/ports |
| 68 |
patternProperties: |
| 69 |
'^port@[0-1]': |
| 70 |
$ref: audio-graph-port.yaml# |
| 71 |
unevaluatedProperties: false |
| 72 |
description: Input port from SAI TX |
| 73 |
|
| 74 |
properties: |
| 75 |
port@2: |
| 76 |
$ref: audio-graph-port.yaml# |
| 77 |
unevaluatedProperties: false |
| 78 |
description: Output port to SAI RX |
| 79 |
|
| 80 |
required: |
| 81 |
- compatible |
| 82 |
- reg |
| 83 |
- clocks |
| 84 |
- clock-names |
| 85 |
|
| 86 |
allOf: |
| 87 |
- if: |
| 88 |
properties: |
| 89 |
compatible: |
| 90 |
contains: |
| 91 |
enum: |
| 92 |
- fsl,imx8qm-audmix |
| 93 |
then: |
| 94 |
required: |
| 95 |
- power-domains |
| 96 |
|
| 97 |
unevaluatedProperties: false |
| 98 |
|
| 99 |
examples: |
| 100 |
- | |
| 101 |
audmix@59840000 { |
| 102 |
compatible = "fsl,imx8qm-audmix"; |
| 103 |
reg = <0x59840000 0x10000>; |
| 104 |
clocks = <&amix_lpcg 0>; |
| 105 |
clock-names = "ipg"; |
| 106 |
power-domains = <&pd_audmix>; |
| 107 |
dais = <&sai4>, <&sai5>; |
| 108 |
|
| 109 |
ports { |
| 110 |
#address-cells = <1>; |
| 111 |
#size-cells = <0>; |
| 112 |
|
| 113 |
port@0 { |
| 114 |
reg = <0>; |
| 115 |
playback-only; |
| 116 |
|
| 117 |
amix_endpoint0: endpoint { |
| 118 |
dai-tdm-slot-num = <8>; |
| 119 |
dai-tdm-slot-width = <32>; |
| 120 |
dai-tdm-slot-width-map = <32 8 32>; |
| 121 |
dai-format = "dsp_a"; |
| 122 |
remote-endpoint = <&be00_ep>; |
| 123 |
}; |
| 124 |
}; |
| 125 |
|
| 126 |
port@1 { |
| 127 |
reg = <1>; |
| 128 |
playback-only; |
| 129 |
|
| 130 |
amix_endpoint1: endpoint { |
| 131 |
dai-tdm-slot-num = <8>; |
| 132 |
dai-tdm-slot-width = <32>; |
| 133 |
dai-tdm-slot-width-map = <32 8 32>; |
| 134 |
dai-format = "dsp_a"; |
| 135 |
remote-endpoint = <&be01_ep>; |
| 136 |
}; |
| 137 |
}; |
| 138 |
|
| 139 |
port@2 { |
| 140 |
reg = <2>; |
| 141 |
capture-only; |
| 142 |
|
| 143 |
amix_endpoint2: endpoint { |
| 144 |
dai-tdm-slot-num = <8>; |
| 145 |
dai-tdm-slot-width = <32>; |
| 146 |
dai-tdm-slot-width-map = <32 8 32>; |
| 147 |
dai-format = "dsp_a"; |
| 148 |
bitclock-master; |
| 149 |
frame-master; |
| 150 |
remote-endpoint = <&be02_ep>; |
| 151 |
}; |
| 152 |
}; |
| 153 |
}; |
| 154 |
}; |