Skip to content

Commit 7b2ee29

Browse files
committed
ALSA: hda - Update documentation
Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 664389d commit 7b2ee29

1 file changed

Lines changed: 101 additions & 25 deletions

File tree

‎Documentation/sound/alsa/HD-Audio.txt‎

Lines changed: 101 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,14 @@ support the automatic probing (yet as of 2.6.28). And, BIOS is often,
176176
yes, pretty often broken. It sets up wrong values and screws up the
177177
driver.
178178

179-
The preset model is provided basically to overcome such a situation.
180-
When the matching preset model is found in the white-list, the driver
181-
assumes the static configuration of that preset and builds the mixer
182-
elements and PCM streams based on the static information. Thus, if
183-
you have a newer machine with a slightly different PCI SSID from the
184-
existing one, you may have a good chance to re-use the same model.
185-
You can pass the `model` option to specify the preset model instead of
186-
PCI SSID look-up.
179+
The preset model (or recently called as "fix-up") is provided
180+
basically to overcome such a situation. When the matching preset
181+
model is found in the white-list, the driver assumes the static
182+
configuration of that preset with the correct pin setup, etc.
183+
Thus, if you have a newer machine with a slightly different PCI SSID
184+
(or codec SSID) from the existing one, you may have a good chance to
185+
re-use the same model. You can pass the `model` option to specify the
186+
preset model instead of PCI (and codec-) SSID look-up.
187187

