Lines Matching +full:power +full:- +full:friendly

2 More Notes on HD-Audio Driver
11 HD-audio is the new standard on-board audio component on modern PCs
12 after AC97. Although Linux has been supporting HD-audio since long
15 This document explains the brief trouble-shooting and debugging
16 methods for the HD-audio hardware.
18 The HD-audio component consists of two parts: the controller chip and
19 the codec chips on the HD-audio bus. Linux provides a single driver
20 for all controllers, snd-hda-intel. Although the driver name contains
21 a word of a well-known hardware vendor, it's not specific to it but for
22 all controller chips by other companies. Since the HD-audio
23 controllers are supposed to be compatible, the single snd-hda-driver
25 bugs and issues specific to each controller type. The snd-hda-intel
34 The snd-hda-intel driver has several different codec parsers depending
37 parser, usually the codec-specific parser (coded in patch_*.c) is used
38 for the codec-specific implementations. The details about the
39 codec-specific problems are explained in the later sections.
41 If you are interested in the deep debugging of HD-audio, read the
42 HD-audio specification at first. The specification is found on
48 HD-Audio Controller
51 DMA-Position Problem
52 --------------------
55 read in two ways, either via a LPIB register or via a position-buffer
56 map. As default the driver tries to read from the io-mapped
57 position-buffer, and falls back to LPIB if the position-buffer appears
62 ``position_fix=2`` means to use the position-buffer.
65 by comparing both LPIB and position-buffer values.
67 and uses LPIB for the playback and the position-buffer for the capture
80 the wake-up timing. It wakes up a few samples before actually
93 Codec-Probing Problem
94 ---------------------
97 confused and tries to access the non-existing codec slot. This often
98 results in the total screw-up, and destructs the further communication
115 accessing a non-existing codec slot.
135 ------------------
136 HD-audio driver uses MSI as default (if available) since 2.6.33
143 see a regression wrt the sound quality (stuttering, etc) or a lock-up
150 HD-Audio Codec
154 ------------
155 The most common problem regarding the HD-audio driver is the
157 Most of codec-specific code has several preset models, either to
165 hda_codec: ALC880: BIOS auto-probing.
170 hda_codec: Unknown model for ALC880, trying auto-probe from BIOS...
175 listed in the known preset model (white-)list. But, this doesn't mean
176 that the driver is broken. Many codec-drivers provide the automatic
179 The HD-audio codec has usually "pin" widgets, and BIOS sets the default
181 connection type, the jack color, etc. The HD-audio driver can guess
183 However -- some codec-support codes, such as patch_analog.c, don't
188 The preset model (or recently called as "fix-up") is provided
190 model is found in the white-list, the driver assumes the static
194 re-use the same model. You can pass the ``model`` option to specify the
195 preset model instead of PCI (and codec-) SSID look-up.
198 Check your codec chip from the codec proc file (see "Codec Proc-File"
200 chip. Then, see Documentation/sound/hd-audio/models.rst file,
201 the section of HD-audio driver. You can find a list of codecs
206 Thus, the first thing you can do for any brand-new, unsupported and
207 non-working HD-audio hardware is to check HD-audio codec and several
213 * when 'nofixup' is passed, the device-specific fixups in the codec
215 * when ``generic`` is passed, the codec-specific parser is skipped and
220 where XXXX and YYYY are the sub-vendor and sub-device IDs in hex
231 ----------------------------
232 One of the most frequent (and obvious) bugs with HD-audio is the
233 silent output from either or both of a built-in speaker and a
239 Before making a bug report, double-check whether the mixer is set up
240 correctly. The recent version of snd-hda-intel driver provides mostly
242 indicates the front-channels). In addition, there can be individual
250 not on every preset model or codec-support code.
265 * Some Realtek codecs require special vendor-specific coefficients to
267 * IDT codecs may have extra power-enable/disable controls on each
269 * Very rare but some devices don't accept the pin-detection verb until
271 codec-communication stall. Some examples are found in
276 ----------------
284 When the PCM device is opened via "default" PCM (without pulse-audio
289 should be set to exactly 50%, corresponding to 0dB -- neither extra
294 and the recorded sound contains a certain DC-offset. This is no bug
297 Most of modern laptops have no analog CD-input connection. Thus, the
301 The automatic switching of the built-in and external mic per plugging
308 ----------------
310 to fight against evil, try debugging via hitting the raw HD-audio
311 codec verbs to the device. Some tools are available: hda-emu and
312 hda-analyzer. The detailed description is found in the sections
321 --------------------
338 When this is enabled, the driver creates hardware-dependent devices
341 codec slot #2 of the first card (#0). For debug-tools such as
342 hda-verb and hda-analyzer, the hwdep device has to be enabled.
347 the corresponding hwdep directory. See "HD-audio reconfiguration"
350 ``CONFIG_SND_HDA_POWER_SAVE`` option enables the power-saving feature.
351 See "Power-saving" section below.
354 Codec Proc-File
355 ---------------
356 The codec proc-file is a treasure-chest for debugging HD-audio.
363 is because the jack-sensing might be depending on the trigger state.
374 HD-Audio Reconfiguration
375 ------------------------
376 This is an experimental feature to allow you re-configure the HD-audio
378 files are available under each codec-hwdep device directory (e.g.
382 Shows the 32bit codec vendor-id hex number. You can change the
383 vendor-id value by writing to this file.
385 Shows the 32bit codec subsystem-id hex number. You can change the
386 subsystem-id value by writing to this file.
388 Shows the 32bit codec revision-id hex number. You can change the
389 revision-id value by writing to this file.
391 Shows the AFG ID. This is read-only.
393 Shows the MFG ID. This is read-only.
422 Triggers the codec re-configuration. When any value is written to
423 this file, the driver re-initialize and parses the codec tree
432 re-configure based on that state, run like below:
440 ------------
446 the codec parser will skip the features like auto-mute or mic
447 auto-switch. As a boolean value, either ``yes``, ``no``, ``true``, ``false``,
475 enable/disable the headphone auto-mute feature; default true
477 enable/disable the mic auto-switch feature; default true
479 enable/disable the line-in auto-switch feature; default false
485 try probing multi-I/O config (e.g. shared line-in/surround,
490 provide split internal mic volume/switch for phase-inverted
496 add the stereo mix (analog-loopback mix) to the input mux if
502 advanced power management for each widget, controlling the power
506 power down the unused widgets, a subset of power_save_node, and
511 enable/disable the hp/mic shared input for a single built-in mic
516 specifies the widget NID of the analog-loopback mixer
520 --------------
522 as a firmware file for modifying the HD-audio setup before
549 three numbers indicating the codec vendor-id (0x12345678 in the
550 example), the codec subsystem-id (0xabcd1234) and the address (2) of
562 default pin-configurations just like ``user_pin_configs`` sysfs above.
595 My-own NEWS-0002
598 The hd-audio driver reads the file via request_firmware(). Thus,
601 ``patch=hda-init.fw``, the file /lib/firmware/hda-init.fw must be
606 For example, if you have two cards, one for an on-board analog and one
610 options snd-hda-intel patch=on-board-patch,hdmi-patch
613 Power-Saving
614 ------------
615 The power-saving is a kind of auto-suspend of the device. When the
617 turned off to save the power. The time to go down is specified via
621 The power-saving won't work when the analog loopback is enabled on
623 you want the power-saving.
625 The power-saving feature might cause audible click noises at each
626 power-down/up depending on the device. Some of them might be
628 openSUSE enables the power-saving feature automatically when the power
630 power-saving. See /sys/module/snd_hda_intel/parameters/power_save to
631 check the current value. If it's non-zero, the feature is turned on.
633 The recent kernel supports the runtime PM for the HD-audio controller
634 chip, too. It means that the HD-audio controller is also powered up /
642 -----------
643 The hd-audio driver gives a few basic tracepoints.
646 ``hda:hda_bus_reset`` traces the bus-reset due to fatal error, etc,
648 ``hda:hda_power_down`` and ``hda:hda_power_up`` trace the power down/up
649 via power-saving behavior.
664 # TASK-PID CPU# TIMESTAMP FUNCTION
666 <...>-7807 [002] 105147.774889: hda_send_cmd: [0:0] val=e3a019
667 <...>-7807 [002] 105147.774893: hda_send_cmd: [0:0] val=e39019
668 <...>-7807 [002] 105147.999542: hda_send_cmd: [0:0] val=e3a01a
669 <...>-7807 [002] 105147.999543: hda_send_cmd: [0:0] val=e3901a
670 <...>-26764 [001] 349222.837143: hda_send_cmd: [0:0] val=e3a019
671 <...>-26764 [001] 349222.837148: hda_send_cmd: [0:0] val=e39019
672 <...>-26764 [001] 349223.058539: hda_send_cmd: [0:0] val=e3a01a
673 <...>-26764 [001] 349223.058541: hda_send_cmd: [0:0] val=e3901a
677 a packed value, and you can decode it via hda-decode-verb program
678 included in hda-emu package below. For example, the value e3a019 is
679 to set the left output-amp value to 25.
682 % hda-decode-verb 0xe3a019
692 ----------------
693 The latest development codes for HD-audio are found on sound git tree:
697 The master branch or for-next branches can be used as the main
699 and next kernels are found in for-linus and for-next branches,
704 --------------------
710 * Kernel version (and ALSA-driver version if you built externally)
711 * ``alsa-info.sh`` output; run with ``--no-upload`` option. See the
712 section below about alsa-info
714 If it's a regression, at best, send alsa-info outputs of both working
715 and non-working kernels. This is really helpful because we can
720 kernel-bugzilla
722 alsa-devel ML
723 alsa-devel@alsa-project.org
729 This section describes some tools available for debugging HD-audio
732 alsa-info
733 ---------
734 The script ``alsa-info.sh`` is a very useful tool to gather the audio
735 device information. It's included in alsa-utils package. The latest
738 * git://git.alsa-project.org/alsa-utils.git
742 * https://www.alsa-project.org/alsa-info.sh
748 on alsa-project.org. But, if you send a bug report, it'd be better to
749 run with ``--no-upload`` option, and attach the generated file.
751 There are some other useful options. See ``--help`` option output for
757 alsa-info at this state. With this option, the driver won't configure
762 configuration via hwdep sysfs file if hda-reconfig option is enabled.
768 hda-verb
769 --------
770 hda-verb is a tiny program that allows you to access the HD-audio
771 codec directly. You can execute a raw HD-audio codec verb with this.
775 The hda-verb program takes four arguments: the hwdep device file, the
781 The second parameter is the widget number-id to access. The third
788 % hda-verb /dev/snd/hwC0D0 0x12 0x701 2
792 % hda-verb /dev/snd/hwC0D0 0x0 PARAMETERS VENDOR_ID
796 % hda-verb /dev/snd/hwC0D0 2 set_a 0xb080
804 via hda-verb won't change the mixer value.
806 The hda-verb program is included now in alsa-tools:
808 * git://git.alsa-project.org/alsa-tools.git
810 Also, the old stand-alone package is found in the ftp directory:
816 * git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/hda-verb.git
818 See README file in the tarball for more details about hda-verb
822 hda-analyzer
823 ------------
824 hda-analyzer provides a graphical interface to access the raw HD-audio
826 hda-verb. The program gives you an easy-to-use GUI stuff for showing
828 proc-compatible output.
830 The hda-analyzer:
832 * https://git.alsa-project.org/?p=alsa.git;a=tree;f=hda-analyzer
834 is a part of alsa.git repository in alsa-project.org:
836 * git://git.alsa-project.org/alsa.git
839 ----------
841 codec-node connection of a codec chip. It's especially useful when
851 hda-emu
852 -------
853 hda-emu is an HD-audio emulator. The main purpose of this program is
854 to debug an HD-audio codec without the real hardware. Thus, it
856 dumps the codec register changes and the ALSA-driver internal changes
857 at probing and operating the HD-audio driver.
859 The program requires a codec proc-file to simulate. Get a proc file
862 proc file, and the hda-emu program will start parsing the codec file
863 and simulates the HD-audio driver:
867 % hda-emu codecs/stac9200-dell-d820-laptop
874 The program gives you only a very dumb command-line interface. You
875 can get a proc-file dump at the current state, get a list of control
881 * git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/hda-emu.git
883 See README file in the repository for more details about hda-emu
887 hda-jack-retask
888 ---------------
889 hda-jack-retask is a user-friendly GUI program to manipulate the
890 HD-audio pin control for jack retasking. If you have a problem about
896 The program is included in alsa-tools now:
898 * git://git.alsa-project.org/alsa-tools.git