← Documents Documentation/sound/designs/powersave.rst GitHub 원문 ↗

Linux 6.18.37 · Sound

사운드 전력 절감 모드 참고 사항

AC97과 HD-audio codec의 자동 절전 조건, `power_save` timeout과 sysfs 조정, controller 절전에서 발생할 수 있는 click/pop과 wake-up 지연을 설명합니다.

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

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

1. 요약·해설

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

요약·해설

powersave.rst:1-43

AC97과 HD-audio codec의 자동 절전 조건, `power_save` timeout과 sysfs 조정, controller 절전에서 발생할 수 있는 click/pop과 wake-up 지연을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 ==========================
2 Notes on Power-Saving Mode
3 ==========================
4
5 AC97 and HD-audio drivers have the automatic power-saving mode.
6 This feature is enabled via Kconfig ``CONFIG_SND_AC97_POWER_SAVE``
7 and ``CONFIG_SND_HDA_POWER_SAVE`` options, respectively.
8
9 With the automatic power-saving, the driver turns off the codec power
10 appropriately when no operation is required. When no applications use
11 the device and/or no analog loopback is set, the power disablement is
12 done fully or partially. It'll save a certain power consumption, thus
13 good for laptops (even for desktops).
14
15 The time-out for automatic power-off can be specified via ``power_save``
16 module option of snd-ac97-codec and snd-hda-intel modules. Specify
17 the time-out value in seconds. 0 means to disable the automatic
18 power-saving. The default value of timeout is given via
19 ``CONFIG_SND_AC97_POWER_SAVE_DEFAULT`` and
20 ``CONFIG_SND_HDA_POWER_SAVE_DEFAULT`` Kconfig options. Setting this to 1
21 (the minimum value) isn't recommended because many applications try to
22 reopen the device frequently. 10 would be a good choice for normal
23 operations.
24
25 The ``power_save`` option is exported as writable. This means you can
26 adjust the value via sysfs on the fly. For example, to turn on the
27 automatic power-save mode with 10 seconds, write to
28 ``/sys/module/snd_ac97_codec/parameters/power_save`` (usually as root):
29 ::
30
31 # echo 10 > /sys/module/snd_ac97_codec/parameters/power_save
32
33
34 Note that you might hear click noise/pop when changing the power
35 state. Also, it often takes certain time to wake up from the
36 power-down to the active state. These are often hard to fix, so
37 don't report extra bug reports unless you have a fix patch ;-)
38
39 For HD-audio interface, there is another module option,
40 power_save_controller. This enables/disables the power-save mode of
41 the controller side. Setting this on may reduce a bit more power
42 consumption, but might result in longer wake-up time and click noise.
43 Try to turn it off when you experience such a thing too often.
44

3. 한국어 전문 번역

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

AC97과 HD-audio 자동 절전

1-13

AC97과 HD-audio 드라이버는 자동 전력 절감 모드를 제공한다. 각각 Kconfig의 `CONFIG_SND_AC97_POWER_SAVE`와 `CONFIG_SND_HDA_POWER_SAVE` 옵션으로 이 기능을 활성화한다.

자동 절전이 활성화되면 드라이버는 동작이 필요하지 않을 때 codec 전원을 적절히 끈다. 어떤 애플리케이션도 장치를 사용하지 않거나 analog loopback이 설정되지 않은 경우 전원을 완전히 또는 부분적으로 차단한다. 이 기능은 일정한 소비 전력을 줄이므로 노트북뿐 아니라 데스크톱에도 유용하다.

사운드 codec 자동 절전
애플리케이션 미사용analog loopback 없음timeout 경과codec 전원 부분/전체 차단소비 전력 감소

사용 상태에 따라 codec 전력을 차단하고 다시 활성화한다.

==========================
Notes on Power-Saving Mode
==========================

AC97 and HD-audio drivers have the automatic power-saving mode.
This feature is enabled via Kconfig ``CONFIG_SND_AC97_POWER_SAVE``
and ``CONFIG_SND_HDA_POWER_SAVE`` options, respectively.

