← Documents Documentation/sound/codecs/cs35l56.rst GitHub 원문 ↗

Linux 6.18.37 · Sound

Cirrus Logic CS35L54/56/57/63 Boosted Smart Amplifier 드라이버

CS35L54/56/57/63 amplifier의 노트북별 firmware, SSID 파일 이름, 정상 로그와 firmware·calibration·버스·보호 오류 진단을 설명합니다.

Source pathDocumentation/sound/codecs/cs35l56.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

cs35l56.rst:1-305

CS35L54/56/57/63 amplifier의 노트북별 firmware, SSID 파일 이름, 정상 로그와 firmware·calibration·버스·보호 오류 진단을 설명합니다.

다른 노트북의 firmware를 재사용하면 전원·speaker 한계와 맞지 않아 하드웨어를 손상시킬 수 있으므로, 반드시 해당 시스템 ID와 OEM 구성에 맞는 파일을 사용해야 합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0-only
2
3 ========================================================================
4 Audio drivers for Cirrus Logic CS35L54/56/57/63 Boosted Smart Amplifiers
5 ========================================================================
6 :Copyright: 2025 Cirrus Logic, Inc. and
7 Cirrus Logic International Semiconductor Ltd.
8
9 Contact: patches@opensource.cirrus.com
10
11 Summary
12 =======
13
14 The high-level summary of this document is:
15
16 **If you have a laptop that uses CS35L54/56/57/63 amplifiers but audio is not
17 working, DO NOT ATTEMPT TO USE FIRMWARE AND SETTINGS FROM ANOTHER LAPTOP,
18 EVEN IF THAT LAPTOP SEEMS SIMILAR.**
19
20 The CS35L54/56/57/63 amplifiers must be correctly configured for the power
21 supply voltage, speaker impedance, maximum speaker voltage/current, and
22 other external hardware connections.
23
24 The amplifiers feature advanced boost technology that increases the voltage
25 used to drive the speakers, while proprietary speaker protection algorithms
26 allow these boosted amplifiers to push the limits of the speakers without
27 causing damage. These **must** be configured correctly.
28
29 Supported Cirrus Logic amplifiers
30 ---------------------------------
31
32 The cs35l56 drivers support:
33
34 * CS35L54
35 * CS35L56
36 * CS35L57
37 * CS35L63
38
39 There are two drivers in the kernel
40
41 *For systems using SoundWire*: sound/soc/codecs/cs35l56.c and associated files
42
43 *For systems using HDA*: sound/pci/hda/cs35l56_hda.c
44
45 Firmware
46 ========
47
48 The amplifier is controlled and managed by firmware running on the internal
49 DSP. Firmware files are essential to enable the full capabilities of the
50 amplifier.
51
52 Firmware is distributed in the linux-firmware repository:
53 https://gitlab.com/kernel-firmware/linux-firmware.git
54
55 On most SoundWire systems the amplifier has a default minimum capability to
56 produce audio. However this will be
57
58 * at low volume, to protect the speakers, since the speaker specifications
59 and power supply voltages are unknown.
60 * a mono mix of left and right channels.
61
62 On some SoundWire systems that have both CS42L43 and CS35L56/57 the CS35L56/57
63 receive their audio from the CS42L43 instead of directly from the host
64 SoundWire interface. These systems can be identified by the CS42L43 showing
65 in dmesg as a SoundWire device, but the CS35L56/57 as SPI. On these systems
66 the firmware is *mandatory* to enable receiving the audio from the CS42L43.
67
68 On HDA systems the firmware is *mandatory* to enable HDA bridge mode. There
69 will not be any audio from the amplifiers without firmware.
70
71 Cirrus Logic firmware files
72 ---------------------------
73
74 Each amplifier requires two firmware files. One file has a .wmfw suffix, the
75 other has a .bin suffix.
76
77 The firmware is customized by the OEM to match the hardware of each laptop,
78 and the firmware is specific to that laptop. Because of this, there are many
79 firmware files in linux-firmware for these amplifiers. Firmware files are
80 **not interchangeable between laptops**.
81
82 Cirrus Logic submits files for known laptops to the upstream linux-firmware
83 repository. Providing Cirrus Logic is aware of a particular laptop and has
84 permission from the manufacturer to publish the firmware, it will be pushed
85 to linux-firmware. You may need to upgrade to a newer release of
86 linux-firmware to obtain the firmware for your laptop.
87
88 **Important:** the Makefile for linux-firmware creates symlinks that are listed
89 in the WHENCE file. These symlinks are required for the CS35L56 driver to be
90 able to load the firmware.
91
92 How do I know which firmware file I should have?
93 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94 All firmware file names are qualified with a unique "system ID". On normal
95 x86 PCs with PCI audio this is the Vendor Subsystem ID (SSID) of the host
96 PCI audio interface.
97
98 The SSID can be viewed using the lspci tool::
99
100 lspci -v -nn | grep -A2 -i audio
101 0000:00:1f.3 Audio device [0403]: Intel Corporation Meteor Lake-P HD Audio Controller [8086:7e28]
102 Subsystem: Dell Meteor Lake-P HD Audio Controller [1028:0c63]
103
104 In this example the SSID is 10280c63.
105
106 The format of the firmware file names is:
107
108 SoundWire:
109 cs35lxx-b0-dsp1-misc-SSID[-spkidX]-l?u?
110
111 SoundWire CS35L56 Rev B0 firmware released before kernel version 6.16:
112 cs35lxx-b0-dsp1-misc-SSID[-spkidX]-ampN
113
114 Non-SoundWire (HDA and I2S):
115 cs35lxx-b0-dsp1-misc-SSID[-spkidX]-ampN
116
117 Where:
118
119 * cs35lxx-b0 is the amplifier model and silicon revision. This information
120 is logged by the driver during initialization.
121 * SSID is the 8-digit hexadecimal SSID value.
122 * l?u? is the physical address on the SoundWire bus of the amp this
123 file applies to.
124 * ampN is the amplifier number (for example amp1). This is the same as
125 the prefix on the ALSA control names except that it is always lower-case
126 in the file name.
127 * spkidX is an optional part, used for laptops that have firmware
128 configurations for different makes and models of internal speakers.
129
130 Early firmware for CS35L56 Rev B0 used the ALSA prefix (ampN) as the
131 filename qualifier. Support for the l?u? qualifier was added in kernel 6.16.
132
133 Sound Open Firmware and ALSA topology files
134 -------------------------------------------
135
136 All SoundWire systems will require a Sound Open Firmware (SOF) for the
137 host CPU audio DSP, together with an ALSA topology file (.tplg).
138
139 The SOF firmware will usually be provided by the manufacturer of the host
140 CPU (i.e. Intel or AMD). The .tplg file is normally part of the SOF firmware
141 release.
142
143 SOF binary builds are available from: https://github.com/thesofproject/sof-bin/releases
144
145 The main SOF source is here: https://github.com/thesofproject
146
147 ALSA-ucm configurations
148 -----------------------
149 Typically an appropriate ALSA-ucm configuration file is needed for
150 use-case managers and audio servers such as PipeWire.
151
152 Configuration files are available from the alsa-ucm-conf repository:
153 https://git.alsa-project.org/?p=alsa-ucm-conf.git
154
155 Kernel log messages
156 ===================
157
158 SoundWire
159 ---------
160 A successful initialization will look like this (this will be repeated for
161 each amplifier)::
162
163 [ 7.568374] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_P not found, using dummy regulator
164 [ 7.605208] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_IO not found, using dummy regulator
165 [ 7.605313] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_A not found, using dummy regulator
166 [ 7.939279] cs35l56 sdw:0:0:01fa:3556:01:0: Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
167 [ 7.947844] cs35l56 sdw:0:0:01fa:3556:01:0: Slave 4 state check1: UNATTACHED, status was 1
168 [ 8.740280] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_B not found, using dummy regulator
169 [ 8.740552] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_AMP not found, using dummy regulator
170 [ 9.242164] cs35l56 sdw:0:0:01fa:3556:01:0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx.wmfw: format 3 timestamp 0x66b2b872
171 [ 9.242173] cs35l56 sdw:0:0:01fa:3556:01:0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx.wmfw: Tue 05 Dec 2023 21:37:21 GMT Standard Time
172 [ 9.991709] cs35l56 sdw:0:0:01fa:3556:01:0: DSP1: Firmware: 1a00d6 vendor: 0x2 v3.11.23, 41 algorithms
173 [10.039098] cs35l56 sdw:0:0:01fa:3556:01:0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx-amp1.bin: v3.11.23
174 [10.879235] cs35l56 sdw:0:0:01fa:3556:01:0: Slave 4 state check1: UNATTACHED, status was 1
175 [11.401536] cs35l56 sdw:0:0:01fa:3556:01:0: Calibration applied
176
177 HDA
178 ---
179 A successful initialization will look like this (this will be repeated for
180 each amplifier)::
181
182 [ 6.306475] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
183 [ 6.613892] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP system name: 'xxxxxxxx', amp name: 'AMP1'
184 [ 8.266660] snd_hda_codec_cs8409 ehdaudio0D0: bound i2c-CSC3556:00-cs35l56-hda.0 (ops cs35l56_hda_comp_ops [snd_hda_scodec_cs35l56])
185 [ 8.287525] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx.wmfw: format 3 timestamp 0x66b2b872
186 [ 8.287528] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx.wmfw: Tue 05 Dec 2023 21:37:21 GMT Standard Time
187 [ 9.984335] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP1: Firmware: 1a00d6 vendor: 0x2 v3.11.23, 41 algorithms
188 [10.085797] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx-amp1.bin: v3.11.23
189 [10.655237] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: Calibration applied
190
191 Important messages
192 ~~~~~~~~~~~~~~~~~~
193 Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
194 Shows that the driver has been able to read device ID registers from the
195 amplifier.
196
197 * The actual amplifier type and silicon revision (CS35L56 B0 in this
198 example) is shown, as read from the amplifier identification registers.
199 * (patched=0) is normal, and indicates that the amplifier has been hard
200 reset and is running default ROM firmware.
201 * (patched=1) means that something has previously downloaded firmware
202 to the amplifier and the driver does not have control of the RESET
203 signal to be able to replace this preloaded firmware. This is normal
204 for systems where the BIOS downloads firmware to the amplifiers
205 before OS boot.
206 This status can also be seen if the cs35l56 kernel module is unloaded
207 and reloaded on a system where the driver does not have control of
208 RESET. SoundWire systems typically do not give the driver control of
209 RESET and only a BIOS (re)boot can reset the amplifiers.
210
211 DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx.wmfw
212 Shows that a .wmfw firmware file was found and downloaded.
213
214 DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx-amp1.bin
215 Shows that a .bin firmware file was found and downloaded.
216
217 Calibration applied
218 Factory calibration data in EFI was written to the amplifier.
219
220 Error messages
221 ==============
222 This section explains some of the error messages that the driver can log.
223
224 Algorithm coefficient version %d.%d.%d but expected %d.%d.%d
225 The version of the .bin file content does not match the loaded firmware.
226 Caused by mismatched .wmfw and .bin file, or .bin file was found but
227 .wmfw was not.
228
229 No %s for algorithm %x
230 The version of the .bin file content does not match the loaded firmware.
231 Caused by mismatched .wmfw and .bin file, or .bin file was found but
232 .wmfw was not.
233
234 .bin file required but not found
235 HDA driver did not find a .bin file that matches this hardware.
236
237 Calibration disabled due to missing firmware controls
238 Driver was not able to write EFI calibration data to firmware registers.
239 This typically means that either:
240
241 * The driver did not find a suitable wmfw for this hardware, or
242 * The amplifier has already been patched with firmware by something
243 previously, and the driver does not have control of a hard RESET line
244 to be able to reset the amplifier and download the firmware files it
245 found. This situation is indicated by the device identification
246 string in the kernel log shows "(patched=1)"
247
248 Failed to write calibration
249 Same meaning and cause as "Calibration disabled due to missing firmware
250 controls"
251
252 Failed to read calibration data from EFI
253 Factory calibration data in EFI is missing, empty or corrupt.
254 This is most likely to be cause by accidentally deleting the file from
255 the EFI filesystem.
256
257 No calibration for silicon ID
258 The factory calibration data in EFI does not match this hardware.
259 The most likely cause is that an amplifier has been replaced on the
260 motherboard without going through manufacturer calibration process to
261 generate calibration data for the new amplifier.
262
263 Did not find any buses for CSCxxxx
264 Only on HDA systems. The HDA codec driver found an ACPI entry for
265 Cirrus Logic companion amps, but could not enumerate the ACPI entries for
266 the I2C/SPI buses. The most likely cause of this is that:
267
268 * The relevant bus driver (I2C or SPI) is not part of the kernel.
269 * The HDA codec driver was built-in to the kernel but the I2C/SPI
270 bus driver is a module and so the HDA codec driver cannot call the
271 bus driver functions.
272
273 init_completion timed out
274 The SoundWire bus controller (host end) did not enumerate the amplifier.
275 In other words, the ACPI says there is an amplifier but for some reason
276 it was not detected on the bus.
277
278 No AF01 node
279 Indicates an error in ACPI. A SoundWire system should have a Device()
280 node named "AF01" but it was not found.
281
282 Failed to get spk-id-gpios
283 ACPI says that the driver should request a GPIO but the driver was not
284 able to get that GPIO. The most likely cause is that the kernel does not
285 include the correct GPIO or PINCTRL driver for this system.
286
287 Failed to read spk-id
288 ACPI says that the driver should request a GPIO but the driver was not
289 able to read that GPIO.
290
291 Unexpected spk-id element count
292 AF01 contains more speaker ID GPIO entries than the driver supports
293
294 Overtemp error
295 Amplifier overheat protection was triggered and the amplifier shut down
296 to protect itself.
297
298 Amp short error
299 Amplifier detected a short-circuit on the speaker output pins and shut
300 down for protection. This would normally indicate a damaged speaker.
301
302 Hibernate wake failed
303 The driver tried to wake the amplifier from its power-saving state but
304 did not see the expected responses from the amplifier. This can be caused
305 by using firmware that does not match the hardware.
306

