요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/everest,es8326.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Everest ES8326 audio CODEC
maintainers:
- David Yang <[email protected]>
properties:
compatible:
const: everest,es8326
reg:
maxItems: 1
clocks:
items:
- description: clock for master clock (MCLK)
clock-names:
items:
- const: mclk
interrupts:
maxItems: 1
description: interrupt output for headset detection
"#sound-dai-cells":
const: 0
everest,jack-pol:
$ref: /schemas/types.yaml#/definitions/uint8
description: |
just the value of reg 57. Bit(3) decides whether the jack polarity is inverted.
Bit(2) decides whether the button on the headset is inverted.
Bit(1)/(0) decides the mic property to be OMTP/CTIA or auto.
minimum: 0x00
maximum: 0x0f
default: 0x0f
everest,mic1-src:
deprecated: true
$ref: /schemas/types.yaml#/definitions/uint8
description:
the value of reg 2A when headset plugged.
minimum: 0x00
maximum: 0x77
default: 0x22
everest,mic2-src:
deprecated: true
$ref: /schemas/types.yaml#/definitions/uint8
description:
the value of reg 2A when headset unplugged.
minimum: 0x00
maximum: 0x77
default: 0x44
everest,jack-detect-inverted:
$ref: /schemas/types.yaml#/definitions/flag
description:
Defined to invert the jack detection.
everest,interrupt-src:
$ref: /schemas/types.yaml#/definitions/uint8
description: |
value of reg 0x58, Defines the interrupt source.
Bit(2) 1 means button press triggers irq, 0 means not.
Bit(3) 1 means PIN9 is the irq source for jack detection. When set to 0,
bias change on PIN9 do not triggers irq.
Bit(4) 1 means PIN27 is the irq source for jack detection.
Bit(5) 1 means PIN9 is the irq source after MIC detect.
Bit(6) 1 means PIN27 is the irq source after MIC detect.
minimum: 0
maximum: 0x3c
default: 0x08
everest,interrupt-clk:
$ref: /schemas/types.yaml#/definitions/uint8
description: |
value of reg 0x59, Defines the interrupt output behavior.
Bit(0-3) 0 means irq pulse equals 512*internal clock
1 means irq pulse equals 1024*internal clock
2 means ...
7 means irq pulse equals 65536*internal clock
8 means irq mutes PA
9 means irq mutes PA and DAC output
Bit(4) 1 means we invert the interrupt output.
Bit(6) 1 means the chip do not detect jack type after button released.
0 means the chip detect jack type again after button released.
minimum: 0
maximum: 0x7f
default: 0x00
required:
- compatible
- reg
- "#sound-dai-cells"
additionalProperties: false
examples:
- |
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];
};
};
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];
};
};
요약과 해설
everest,es8326.yaml:1-120Everest audio codec의 route pin, clock, 전원과 jack interrupt 조건을 먼저 해설하고, 접을 수 있는 영어 원문 전체와 원문 줄 좌표를 보존한 한국어 전문 번역을 제공합니다.