← Documents Documentation/devicetree/bindings/sound/st,sta350.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Sound

ST STA350 codec

STA350 FFX timing, protection, distortion·mute와 bridge power-down을 설명합니다.

Source pathDocumentation/devicetree/bindings/sound/st,sta350.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

st,sta350.txt:1-131

STA350 FFX timing, protection, distortion·mute와 bridge power-down을 설명합니다. 영어 원문 전체와 줄 좌표를 보존하며 한국어 전문 번역에서는 property·수치·clock·phandle·예제 코드를 원형대로 유지합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 STA350 audio CODEC
2
3 The driver for this device only supports I2C.
4
5 Required properties:
6
7 - compatible: "st,sta350"
8 - reg: the I2C address of the device for I2C
9 - reset-gpios: a GPIO spec for the reset pin. If specified, it will be
10 deasserted before communication to the codec starts.
11
12 - power-down-gpios: a GPIO spec for the power down pin. If specified,
13 it will be deasserted before communication to the codec
14 starts.
15
16 - vdd-dig-supply: regulator spec, providing 3.3V
17 - vdd-pll-supply: regulator spec, providing 3.3V
18 - vcc-supply: regulator spec, providing 5V - 26V
19
20 Optional properties:
21
22 - st,output-conf: number, Selects the output configuration:
23 0: 2-channel (full-bridge) power, 2-channel data-out
24 1: 2 (half-bridge). 1 (full-bridge) on-board power
25 2: 2 Channel (Full-Bridge) Power, 1 Channel FFX
26 3: 1 Channel Mono-Parallel
27 If parameter is missing, mode 0 will be enabled.
28 This property has to be specified as '/bits/ 8' value.
29
30 - st,ch1-output-mapping: Channel 1 output mapping
31 - st,ch2-output-mapping: Channel 2 output mapping
32 - st,ch3-output-mapping: Channel 3 output mapping
33 0: Channel 1
34 1: Channel 2
35 2: Channel 3
36 If parameter is missing, channel 1 is chosen.
37 This properties have to be specified as '/bits/ 8' values.
38
39 - st,thermal-warning-recover:
40 If present, thermal warning recovery is enabled.
41
42 - st,thermal-warning-adjustment:
43 If present, thermal warning adjustment is enabled.
44
45 - st,fault-detect-recovery:
46 If present, then fault recovery will be enabled.
47
48 - st,ffx-power-output-mode: string
49 The FFX power output mode selects how the FFX output timing is
50 configured. Must be one of these values:
51 - "drop-compensation"
52 - "tapered-compensation"
53 - "full-power-mode"
54 - "variable-drop-compensation" (default)
55
56 - st,drop-compensation-ns: number
57 Only required for "st,ffx-power-output-mode" ==
58 "variable-drop-compensation".
59 Specifies the drop compensation in nanoseconds.
60 The value must be in the range of 0..300, and only
61 multiples of 20 are allowed. Default is 140ns.
62
63 - st,overcurrent-warning-adjustment:
64 If present, overcurrent warning adjustment is enabled.
65
66 - st,max-power-use-mpcc:
67 If present, then MPCC bits are used for MPC coefficients,
68 otherwise standard MPC coefficients are used.
69
70 - st,max-power-corr:
71 If present, power bridge correction for THD reduction near maximum
72 power output is enabled.
73
74 - st,am-reduction-mode:
75 If present, FFX mode runs in AM reduction mode, otherwise normal
76 FFX mode is used.
77
78 - st,odd-pwm-speed-mode:
79 If present, PWM speed mode run on odd speed mode (341.3 kHz) on all
80 channels. If not present, normal PWM speed mode (384 kHz) will be used.
81
82 - st,distortion-compensation:
83 If present, distortion compensation variable uses DCC coefficient.
84 If not present, preset DC coefficient is used.
85
86 - st,invalid-input-detect-mute:
87 If present, automatic invalid input detect mute is enabled.
88
89 - st,activate-mute-output:
90 If present, a mute output will be activated in ase the volume will
91 reach a value lower than -76 dBFS.
92
93 - st,bridge-immediate-off:
94 If present, the bridge will be switched off immediately after the
95 power-down-gpio goes low. Otherwise, the bridge will wait for 13
96 million clock cycles to pass before shutting down.
97
98 - st,noise-shape-dc-cut:
99 If present, the noise-shaping technique on the DC cutoff filter are
100 enabled.
101
102 - st,powerdown-master-volume:
103 If present, the power-down pin and I2C power-down functions will
104 act on the master volume. Otherwise, the functions will act on the
105 mute commands.
106
107 - st,powerdown-delay-divider:
108 If present, the bridge power-down time will be divided by the provided
109 value. If not specified, a divider of 1 will be used. Allowed values
110 are 1, 2, 4, 8, 16, 32, 64 and 128.
111 This property has to be specified as '/bits/ 8' value.
112
113 Example:
114
115 codec: sta350@38 {
116 compatible = "st,sta350";
117 reg = <0x1c>;
118 reset-gpios = <&gpio1 19 0>;
119 power-down-gpios = <&gpio1 16 0>;
120 st,output-conf = /bits/ 8 <0x3>; // set output to 2-channel
121 // (full-bridge) power,
122 // 2-channel data-out
123 st,ch1-output-mapping = /bits/ 8 <0>; // set channel 1 output ch 1
124 st,ch2-output-mapping = /bits/ 8 <0>; // set channel 2 output ch 1
125 st,ch3-output-mapping = /bits/ 8 <0>; // set channel 3 output ch 1
126 st,max-power-correction; // enables power bridge
127 // correction for THD reduction
128 // near maximum power output
129 st,invalid-input-detect-mute; // mute if no valid digital
130 // audio signal is provided.
131 };
132