188188
What `model` option values are available depends on the codec chip.
189189
Check your codec chip from the codec proc file (see "Codec Proc-File"
@@ -199,17 +199,12 @@ non-working HD-audio hardware is to check HD-audio codec and several
199199
different `model` option values. If you have any luck, some of them
200200
might suit with your device well.
201201

202-
Some codecs such as ALC880 have a special model option `model=test`.
203-
This configures the driver to provide as many mixer controls as
204-
possible for every single pin feature except for the unsolicited
205-
events (and maybe some other specials). Adjust each mixer element and
206-
try the I/O in the way of trial-and-error until figuring out the whole
207-
I/O pin mappings.
202+
There are a few special model option values:
203+
- when 'nofixup' is passed, the device-specific fixups in the codec
204+
parser are skipped.
205+
- when `generic` is passed, the codec-specific parser is skipped and
206+
only the generic parser is used.
208207

209-
Note that `model=generic` has a special meaning. It means to use the
210-
generic parser regardless of the codec. Usually the codec-specific
211-
parser is much better than the generic parser (as now). Thus this
212-
option is more about the debugging purpose.
213208

214209
Speaker and Headphone Output
215210
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -387,9 +382,8 @@ init_verbs::
387382
(separated with a space).
388383
hints::
389384
Shows / stores hint strings for codec parsers for any use.
390-
Its format is `key = value`. For example, passing `hp_detect = yes`
391-
to IDT/STAC codec parser will result in the disablement of the
392-
headphone detection.
385+
Its format is `key = value`. For example, passing `jack_detect = no`
386+
will disable the jack detection of the machine completely.
393387
init_pin_configs::
394388
Shows the initial pin default config values set by BIOS.
395389
driver_pin_configs::
@@ -421,6 +415,61 @@ re-configure based on that state, run like below:
421415
------------------------------------------------------------------------
422416

423417

418+
Hint Strings
419+
~~~~~~~~~~~~
420+
The codec parser have several switches and adjustment knobs for
421+
matching better with the actual codec or device behavior. Many of
422+
them can be adjusted dynamically via "hints" strings as mentioned in
423+
the section above. For example, by passing `jack_detect = no` string
424+
via sysfs or a patch file, you can disable the jack detection, thus
425+
the codec parser will skip the features like auto-mute or mic
426+
auto-switch. As a boolean value, either `yes`, `no`, `true`, `false`,
427+
`1` or `0` can be passed.
428+
429+
The generic parser supports the following hints:
430+
431+
- jack_detect (bool): specify whether the jack detection is available
432+
at all on this machine; default true
433+
- inv_jack_detect (bool): indicates that the jack detection logic is
434+
inverted
435+
- trigger_sense (bool): indicates that the jack detection needs the
436+
explicit call of AC_VERB_SET_PIN_SENSE verb
437+
- inv_eapd (bool): indicates that the EAPD is implemented in the
438+
inverted logic
439+
- pcm_format_first (bool): sets the PCM format before the stream tag
440+
and channel ID
441+
- sticky_stream (bool): keep the PCM format, stream tag and ID as long
442+
as possible; default true
443+
- spdif_status_reset (bool): reset the SPDIF status bits at each time
444+
the SPDIF stream is set up
445+
- pin_amp_workaround (bool): the output pin may have multiple amp
446+
values
447+
- single_adc_amp (bool): ADCs can have only single input amps
448+
- auto_mute (bool): enable/disable the headphone auto-mute feature;
449+
default true
450+
- auto_mic (bool): enable/disable the mic auto-switch feature; default
451+
true
452+
- line_in_auto_switch (bool): enable/disable the line-in auto-switch
453+
feature; default false
454+
- need_dac_fix (bool): limits the DACs depending on the channel count
455+
- primary_hp (bool): probe headphone jacks as the primary outputs;
456+
default true
457+
- multi_cap_vol (bool): provide multiple capture volumes
458+
- inv_dmic_split (bool): provide split internal mic volume/switch for
459+
phase-inverted digital mics
460+
- indep_hp (bool): provide the independent headphone PCM stream and
461+
the corresponding mixer control, if available
462+
- add_stereo_mix_input (bool): add the stereo mix (analog-loopback
463+
mix) to the input mux if available
464+
- add_out_jack_modes (bool): add "xxx Jack Mode" enum controls to each
465+
output jack for allowing to change the headphone amp capability
466+
- add_in_jack_modes (bool): add "xxx Jack Mode" enum controls to each
467+
input jack for allowing to change the mic bias vref
468+
- power_down_unused (bool): power down the unused widgets
469+
- mixer_nid (int): specifies the widget NID of the analog-loopback
470+
mixer
471+
472+
424473
Early Patching
425474
~~~~~~~~~~~~~~
426475
When CONFIG_SND_HDA_PATCH_LOADER=y is set, you can pass a "patch" as a
@@ -445,7 +494,7 @@ A patch file is a plain text file which looks like below:
445494
0x20 0x400 0xff
446495

447496
[hint]
448-
hp_detect = yes
497+
jack_detect = no
449498
------------------------------------------------------------------------
450499

451500
The file needs to have a line `[codec]`. The next line should contain
@@ -531,6 +580,13 @@ cable is unplugged. Thus, if you hear noises, suspect first the
531580
power-saving. See /sys/module/snd_hda_intel/parameters/power_save to
532581
check the current value. If it's non-zero, the feature is turned on.
533582

583+
The recent kernel supports the runtime PM for the HD-audio controller
584+
chip, too. It means that the HD-audio controller is also powered up /
585+
down dynamically. The feature is enabled only for certain controller
586+
chips like Intel LynxPoint. You can enable/disable this feature
587+
forcibly by setting `power_save_controller` option, which is also
588+
available at /sys/module/snd_hda_intel/parameters directory.
589+
534590

535591
Tracepoints
536592
~~~~~~~~~~~
@@ -587,8 +643,9 @@ The latest development codes for HD-audio are found on sound git tree:
587643
- git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
588644

589645
The master branch or for-next branches can be used as the main
590-
development branches in general while the HD-audio specific patches
591-
are committed in topic/hda branch.
646+
development branches in general while the development for the current
647+
and next kernels are found in for-linus and for-next branches,
648+
respectively.
592649

593650
If you are using the latest Linus tree, it'd be better to pull the
594651
above GIT tree onto it. If you are using the older kernels, an easy
@@ -699,7 +756,11 @@ won't be always updated. For example, the volume values are usually
699756
cached in the driver, and thus changing the widget amp value directly
700757
via hda-verb won't change the mixer value.
701758

702-
The hda-verb program is found in the ftp directory:
759+
The hda-verb program is included now in alsa-tools:
760+
761+
- git://git.alsa-project.org/alsa-tools.git
762+
763+
Also, the old stand-alone package is found in the ftp directory:
703764

704765
- ftp://ftp.suse.com/pub/people/tiwai/misc/
705766

@@ -777,3 +838,18 @@ A git repository is available:
777838

778839
See README file in the tarball for more details about hda-emu
779840
program.
841+
842+
843+
hda-jack-retask
844+
~~~~~~~~~~~~~~~
845+
hda-jack-retask is a user-friendly GUI program to manipulate the
846+
HD-audio pin control for jack retasking. If you have a problem about
847+
the jack assignment, try this program and check whether you can get
848+
useful results. Once when you figure out the proper pin assignment,
849+
it can be fixed either in the driver code statically or via passing a
850+
firmware patch file (see "Early Patching" section).
851+
852+
The program is included in alsa-tools now:
853+
854+
- git://git.alsa-project.org/alsa-tools.git
855+

0 commit comments

Comments
 (0)