← Documents Documentation/devicetree/bindings/sound/fsl,audmix.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Sound

NXP Audio Mixer

i.MX8QM AUDMIX의 TDM stream mixing, DAI phandle과 graph port를 설명합니다.

Source pathDocumentation/devicetree/bindings/sound/fsl,audmix.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

fsl,audmix.yaml:1-142

NXP/Freescale audio mixer, sample-rate converter와 serial interface의 signal flow, clock, DMA와 조건부 속성을 먼저 해설하고, 접을 수 있는 영어 원문 전체와 원문 줄 좌표를 보존한 한국어 전문 번역을 제공합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
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 <shengjiu.wang@nxp.com>
11 - Frank Li <Frank.Li@nxp.com>
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 const: fsl,imx8qm-audmix
38
39 reg:
40 maxItems: 1
41
42 clocks:
43 maxItems: 1
44
45 clock-names:
46 items:
47 - const: ipg
48
49 power-domains:
50 maxItems: 1
51
52 dais:
53 description: contain a list of phandles to AUDMIX connected DAIs.
54 $ref: /schemas/types.yaml#/definitions/phandle-array
55 minItems: 2
56 items:
57 - description: the AUDMIX output
58 maxItems: 1
59 - description: serial audio input 1
60 maxItems: 1
61 - description: serial audio input 2
62 maxItems: 1
63
64 ports:
65 $ref: /schemas/graph.yaml#/properties/ports
66 patternProperties:
67 '^port@[0-1]':
68 $ref: audio-graph-port.yaml#
69 unevaluatedProperties: false
70 description: Input port from SAI TX
71
72 properties:
73 port@2:
74 $ref: audio-graph-port.yaml#
75 unevaluatedProperties: false
76 description: Output port to SAI RX
77
78 required:
79 - compatible
80 - reg
81 - clocks
82 - clock-names
83 - power-domains
84
85 unevaluatedProperties: false
86
87 examples:
88 - |
89 audmix@59840000 {
90 compatible = "fsl,imx8qm-audmix";
91 reg = <0x59840000 0x10000>;
92 clocks = <&amix_lpcg 0>;
93 clock-names = "ipg";
94 power-domains = <&pd_audmix>;
95 dais = <&sai4>, <&sai5>;
96
97 ports {
98 #address-cells = <1>;
99 #size-cells = <0>;
100
101 port@0 {
102 reg = <0>;
103 playback-only;
104
105 amix_endpoint0: endpoint {
106 dai-tdm-slot-num = <8>;
107 dai-tdm-slot-width = <32>;
108 dai-tdm-slot-width-map = <32 8 32>;
109 dai-format = "dsp_a";
110 remote-endpoint = <&be00_ep>;
111 };
112 };
113
114 port@1 {
115 reg = <1>;
116 playback-only;
117
118 amix_endpoint1: endpoint {
119 dai-tdm-slot-num = <8>;
120 dai-tdm-slot-width = <32>;
121 dai-tdm-slot-width-map = <32 8 32>;
122 dai-format = "dsp_a";
123 remote-endpoint = <&be01_ep>;
124 };
125 };
126
127 port@2 {
128 reg = <2>;
129 capture-only;
130
131 amix_endpoint2: endpoint {
132 dai-tdm-slot-num = <8>;
133 dai-tdm-slot-width = <32>;
134 dai-tdm-slot-width-map = <32 8 32>;
135 dai-format = "dsp_a";
136 bitclock-master;
137 frame-master;
138 remote-endpoint = <&be02_ep>;
139 };
140 };
141 };
142 };
143

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

NXP Audio Mixer schema

1-12

이 YAML binding은 NXP on-chip Audio Mixer(AUDMIX)를 정의합니다. Schema ID는 `http://devicetree.org/schemas/sound/fsl,audmix.yaml#`이고 maintainer는 Shengjiu Wang과 Frank Li입니다.

두 TDM stream의 mixing 동작

13-34

AUDMIX는 두 audio stream을 하나로 섞습니다. 두 serial input은 각각 SAI가 구동하며 TDM frame마다 8 audio channel을 전달합니다. Mixer는 두 interface의 같은 channel sample을 하나로 합치고, mixing 전에 각 input을 설정에 따라 감쇠할 수 있습니다.

Output도 input과 같은 TDM frame 형식의 serial audio interface입니다. Codec의 serial DAC TDM interface를 구동하고 normal SAI receive path와 external pin으로도 보내 CPU가 readback할 수 있습니다.

Output source는 serial audio input 1, serial audio input 2, mixed audio 중 하나입니다. Mixing 자체는 sample rate와 독립적이지만 두 input stream은 같은 sample rate와 같은 TDM channel 수를 가져야 합니다.

주소, IPG clock과 power domain

35-51

`compatible`은 `fsl,imx8qm-audmix`, `reg`, `clocks`, `power-domains`는 각각 최대 한 항목입니다. `clock-names`는 `ipg`입니다.

DAI phandle과 graph port

52-77

`dais`는 AUDMIX에 연결된 DAI phandle 배열로 최소 두 항목입니다. 항목은 AUDMIX output, serial audio input 1, serial audio input 2 순서로 정의되며 각 항목은 phandle 하나입니다.

`ports`는 graph schema를 따릅니다. `port@0`과 `port@1`은 SAI TX에서 들어오는 input port이고 `port@2`는 SAI RX로 나가는 output port입니다. 각 port는 `audio-graph-port.yaml#`을 참조하며 정의되지 않은 속성을 허용하지 않습니다.

필수 속성과 확장 제한

78-86

필수 속성은 `compatible`, `reg`, `clocks`, `clock-names`, `power-domains`입니다. `unevaluatedProperties: false`이므로 schema에서 평가하지 않은 속성은 허용하지 않습니다.

i.MX8QM 8-channel AUDMIX 예제

87-142

예제는 address `0x59840000`의 AUDMIX에 IPG clock, power domain, SAI4와 SAI5를 연결합니다. 두 playback input과 한 capture output은 모두 8개 32-bit TDM slot과 `dsp_a` format을 사용하며 output endpoint가 bit/frame clock master입니다.

audmix@59840000 {
  compatible = "fsl,imx8qm-audmix";
  reg = <0x59840000 0x10000>;
  clocks = <&amix_lpcg 0>;
  clock-names = "ipg";
  power-domains = <&pd_audmix>;
  dais = <&sai4>, <&sai5>;

  ports {
    #address-cells = <1>;
    #size-cells = <0>;

    port@0 {
      reg = <0>;
      playback-only;

      amix_endpoint0: endpoint {
        dai-tdm-slot-num = <8>;
        dai-tdm-slot-width = <32>;
        dai-tdm-slot-width-map = <32 8 32>;
        dai-format = "dsp_a";
        remote-endpoint = <&be00_ep>;
      };
    };

    port@1 {
      reg = <1>;
      playback-only;

      amix_endpoint1: endpoint {
        dai-tdm-slot-num = <8>;
        dai-tdm-slot-width = <32>;
        dai-tdm-slot-width-map = <32 8 32>;
        dai-format = "dsp_a";
        remote-endpoint = <&be01_ep>;
      };
    };

    port@2 {
      reg = <2>;
      capture-only;

      amix_endpoint2: endpoint {
        dai-tdm-slot-num = <8>;
        dai-tdm-slot-width = <32>;
        dai-tdm-slot-width-map = <32 8 32>;
        dai-format = "dsp_a";
        bitclock-master;
        frame-master;
        remote-endpoint = <&be02_ep>;
      };
    };
  };
};