← Documents Documentation/devicetree/bindings/sound/everest,es8326.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Sound

Everest ES8326 audio codec

ES8326의 headset detection, jack polarity와 interrupt register bit를 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

everest,es8326.yaml:1-120

Everest audio codec의 route pin, clock, 전원과 jack interrupt 조건을 먼저 해설하고, 접을 수 있는 영어 원문 전체와 원문 줄 좌표를 보존한 한국어 전문 번역을 제공합니다.

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/everest,es8326.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Everest ES8326 audio CODEC
8
9 maintainers:
10 - David Yang <[email protected]>
11
12 properties:
13 compatible:
14 const: everest,es8326
15
16 reg:
17 maxItems: 1
18
19 clocks:
20 items:
21 - description: clock for master clock (MCLK)
22
23 clock-names:
24 items:
25 - const: mclk
26
27 interrupts:
28 maxItems: 1
29 description: interrupt output for headset detection
30
31 "#sound-dai-cells":
32 const: 0
33
34 everest,jack-pol:
35 $ref: /schemas/types.yaml#/definitions/uint8
36 description: |
37 just the value of reg 57. Bit(3) decides whether the jack polarity is inverted.
38 Bit(2) decides whether the button on the headset is inverted.
39 Bit(1)/(0) decides the mic property to be OMTP/CTIA or auto.
40 minimum: 0x00
41 maximum: 0x0f
42 default: 0x0f
43
44 everest,mic1-src:
45 deprecated: true
46 $ref: /schemas/types.yaml#/definitions/uint8
47 description:
48 the value of reg 2A when headset plugged.
49 minimum: 0x00
50 maximum: 0x77
51 default: 0x22
52
53 everest,mic2-src:
54 deprecated: true
55 $ref: /schemas/types.yaml#/definitions/uint8
56 description:
57 the value of reg 2A when headset unplugged.
58 minimum: 0x00
59 maximum: 0x77
60 default: 0x44
61
62 everest,jack-detect-inverted:
63 $ref: /schemas/types.yaml#/definitions/flag
64 description:
65 Defined to invert the jack detection.
66
67 everest,interrupt-src:
68 $ref: /schemas/types.yaml#/definitions/uint8
69 description: |
70 value of reg 0x58, Defines the interrupt source.
71 Bit(2) 1 means button press triggers irq, 0 means not.
72 Bit(3) 1 means PIN9 is the irq source for jack detection. When set to 0,
73 bias change on PIN9 do not triggers irq.
74 Bit(4) 1 means PIN27 is the irq source for jack detection.
75 Bit(5) 1 means PIN9 is the irq source after MIC detect.
76 Bit(6) 1 means PIN27 is the irq source after MIC detect.
77 minimum: 0
78 maximum: 0x3c
79 default: 0x08
80
81 everest,interrupt-clk:
82 $ref: /schemas/types.yaml#/definitions/uint8
83 description: |
84 value of reg 0x59, Defines the interrupt output behavior.
85 Bit(0-3) 0 means irq pulse equals 512*internal clock
86 1 means irq pulse equals 1024*internal clock
87 2 means ...
88 7 means irq pulse equals 65536*internal clock
89 8 means irq mutes PA
90 9 means irq mutes PA and DAC output
91 Bit(4) 1 means we invert the interrupt output.
92 Bit(6) 1 means the chip do not detect jack type after button released.
93 0 means the chip detect jack type again after button released.
94 minimum: 0
95 maximum: 0x7f
96 default: 0x00
97
98 required:
99 - compatible
100 - reg
101 - "#sound-dai-cells"
102
103 additionalProperties: false
104
105 examples:
106 - |
107 i2c {
108 #address-cells = <1>;
109 #size-cells = <0>;
110 es8326: codec@19 {
111 compatible = "everest,es8326";
112 reg = <0x19>;
113 clocks = <&clks 10>;
114 clock-names = "mclk";
115 #sound-dai-cells = <0>;
116 everest,jack-pol = [0e];
117 everest,interrupt-src = [08];
118 everest,interrupt-clk = [00];
119 };
120 };
121

3. 한국어 전문 번역

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

ES8326 codec schema

1-11

이 YAML binding은 Everest ES8326 audio codec을 정의합니다. Schema ID는 `http://devicetree.org/schemas/sound/everest,es8326.yaml#`이고 maintainer는 David Yang입니다.

주소, clock과 headset interrupt

12-33

`compatible`은 `everest,es8326`, `reg`는 최대 한 항목입니다. `clocks`는 MCLK 한 항목이고 `clock-names`는 `mclk`입니다.

`interrupts`는 headset detection용 interrupt output 한 항목이며 `#sound-dai-cells`는 0입니다.

Jack polarity와 microphone source

34-66

`everest,jack-pol`은 register 57의 `uint8` 값입니다. Bit 3은 jack polarity 반전, bit 2는 headset button 반전, bit 1/0은 microphone 방식 OMTP/CTIA 또는 auto를 정합니다. 범위는 `0x00`~`0x0f`, 기본값은 `0x0f`입니다.

Deprecated 속성 `everest,mic1-src`는 headset 연결 시 register `0x2A` 값으로 범위 `0x00`~`0x77`, 기본값 `0x22`입니다. `everest,mic2-src`는 headset 미연결 시 같은 register 값이며 기본값은 `0x44`입니다.

Flag `everest,jack-detect-inverted`를 정의하면 jack detection을 반전합니다.

Interrupt source register

67-80

`everest,interrupt-src`는 register `0x58`의 `uint8` 값입니다. Bit 2는 button press IRQ, bit 3은 jack detection용 PIN9 IRQ, bit 4는 PIN27 IRQ, bit 5는 MIC detect 후 PIN9 IRQ, bit 6은 MIC detect 후 PIN27 IRQ를 활성화합니다.

범위는 0~`0x3c`, 기본값은 `0x08`입니다. Bit 3이 0이면 PIN9의 bias 변화가 IRQ를 발생시키지 않습니다.

Interrupt pulse와 출력 동작

81-97

`everest,interrupt-clk`는 register `0x59`의 `uint8` 값입니다. Bit 0~3 값 0은 IRQ pulse가 internal clock의 512배, 1은 1024배이며 7까지 증가해 65536배가 됩니다. 값 8은 IRQ가 PA를 mute하고 9는 PA와 DAC output을 함께 mute합니다.

Bit 4는 interrupt output을 반전합니다. Bit 6이 1이면 button release 뒤 jack type을 다시 감지하지 않고, 0이면 재감지합니다. 범위는 0~`0x7f`, 기본값은 `0x00`입니다.

필수 속성과 추가 속성

98-104

필수 속성은 `compatible`, `reg`, `#sound-dai-cells`입니다. `additionalProperties: false`이므로 정의되지 않은 추가 속성은 허용하지 않습니다.

ES8326 jack 설정 예제

105-120

예제는 I2C address `0x19`의 ES8326에 MCLK를 연결하고 jack polarity `[0e]`, interrupt source `[08]`, interrupt clock `[00]`을 설정합니다.

i2c {
  #address-cells = <1>;
  #size-cells = <0>;
  es8326: codec@19 {
    compatible = "everest,es8326";
    reg = <0x19>;
    clocks = <&clks 10>;
    clock-names = "mclk";
    #sound-dai-cells = <0>;
    everest,jack-pol = [0e];
    everest,interrupt-src = [08];
    everest,interrupt-clk = [00];
  };
};