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

Linux 6.18.37 · Devicetree Bindings / Sound

QMC audio

QMC channel 기반 DAI의 interleaved mode와 non-interleaved mode, TDM slot 예제를 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

fsl,qmc-audio.yaml:1-147

NXP/Freescale digital microphone, GPIO audio, SGTL5000 machine card와 QMC multichannel audio의 핵심 signal path와 조건부 속성을 먼저 해설하고, 접을 수 있는 영어 원문 전체와 줄 좌표를 보존한 한국어 전문 번역을 제공합니다.

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,qmc-audio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: QMC audio
8
9 maintainers:
10 - Herve Codina <herve.codina@bootlin.com>
11
12 description: |
13 The QMC audio is an ASoC component which uses QMC (QUICC Multichannel
14 Controller) channels to transfer the audio data.
15 It provides several DAIs. For each DAI, the DAI is working in interleaved mode
16 if only one QMC channel is used by the DAI or it is working in non-interleaved
17 mode if several QMC channels are used by the DAI.
18
19 allOf:
20 - $ref: dai-common.yaml#
21
22 properties:
23 compatible:
24 const: fsl,qmc-audio
25
26 '#address-cells':
27 const: 1
28 '#size-cells':
29 const: 0
30 '#sound-dai-cells':
31 const: 1
32
33 patternProperties:
34 '^dai@([0-9]|[1-5][0-9]|6[0-3])$':
35 description:
36 A DAI managed by this controller
37 type: object
38 additionalProperties: false
39
40 properties:
41 reg:
42 minimum: 0
43 maximum: 63
44 description:
45 The DAI number
46
47 fsl,qmc-chan:
48 $ref: /schemas/types.yaml#/definitions/phandle-array
49 items:
50 items:
51 - description: phandle to QMC node
52 - description: Channel number
53 minItems: 1
54 description:
55 Should be a phandle/number pair list. The list of phandle to QMC node
56 and the QMC channel pair to use for this DAI.
57 If only one phandle/number pair is provided, this DAI works in
58 interleaved mode, i.e. audio channels for this DAI are interleaved in
59 the QMC channel. If more than one pair is provided, this DAI works
60 in non-interleave mode. In that case the first audio channel uses the
61 the first QMC channel, the second audio channel uses the second QMC
62 channel, etc...
63
64 required:
65 - reg
66 - fsl,qmc-chan
67
68 required:
69 - compatible
70 - '#address-cells'
71 - '#size-cells'
72 - '#sound-dai-cells'
73
74 additionalProperties: false
75
76 examples:
77 - |
78 audio_controller: audio-controller {
79 compatible = "fsl,qmc-audio";
80 #address-cells = <1>;
81 #size-cells = <0>;
82 #sound-dai-cells = <1>;
83 dai@16 {
84 reg = <16>;
85 fsl,qmc-chan = <&qmc 16>;
86 };
87 dai@17 {
88 reg = <17>;
89 fsl,qmc-chan = <&qmc 17>;
90 };
91 dai@18 {
92 reg = <18>;
93 /* Non-interleaved mode */
94 fsl,qmc-chan = <&qmc 18>, <&qmc 19>;
95 };
96 };
97
98 sound {
99 compatible = "simple-audio-card";
100 #address-cells = <1>;
101 #size-cells = <0>;
102 simple-audio-card,dai-link@0 {
103 reg = <0>;
104 format = "dsp_b";
105 cpu {
106 sound-dai = <&audio_controller 16>;
107 };
108 codec {
109 sound-dai = <&codec1>;
110 dai-tdm-slot-num = <4>;
111 dai-tdm-slot-width = <8>;
112 /* TS 3, 5, 7, 9 */
113 dai-tdm-slot-tx-mask = <0 0 0 1 0 1 0 1 0 1>;
114 dai-tdm-slot-rx-mask = <0 0 0 1 0 1 0 1 0 1>;
115 };
116 };
117 simple-audio-card,dai-link@1 {
118 reg = <1>;
119 format = "dsp_b";
120 cpu {
121 sound-dai = <&audio_controller 17>;
122 };
123 codec {
124 sound-dai = <&codec2>;
125 dai-tdm-slot-num = <4>;
126 dai-tdm-slot-width = <8>;
127 /* TS 2, 4, 6, 8 */
128 dai-tdm-slot-tx-mask = <0 0 1 0 1 0 1 0 1>;
129 dai-tdm-slot-rx-mask = <0 0 1 0 1 0 1 0 1>;
130 };
131 };
132 simple-audio-card,dai-link@2 {
133 reg = <2>;
134 format = "dsp_b";
135 cpu {
136 sound-dai = <&audio_controller 18>;
137 };
138 codec {
139 sound-dai = <&codec3>;
140 dai-tdm-slot-num = <2>;
141 dai-tdm-slot-width = <8>;
142 /* TS 9, 10 */
143 dai-tdm-slot-tx-mask = <0 0 0 0 0 0 0 0 0 1 1>;
144 dai-tdm-slot-rx-mask = <0 0 0 0 0 0 0 0 0 1 1>;
145 };
146 };
147 };
148