With the automatic power-saving, the driver turns off the codec power
appropriately when no operation is required.  When no applications use
the device and/or no analog loopback is set, the power disablement is
done fully or partially.  It'll save a certain power consumption, thus
good for laptops (even for desktops).

timeout과 실시간 sysfs 조정

14-32

자동 전원 차단 timeout은 `snd-ac97-codec`과 `snd-hda-intel` 모듈의 `power_save` 옵션으로 지정한다. 값의 단위는 초이며 0은 자동 절전을 비활성화한다.

기본 timeout은 Kconfig의 `CONFIG_SND_AC97_POWER_SAVE_DEFAULT`와 `CONFIG_SND_HDA_POWER_SAVE_DEFAULT`에서 정한다. 최솟값 1초는 많은 애플리케이션이 장치를 자주 다시 열기 때문에 권장되지 않으며, 일반적인 동작에는 10초가 적절한 선택이다.

`power_save` 옵션은 쓰기 가능한 매개변수로 공개되므로 실행 중에도 sysfs에서 값을 조정할 수 있다. 예를 들어 AC97 codec의 자동 절전을 10초로 켜려면 일반적으로 root 권한으로 다음 명령을 실행한다.

# echo 10 > /sys/module/snd_ac97_codec/parameters/power_save
power_save timeout
동작평가
0자동 절전 비활성화문제 회피용
11초 뒤 절전빈번한 재열기 때문에 비권장
1010초 뒤 절전일반 동작에 권장
기타 양수지정한 초 뒤 절전사용 패턴에 맞춰 조정

값에 따른 자동 절전 동작과 권장 사항이다.


The time-out for automatic power-off can be specified via ``power_save``
module option of snd-ac97-codec and snd-hda-intel modules.  Specify
the time-out value in seconds.  0 means to disable the automatic
power-saving.  The default value of timeout is given via
``CONFIG_SND_AC97_POWER_SAVE_DEFAULT`` and
``CONFIG_SND_HDA_POWER_SAVE_DEFAULT`` Kconfig options.  Setting this to 1
(the minimum value) isn't recommended because many applications try to
reopen the device frequently.  10 would be a good choice for normal
operations.

The ``power_save`` option is exported as writable.  This means you can
adjust the value via sysfs on the fly.  For example, to turn on the
automatic power-save mode with 10 seconds, write to
``/sys/module/snd_ac97_codec/parameters/power_save`` (usually as root):
::

        # echo 10 > /sys/module/snd_ac97_codec/parameters/power_save

상태 전환과 controller 절전의 부작용

33-43

전원 상태가 바뀔 때 click 또는 pop noise가 들릴 수 있고, 전원 차단 상태에서 active 상태로 깨어나는 데 시간이 걸릴 수 있다. 이런 현상은 수정하기 어려운 경우가 많으므로 실제 수정 patch 없이 같은 증상을 추가로 보고하는 것은 권장되지 않는다.

HD-audio interface에는 `power_save_controller` 모듈 옵션도 있다. 이 옵션은 codec이 아니라 controller 쪽 전력 절감 모드를 켜거나 끈다.

controller 절전을 켜면 전력을 조금 더 줄일 수 있지만 wake-up 시간이 길어지고 click noise가 생길 수 있다. 이런 현상이 너무 자주 발생하면 `power_save_controller`를 꺼서 비교해야 한다.

HD-audio 절전 선택
설정이점가능한 부작용
power_savecodec 소비 전력 감소click/pop, wake-up 지연
power_save_controller=1controller 전력까지 추가 감소더 긴 wake-up, click noise
power_save_controller=0controller 부작용 회피절전량 일부 감소

codec 절전과 controller 절전의 이점과 비용을 구분한다.


Note that you might hear click noise/pop when changing the power
state.  Also, it often takes certain time to wake up from the
power-down to the active state.  These are often hard to fix, so
don't report extra bug reports unless you have a fix patch ;-)

For HD-audio interface, there is another module option,
power_save_controller.  This enables/disables the power-save mode of
the controller side.  Setting this on may reduce a bit more power
consumption, but might result in longer wake-up time and click noise.
Try to turn it off when you experience such a thing too often.