3. 한국어 전문 번역

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

STA350 I2C·GPIO·전원 속성

1-19

STA350 driver는 I2C만 지원합니다. `compatible`은 `st,sta350`, `reg`는 I2C address입니다. `reset-gpios`와 `power-down-gpios`를 지정하면 통신 전에 deassert합니다. `vdd-dig-supply`·`vdd-pll-supply`는 3.3 V, `vcc-supply`는 5~26 V regulator입니다.

Output mode와 channel mapping

20-37

8-bit `st,output-conf` 값 0은 2-channel full-bridge·2-channel data, 1은 half-bridge 2개와 onboard full-bridge 1개, 2는 full-bridge 2-channel power·1-channel FFX, 3은 mono-parallel입니다. 기본값은 0입니다.

8-bit `st,ch1-output-mapping`~`st,ch3-output-mapping` 값 0·1·2는 channel 1·2·3을 선택하고 기본값은 channel 1입니다.

Thermal·fault·FFX timing

38-61

`st,thermal-warning-recover`, `st,thermal-warning-adjustment`, `st,fault-detect-recovery`는 해당 보호·복구 기능을 활성화합니다.

`st,ffx-power-output-mode`는 `drop-compensation`, `tapered-compensation`, `full-power-mode`, 기본 `variable-drop-compensation` 중 하나입니다. Variable mode에서는 `st,drop-compensation-ns`가 필요하며 0~300 ns 범위의 20 ns 배수이고 기본값은 140 ns입니다.

Power·PWM·distortion·mute 옵션

62-87

`st,overcurrent-warning-adjustment`는 overcurrent warning 조정을, `st,max-power-use-mpcc`는 MPCC coefficient 사용을, `st,max-power-corr`는 maximum power 부근 THD 감소 correction을 켭니다.

`st,am-reduction-mode`는 FFX AM reduction, `st,odd-pwm-speed-mode`는 341.3 kHz odd PWM을 사용하며 기본 PWM은 384 kHz입니다. `st,distortion-compensation`은 DCC coefficient 기반 distortion compensation을, `st,invalid-input-detect-mute`는 invalid input 자동 mute를 켭니다.

Mute·bridge power-down 옵션

88-112

`st,activate-mute-output`은 volume이 -76 dBFS 아래로 내려갈 때 mute output을 활성화합니다. `st,bridge-immediate-off`는 power-down GPIO low 직후 bridge를 끄며, 없으면 1,300만(13,000,000) clock cycle을 기다립니다.

`st,noise-shape-dc-cut`은 DC cutoff filter의 noise shaping을 켭니다. `st,powerdown-master-volume`은 power-down pin과 I2C power-down이 mute command 대신 master volume에 작용하게 합니다. 8-bit `st,powerdown-delay-divider`는 bridge power-down 시간을 1·2·4·8·16·32·64·128 중 하나로 나누며 기본값은 1입니다.

STA350 예제와 property 이름

113-131

예제는 reset·power-down GPIO, output/channel mapping과 invalid-input mute를 설정합니다. 예제의 `st,max-power-correction`은 앞에서 정의한 `st,max-power-corr`와 다릅니다.

codec: sta350@38 {
        compatible = "st,sta350";
        reg = <0x1c>;
        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.
};