Lines Matching +full:auto +full:- +full:string +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
75 the wake-up timing. It wakes up a few samples before actually
88 Codec-Probing Problem
89 ---------------------
92 confused and tries to access the non-existing codec slot. This often
93 results in the total screw-up, and destructs the further communication
110 accessing a non-existing codec slot.
130 ------------------
131 HD-audio driver uses MSI as default (if available) since 2.6.33
138 see a regression wrt the sound quality (stuttering, etc) or a lock-up
145 HD-Audio Codec
149 ------------
150 The most common problem regarding the HD-audio driver is the
152 Most of codec-specific code has several preset models, either to
160 hda_codec: ALC880: BIOS auto-probing.
165 hda_codec: Unknown model for ALC880, trying auto-probe from BIOS...
170 listed in the known preset model (white-)list. But, this doesn't mean
171 that the driver is broken. Many codec-drivers provide the automatic
174 The HD-audio codec has usually "pin" widgets, and BIOS sets the default
176 connection type, the jack color, etc. The HD-audio driver can guess
178 However -- some codec-support codes, such as patch_analog.c, don't
183 The preset model (or recently called as "fix-up") is provided
185 model is found in the white-list, the driver assumes the static
189 re-use the same model. You can pass the ``model`` option to specify the
190 preset model instead of PCI (and codec-) SSID look-up.
193 Check your codec chip from the codec proc file (see "Codec Proc-File"
195 chip. Then, see Documentation/sound/hd-audio/models.rst file,
196 the section of HD-audio driver. You can find a list of codecs
201 Thus, the first thing you can do for any brand-new, unsupported and
202 non-working HD-audio hardware is to check HD-audio codec and several
208 * when 'nofixup' is passed, the device-specific fixups in the codec
210 * when ``generic`` is passed, the codec-specific parser is skipped and
215 ----------------------------
216 One of the most frequent (and obvious) bugs with HD-audio is the
217 silent output from either or both of a built-in speaker and a
223 Before making a bug report, double-check whether the mixer is set up
224 correctly. The recent version of snd-hda-intel driver provides mostly
226 indicates the front-channels). In addition, there can be individual
234 not on every preset model or codec-support code.
249 * Some Realtek codecs require special vendor-specific coefficients to
251 * IDT codecs may have extra power-enable/disable controls on each
253 * Very rare but some devices don't accept the pin-detection verb until
255 codec-communication stall. Some examples are found in
260 ----------------
268 When the PCM device is opened via "default" PCM (without pulse-audio
273 should be set to exactly 50%, corresponding to 0dB -- neither extra
278 and the recorded sound contains a certain DC-offset. This is no bug
281 Most of modern laptops have no analog CD-input connection. Thus, the
285 The automatic switching of the built-in and external mic per plugging
292 ----------------
294 to fight against evil, try debugging via hitting the raw HD-audio
295 codec verbs to the device. Some tools are available: hda-emu and
296 hda-analyzer. The detailed description is found in the sections
305 --------------------
322 When this is enabled, the driver creates hardware-dependent devices
325 codec slot #2 of the first card (#0). For debug-tools such as
326 hda-verb and hda-analyzer, the hwdep device has to be enabled.
331 the corresponding hwdep directory. See "HD-audio reconfiguration"
334 ``CONFIG_SND_HDA_POWER_SAVE`` option enables the power-saving feature.
335 See "Power-saving" section below.
338 Codec Proc-File
339 ---------------
340 The codec proc-file is a treasure-chest for debugging HD-audio.
347 is because the jack-sensing might be depending on the trigger state.
358 HD-Audio Reconfiguration
359 ------------------------
360 This is an experimental feature to allow you re-configure the HD-audio
362 files are available under each codec-hwdep device directory (e.g.
366 Shows the 32bit codec vendor-id hex number. You can change the
367 vendor-id value by writing to this file.
369 Shows the 32bit codec subsystem-id hex number. You can change the
370 subsystem-id value by writing to this file.
372 Shows the 32bit codec revision-id hex number. You can change the
373 revision-id value by writing to this file.
375 Shows the AFG ID. This is read-only.
377 Shows the MFG ID. This is read-only.
379 Shows the codec name string. Can be changed by writing to this
391 will disable the jack detection of the machine completely.
406 Triggers the codec re-configuration. When any value is written to
407 this file, the driver re-initialize and parses the codec tree
416 re-configure based on that state, run like below:
424 ------------
428 the section above. For example, by passing ``jack_detect = no`` string
429 via sysfs or a patch file, you can disable the jack detection, thus
430 the codec parser will skip the features like auto-mute or mic
431 auto-switch. As a boolean value, either ``yes``, ``no``, ``true``, ``false``,
437 specify whether the jack detection is available at all on this
440 indicates that the jack detection logic is inverted
442 indicates that the jack detection needs the explicit call of
459 enable/disable the headphone auto-mute feature; default true
461 enable/disable the mic auto-switch feature; default true
463 enable/disable the line-in auto-switch feature; default false
469 try probing multi-I/O config (e.g. shared line-in/surround,
474 provide split internal mic volume/switch for phase-inverted
480 add the stereo mix (analog-loopback mix) to the input mux if
495 enable/disable the hp/mic shared input for a single built-in mic
500 specifies the widget NID of the analog-loopback mixer
504 --------------
506 as a firmware file for modifying the HD-audio setup before
519 auto
533 three numbers indicating the codec vendor-id (0x12345678 in the
534 example), the codec subsystem-id (0xabcd1234) and the address (2) of
542 In the example above, it will be changed to model=auto.
546 default pin-configurations just like ``user_pin_configs`` sysfs above.
579 My-own NEWS-0002
582 The hd-audio driver reads the file via request_firmware(). Thus,
585 ``patch=hda-init.fw``, the file /lib/firmware/hda-init.fw must be
590 For example, if you have two cards, one for an on-board analog and one
594 options snd-hda-intel patch=on-board-patch,hdmi-patch
597 Power-Saving
598 ------------
599 The power-saving is a kind of auto-suspend of the device. When the
605 The power-saving won't work when the analog loopback is enabled on
607 you want the power-saving.
609 The power-saving feature might cause audible click noises at each
610 power-down/up depending on the device. Some of them might be
612 openSUSE enables the power-saving feature automatically when the power
614 power-saving. See /sys/module/snd_hda_intel/parameters/power_save to
615 check the current value. If it's non-zero, the feature is turned on.
617 The recent kernel supports the runtime PM for the HD-audio controller
618 chip, too. It means that the HD-audio controller is also powered up /
626 -----------
627 The hd-audio driver gives a few basic tracepoints.
630 ``hda:hda_bus_reset`` traces the bus-reset due to fatal error, etc,
633 via power-saving behavior.
648 # TASK-PID CPU# TIMESTAMP FUNCTION
650 <...>-7807 [002] 105147.774889: hda_send_cmd: [0:0] val=e3a019
651 <...>-7807 [002] 105147.774893: hda_send_cmd: [0:0] val=e39019
652 <...>-7807 [002] 105147.999542: hda_send_cmd: [0:0] val=e3a01a
653 <...>-7807 [002] 105147.999543: hda_send_cmd: [0:0] val=e3901a
654 <...>-26764 [001] 349222.837143: hda_send_cmd: [0:0] val=e3a019
655 <...>-26764 [001] 349222.837148: hda_send_cmd: [0:0] val=e39019
656 <...>-26764 [001] 349223.058539: hda_send_cmd: [0:0] val=e3a01a
657 <...>-26764 [001] 349223.058541: hda_send_cmd: [0:0] val=e3901a
661 a packed value, and you can decode it via hda-decode-verb program
662 included in hda-emu package below. For example, the value e3a019 is
663 to set the left output-amp value to 25.
666 % hda-decode-verb 0xe3a019
676 ----------------
677 The latest development codes for HD-audio are found on sound git tree:
681 The master branch or for-next branches can be used as the main
683 and next kernels are found in for-linus and for-next branches,
688 --------------------
694 * Kernel version (and ALSA-driver version if you built externally)
695 * ``alsa-info.sh`` output; run with ``--no-upload`` option. See the
696 section below about alsa-info
698 If it's a regression, at best, send alsa-info outputs of both working
699 and non-working kernels. This is really helpful because we can
704 kernel-bugzilla
706 alsa-devel ML
707 alsa-devel@alsa-project.org
713 This section describes some tools available for debugging HD-audio
716 alsa-info
717 ---------
718 The script ``alsa-info.sh`` is a very useful tool to gather the audio
719 device information. It's included in alsa-utils package. The latest
722 * git://git.alsa-project.org/alsa-utils.git
726 * http://www.alsa-project.org/alsa-info.sh
732 on alsa-project.org. But, if you send a bug report, it'd be better to
733 run with ``--no-upload`` option, and attach the generated file.
735 There are some other useful options. See ``--help`` option output for
741 alsa-info at this state. With this option, the driver won't configure
746 configuration via hwdep sysfs file if hda-reconfig option is enabled.
752 hda-verb
753 --------
754 hda-verb is a tiny program that allows you to access the HD-audio
755 codec directly. You can execute a raw HD-audio codec verb with this.
759 The hda-verb program takes four arguments: the hwdep device file, the
765 The second parameter is the widget number-id to access. The third
766 parameter can be either a hex/digit number or a string corresponding
768 can be a string for the parameter type.
772 % hda-verb /dev/snd/hwC0D0 0x12 0x701 2
776 % hda-verb /dev/snd/hwC0D0 0x0 PARAMETERS VENDOR_ID
780 % hda-verb /dev/snd/hwC0D0 2 set_a 0xb080
788 via hda-verb won't change the mixer value.
790 The hda-verb program is included now in alsa-tools:
792 * git://git.alsa-project.org/alsa-tools.git
794 Also, the old stand-alone package is found in the ftp directory:
800 * git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/hda-verb.git
802 See README file in the tarball for more details about hda-verb
806 hda-analyzer
807 ------------
808 hda-analyzer provides a graphical interface to access the raw HD-audio
810 hda-verb. The program gives you an easy-to-use GUI stuff for showing
812 proc-compatible output.
814 The hda-analyzer:
816 * http://git.alsa-project.org/?p=alsa.git;a=tree;f=hda-analyzer
818 is a part of alsa.git repository in alsa-project.org:
820 * git://git.alsa-project.org/alsa.git
823 ----------
825 codec-node connection of a codec chip. It's especially useful when
835 hda-emu
836 -------
837 hda-emu is an HD-audio emulator. The main purpose of this program is
838 to debug an HD-audio codec without the real hardware. Thus, it
840 dumps the codec register changes and the ALSA-driver internal changes
841 at probing and operating the HD-audio driver.
843 The program requires a codec proc-file to simulate. Get a proc file
846 proc file, and the hda-emu program will start parsing the codec file
847 and simulates the HD-audio driver:
851 % hda-emu codecs/stac9200-dell-d820-laptop
858 The program gives you only a very dumb command-line interface. You
859 can get a proc-file dump at the current state, get a list of control
865 * git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/hda-emu.git
867 See README file in the repository for more details about hda-emu
871 hda-jack-retask
872 ---------------
873 hda-jack-retask is a user-friendly GUI program to manipulate the
874 HD-audio pin control for jack retasking. If you have a problem about
880 The program is included in alsa-tools now:
882 * git://git.alsa-project.org/alsa-tools.git