Documentation/sound/alsa/powersave.txt

Chinese translated version of Documentation/sound/alsa/powersave.txt

If you have any comment or update to the content, please contact the
original document maintainer directly.  However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help.  Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.

Chinese maintainer:Luo Yangyang <794436342@qq.com>
---------------------------------------------------------------------
Documentation/sound/alsa/powersave.txt的中文翻译

如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。

中文版维护者: 罗秧秧  <794436342@qq.com>
中文版翻译者: 罗秧秧  <794436342@qq.com>
中文版校译者: 罗秧秧  <794436342@qq.com>

以下为正文
---------------------------------------------------------------------

ALSA是Advanced Linux Sound Architecture,高级Linux声音架构的简称,
它在Linux操作系统上提供了音频和MIDI(Musical Instrument Digital Interface,音乐设备数字化接口)的支持。

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.
AC97和HD音频驱动程序有自动省电模式。
它们分别通过配置文件CONFIG_SND_AC97_POWER_SAVE
和CONFIG_SND_HDA_POWER_SAVE配置选项来启用此功能的。

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).
有了自动省电,当没有操作被要求时,在适当的时候,驱动程序将编解码器电源关闭。
如果没有应用程序使用设备并且/或者没有设置模拟回环,
电源会完全或部分伤残无效。它可以节省一定的电能消耗,从而
对笔记本电脑是有好处的(甚至是台式机电脑)。

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.

可以通过snd-ac97-codec和snd-hda-intel modules两个模块的
模块选项指定自动断电的超时。指定的超时值以秒为单位。 0表示禁用自动
省电。通过CONFIG_SND_AC97_POWER_SAVE_DEFAULT和
CONFIG_SND_HDA_POWER_SAVE_DEFAULT配置选项给定默认超时值。
不建议将此值设为1(最小值),那是因为许多应用程序会频繁地试图
重新打开设备。 设置成10对正常操作将是一个不错的选择。

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/modules/snd_ac97_codec/parameters/power_save (usually as root):

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

该power_save选项导出为可写。这意味着你可以
通过联机虚拟文件系统调整该值。例如,要想打开
自动省电模式下10秒,就要这样写入到
/ sys/modules/snd_ac97_codec/parameters/power_save(通常是作为root用户) :

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

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 hardly 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.

对于高清音频接口来说,有另一个模块选项,
power_save_controller 。这能启用/禁用控制器端的省电模式。
设置此项打开可能能减少更多的耗电量,
但可能会导致更长的唤醒时间和“咔嗒”噪声。
当你遇到这样的事情太频繁时,尝试将其关闭。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
将QT += core QT -= gui CONFIG += c++11 TARGET = UavRectifyLoadLIb CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS win32{ CONFIG(debug, debug|release){ DESTDIR = $$PWD/../../../../RasterManager/bin/Debug } else{ DESTDIR = $$PWD/../../../../RasterManager/bin/release } INCLUDEPATH += $$PWD/../../../include/gdal1101 DEPENDPATH += $$PWD/../../../include/gdal1101 } else{ CONFIG(debug, debug|release){ DESTDIR = $$PWD/../../../product/release32 } else{ DESTDIR = $$PWD/../../../product/release32 } } # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 unix:!macx: LIBS += -L$$PWD/../../../product/release32/ -lUAVAutoRectifyMt -lUAVAutoRectify -lUAVAutoRectifyFi INCLUDEPATH += $$PWD/../include DEPENDPATH += $$PWD/../include unix:!macx: LIBS += -L$$PWD/../../../lib/opencvf249/ -lopencv_core unix:!macx: LIBS += -L$$PWD/../../../lib/opencvf249/ -lopencv_highgui unix:!macx: LIBS += -L$$PWD/../../../lib/opencvf249/ -lopencv_imgproc INCLUDEPATH += $$PWD/../../../lib/opencvf249 DEPENDPATH += $$PWD/../../../lib/opencvf249 unix:!macx: LIBS += -L$$PWD/../../../../../../../usr/local/lib/ -lopencv_core #unix:!macx: LIBS += -L$$PWD/../../../../../../../usr/local/lib/ -lopencv_highgui unix:!macx: LIBS += -L$$PWD/../../../../../../../usr/local/lib/ -lopencv_imgproc unix:!macx: LIBS += -L$$PWD/../../../../../../../usr/local/lib/ -lopencv_features2d unix:!macx: LIBS += -L$$PWD/../../../../../../../usr/local/lib/ -lopencv_imgcodecs INCLUDEPATH += $$PWD/../../../../../../../usr/local/include DEPENDPATH += $$PWD/../../../../../../../usr/local/include unix:!macx: LIBS += -L$$PWD/../../../product/release32/ -lDEMDriver unix:!macx: LIBS += -L$$PWD/../../../product/release32/ -lProjection unix:!macx: LIBS += -L$$PWD/../../../product/release32/ -lIImage_gC QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO 转为cmake格式
06-11
根据给出的代码,可以将其转化为以下CMake代码: ``` cmake_minimum_required(VERSION 3.5) project(UavRectifyLoadLIb LANGUAGES CXX) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) find_package(Qt5Core REQUIRED) add_executable(UavRectifyLoadLIb main.cpp ) target_link_libraries(UavRectifyLoadLIb PRIVATE Qt5::Core UAVAutoRectifyMt UAVAutoRectify UAVAutoRectifyFi DEMDriver Projection IImage_gC opencv_core opencv_highgui opencv_imgproc opencv_features2d opencv_imgcodecs ) target_include_directories(UavRectifyLoadLIb PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/gdal1101 ${CMAKE_CURRENT_SOURCE_DIR}/../include ${CMAKE_CURRENT_SOURCE_DIR}/../../../lib/opencvf249 ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../../usr/local/include ) if(UNIX AND NOT APPLE) target_link_directories(UavRectifyLoadLIb PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../product/release32 ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../../usr/local/lib ) endif() if(WIN32) if(CMAKE_BUILD_TYPE STREQUAL "Debug") set_target_properties(UavRectifyLoadLIb PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/../../../../RasterManager/bin/Debug ) else() set_target_properties(UavRectifyLoadLIb PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../RasterManager/bin/release ) endif() else() if(CMAKE_BUILD_TYPE STREQUAL "Debug") set_target_properties(UavRectifyLoadLIb PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/../../../product/release32 ) else() set_target_properties(UavRectifyLoadLIb PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/../../../product/release32 ) endif() endif() ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值