3. 한국어 전문 번역

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

안전 경고, 지원 칩과 드라이버

1-44
.. SPDX-License-Identifier: GPL-2.0-only

이 문서는 2025 Cirrus Logic, Inc. 및 Cirrus Logic International Semiconductor Ltd. 저작물이며 문의 주소는 `patches@opensource.cirrus.com`이다.

핵심 경고: CS35L54/56/57/63 amplifier를 사용하는 노트북에서 소리가 나지 않더라도, 비슷해 보이는 다른 노트북의 firmware와 설정을 사용해서는 안 된다.

이 amplifier는 전원 전압, speaker impedance, 최대 speaker 전압·전류와 기타 외부 하드웨어 연결에 정확히 맞게 구성해야 한다. 고급 boost 기술은 speaker 구동 전압을 높이고 독점 보호 algorithm은 손상 없이 speaker 한계에 가깝게 동작하도록 하지만, 이 설정이 올바르다는 전제가 반드시 필요하다.

`cs35l56` 계열 드라이버는 CS35L54, CS35L56, CS35L57, CS35L63을 지원한다. SoundWire 시스템은 `sound/soc/codecs/cs35l56.c`와 관련 파일을 사용하고, HDA 시스템은 `sound/pci/hda/cs35l56_hda.c`를 사용한다.

