← Documents Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Sound

Freescale i.MX ASRC controller

i.MX ASRC의 DPCM Front End 동작, DMA·clock map, sample rate·width·format과 SoC별 조건을 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

fsl,imx-asrc.yaml:1-189

Freescale/NXP audio sample-rate conversion, board-level codec routing과 CM7 SOF 처리 경로의 핵심 속성을 먼저 해설하고, 접을 수 있는 영어 원문 전체와 원문 줄 좌표를 보존한 한국어 전문 번역을 제공합니다.

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,imx-asrc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Freescale Asynchronous Sample Rate Converter (ASRC) Controller
8
9 description:
10 The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of
11 a signal associated with an input clock into a signal associated with a
12 different output clock. The driver currently works as a Front End of DPCM
13 with other Back Ends Audio controller such as ESAI, SSI and SAI. It has
14 three pairs to support three substreams within totally 10 channels.
15
16 maintainers:
17 - Shawn Guo <shawnguo@kernel.org>
18 - Sascha Hauer <s.hauer@pengutronix.de>
19
20 properties:
21 compatible:
22 oneOf:
23 - enum:
24 - fsl,imx35-asrc
25 - fsl,imx53-asrc
26 - fsl,imx8qm-asrc
27 - fsl,imx8qxp-asrc
28 - items:
29 - enum:
30 - fsl,imx6sx-asrc
31 - fsl,imx6ul-asrc
32 - const: fsl,imx53-asrc
33
34 reg:
35 maxItems: 1
36
37 interrupts:
38 maxItems: 1
39
40 dmas:
41 maxItems: 6
42
43 dma-names:
44 items:
45 - const: rxa
46 - const: rxb
47 - const: rxc
48 - const: txa
49 - const: txb
50 - const: txc
51
52 clocks:
53 maxItems: 19
54
55 clock-names:
56 items:
57 - const: mem
58 - const: ipg
59 - const: asrck_0
60 - const: asrck_1
61 - const: asrck_2
62 - const: asrck_3
63 - const: asrck_4
64 - const: asrck_5
65 - const: asrck_6
66 - const: asrck_7
67 - const: asrck_8
68 - const: asrck_9
69 - const: asrck_a
70 - const: asrck_b
71 - const: asrck_c
72 - const: asrck_d
73 - const: asrck_e
74 - const: asrck_f
75 - const: spba
76
77 power-domains:
78 maxItems: 1
79
80 port:
81 $ref: audio-graph-port.yaml#
82 unevaluatedProperties: false
83
84 fsl,asrc-rate:
85 $ref: /schemas/types.yaml#/definitions/uint32
86 description: The mutual sample rate used by DPCM Back Ends
87
88 fsl,asrc-width:
89 $ref: /schemas/types.yaml#/definitions/uint32
90 description: The mutual sample width used by DPCM Back Ends
91 enum: [16, 24]
92
93 fsl,asrc-clk-map:
94 $ref: /schemas/types.yaml#/definitions/uint32
95 description:
96 Defines clock map used in driver
97 <0> - select the map for asrc0 in imx8qm/imx8qxp
98 <1> - select the map for asrc1 in imx8qm/imx8qxp
99 enum: [0, 1]
100
101 big-endian:
102 type: boolean
103 description:
104 If this property is absent, the little endian mode will be in use as
105 default. Otherwise, the big endian mode will be in use for all the
106 device registers.
107
108 fsl,asrc-format:
109 $ref: /schemas/types.yaml#/definitions/uint32
110 description:
111 Defines a mutual sample format used by DPCM Back Ends, which can
112 replace the fsl,asrc-width. The value is 2 (S16_LE), or 6 (S24_LE).
113 enum: [2, 6]
114
115 required:
116 - compatible
117 - reg
118 - interrupts
119 - dmas
120 - dma-names
121 - clocks
122 - clock-names
123 - fsl,asrc-rate
124 - fsl,asrc-width
125
126 allOf:
127 - $ref: dai-common.yaml#
128 - if:
129 properties:
130 compatible:
131 contains:
132 enum:
133 - fsl,imx8qm-asrc
134 - fsl,imx8qxp-asrc
135 then:
136 required:
137 - fsl,asrc-clk-map
138 else:
139 properties:
140 fsl,asrc-clk-map: false
141
142 - if:
143 properties:
144 compatible:
145 contains:
146 enum:
147 - fsl,imx8qm-asrc
148 - fsl,imx8qxp-asrc
149 then:
150 required:
151 - power-domains
152
153 unevaluatedProperties: false
154
155 examples:
156 - |
157 #include <dt-bindings/interrupt-controller/irq.h>
158 #include <dt-bindings/clock/imx6qdl-clock.h>
159 asrc: asrc@2034000 {
160 compatible = "fsl,imx53-asrc";
161 reg = <0x02034000 0x4000>;
162 interrupts = <0 50 IRQ_TYPE_LEVEL_HIGH>;
163 clocks = <&clks IMX6QDL_CLK_ASRC_IPG>,
164 <&clks IMX6QDL_CLK_ASRC_MEM>, <&clks 0>,
165 <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
166 <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
167 <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
168 <&clks IMX6QDL_CLK_ASRC>, <&clks 0>, <&clks 0>,
169 <&clks IMX6QDL_CLK_SPBA>;
170 clock-names = "mem", "ipg", "asrck_0",
171 "asrck_1", "asrck_2", "asrck_3", "asrck_4",
172 "asrck_5", "asrck_6", "asrck_7", "asrck_8",
173 "asrck_9", "asrck_a", "asrck_b", "asrck_c",
174 "asrck_d", "asrck_e", "asrck_f", "spba";
175 dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>,
176 <&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>;
177 dma-names = "rxa", "rxb", "rxc",
178 "txa", "txb", "txc";
179 fsl,asrc-rate = <48000>;
180 fsl,asrc-width = <16>;
181
182 port {
183 playback-only;
184
185 asrc_endpoint: endpoint {
186 remote-endpoint = <&fe00_ep>;
187 };
188 };
189 };
190

