Documentation/sound/hd-audio/notes.rst

Source file repositories/reference/linux-study-clean/Documentation/sound/hd-audio/notes.rst

File Facts

System
Linux kernel
Corpus path
Documentation/sound/hd-audio/notes.rst
Extension
.rst
Size
35853 bytes
Lines
893
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

=============================
More Notes on HD-Audio Driver
=============================

Takashi Iwai <tiwai@suse.de>


General
=======

HD-audio is the new standard on-board audio component on modern PCs
after AC97.  Although Linux has been supporting HD-audio since long
time ago, there are often problems with new machines.  A part of the
problem is broken BIOS, and the rest is the driver implementation.
This document explains the brief trouble-shooting and debugging
methods for the	HD-audio hardware.

The HD-audio component consists of two parts: the controller chip and
the codec chips on the HD-audio bus.  Linux provides a single driver
for all controllers, snd-hda-intel.  Although the driver name contains
a word of a well-known hardware vendor, it's not specific to it but for
all controller chips by other companies.  Since the HD-audio
controllers are supposed to be compatible, the single snd-hda-driver
should work in most cases.  But, not surprisingly, there are known
bugs and issues specific to each controller type.  The snd-hda-intel
driver has a bunch of workarounds for these as described below.

A controller may have multiple codecs.  Usually you have one audio
codec and optionally one modem codec.  In theory, there might be
multiple audio codecs, e.g. for analog and digital outputs, and the
driver might not work properly because of conflict of mixer elements.
This should be fixed in future if such hardware really exists.

The snd-hda-intel driver has several different codec parsers depending
on the codec.  It has a generic parser as a fallback, but this
functionality is fairly limited until now.  Instead of the generic
parser, usually the codec-specific parser (coded in patch_*.c) is used
for the codec-specific implementations.  The details about the
codec-specific problems are explained in the later sections.

If you are interested in the deep debugging of HD-audio, read the
HD-audio specification at first.  The specification is found on
Intel's web page, for example:

* https://www.intel.com/content/www/us/en/standards/high-definition-audio-specification.html


HD-Audio Controller
===================

DMA-Position Problem
--------------------
The most common problem of the controller is the inaccurate DMA
pointer reporting.  The DMA pointer for playback and capture can be
read in two ways, either via a LPIB register or via a position-buffer
map.  As default the driver tries to read from the io-mapped
position-buffer, and falls back to LPIB if the position-buffer appears
dead.  However, this detection isn't perfect on some devices.  In such
a case, you can change the default method via ``position_fix`` option.

``position_fix=1`` means to use LPIB method explicitly.
``position_fix=2`` means to use the position-buffer.
``position_fix=3`` means to use a combination of both methods, needed
for some VIA controllers.  The capture stream position is corrected
by comparing both LPIB and position-buffer values.
``position_fix=4`` is another combination available for all controllers,
and uses LPIB for the playback and the position-buffer for the capture
streams.
``position_fix=5`` is specific to Intel platforms, so far, for Skylake
and onward.  It applies the delay calculation for the precise position

Annotation

Implementation Notes