지원 amplifier와 커널 드라이버
구분대상 / 경로
지원 칩CS35L54, CS35L56, CS35L57, CS35L63
SoundWiresound/soc/codecs/cs35l56.c 및 관련 파일
HDAsound/pci/hda/cs35l56_hda.c

버스 구성에 따라 사용하는 드라이버가 다르다.

.. SPDX-License-Identifier: GPL-2.0-only

========================================================================
Audio drivers for Cirrus Logic CS35L54/56/57/63 Boosted Smart Amplifiers
========================================================================
:Copyright: 2025 Cirrus Logic, Inc. and
                 Cirrus Logic International Semiconductor Ltd.

Contact: patches@opensource.cirrus.com

Summary
=======

The high-level summary of this document is:

**If you have a laptop that uses CS35L54/56/57/63 amplifiers but audio is not
working, DO NOT ATTEMPT TO USE FIRMWARE AND SETTINGS FROM ANOTHER LAPTOP,
EVEN IF THAT LAPTOP SEEMS SIMILAR.**

The CS35L54/56/57/63 amplifiers must be correctly configured for the power
supply voltage, speaker impedance, maximum speaker voltage/current, and
other external hardware connections.

The amplifiers feature advanced boost technology that increases the voltage
used to drive the speakers, while proprietary speaker protection algorithms
allow these boosted amplifiers to push the limits of the speakers without
causing damage. These **must** be configured correctly.

