Lines Matching +full:auto +full:- +full:detection
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
58 dead. However, this detection isn't perfect on some devices. In such
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 ----------------------------
221 One of the most frequent (and obvious) bugs with HD-audio is the
222 silent output from either or both of a built-in speaker and a
228 Before making a bug report, double-check whether the mixer is set up
229 correctly. The recent version of snd-hda-intel driver provides mostly
231 indicates the front-channels). In addition, there can be individual
239 not on every preset model or codec-support code.
254 * Some Realtek codecs require special vendor-specific coefficients to
256 * IDT codecs may have extra power-enable/disable controls on each
258 * Very rare but some devices don't accept the pin-detection verb until
260 codec-communication stall. Some examples are found in
265 ----------------
273 When the PCM device is opened via "default" PCM (without pulse-audio
278 should be set to exactly 50%, corresponding to 0dB -- neither extra
283 and the recorded sound contains a certain DC-offset. This is no bug
286 Most of modern laptops have no analog CD-input connection. Thus, the
290 The automatic switching of the built-in and external mic per plugging
297 ----------------
299 to fight against evil, try debugging via hitting the raw HD-audio
300 codec verbs to the device. Some tools are available: hda-emu and
301 hda-analyzer. The detailed description is found in the sections
310 --------------------
327 When this is enabled, the driver creates hardware-dependent devices
330 codec slot #2 of the first card (#0). For debug-tools such as
331 hda-verb and hda-analyzer, the hwdep device has to be enabled.
336 the corresponding hwdep directory. See "HD-audio reconfiguration"
339 ``CONFIG_SND_HDA_POWER_SAVE`` option enables the power-saving feature.
340 See "Power-saving" section below.
343 Codec Proc-File
344 ---------------
345 The codec proc-file is a treasure-chest for debugging HD-audio.
352 is because the jack-sensing might be depending on the trigger state.
363 HD-Audio Reconfiguration
364 ------------------------
365 This is an experimental feature to allow you re-configure the HD-audio
367 files are available under each codec-hwdep device directory (e.g.
371 Shows the 32bit codec vendor-id hex number. You can change the
372 vendor-id value by writing to this file.
374 Shows the 32bit codec subsystem-id hex number. You can change the
375 subsystem-id value by writing to this file.
377 Shows the 32bit codec revision-id hex number. You can change the
378 revision-id value by writing to this file.
380 Shows the AFG ID. This is read-only.
382 Shows the MFG ID. This is read-only.
396 will disable the jack detection of the machine completely.
411 Triggers the codec re-configuration. When any value is written to
412 this file, the driver re-initialize and parses the codec tree
421 re-configure based on that state, run like below:
429 ------------
434 via sysfs or a patch file, you can disable the jack detection, thus
435 the codec parser will skip the features like auto-mute or mic
436 auto-switch. As a boolean value, either ``yes``, ``no``, ``true``, ``false``,
442 specify whether the jack detection is available at all on this
445 indicates that the jack detection logic is inverted
447 indicates that the jack detection needs the explicit call of
464 enable/disable the headphone auto-mute feature; default true
466 enable/disable the mic auto-switch feature; default true
468 enable/disable the line-in auto-switch feature; default false
474 try probing multi-I/O config (e.g. shared line-in/surround,
479 provide split internal mic volume/switch for phase-inverted
485 add the stereo mix (analog-loopback mix) to the input mux if
500 enable/disable the hp/mic shared input for a single built-in mic
505 specifies the widget NID of the analog-loopback mixer
509 --------------
511 as a firmware file for modifying the HD-audio setup before
524 auto
538 three numbers indicating the codec vendor-id (0x12345678 in the
539 example), the codec subsystem-id (0xabcd1234) and the address (2) of
547 In the example above, it will be changed to model=auto.
551 default pin-configurations just like ``user_pin_configs`` sysfs above.
584 My-own NEWS-0002
587 The hd-audio driver reads the file via request_firmware(). Thus,
590 ``patch=hda-init.fw``, the file /lib/firmware/hda-init.fw must be
595 For example, if you have two cards, one for an on-board analog and one
599 options snd-hda-intel patch=on-board-patch,hdmi-patch
602 Power-Saving
603 ------------
604 The power-saving is a kind of auto-suspend of the device. When the
610 The power-saving won't work when the analog loopback is enabled on
612 you want the power-saving.
614 The power-saving feature might cause audible click noises at each
615 power-down/up depending on the device. Some of them might be
617 openSUSE enables the power-saving feature automatically when the power
619 power-saving. See /sys/module/snd_hda_intel/parameters/power_save to
620 check the current value. If it's non-zero, the feature is turned on.
622 The recent kernel supports the runtime PM for the HD-audio controller
623 chip, too. It means that the HD-audio controller is also powered up /
631 -----------
632 The hd-audio driver gives a few basic tracepoints.
635 ``hda:hda_bus_reset`` traces the bus-reset due to fatal error, etc,
638 via power-saving behavior.
653 # TASK-PID CPU# TIMESTAMP FUNCTION
655 <...>-7807 [002] 105147.774889: hda_send_cmd: [0:0] val=e3a019
656 <...>-7807 [002] 105147.774893: hda_send_cmd: [0:0] val=e39019
657 <...>-7807 [002] 105147.999542: hda_send_cmd: [0:0] val=e3a01a
658 <...>-7807 [002] 105147.999543: hda_send_cmd: [0:0] val=e3901a
659 <...>-26764 [001] 349222.837143: hda_send_cmd: [0:0] val=e3a019
660 <...>-26764 [001] 349222.837148: hda_send_cmd: [0:0] val=e39019
661 <...>-26764 [001] 349223.058539: hda_send_cmd: [0:0] val=e3a01a
662 <...>-26764 [001] 349223.058541: hda_send_cmd: [0:0] val=e3901a
666 a packed value, and you can decode it via hda-decode-verb program
667 included in hda-emu package below. For example, the value e3a019 is
668 to set the left output-amp value to 25.
671 % hda-decode-verb 0xe3a019
681 ----------------
682 The latest development codes for HD-audio are found on sound git tree:
686 The master branch or for-next branches can be used as the main
688 and next kernels are found in for-linus and for-next branches,
693 --------------------
699 * Kernel version (and ALSA-driver version if you built externally)
700 * ``alsa-info.sh`` output; run with ``--no-upload`` option. See the
701 section below about alsa-info
703 If it's a regression, at best, send alsa-info outputs of both working
704 and non-working kernels. This is really helpful because we can
709 kernel-bugzilla
711 alsa-devel ML
712 alsa-devel@alsa-project.org
718 This section describes some tools available for debugging HD-audio
721 alsa-info
722 ---------
723 The script ``alsa-info.sh`` is a very useful tool to gather the audio
724 device information. It's included in alsa-utils package. The latest
727 * git://git.alsa-project.org/alsa-utils.git
731 * https://www.alsa-project.org/alsa-info.sh
737 on alsa-project.org. But, if you send a bug report, it'd be better to
738 run with ``--no-upload`` option, and attach the generated file.
740 There are some other useful options. See ``--help`` option output for
746 alsa-info at this state. With this option, the driver won't configure
751 configuration via hwdep sysfs file if hda-reconfig option is enabled.
757 hda-verb
758 --------
759 hda-verb is a tiny program that allows you to access the HD-audio
760 codec directly. You can execute a raw HD-audio codec verb with this.
764 The hda-verb program takes four arguments: the hwdep device file, the
770 The second parameter is the widget number-id to access. The third
777 % hda-verb /dev/snd/hwC0D0 0x12 0x701 2
781 % hda-verb /dev/snd/hwC0D0 0x0 PARAMETERS VENDOR_ID
785 % hda-verb /dev/snd/hwC0D0 2 set_a 0xb080
793 via hda-verb won't change the mixer value.
795 The hda-verb program is included now in alsa-tools:
797 * git://git.alsa-project.org/alsa-tools.git
799 Also, the old stand-alone package is found in the ftp directory:
805 * git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/hda-verb.git
807 See README file in the tarball for more details about hda-verb
811 hda-analyzer
812 ------------
813 hda-analyzer provides a graphical interface to access the raw HD-audio
815 hda-verb. The program gives you an easy-to-use GUI stuff for showing
817 proc-compatible output.
819 The hda-analyzer:
821 * https://git.alsa-project.org/?p=alsa.git;a=tree;f=hda-analyzer
823 is a part of alsa.git repository in alsa-project.org:
825 * git://git.alsa-project.org/alsa.git
828 ----------
830 codec-node connection of a codec chip. It's especially useful when
840 hda-emu
841 -------
842 hda-emu is an HD-audio emulator. The main purpose of this program is
843 to debug an HD-audio codec without the real hardware. Thus, it
845 dumps the codec register changes and the ALSA-driver internal changes
846 at probing and operating the HD-audio driver.
848 The program requires a codec proc-file to simulate. Get a proc file
851 proc file, and the hda-emu program will start parsing the codec file
852 and simulates the HD-audio driver:
856 % hda-emu codecs/stac9200-dell-d820-laptop
863 The program gives you only a very dumb command-line interface. You
864 can get a proc-file dump at the current state, get a list of control
870 * git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/hda-emu.git
872 See README file in the repository for more details about hda-emu
876 hda-jack-retask
877 ---------------
878 hda-jack-retask is a user-friendly GUI program to manipulate the
879 HD-audio pin control for jack retasking. If you have a problem about
885 The program is included in alsa-tools now:
887 * git://git.alsa-project.org/alsa-tools.git