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 --------------------
332 When this is enabled, the driver creates hardware-dependent devices
335 codec slot #2 of the first card (#0). For debug-tools such as
336 hda-verb and hda-analyzer, the hwdep device has to be enabled.
341 the corresponding hwdep directory. See "HD-audio reconfiguration"
344 ``CONFIG_SND_HDA_POWER_SAVE`` option enables the power-saving feature.
345 See "Power-saving" section below.
348 Codec Proc-File
349 ---------------
350 The codec proc-file is a treasure-chest for debugging HD-audio.
357 is because the jack-sensing might be depending on the trigger state.
368 HD-Audio Reconfiguration
369 ------------------------
370 This is an experimental feature to allow you re-configure the HD-audio
372 files are available under each codec-hwdep device directory (e.g.
376 Shows the 32bit codec vendor-id hex number. You can change the
377 vendor-id value by writing to this file.
379 Shows the 32bit codec subsystem-id hex number. You can change the
380 subsystem-id value by writing to this file.
382 Shows the 32bit codec revision-id hex number. You can change the
383 revision-id value by writing to this file.
385 Shows the AFG ID. This is read-only.
387 Shows the MFG ID. This is read-only.
416 Triggers the codec re-configuration. When any value is written to
417 this file, the driver re-initialize and parses the codec tree
426 re-configure based on that state, run like below:
434 ------------
440 the codec parser will skip the features like auto-mute or mic
441 auto-switch. As a boolean value, either ``yes``, ``no``, ``true``, ``false``,
469 enable/disable the headphone auto-mute feature; default true
471 enable/disable the mic auto-switch feature; default true
473 enable/disable the line-in auto-switch feature; default false
479 try probing multi-I/O config (e.g. shared line-in/surround,
484 provide split internal mic volume/switch for phase-inverted
490 add the stereo mix (analog-loopback mix) to the input mux if
496 advanced power management for each widget, controlling the power
500 power down the unused widgets, a subset of power_save_node, and
505 enable/disable the hp/mic shared input for a single built-in mic
510 specifies the widget NID of the analog-loopback mixer
514 --------------
516 as a firmware file for modifying the HD-audio setup before
543 three numbers indicating the codec vendor-id (0x12345678 in the
544 example), the codec subsystem-id (0xabcd1234) and the address (2) of
556 default pin-configurations just like ``user_pin_configs`` sysfs above.
589 My-own NEWS-0002
592 The hd-audio driver reads the file via request_firmware(). Thus,
595 ``patch=hda-init.fw``, the file /lib/firmware/hda-init.fw must be
600 For example, if you have two cards, one for an on-board analog and one
604 options snd-hda-intel patch=on-board-patch,hdmi-patch
607 Power-Saving
608 ------------
609 The power-saving is a kind of auto-suspend of the device. When the
611 turned off to save the power. The time to go down is specified via
615 The power-saving won't work when the analog loopback is enabled on
617 you want the power-saving.
619 The power-saving feature might cause audible click noises at each
620 power-down/up depending on the device. Some of them might be
622 openSUSE enables the power-saving feature automatically when the power
624 power-saving. See /sys/module/snd_hda_intel/parameters/power_save to
625 check the current value. If it's non-zero, the feature is turned on.
627 The recent kernel supports the runtime PM for the HD-audio controller
628 chip, too. It means that the HD-audio controller is also powered up /
636 -----------
637 The hd-audio driver gives a few basic tracepoints.
640 ``hda:hda_bus_reset`` traces the bus-reset due to fatal error, etc,
642 ``hda:hda_power_down`` and ``hda:hda_power_up`` trace the power down/up
643 via power-saving behavior.
658 # TASK-PID CPU# TIMESTAMP FUNCTION
660 <...>-7807 [002] 105147.774889: hda_send_cmd: [0:0] val=e3a019
661 <...>-7807 [002] 105147.774893: hda_send_cmd: [0:0] val=e39019
662 <...>-7807 [002] 105147.999542: hda_send_cmd: [0:0] val=e3a01a
663 <...>-7807 [002] 105147.999543: hda_send_cmd: [0:0] val=e3901a
664 <...>-26764 [001] 349222.837143: hda_send_cmd: [0:0] val=e3a019
665 <...>-26764 [001] 349222.837148: hda_send_cmd: [0:0] val=e39019
666 <...>-26764 [001] 349223.058539: hda_send_cmd: [0:0] val=e3a01a
667 <...>-26764 [001] 349223.058541: hda_send_cmd: [0:0] val=e3901a
671 a packed value, and you can decode it via hda-decode-verb program
672 included in hda-emu package below. For example, the value e3a019 is
673 to set the left output-amp value to 25.
676 % hda-decode-verb 0xe3a019
686 ----------------
687 The latest development codes for HD-audio are found on sound git tree:
691 The master branch or for-next branches can be used as the main
693 and next kernels are found in for-linus and for-next branches,
698 --------------------
704 * Kernel version (and ALSA-driver version if you built externally)
705 * ``alsa-info.sh`` output; run with ``--no-upload`` option. See the
706 section below about alsa-info
708 If it's a regression, at best, send alsa-info outputs of both working
709 and non-working kernels. This is really helpful because we can
714 kernel-bugzilla
716 alsa-devel ML
717 alsa-devel@alsa-project.org
723 This section describes some tools available for debugging HD-audio
726 alsa-info
727 ---------
728 The script ``alsa-info.sh`` is a very useful tool to gather the audio
729 device information. It's included in alsa-utils package. The latest
732 * git://git.alsa-project.org/alsa-utils.git
736 * https://www.alsa-project.org/alsa-info.sh
742 on alsa-project.org. But, if you send a bug report, it'd be better to
743 run with ``--no-upload`` option, and attach the generated file.
745 There are some other useful options. See ``--help`` option output for
751 alsa-info at this state. With this option, the driver won't configure
756 configuration via hwdep sysfs file if hda-reconfig option is enabled.
762 hda-verb
763 --------
764 hda-verb is a tiny program that allows you to access the HD-audio
765 codec directly. You can execute a raw HD-audio codec verb with this.
769 The hda-verb program takes four arguments: the hwdep device file, the
775 The second parameter is the widget number-id to access. The third
782 % hda-verb /dev/snd/hwC0D0 0x12 0x701 2
786 % hda-verb /dev/snd/hwC0D0 0x0 PARAMETERS VENDOR_ID
790 % hda-verb /dev/snd/hwC0D0 2 set_a 0xb080
798 via hda-verb won't change the mixer value.
800 The hda-verb program is included now in alsa-tools:
802 * git://git.alsa-project.org/alsa-tools.git
804 Also, the old stand-alone package is found in the ftp directory:
810 * git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/hda-verb.git
812 See README file in the tarball for more details about hda-verb
816 hda-analyzer
817 ------------
818 hda-analyzer provides a graphical interface to access the raw HD-audio
820 hda-verb. The program gives you an easy-to-use GUI stuff for showing
822 proc-compatible output.
824 The hda-analyzer:
826 * https://git.alsa-project.org/?p=alsa.git;a=tree;f=hda-analyzer
828 is a part of alsa.git repository in alsa-project.org:
830 * git://git.alsa-project.org/alsa.git
833 ----------
835 codec-node connection of a codec chip. It's especially useful when
845 hda-emu
846 -------
847 hda-emu is an HD-audio emulator. The main purpose of this program is
848 to debug an HD-audio codec without the real hardware. Thus, it
850 dumps the codec register changes and the ALSA-driver internal changes
851 at probing and operating the HD-audio driver.
853 The program requires a codec proc-file to simulate. Get a proc file
856 proc file, and the hda-emu program will start parsing the codec file
857 and simulates the HD-audio driver:
861 % hda-emu codecs/stac9200-dell-d820-laptop
868 The program gives you only a very dumb command-line interface. You
869 can get a proc-file dump at the current state, get a list of control
875 * git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/hda-emu.git
877 See README file in the repository for more details about hda-emu
881 hda-jack-retask
882 ---------------
883 hda-jack-retask is a user-friendly GUI program to manipulate the
884 HD-audio pin control for jack retasking. If you have a problem about
890 The program is included in alsa-tools now:
892 * git://git.alsa-project.org/alsa-tools.git