3. 한국어 전문 번역

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

QMC channel 기반 ASoC component

1-21

QMC audio는 QMC(QUICC Multichannel Controller) channel로 audio data를 전송하는 ASoC component이며 여러 DAI를 제공합니다. 한 DAI가 QMC channel 하나만 사용하면 interleaved mode, 여러 QMC channel을 사용하면 non-interleaved mode로 동작합니다.

Schema ID는 `http://devicetree.org/schemas/sound/fsl,qmc-audio.yaml#`이며 maintainer는 Herve Codina입니다. 공통 `dai-common.yaml#` 규칙을 적용합니다.

Controller cell 구성

22-32

`compatible`은 `fsl,qmc-audio`입니다. `#address-cells`는 1, `#size-cells`는 0이고, DAI 선택 인수 한 개를 받으므로 `#sound-dai-cells`는 1입니다.

DAI 0~63과 QMC channel mapping

33-63

Child node 이름은 `^dai@([0-9]|[1-5][0-9]|6[0-3])$` pattern을 따라 DAI 0~63을 표현합니다. 각 node의 `reg`가 DAI 번호이며 범위는 0~63입니다.

`fsl,qmc-chan`은 QMC node phandle과 channel number의 pair 목록이며 최소 한 pair가 필요합니다. 한 pair이면 이 DAI의 audio channel들이 하나의 QMC channel에 interleave됩니다. 여러 pair이면 non-interleave mode이며 첫 audio channel은 첫 QMC channel, 두 번째 audio channel은 두 번째 QMC channel을 사용하는 식으로 대응합니다.

Child와 controller 필수 속성

64-75

각 DAI child에는 `reg`와 `fsl,qmc-chan`이 필수입니다. Controller에는 `compatible`, `#address-cells`, `#size-cells`, `#sound-dai-cells`가 필요하며 정의되지 않은 추가 속성은 허용하지 않습니다.

세 DAI를 제공하는 QMC audio controller

76-97

예제 controller는 DAI 16과 17을 각각 QMC channel 16과 17에 일대일 연결합니다. DAI 18은 QMC channel 18과 19 두 개를 사용해 non-interleaved mode로 동작합니다.

audio_controller: audio-controller {
    compatible = "fsl,qmc-audio";
    #address-cells = <1>;
    #size-cells = <0>;
    #sound-dai-cells = <1>;
    dai@16 {
        reg = <16>;
        fsl,qmc-chan = <&qmc 16>;
    };
    dai@17 {
        reg = <17>;
        fsl,qmc-chan = <&qmc 17>;
    };
    dai@18 {
        reg = <18>;
        /* Non-interleaved mode */
        fsl,qmc-chan = <&qmc 18>, <&qmc 19>;
    };
};

세 DSP_B DAI link와 TDM slot mask

98-147

`simple-audio-card` 예제는 controller DAI 16, 17, 18을 각각 codec1, codec2, codec3에 연결하고 모두 `dsp_b` format을 사용합니다. 앞의 두 link는 8-bit slot 4개를 쓰며 각각 TS 3·5·7·9와 TS 2·4·6·8 mask를 지정합니다. 세 번째 link는 8-bit slot 2개와 TS 9·10 mask를 사용합니다.

sound {
    compatible = "simple-audio-card";
    #address-cells = <1>;
    #size-cells = <0>;
    simple-audio-card,dai-link@0 {
        reg = <0>;
        format = "dsp_b";
        cpu {
            sound-dai = <&audio_controller 16>;
        };
        codec {
            sound-dai = <&codec1>;
            dai-tdm-slot-num = <4>;
            dai-tdm-slot-width = <8>;
            /* TS 3, 5, 7, 9 */
            dai-tdm-slot-tx-mask = <0 0 0 1 0 1 0 1 0 1>;
            dai-tdm-slot-rx-mask = <0 0 0 1 0 1 0 1 0 1>;
        };
    };
    simple-audio-card,dai-link@1 {
        reg = <1>;
        format = "dsp_b";
        cpu {
            sound-dai = <&audio_controller 17>;
        };
        codec {
            sound-dai = <&codec2>;
            dai-tdm-slot-num = <4>;
            dai-tdm-slot-width = <8>;
            /* TS 2, 4, 6, 8 */
            dai-tdm-slot-tx-mask = <0 0 1 0 1 0 1 0 1>;
            dai-tdm-slot-rx-mask = <0 0 1 0 1 0 1 0 1>;
        };
    };
    simple-audio-card,dai-link@2 {
        reg = <2>;
        format = "dsp_b";
        cpu {
            sound-dai = <&audio_controller 18>;
        };
        codec {
            sound-dai = <&codec3>;
            dai-tdm-slot-num = <2>;
            dai-tdm-slot-width = <8>;
            /* TS 9, 10 */
            dai-tdm-slot-tx-mask = <0 0 0 0 0 0 0 0 0 1 1>;
            dai-tdm-slot-rx-mask = <0 0 0 0 0 0 0 0 0 1 1>;
        };
    };
};