Supported Cirrus Logic amplifiers
---------------------------------

The cs35l56 drivers support:

* CS35L54
* CS35L56
* CS35L57
* CS35L63

There are two drivers in the kernel

*For systems using SoundWire*: sound/soc/codecs/cs35l56.c and associated files

*For systems using HDA*: sound/pci/hda/cs35l56_hda.c

Firmware 필요 조건과 배포

45-90

Amplifier 내부 DSP에서 실행되는 firmware가 장치를 제어하고 관리한다. 전체 기능을 활성화하려면 firmware 파일이 필수이며, 파일은 `linux-firmware` 저장소에서 배포된다: `https://gitlab.com/kernel-firmware/linux-firmware.git`.

대부분의 SoundWire 시스템은 firmware 없이도 최소 기능으로 소리를 낼 수 있다. 다만 speaker 사양과 전원 전압을 알 수 없어 보호를 위해 음량이 낮고, 좌우 채널의 mono mix만 출력한다.

CS42L43과 CS35L56/57을 함께 쓰는 일부 SoundWire 시스템에서는 CS35L56/57이 host SoundWire interface가 아니라 CS42L43에서 audio를 받는다. `dmesg`에서 CS42L43은 SoundWire 장치로, CS35L56/57은 SPI 장치로 나타나는 시스템이다. 이 구성에서는 CS42L43 audio 수신을 활성화하는 firmware가 필수다. HDA 시스템도 HDA bridge mode를 활성화하려면 firmware가 반드시 필요하며, 없으면 amplifier에서 소리가 나지 않는다.

각 amplifier에는 `.wmfw`와 `.bin` 두 firmware 파일이 필요하다. OEM이 노트북 하드웨어에 맞춰 사용자화하므로 파일은 특정 노트북 전용이며 서로 교환할 수 없다. Cirrus Logic은 제조사의 공개 허가가 있는 알려진 노트북 파일을 upstream `linux-firmware`에 제출한다. 해당 모델의 파일을 얻으려면 더 새 `linux-firmware` 릴리스로 갱신해야 할 수 있다.

중요: `linux-firmware` Makefile은 `WHENCE`에 기록된 symbolic link를 만든다. CS35L56 드라이버가 firmware를 적재하려면 이 link가 반드시 있어야 한다.

CS35 firmware 필요성
구성Firmware 요구
일반 SoundWire최소 저음량·좌우 mono mix는 가능, 전체 기능에는 필요
CS42L43 + CS35L56/57CS42L43에서 audio를 받기 위해 필수
HDAHDA bridge mode와 모든 amplifier audio에 필수
파일 구성amplifier마다 .wmfw 1개와 .bin 1개

시스템 유형별 firmware 미적용 상태와 요구 수준이다.

Firmware
========

The amplifier is controlled and managed by firmware running on the internal
DSP. Firmware files are essential to enable the full capabilities of the
amplifier.

Firmware is distributed in the linux-firmware repository:
https://gitlab.com/kernel-firmware/linux-firmware.git

On most SoundWire systems the amplifier has a default minimum capability to
produce audio. However this will be

* at low volume, to protect the speakers, since the speaker specifications
  and power supply voltages are unknown.
* a mono mix of left and right channels.

On some SoundWire systems that have both CS42L43 and CS35L56/57 the CS35L56/57
receive their audio from the CS42L43 instead of directly from the host
SoundWire interface. These systems can be identified by the CS42L43 showing
in dmesg as a SoundWire device, but the CS35L56/57 as SPI. On these systems
the firmware is *mandatory* to enable receiving the audio from the CS42L43.

On HDA systems the firmware is *mandatory* to enable HDA bridge mode. There
will not be any audio from the amplifiers without firmware.

Cirrus Logic firmware files
---------------------------

Each amplifier requires two firmware files. One file has a .wmfw suffix, the
other has a .bin suffix.

The firmware is customized by the OEM to match the hardware of each laptop,
and the firmware is specific to that laptop. Because of this, there are many
firmware files in linux-firmware for these amplifiers. Firmware files are
**not interchangeable between laptops**.

Cirrus Logic submits files for known laptops to the upstream linux-firmware
repository. Providing Cirrus Logic is aware of a particular laptop and has
permission from the manufacturer to publish the firmware, it will be pushed
to linux-firmware. You may need to upgrade to a newer release of
linux-firmware to obtain the firmware for your laptop.