3. 한국어 전문 번역

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

Freescale 비동기 샘플 레이트 변환기

1-19

이 YAML binding은 Freescale Asynchronous Sample Rate Converter(ASRC) controller를 정의합니다. ASRC는 입력 clock에 연결된 신호의 sampling rate를 서로 다른 출력 clock에 연결된 신호의 sampling rate로 변환합니다.

현재 driver는 ESAI, SSI, SAI 같은 다른 Back End audio controller와 함께 DPCM Front End로 동작합니다. 세 pair가 총 10 channel 안에서 세 substream을 지원합니다. Schema ID는 `http://devicetree.org/schemas/sound/fsl,imx-asrc.yaml#`이며 maintainer는 Shawn Guo와 Sascha Hauer입니다.

SoC 호환성, register, IRQ와 DMA

20-51

`compatible`은 `fsl,imx35-asrc`, `fsl,imx53-asrc`, `fsl,imx8qm-asrc`, `fsl,imx8qxp-asrc` 중 하나이거나, `fsl,imx6sx-asrc` 또는 `fsl,imx6ul-asrc` 뒤에 fallback `fsl,imx53-asrc`를 두는 두 항목 배열입니다.

`reg`와 `interrupts`는 각각 최대 한 항목입니다. `dmas`는 최대 6개이고 `dma-names`는 수신 pair `rxa`, `rxb`, `rxc` 다음 송신 pair `txa`, `txb`, `txc` 순서입니다.

19개 clock 이름

52-76

`clocks`는 최대 19개입니다. `clock-names`의 순서는 memory clock `mem`, IPG clock `ipg`, 변환 clock `asrck_0`부터 `asrck_9` 및 `asrck_a`부터 `asrck_f`, 마지막 Shared Peripheral Bus clock `spba`입니다.

Power domain, graph port, 공통 rate와 width

77-92

`power-domains`는 최대 한 항목입니다. `port`는 `audio-graph-port.yaml#`을 참조하며 평가되지 않은 추가 속성을 허용하지 않습니다.

`fsl,asrc-rate`는 DPCM Back End들이 함께 사용하는 sample rate를 나타내는 `uint32`입니다. `fsl,asrc-width`는 공통 sample width이며 허용값은 16 또는 24입니다.

Clock map, endian과 sample format

93-114

`fsl,asrc-clk-map`은 driver에서 사용할 clock map을 지정합니다. 값 0은 i.MX8QM/i.MX8QXP의 ASRC0 map, 값 1은 ASRC1 map을 선택합니다.

`big-endian`이 없으면 모든 device register에 기본 little-endian mode를 사용하고, 있으면 big-endian mode를 사용합니다.

`fsl,asrc-format`은 `fsl,asrc-width`를 대체할 수 있는 DPCM Back End 공통 sample format입니다. 값 2는 `S16_LE`, 값 6은 `S24_LE`입니다.

필수 속성과 i.MX8Q 조건

115-154

항상 필요한 속성은 `compatible`, `reg`, `interrupts`, `dmas`, `dma-names`, `clocks`, `clock-names`, `fsl,asrc-rate`, `fsl,asrc-width`입니다. Binding은 `dai-common.yaml#`을 함께 적용하고 평가되지 않은 속성은 허용하지 않습니다.

`compatible`에 `fsl,imx8qm-asrc` 또는 `fsl,imx8qxp-asrc`가 포함되면 `fsl,asrc-clk-map`이 필수이며, 그 밖의 SoC에서는 이 속성이 금지됩니다. 같은 두 SoC에는 `power-domains`도 필수입니다.

i.MX53 호환 ASRC 예제

155-189

예제는 `0x02034000`의 ASRC에 interrupt 50, 19개 clock, 여섯 SDMA channel을 연결하고 공통 rate 48000 Hz와 width 16을 설정합니다. `playback-only` graph endpoint는 `fe00_ep`와 연결됩니다.

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/imx6qdl-clock.h>
asrc: asrc@2034000 {
    compatible = "fsl,imx53-asrc";
    reg = <0x02034000 0x4000>;
    interrupts = <0 50 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&clks IMX6QDL_CLK_ASRC_IPG>,
             <&clks IMX6QDL_CLK_ASRC_MEM>, <&clks 0>,
             <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
             <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
             <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
             <&clks IMX6QDL_CLK_ASRC>, <&clks 0>, <&clks 0>,
             <&clks IMX6QDL_CLK_SPBA>;
    clock-names = "mem", "ipg", "asrck_0",
            "asrck_1", "asrck_2", "asrck_3", "asrck_4",
            "asrck_5", "asrck_6", "asrck_7", "asrck_8",
            "asrck_9", "asrck_a", "asrck_b", "asrck_c",
            "asrck_d", "asrck_e", "asrck_f", "spba";
    dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>,
           <&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>;
    dma-names = "rxa", "rxb", "rxc",
                "txa", "txb", "txc";
    fsl,asrc-rate = <48000>;
    fsl,asrc-width = <16>;

    port {
        playback-only;

        asrc_endpoint: endpoint {
            remote-endpoint = <&fe00_ep>;
        };
   };
};