aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-12-10 03:28:15 -0500
committerTakashi Iwai <tiwai@suse.de>2008-12-10 03:28:15 -0500
commitd2afbe78a2922929ad44882d3583d938b9949a30 (patch)
tree309cb937ff5a5da0b4ea64f72e1e9aec78f1aa66 /Documentation/sound
parent30bc4481de890e97dc001ee123761d89638cbc50 (diff)
ALSA: hda - Update documentation
Minor typo-fixes and improvements on HD-Audio.txt. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'Documentation/sound')
-rw-r--r--Documentation/sound/alsa/HD-Audio.txt159
1 files changed, 83 insertions, 76 deletions
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt
index e758f24017bf..ca8187de52d8 100644
--- a/Documentation/sound/alsa/HD-Audio.txt
+++ b/Documentation/sound/alsa/HD-Audio.txt
@@ -9,22 +9,25 @@ GENERAL
9HD-audio is the new standard on-board audio component on modern PCs 9HD-audio is the new standard on-board audio component on modern PCs
10after AC97. Although Linux has been supporting HD-audio since long 10after AC97. Although Linux has been supporting HD-audio since long
11time ago, there are often problems with new machines. A part of the 11time ago, there are often problems with new machines. A part of the
12problem is broken BIOS, and rest is the driver implementation. This 12problem is broken BIOS, and the rest is the driver implementation.
13document explains the trouble-shooting and debugging methods for the 13This document explains the brief trouble-shooting and debugging
14HD-audio hardware. 14methods for the HD-audio hardware.
15 15
16The HD-audio component consists of two parts: the controller chip and 16The HD-audio component consists of two parts: the controller chip and
17the codec chips on the HD-audio bus. Linux provides a single driver 17the codec chips on the HD-audio bus. Linux provides a single driver
18for all controllers, snd-hda-intel. Since the HD-audio controllers 18for all controllers, snd-hda-intel. Although the driver name contains
19are supposed to be compatible, the single snd-hda-driver should work 19a word of a well-known harware vendor, it's not specific to it but for
20in most cases. But, not surprisingly, there are known bugs and issues 20all controller chips by other companies. Since the HD-audio
21specific to each controller type. The snd-hda-intel driver has a 21controllers are supposed to be compatible, the single snd-hda-driver
22bunch of workarounds for these as described below. 22should work in most cases. But, not surprisingly, there are known
23bugs and issues specific to each controller type. The snd-hda-intel
24driver has a bunch of workarounds for these as described below.
23 25
24A controller may have multiple codecs. Usually you have one audio 26A controller may have multiple codecs. Usually you have one audio
25codec and optionally one modem codec. In some cases, there can be 27codec and optionally one modem codec. In theory, there might be
26multiple audio codecs, e.g. for analog and digital outputs, but the 28multiple audio codecs, e.g. for analog and digital outputs, and the
27driver might not work properly. 29driver might not work properly because of conflict of mixer elements.
30This should be fixed in future if such hardware really exists.
28 31
29The snd-hda-intel driver has several different codec parsers depending 32The snd-hda-intel driver has several different codec parsers depending
30on the codec. It has a generic parser as a fallback, but this 33on the codec. It has a generic parser as a fallback, but this
@@ -48,15 +51,16 @@ DMA-Position Problem
48The most common problem of the controller is the inaccurate DMA 51The most common problem of the controller is the inaccurate DMA
49pointer reporting. The DMA pointer for playback and capture can be 52pointer reporting. The DMA pointer for playback and capture can be
50read in two ways, either via a LPIB register or via a position-buffer 53read in two ways, either via a LPIB register or via a position-buffer
51map. As default the driver tries to reads from the io-mapped 54map. As default the driver tries to read from the io-mapped
52position-buffer, and falls back to LPIB if it appears unupdated. 55position-buffer, and falls back to LPIB if the position-buffer appears
53However, this detection isn't perfect on some devices. In such a 56dead. However, this detection isn't perfect on some devices. In such
54case, you can change the default method via `position_fix` option. 57a case, you can change the default method via `position_fix` option.
55 58
56`position_fix=1` means to use LPIB method explicitly. 59`position_fix=1` means to use LPIB method explicitly.
57`position_fix=2` means to use the position-buffer. 0 is the default 60`position_fix=2` means to use the position-buffer. 0 is the default
58value, the automatic check. If you get a problem of repeated sounds, 61value, the automatic check and fallback to LPIB as described in the
59this option might help. 62above. If you get a problem of repeated sounds, this option might
63help.
60 64
61In addition to that, every controller is known to be broken regarding 65In addition to that, every controller is known to be broken regarding
62the wake-up timing. It wakes up a few samples before actually 66the wake-up timing. It wakes up a few samples before actually
@@ -67,9 +71,9 @@ via `bdl_pos_adj` option.
67 71
68When `bdl_pos_adj` is a negative value (as default), it's assigned to 72When `bdl_pos_adj` is a negative value (as default), it's assigned to
69an appropriate value depending on the controller chip. For Intel 73an appropriate value depending on the controller chip. For Intel
70chip, it'd be 1 while it'd be 32 for others. Usually this works. 74chips, it'd be 1 while it'd be 32 for others. Usually this works.
71Only in case it doesn't work and you get warning messages, you should 75Only in case it doesn't work and you get warning messages, you should
72change to other values. 76change this parameter to other values.
73 77
74 78
75Codec-Probing Problem 79Codec-Probing Problem
@@ -77,13 +81,13 @@ Codec-Probing Problem
77A less often but a more severe problem is the codec probing. When 81A less often but a more severe problem is the codec probing. When
78BIOS reports the available codec slots wrongly, the driver gets 82BIOS reports the available codec slots wrongly, the driver gets
79confused and tries to access the non-existing codec slot. This often 83confused and tries to access the non-existing codec slot. This often
80results in the total screw-up, and destruct the further communication 84results in the total screw-up, and destructs the further communication
81with the codec chips. The symptom appears usually as the error 85with the codec chips. The symptom appears usually as error messages
82message like: 86like:
83------------------------------------------------------------------------ 87------------------------------------------------------------------------
84 hda_intel: azx_get_response timeout, switching to polling mode: \ 88 hda_intel: azx_get_response timeout, switching to polling mode:
85 last cmd=0x12345678 89 last cmd=0x12345678
86 hda_intel: azx_get_response timeout, switching to single_cmd mode: \ 90 hda_intel: azx_get_response timeout, switching to single_cmd mode:
87 last cmd=0x12345678 91 last cmd=0x12345678
88------------------------------------------------------------------------ 92------------------------------------------------------------------------
89 93
@@ -98,9 +102,9 @@ accessing a non-existing codec slot.
98 102
99Thus, if the second error message appears, try to narrow the probed 103Thus, if the second error message appears, try to narrow the probed
100codec slots via `probe_mask` option. It's a bitmask, and each bit 104codec slots via `probe_mask` option. It's a bitmask, and each bit
101corresponding to the codec slot. For example, to probe only the 105corresponds to the codec slot. For example, to probe only the first
102first slot, pass `probe_mask=1`. For the first and the third slots, 106slot, pass `probe_mask=1`. For the first and the third slots, pass
103pass `probe_mask=5` (where 5 = 1 | 4), and so on. 107`probe_mask=5` (where 5 = 1 | 4), and so on.
104 108
105Since 2.6.29 kernel, the driver has a more robust probing method, so 109Since 2.6.29 kernel, the driver has a more robust probing method, so
106this error might happen rarely, though. 110this error might happen rarely, though.
@@ -119,10 +123,10 @@ HD-AUDIO CODEC
119 123
120Model Option 124Model Option
121~~~~~~~~~~~~ 125~~~~~~~~~~~~
122The most common problems with the HD-audio driver is the unsupported 126The most common problem regarding the HD-audio driver is the
123codec features or the mismatched device configuration. Most of 127unsupported codec features or the mismatched device configuration.
124codec-specific code has several preset models, either to override the 128Most of codec-specific code has several preset models, either to
125BIOS setup or to provide more comprehensive features. 129override the BIOS setup or to provide more comprehensive features.
126 130
127The driver checks PCI SSID and looks through the static configuration 131The driver checks PCI SSID and looks through the static configuration
128table until any matching entry is found. If you have a new machine, 132table until any matching entry is found. If you have a new machine,
@@ -130,44 +134,44 @@ you may see a message like below:
130------------------------------------------------------------------------ 134------------------------------------------------------------------------
131 hda_codec: Unknown model for ALC880, trying auto-probe from BIOS... 135 hda_codec: Unknown model for ALC880, trying auto-probe from BIOS...
132------------------------------------------------------------------------ 136------------------------------------------------------------------------
133Even if you such a message, DON'T PANIC. Take a deep breath (and keep 137Even if you see such a message, DON'T PANIC. Take a deep breath and
134your towel). First of all, it's an informational message, no warning, 138keep your towel. First of all, it's an informational message, no
135no error. This means that the PCI SSID of your device isn't listed in 139warning, no error. This means that the PCI SSID of your device isn't
136the known preset model list. But, this doesn't mean that the driver 140listed in the known preset model (white-)list. But, this doesn't mean
137is broken. Many codec-driver provides the automatic configuration 141that the driver is broken. Many codec-drivers provide the automatic
138based on the BIOS setup. 142configuration mechanism based on the BIOS setup.
139 143
140The HD-audio codec has usually "pin" widgets, and BIOS sets the default 144The HD-audio codec has usually "pin" widgets, and BIOS sets the default
141configuration of each pin, which indicates the location, the 145configuration of each pin, which indicates the location, the
142connection type, the jack color, etc. The HD-audio driver can guess 146connection type, the jack color, etc. The HD-audio driver can guess
143the right connection judging from these default configuration values. 147the right connection judging from these default configuration values.
144However -- some codec support codes, such as patch_analog.c, don't 148However -- some codec-support codes, such as patch_analog.c, don't
145support the automatic probing (yet as of 2.6.28). And, BIOS is often, 149support the automatic probing (yet as of 2.6.28). And, BIOS is often,
146yes, pretty often broken. It sets up wrong values and screws up the 150yes, pretty often broken. It sets up wrong values and screws up the
147driver. 151driver.
148 152
149The preset model is provided basically to override such a situation. 153The preset model is provided basically to overcome such a situation.
150When the matching preset model is found in the list, the driver 154When the matching preset model is found in the white-list, the driver
151assumes the static configuration of that preset and builds the mixer 155assumes the static configuration of that preset and builds the mixer
152and PCM based on the static information. Thus, if you have a newer 156elements and PCM streams based on the static information. Thus, if
153machine with a slightly different PCI SSID from the existing one, you 157you have a newer machine with a slightly different PCI SSID from the
154may have a good chance to re-use the same model. You can pass the 158existing one, you may have a good chance to re-use the same model.
155`model` option to specify the preset model instead of PCI SSID 159You can pass the `model` option to specify the preset model instead of
156look-up. 160PCI SSID look-up.
157 161
158What `model` option values are available depends on the codec chip. 162What `model` option values are available depends on the codec chip.
159Check your codec chip from the codec proc file (see "Codec Proc-File" 163Check your codec chip from the codec proc file (see "Codec Proc-File"
160section below). It will show the vendor/product name of your codec 164section below). It will show the vendor/product name of your codec
161chip. Then, see Documentation/sound/alsa/ALSA-Configuration.txt file. 165chip. Then, see Documentation/sound/alsa/ALSA-Configuration.txt
162In the section of HD-audio driver, you can find a list of codecs and 166file, the section of HD-audio driver. You can find a list of codecs
163`model` options belonging to each codec. For example, for Realtek 167and `model` options belonging to each codec. For example, for Realtek
164ALC262 codec chip, pass `model=ultra` for devices that are compatible 168ALC262 codec chip, pass `model=ultra` for devices that are compatible
165with Samsung Q1 Ultra. 169with Samsung Q1 Ultra.
166 170
167Thus, the first thing you can do for any brand-new, unsupported 171Thus, the first thing you can do for any brand-new, unsupported and
168HD-audio hardware is to check HD-audio codec and several different 172non-working HD-audio hardware is to check HD-audio codec and several
169`model` option values. If you have a luck, some of them might suit 173different `model` option values. If you have a luck, some of them
170with your device well. 174might suit with your device well.
171 175
172Some codecs such as ALC880 have a special model option `model=test`. 176Some codecs such as ALC880 have a special model option `model=test`.
173This configures the driver to provide as many mixer controls as 177This configures the driver to provide as many mixer controls as
@@ -188,12 +192,14 @@ One of the most frequent (and obvious) bugs with HD-audio is the
188silent output from either or both of a built-in speaker and a 192silent output from either or both of a built-in speaker and a
189headphone jack. In general, you should try a headphone output at 193headphone jack. In general, you should try a headphone output at
190first. A speaker output often requires more additional controls like 194first. A speaker output often requires more additional controls like
191the amplifier. Thus a headphone output has a slightly better chance. 195the external amplifier bits. Thus a headphone output has a slightly
196better chance.
192 197
193Before making a bug report, double-check whether the mixer is set up 198Before making a bug report, double-check whether the mixer is set up
194correctly. The recent version of snd-hda-intel driver provides mostly 199correctly. The recent version of snd-hda-intel driver provides mostly
195"Master" volume control as well as "Front" volume. In addition, there 200"Master" volume control as well as "Front" volume (where Front
196are individual "Headphone" and "Speaker" controls. 201indicates the front-channels). In addition, there can be individual
202"Headphone" and "Speaker" controls.
197 203
198Ditto for the speaker output. There can be "External Amplifier" 204Ditto for the speaker output. There can be "External Amplifier"
199switch on some codecs. Turn on this if present. 205switch on some codecs. Turn on this if present.
@@ -214,7 +220,7 @@ following:
214 external amplifier. This can be set usually via EAPD verb or a 220 external amplifier. This can be set usually via EAPD verb or a
215 certain GPIO. If the codec pin supports EAPD, you have a better 221 certain GPIO. If the codec pin supports EAPD, you have a better
216 chance via SET_EAPD_BTL verb (0x70c). On others, GPIO pin (mostly 222 chance via SET_EAPD_BTL verb (0x70c). On others, GPIO pin (mostly
217 it's either GPIO0 or GPIO1) can turn on/off EAPD. 223 it's either GPIO0 or GPIO1) may turn on/off EAPD.
218- Some Realtek codecs require special vendor-specific coefficients to 224- Some Realtek codecs require special vendor-specific coefficients to
219 turn on the amplifier. See patch_realtek.c. 225 turn on the amplifier. See patch_realtek.c.
220- IDT codecs may have extra power-enable/disable controls on each 226- IDT codecs may have extra power-enable/disable controls on each
@@ -227,29 +233,29 @@ following:
227 233
228Capture Problems 234Capture Problems
229~~~~~~~~~~~~~~~~ 235~~~~~~~~~~~~~~~~
230The capture problems are often missing setups of mixers. Thus, before 236The capture problems are often because of missing setups of mixers.
231submitting a bug report, make sure that you set up the mixer 237Thus, before submitting a bug report, make sure that you set up the
232correctly. For example, both "Capture Volume" and "Capture Switch" 238mixer correctly. For example, both "Capture Volume" and "Capture
233have to be set properly in addition to the right "Capture Source" or 239Switch" have to be set properly in addition to the right "Capture
234"Input Source" selection. Some devices have "Mic Boost" volume or 240Source" or "Input Source" selection. Some devices have "Mic Boost"
235switch. 241volume or switch.
236 242
237When the PCM device is opened via "default" PCM (without pulse-audio 243When the PCM device is opened via "default" PCM (without pulse-audio
238plugin), you'll likely have "Digital Capture Volume" control as well. 244plugin), you'll likely have "Digital Capture Volume" control as well.
239This is provided for the extra gain/attenuation of the signal in 245This is provided for the extra gain/attenuation of the signal in
240software, especially for the inputs without the hardware volume 246software, especially for the inputs without the hardware volume
241control such as digital microphones. Unless really needed, this 247control such as digital microphones. Unless really needed, this
242should be set to exactly 50%, corresponding to 0dB. When you use "hw" 248should be set to exactly 50%, corresponding to 0dB -- neither extra
243PCM, i.e., a raw access PCM, this control will have no influence, 249gain nor attenuation. When you use "hw" PCM, i.e., a raw access PCM,
244though. 250this control will have no influence, though.
245 251
246It's known that some codecs / devices have fairly bad analog circuits, 252It's known that some codecs / devices have fairly bad analog circuits,
247and the recorded sound contains a certain DC-offset. This is no bug 253and the recorded sound contains a certain DC-offset. This is no bug
248of the driver. 254of the driver.
249 255
250Most of modern laptops have no analog CD-input connection. Thus, the 256Most of modern laptops have no analog CD-input connection. Thus, the
251recording from CD input won't work in many cases although the driver 257recording from CD input won't work in many cases although the driver
252provides it as the capture source. 258provides it as the capture source. Use CDDA instead.
253 259
254The automatic switching of the built-in and external mic per plugging 260The automatic switching of the built-in and external mic per plugging
255is implemented on some codec models but not on every model. Partly 261is implemented on some codec models but not on every model. Partly
@@ -264,7 +270,7 @@ to fight again the evil, try debugging via hitting the raw HD-audio
264codec verbs to the device. Some tools are available: hda-emu and 270codec verbs to the device. Some tools are available: hda-emu and
265hda-analyzer. The detailed description is found in the sections 271hda-analyzer. The detailed description is found in the sections
266below. You'd need to enable hwdep for using these tools. See "Kernel 272below. You'd need to enable hwdep for using these tools. See "Kernel
267Configuration". 273Configuration" section.
268 274
269 275
270OTHER ISSUES 276OTHER ISSUES
@@ -284,15 +290,16 @@ sure to want it.
284Don't forget to turn on the appropriate `CONFIG_SND_HDA_CODEC_*` 290Don't forget to turn on the appropriate `CONFIG_SND_HDA_CODEC_*`
285options. Note that each of them corresponds to the codec chip, not 291options. Note that each of them corresponds to the codec chip, not
286the controller chip. Thus, even if lspci shows the Nvidia controller, 292the controller chip. Thus, even if lspci shows the Nvidia controller,
287you may choose the option for other vendors. If you are unsure, just 293you may need to choose the option for other vendors. If you are
288choose all yes. 294unsure, just select all yes.
289 295
290`CONFIG_SND_HDA_HWDEP` is a useful option for debugging the driver. 296`CONFIG_SND_HDA_HWDEP` is a useful option for debugging the driver.
291When this is enabled, the driver creates hardware-dependent devices 297When this is enabled, the driver creates hardware-dependent devices
292(one per each codec), and you have a raw access to the device via 298(one per each codec), and you have a raw access to the device via
293hda-verb program. For example, `hwC0D2` will be created for the card 299these device files. For example, `hwC0D2` will be created for the
2940 codec slot #2. For debug tools such as hda-verb and hda-analyzer, 300codec slot #2 of the first card (#0). For debug-tools such as
295the hwdep device has to be enabled. Thus, turn this on always. 301hda-verb and hda-analyzer, the hwdep device has to be enabled.
302Thus, it'd be better to turn this on always.
296 303
297`CONFIG_SND_HDA_RECONFIG` is a new option, and this depends on the 304`CONFIG_SND_HDA_RECONFIG` is a new option, and this depends on the
298hwdep option above. When enabled, you'll have some sysfs files under 305hwdep option above. When enabled, you'll have some sysfs files under
@@ -436,7 +443,7 @@ details.
436hda-verb 443hda-verb
437~~~~~~~~ 444~~~~~~~~
438hda-verb is a tiny program that allows you to access the HD-audio 445hda-verb is a tiny program that allows you to access the HD-audio
439codec directly. It executes a HD-audio codec verb directly. 446codec directly. You can execute a raw HD-audio codec verb with this.
440This program accesses the hwdep device, thus you need to enable the 447This program accesses the hwdep device, thus you need to enable the
441kernel config `CONFIG_SND_HDA_HWDEP=y` beforehand. 448kernel config `CONFIG_SND_HDA_HWDEP=y` beforehand.
442 449
@@ -486,7 +493,7 @@ hda-analyzer
486~~~~~~~~~~~~ 493~~~~~~~~~~~~
487hda-analyzer provides a graphical interface to access the raw HD-audio 494hda-analyzer provides a graphical interface to access the raw HD-audio
488control, based on pyGTK2 binding. It's a more powerful version of 495control, based on pyGTK2 binding. It's a more powerful version of
489hda-verb. The program gives you a easy-to-use GUI stuff for showing 496hda-verb. The program gives you an easy-to-use GUI stuff for showing
490the widget information and adjusting the amp values, as well as the 497the widget information and adjusting the amp values, as well as the
491proc-compatible output. 498proc-compatible output.
492 499
@@ -498,7 +505,7 @@ alsa-project.org:
498 505
499hda-emu 506hda-emu
500~~~~~~~ 507~~~~~~~
501hda-emu is a HD-audio emulator. The main purpose of this program is 508hda-emu is an HD-audio emulator. The main purpose of this program is
502to debug an HD-audio codec without the real hardware. Thus, it 509to debug an HD-audio codec without the real hardware. Thus, it
503doesn't emulate the behavior with the real audio I/O, but it just 510doesn't emulate the behavior with the real audio I/O, but it just
504dumps the codec register changes and the ALSA-driver internal changes 511dumps the codec register changes and the ALSA-driver internal changes