**Important:** the Makefile for linux-firmware creates symlinks that are listed
in the WHENCE file. These symlinks are required for the CS35L56 driver to be
able to load the firmware.

시스템 ID, 파일 이름, SOF와 ALSA UCM

91-153

모든 firmware 파일 이름에는 고유한 system ID가 들어간다. 일반 x86 PCI audio PC에서는 host PCI audio interface의 Vendor Subsystem ID(SSID)를 사용한다. 다음처럼 `lspci`로 확인한다.

lspci -v -nn | grep -A2 -i audio
0000:00:1f.3 Audio device [0403]: Intel Corporation Meteor Lake-P HD Audio Controller [8086:7e28]
Subsystem: Dell Meteor Lake-P HD Audio Controller [1028:0c63]

이 예의 SSID는 `10280c63`이다. 파일 이름 형식은 버스와 firmware 세대에 따라 다음과 같다.

SoundWire:
    cs35lxx-b0-dsp1-misc-SSID[-spkidX]-l?u?

SoundWire CS35L56 Rev B0 firmware released before kernel version 6.16:
    cs35lxx-b0-dsp1-misc-SSID[-spkidX]-ampN

Non-SoundWire (HDA and I2S):
    cs35lxx-b0-dsp1-misc-SSID[-spkidX]-ampN
CS35 firmware 파일 qualifier
요소의미
cs35lxx-b0초기화 로그에 표시되는 amplifier 모델과 silicon revision
SSID8자리 16진수 subsystem ID
l?u?해당 amplifier의 SoundWire bus 물리 주소
ampNALSA control prefix와 같은 amplifier 번호, 파일 이름에서는 항상 소문자
spkidX내장 speaker 제조사·모델별 구성이 있는 노트북에서 쓰는 선택 항목

파일 이름 각 부분의 의미다.

초기 CS35L56 Rev B0 firmware는 ALSA prefix인 `ampN`을 파일 qualifier로 사용했다. `l?u?` qualifier 지원은 kernel 6.16에서 추가됐다.

모든 SoundWire 시스템은 host CPU audio DSP용 Sound Open Firmware(SOF)와 ALSA topology 파일(`.tplg`)도 필요하다. SOF는 보통 Intel 또는 AMD 같은 host CPU 제조사가 제공하고 `.tplg`는 일반적으로 SOF firmware 릴리스에 포함된다. binary build는 `https://github.com/thesofproject/sof-bin/releases`, 주 source는 `https://github.com/thesofproject`에 있다.

PipeWire 같은 audio server와 use-case manager를 사용하려면 보통 알맞은 ALSA UCM 구성도 필요하다. 구성 파일은 `https://git.alsa-project.org/?p=alsa-ucm-conf.git`의 `alsa-ucm-conf` 저장소에서 제공한다.


How do I know which firmware file I should have?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All firmware file names are qualified with a unique "system ID". On normal
x86 PCs with PCI audio this is the Vendor Subsystem ID (SSID) of the host
PCI audio interface.

The SSID can be viewed using the lspci tool::

  lspci -v -nn | grep -A2 -i audio
  0000:00:1f.3 Audio device [0403]: Intel Corporation Meteor Lake-P HD Audio Controller [8086:7e28]
  Subsystem: Dell Meteor Lake-P HD Audio Controller [1028:0c63]

In this example the SSID is 10280c63.

The format of the firmware file names is:

SoundWire:
    cs35lxx-b0-dsp1-misc-SSID[-spkidX]-l?u?

SoundWire CS35L56 Rev B0 firmware released before kernel version 6.16:
    cs35lxx-b0-dsp1-misc-SSID[-spkidX]-ampN

Non-SoundWire (HDA and I2S):
    cs35lxx-b0-dsp1-misc-SSID[-spkidX]-ampN

Where:

  * cs35lxx-b0 is the amplifier model and silicon revision. This information
    is logged by the driver during initialization.
  * SSID is the 8-digit hexadecimal SSID value.
  * l?u? is the physical address on the SoundWire bus of the amp this
    file applies to.
  * ampN is the amplifier number (for example amp1). This is the same as
    the prefix on the ALSA control names except that it is always lower-case
    in the file name.
  * spkidX is an optional part, used for laptops that have firmware
    configurations for different makes and models of internal speakers.

Early firmware for CS35L56 Rev B0 used the ALSA prefix (ampN) as the
filename qualifier. Support for the l?u? qualifier was added in kernel 6.16.

Sound Open Firmware and ALSA topology files
-------------------------------------------

All SoundWire systems will require a Sound Open Firmware (SOF) for the
host CPU audio DSP, together with an ALSA topology file (.tplg).

The SOF firmware will usually be provided by the manufacturer of the host
CPU (i.e. Intel or AMD). The .tplg file is normally part of the SOF firmware
release.

SOF binary builds are available from: https://github.com/thesofproject/sof-bin/releases

The main SOF source is here: https://github.com/thesofproject

ALSA-ucm configurations
-----------------------
Typically an appropriate ALSA-ucm configuration file is needed for
use-case managers and audio servers such as PipeWire.

Configuration files are available from the alsa-ucm-conf repository:
https://git.alsa-project.org/?p=alsa-ucm-conf.git

SoundWire와 HDA 성공 로그

154-190

