요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
STA32X audio CODEC
The driver for this device only supports I2C.
Required properties:
- compatible: "st,sta32x"
- reg: the I2C address of the device for I2C
- reset-gpios: a GPIO spec for the reset pin. If specified, it will be
deasserted before communication to the codec starts.
- power-down-gpios: a GPIO spec for the power down pin. If specified,
it will be deasserted before communication to the codec
starts.
- Vdda-supply: regulator spec, providing 3.3V
- Vdd3-supply: regulator spec, providing 3.3V
- Vcc-supply: regulator spec, providing 5V - 26V
Optional properties:
- clocks, clock-names: Clock specifier for XTI input clock.
If specified, the clock will be enabled when the codec is probed,
and disabled when it is removed. The 'clock-names' must be set to 'xti'.
- st,output-conf: number, Selects the output configuration:
0: 2-channel (full-bridge) power, 2-channel data-out
1: 2 (half-bridge). 1 (full-bridge) on-board power
2: 2 Channel (Full-Bridge) Power, 1 Channel FFX
3: 1 Channel Mono-Parallel
If parameter is missing, mode 0 will be enabled.
This property has to be specified as '/bits/ 8' value.
- st,ch1-output-mapping: Channel 1 output mapping
- st,ch2-output-mapping: Channel 2 output mapping
- st,ch3-output-mapping: Channel 3 output mapping
0: Channel 1
1: Channel 2
2: Channel 3
If parameter is missing, channel 1 is chosen.
This properties have to be specified as '/bits/ 8' values.
- st,thermal-warning-recover:
If present, thermal warning recovery is enabled.
- st,fault-detect-recovery:
If present, fault detect recovery is enabled.
- st,thermal-warning-adjustment:
If present, thermal warning adjustment is enabled.
- st,fault-detect-recovery:
If present, then fault recovery will be enabled.
- st,drop-compensation-ns: number
Only required for "st,ffx-power-output-mode" ==
"variable-drop-compensation".
Specifies the drop compensation in nanoseconds.
The value must be in the range of 0..300, and only
multiples of 20 are allowed. Default is 140ns.
- st,max-power-use-mpcc:
If present, then MPCC bits are used for MPC coefficients,
otherwise standard MPC coefficients are used.
- st,max-power-corr:
If present, power bridge correction for THD reduction near maximum
power output is enabled.
- st,am-reduction-mode:
If present, FFX mode runs in AM reduction mode, otherwise normal
FFX mode is used.
- st,odd-pwm-speed-mode:
If present, PWM speed mode run on odd speed mode (341.3 kHz) on all
channels. If not present, normal PWM spped mode (384 kHz) will be used.
- st,invalid-input-detect-mute:
If present, automatic invalid input detect mute is enabled.
Example:
codec: sta32x@38 {
compatible = "st,sta32x";
reg = <0x1c>;
clocks = <&clock>;
clock-names = "xti";
reset-gpios = <&gpio1 19 0>;
power-down-gpios = <&gpio1 16 0>;
st,output-conf = /bits/ 8 <0x3>; // set output to 2-channel
// (full-bridge) power,
// 2-channel data-out
st,ch1-output-mapping = /bits/ 8 <0>; // set channel 1 output ch 1
st,ch2-output-mapping = /bits/ 8 <0>; // set channel 2 output ch 1
st,ch3-output-mapping = /bits/ 8 <0>; // set channel 3 output ch 1
st,max-power-correction; // enables power bridge
// correction for THD reduction
// near maximum power output
st,invalid-input-detect-mute; // mute if no valid digital
// audio signal is provided.
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
STA32X I2C·GPIO·전원 속성
1-19STA32X driver는 I2C만 지원합니다. `compatible`은 `st,sta32x`, `reg`는 I2C address입니다. `reset-gpios`와 `power-down-gpios`를 지정하면 codec 통신 전에 각 pin을 deassert합니다.
`Vdda-supply`와 `Vdd3-supply`는 3.3 V regulator, `Vcc-supply`는 5~26 V regulator입니다.
Clock·output configuration·channel mapping
20-41선택 `clocks`는 XTI input clock specifier이고 `clock-names`는 `xti`여야 합니다. Probe 시 clock을 enable하고 remove 시 disable합니다.
8-bit `st,output-conf` 값 0은 2-channel full-bridge power·2-channel data, 1은 half-bridge 2개와 onboard full-bridge 1개, 2는 full-bridge 2-channel power·1-channel FFX, 3은 mono-parallel 1-channel입니다. 생략하면 mode 0입니다.
8-bit `st,ch1-output-mapping`~`st,ch3-output-mapping` 값 0·1·2는 각각 channel 1·2·3을 선택하며 생략 시 channel 1입니다.
Thermal·fault·power 보정 옵션
42-80`st,thermal-warning-recover`, `st,thermal-warning-adjustment`, `st,fault-detect-recovery`는 thermal warning recovery·adjustment와 fault recovery를 활성화합니다. 원문은 `st,fault-detect-recovery`를 두 번 열거합니다.
`st,drop-compensation-ns`는 `st,ffx-power-output-mode = variable-drop-compensation`일 때 필요한 0~300 ns 값으로 20의 배수만 허용하며 기본값은 140 ns입니다.
`st,max-power-use-mpcc`는 MPCC bit를 MPC coefficient에 사용하고, `st,max-power-corr`는 maximum output 부근 THD 감소용 power-bridge correction을 켭니다. `st,am-reduction-mode`는 FFX AM reduction mode를, `st,odd-pwm-speed-mode`는 모든 channel의 341.3 kHz odd PWM speed를 사용합니다. 생략 시 normal FFX와 384 kHz PWM입니다. `st,invalid-input-detect-mute`는 invalid input 자동 mute를 켭니다.
STA32X 예제와 원문 불일치
81-101예제는 XTI clock, reset·power-down GPIO와 output/channel mapping을 지정합니다. `st,output-conf = 0x3` 주석은 앞에서 mode 3을 mono-parallel이라고 한 설명과 달리 2-channel full-bridge라고 적혀 있습니다. 또한 `st,max-power-correction`은 정의된 `st,max-power-corr`와 이름이 다릅니다.
codec: sta32x@38 {
compatible = "st,sta32x";
reg = <0x1c>;
clocks = <&clock>;
clock-names = "xti";
reset-gpios = <&gpio1 19 0>;
power-down-gpios = <&gpio1 16 0>;
st,output-conf = /bits/ 8 <0x3>; // set output to 2-channel
// (full-bridge) power,
// 2-channel data-out
st,ch1-output-mapping = /bits/ 8 <0>; // set channel 1 output ch 1
st,ch2-output-mapping = /bits/ 8 <0>; // set channel 2 output ch 1
st,ch3-output-mapping = /bits/ 8 <0>; // set channel 3 output ch 1
st,max-power-correction; // enables power bridge
// correction for THD reduction
// near maximum power output
st,invalid-input-detect-mute; // mute if no valid digital
// audio signal is provided.
};
요약과 해설
st,sta32x.txt:1-101STA32X output mode, thermal·fault recovery와 FFX·PWM 옵션을 설명합니다. 영어 원문 전체와 줄 좌표를 보존하며 한국어 전문 번역에서는 property·수치·clock·phandle·예제 코드를 원형대로 유지합니다.