SoundWire 초기화에 성공하면 amplifier마다 다음과 같은 로그가 반복된다. regulator를 찾지 못해 dummy regulator를 쓰는 메시지, 장치 ID와 ROM firmware, `.wmfw`와 `.bin` 적재, calibration 적용 순서가 보인다.

[ 7.568374] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_P not found, using dummy regulator
[ 7.605208] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_IO not found, using dummy regulator
[ 7.605313] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_A not found, using dummy regulator
[ 7.939279] cs35l56 sdw:0:0:01fa:3556:01:0: Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
[ 7.947844] cs35l56 sdw:0:0:01fa:3556:01:0: Slave 4 state check1: UNATTACHED, status was 1
[ 8.740280] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_B not found, using dummy regulator
[ 8.740552] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_AMP not found, using dummy regulator
[ 9.242164] cs35l56 sdw:0:0:01fa:3556:01:0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx.wmfw: format 3 timestamp 0x66b2b872
[ 9.242173] cs35l56 sdw:0:0:01fa:3556:01:0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx.wmfw: Tue 05 Dec 2023 21:37:21 GMT Standard Time
[ 9.991709] cs35l56 sdw:0:0:01fa:3556:01:0: DSP1: Firmware: 1a00d6 vendor: 0x2 v3.11.23, 41 algorithms
[10.039098] cs35l56 sdw:0:0:01fa:3556:01:0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx-amp1.bin: v3.11.23
[10.879235] cs35l56 sdw:0:0:01fa:3556:01:0: Slave 4 state check1: UNATTACHED, status was 1
[11.401536] cs35l56 sdw:0:0:01fa:3556:01:0: Calibration applied

HDA도 amplifier마다 초기화 로그가 반복된다. HDA codec binding 뒤 `.wmfw`, firmware algorithm, `.bin`, calibration이 차례로 나타난다.

[ 6.306475] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
[ 6.613892] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP system name: 'xxxxxxxx', amp name: 'AMP1'
[ 8.266660] snd_hda_codec_cs8409 ehdaudio0D0: bound i2c-CSC3556:00-cs35l56-hda.0 (ops cs35l56_hda_comp_ops [snd_hda_scodec_cs35l56])
[ 8.287525] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx.wmfw: format 3 timestamp 0x66b2b872
[ 8.287528] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx.wmfw: Tue 05 Dec 2023 21:37:21 GMT Standard Time
[ 9.984335] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP1: Firmware: 1a00d6 vendor: 0x2 v3.11.23, 41 algorithms
[10.085797] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx-amp1.bin: v3.11.23
[10.655237] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: Calibration applied
CS35 정상 초기화
장치 ID 읽기DSP system 식별.wmfw 적재.bin 적재Calibration applied
SoundWire필요 시 dummy regulatorfirmware 적재
HDAHDA codec bindingfirmware 적재

버스별 로그 세부는 달라도 firmware와 calibration 단계는 같다.


Kernel log messages
===================

SoundWire
---------
A successful initialization will look like this (this will be repeated for
each amplifier)::

  [ 7.568374] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_P not found, using dummy regulator
  [ 7.605208] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_IO not found, using dummy regulator
  [ 7.605313] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_A not found, using dummy regulator
  [ 7.939279] cs35l56 sdw:0:0:01fa:3556:01:0: Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
  [ 7.947844] cs35l56 sdw:0:0:01fa:3556:01:0: Slave 4 state check1: UNATTACHED, status was 1
  [ 8.740280] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_B not found, using dummy regulator
  [ 8.740552] cs35l56 sdw:0:0:01fa:3556:01:0: supply VDD_AMP not found, using dummy regulator
  [ 9.242164] cs35l56 sdw:0:0:01fa:3556:01:0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx.wmfw: format 3 timestamp 0x66b2b872
  [ 9.242173] cs35l56 sdw:0:0:01fa:3556:01:0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx.wmfw: Tue 05 Dec 2023 21:37:21 GMT Standard Time
  [ 9.991709] cs35l56 sdw:0:0:01fa:3556:01:0: DSP1: Firmware: 1a00d6 vendor: 0x2 v3.11.23, 41 algorithms
  [10.039098] cs35l56 sdw:0:0:01fa:3556:01:0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx-amp1.bin: v3.11.23
  [10.879235] cs35l56 sdw:0:0:01fa:3556:01:0: Slave 4 state check1: UNATTACHED, status was 1
  [11.401536] cs35l56 sdw:0:0:01fa:3556:01:0: Calibration applied

HDA
---
A successful initialization will look like this (this will be repeated for
each amplifier)::

  [ 6.306475] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
  [ 6.613892] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP system name: 'xxxxxxxx', amp name: 'AMP1'
  [ 8.266660] snd_hda_codec_cs8409 ehdaudio0D0: bound i2c-CSC3556:00-cs35l56-hda.0 (ops cs35l56_hda_comp_ops [snd_hda_scodec_cs35l56])
  [ 8.287525] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx.wmfw: format 3 timestamp 0x66b2b872
  [ 8.287528] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx.wmfw: Tue 05 Dec 2023 21:37:21 GMT Standard Time
  [ 9.984335] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP1: Firmware: 1a00d6 vendor: 0x2 v3.11.23, 41 algorithms
  [10.085797] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx-amp1.bin: v3.11.23
  [10.655237] cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: Calibration applied

중요 로그 메시지 해석

191-219

`Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)`은 드라이버가 amplifier 식별 register를 읽었다는 뜻이다. 실제 모델과 silicon revision은 register에서 읽은 값이다.

`patched=0`은 hard reset 뒤 기본 ROM firmware를 실행 중인 정상 상태다. `patched=1`은 이전 단계에서 firmware가 이미 내려갔고 드라이버가 RESET 신호를 제어할 수 없어 이를 교체하지 못한다는 뜻이다. BIOS가 OS boot 전에 firmware를 적재하는 시스템에서는 정상일 수 있다. RESET 제어권이 없는 시스템에서 모듈을 내렸다 다시 올려도 이 상태가 나타난다. SoundWire 시스템은 대개 드라이버에 RESET 제어를 주지 않으므로 BIOS 재부팅만 amplifier를 reset할 수 있다.

`DSP1: ...xxxxxxxx.wmfw`는 `.wmfw`를 찾아 내려받았음을, `DSP1: ...xxxxxxxx-amp1.bin`은 `.bin`을 찾아 내려받았음을 보여준다. `Calibration applied`는 EFI의 공장 calibration 데이터를 amplifier에 썼다는 뜻이다.

CS35 중요 로그
로그의미
patched=0hard reset 뒤 기본 ROM firmware
patched=1이전에 firmware가 적재됐고 드라이버가 RESET을 제어하지 못함
DSP1: ...wmfw.wmfw 발견 및 다운로드
DSP1: ...bin.bin 발견 및 다운로드
Calibration appliedEFI 공장 calibration 적용

정상 초기화에서 확인할 대표 문자열이다.

Important messages
~~~~~~~~~~~~~~~~~~
Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
  Shows that the driver has been able to read device ID registers from the
  amplifier.

    * The actual amplifier type and silicon revision (CS35L56 B0 in this
      example) is shown, as read from the amplifier identification registers.
    * (patched=0) is normal, and indicates that the amplifier has been hard
      reset and is running default ROM firmware.
    * (patched=1) means that something has previously downloaded firmware
      to the amplifier and the driver does not have control of the RESET
      signal to be able to replace this preloaded firmware. This is normal
      for systems where the BIOS downloads firmware to the amplifiers
      before OS boot.
      This status can also be seen if the cs35l56 kernel module is unloaded
      and reloaded on a system where the driver does not have control of
      RESET. SoundWire systems typically do not give the driver control of
      RESET and only a BIOS (re)boot can reset the amplifiers.

DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx.wmfw
  Shows that a .wmfw firmware file was found and downloaded.

DSP1: cirrus/cs35l56-b0-dsp1-misc-xxxxxxxx-amp1.bin
  Shows that a .bin firmware file was found and downloaded.

Calibration applied
  Factory calibration data in EFI was written to the amplifier.

Firmware와 calibration 오류

220-261

`Algorithm coefficient version %d.%d.%d but expected %d.%d.%d`와 `No %s for algorithm %x`는 `.bin` 내용의 버전이 적재된 firmware와 맞지 않음을 뜻한다. `.wmfw`와 `.bin`이 서로 다른 조합이거나, `.bin`만 있고 `.wmfw`를 찾지 못했을 때 발생한다.

`.bin file required but not found`는 HDA 드라이버가 해당 하드웨어와 일치하는 `.bin`을 찾지 못했다는 뜻이다.

`Calibration disabled due to missing firmware controls`는 EFI calibration을 firmware register에 쓸 수 없었다는 뜻이다. 적합한 `.wmfw`를 못 찾았거나, amplifier가 이미 firmware로 patch된 상태에서 드라이버가 hard RESET을 제어하지 못해 발견한 firmware를 다시 적재할 수 없을 때 발생한다. 후자는 식별 로그의 `patched=1`로 확인한다. `Failed to write calibration`도 같은 의미와 원인이다.

`Failed to read calibration data from EFI`는 EFI 공장 calibration 데이터가 없거나 비었거나 손상됐다는 뜻이며, EFI filesystem에서 파일을 실수로 지운 경우가 가장 유력하다. `No calibration for silicon ID`는 EFI calibration이 현재 하드웨어와 맞지 않는다는 뜻이다. 제조사 calibration 절차 없이 motherboard의 amplifier를 교체해 새 장치용 데이터를 만들지 않은 경우가 가장 유력하다.

CS35 firmware·calibration 오류
오류원인
Algorithm coefficient version....wmfw/.bin 버전 불일치 또는 .wmfw 누락
No %s for algorithm %x.wmfw/.bin 버전 불일치 또는 .wmfw 누락
.bin file required but not foundHDA용 일치 .bin 누락
Calibration disabled... / Failed to write calibrationfirmware control 누락 또는 patched=1 상태에서 RESET 불가
Failed to read calibration data from EFIEFI calibration 누락·빈 데이터·손상
No calibration for silicon IDcalibration과 교체된 amplifier ID 불일치

오류 문자열과 대표 원인이다.

Error messages
==============
This section explains some of the error messages that the driver can log.

Algorithm coefficient version %d.%d.%d but expected %d.%d.%d
  The version of the .bin file content does not match the loaded firmware.
  Caused by mismatched .wmfw and .bin file, or .bin file was found but
  .wmfw was not.

No %s for algorithm %x
  The version of the .bin file content does not match the loaded firmware.
  Caused by mismatched .wmfw and .bin file, or .bin file was found but
  .wmfw was not.

.bin file required but not found
  HDA driver did not find a .bin file that matches this hardware.

Calibration disabled due to missing firmware controls
  Driver was not able to write EFI calibration data to firmware registers.
  This typically means that either:

    * The driver did not find a suitable wmfw for this hardware, or
    * The amplifier has already been patched with firmware by something
      previously, and the driver does not have control of a hard RESET line
      to be able to reset the amplifier and download the firmware files it
      found. This situation is indicated by the device identification
      string in the kernel log shows "(patched=1)"

Failed to write calibration
  Same meaning and cause as "Calibration disabled due to missing firmware
  controls"

Failed to read calibration data from EFI
  Factory calibration data in EFI is missing, empty or corrupt.
  This is most likely to be cause by accidentally deleting the file from
  the EFI filesystem.

No calibration for silicon ID
  The factory calibration data in EFI does not match this hardware.
  The most likely cause is that an amplifier has been replaced on the
  motherboard without going through manufacturer calibration process to
  generate calibration data for the new amplifier.

버스·ACPI·GPIO·보호 오류

262-305

HDA에서만 나오는 `Did not find any buses for CSCxxxx`는 HDA codec 드라이버가 Cirrus Logic companion amplifier의 ACPI 항목은 찾았지만 I2C/SPI bus 항목을 열거하지 못했다는 뜻이다. 관련 I2C 또는 SPI bus 드라이버가 커널에 없거나, HDA codec 드라이버는 built-in인데 bus 드라이버는 module이라 HDA 쪽에서 bus 함수를 호출할 수 없는 경우가 가장 유력하다.

`init_completion timed out`은 host 측 SoundWire bus controller가 amplifier를 열거하지 못했다는 뜻이다. ACPI에는 amplifier가 있지만 실제 bus에서 감지되지 않았다. `No AF01 node`는 SoundWire 시스템에 있어야 할 이름 `AF01`의 ACPI `Device()` node가 없다는 ACPI 오류다.

`Failed to get spk-id-gpios`는 ACPI가 GPIO 요청을 지시했지만 드라이버가 가져오지 못했다는 뜻이며 올바른 GPIO 또는 PINCTRL 드라이버가 커널에 없을 가능성이 크다. `Failed to read spk-id`는 요청한 GPIO를 읽지 못했다는 뜻이고, `Unexpected spk-id element count`는 `AF01`에 드라이버가 지원하는 수보다 많은 speaker ID GPIO 항목이 있다는 뜻이다.

`Overtemp error`는 과열 보호가 작동해 amplifier가 스스로 꺼졌다는 뜻이다. `Amp short error`는 speaker 출력 pin의 단락을 감지해 보호 종료했음을 뜻하며 보통 speaker 손상을 나타낸다. `Hibernate wake failed`는 절전 상태에서 깨우는 동안 예상 응답을 받지 못했다는 뜻이며 하드웨어와 맞지 않는 firmware를 사용하면 발생할 수 있다.

CS35 시스템·보호 오류
오류의미 / 점검 대상
Did not find any buses for CSCxxxxHDA의 I2C/SPI bus driver 누락 또는 built-in/module 순서 문제
init_completion timed outSoundWire host가 amplifier를 열거하지 못함
No AF01 nodeACPI의 AF01 Device() 누락
Failed to get/read spk-idGPIO/PINCTRL driver 또는 GPIO 읽기 문제
Unexpected spk-id element count지원 수보다 많은 speaker ID GPIO
Overtemp error과열 보호 종료
Amp short errorspeaker 출력 단락, 보통 speaker 손상
Hibernate wake failed절전 복귀 실패, 불일치 firmware 가능

버스, ACPI, GPIO와 amplifier 보호 오류를 구분한다.


Did not find any buses for CSCxxxx
  Only on HDA systems. The HDA codec driver found an ACPI entry for
  Cirrus Logic companion amps, but could not enumerate the ACPI entries for
  the I2C/SPI buses. The most likely cause of this is that:

    * The relevant bus driver (I2C or SPI) is not part of the kernel.
    * The HDA codec driver was built-in to the kernel but the I2C/SPI
      bus driver is a module and so the HDA codec driver cannot call the
      bus driver functions.

init_completion timed out
  The SoundWire bus controller (host end) did not enumerate the amplifier.
  In other words, the ACPI says there is an amplifier but for some reason
  it was not detected on the bus.

No AF01 node
  Indicates an error in ACPI. A SoundWire system should have a Device()
  node named "AF01" but it was not found.

Failed to get spk-id-gpios
  ACPI says that the driver should request a GPIO but the driver was not
  able to get that GPIO. The most likely cause is that the kernel does not
  include the correct GPIO or PINCTRL driver for this system.

Failed to read spk-id
  ACPI says that the driver should request a GPIO but the driver was not
  able to read that GPIO.

Unexpected spk-id element count
  AF01 contains more speaker ID GPIO entries than the driver supports

Overtemp error
  Amplifier overheat protection was triggered and the amplifier shut down
  to protect itself.

Amp short error
  Amplifier detected a short-circuit on the speaker output pins and shut
  down for protection. This would normally indicate a damaged speaker.

Hibernate wake failed
  The driver tried to wake the amplifier from its power-saving state but
  did not see the expected responses from the amplifier. This can be caused
  by using firmware that does not match the hardware.