1 .\" Copyright (c) 2006-2008 Joel Dahl <joel@FreeBSD.org>
2 .\" Copyright (c) 2008 Alexander Motin <mav@FreeBSD.org>
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .Nd "Intel High Definition Audio bridge device driver"
35 To compile this driver into the kernel, place the following lines in your
36 kernel configuration file:
37 .Bd -ragged -offset indent
42 Alternatively, to load the driver as a module at boot time, place the
45 .Bd -literal -offset indent
49 The High Definition (HD) Audio specification was developed by Intel as the
50 logical successor of the old AC'97 specification and has several advantages,
51 such as higher bandwidth which allows more channels and more detailed formats,
52 support for several logical audio devices, and general purpose DMA channels.
56 driver is a HDA bus controller driver and HDA codecs audio functions bridge
57 driver that allows the generic audio driver,
59 to be used with this hardware.
60 Only audio functions are supported by
62 Modem and other possible functions are not implemented.
66 driver supports hardware that conforms with revision 1.0 of the Intel High
67 Definition Audio specification and tries to behave much like the Microsoft
68 Universal Audio Architecture (UAA) draft (revision 0.7b) for handling audio
71 According to HDA and UAA specifications, depending on the number of HDA buses
72 and codecs present in system, their audio capabilities and BIOS provided
75 driver often provides several PCM audio devices.
76 For example, one device for main rear 7.1 output and inputs, one device
77 for independent headset connectors at front and one device for SPDIF or
78 HDMI audio input/output.
79 The assignment of audio inputs and outputs may be tuned with
81 The driver's verbose boot messages provide a lot of information about
82 the operation of the driver and present audio setup.
84 The default audio device may be tuned by setting the
85 .Ar hw.snd.default_unit
86 sysctl, as described in
88 or explicitly specified in application settings.
89 .Ss Boot-time Configuration
90 The following variables are available at boot-time through the
93 .Bl -tag -width ".Va hint.hdac.%d.config"-offset indent
94 .It Va hint.hdac.%d.config
95 Configures a range of possible options.
122 An option prefixed with
126 will do the opposite and takes precedence.
127 Options can be separated by whitespace and commas.
130 are a codec's General Purpose I/O pins which system integrators sometimes
131 use to control external muters, amplifiers and so on.
132 If you have no sound, or sound volume is not adequate, you may have to
133 experiment a bit with the GPIO setup to find the optimal setup for your
140 options control the voltage used to power external microphones.
141 .It Va hint.hdac.%d.msi
142 Controls MSI (Message Signaled Interrupts) support.
143 .It Va hint.hdac.%d.cad%d.nid%d.config
144 Overrides codec pin configuration set by BIOS.
145 May be specified as a 32-bit hexadecimal value with a leading
147 or as a set of space-separated
148 .Dq Ar option Ns = Ns Ar value
152 Pin configuration is the UAA driver's main source of information about codec
154 This information is usually provided by the codec manufacturer and tuned
155 by system integrators for specific system requirements.
158 driver allows users to override it to fix integrator mistakes or to use the
159 available codec in alternative ways (for example to get stereo output and 2
160 inputs instead of a single 5.1 output).
162 The following options are supported:
163 .Bl -tag -width ".Va device=" -offset indent
166 Associations are used to group individual pins to form a complex multi-pin
168 For example, to group 4 connectors for 7.1 output, or to treat several
169 input connectors as sources for the same input device.
170 Association numbers can be specified as numeric values from 0 to 15.
171 A value of 0 means disabled pin.
172 A value of 15 is a set of independent unassociated pins.
173 Each association includes only pins of the same direction (in/out) and is
174 detected atomically (all pins or none).
175 A separate PCM audio device is created for every pair of input and
179 A unique, per-association number used to order pins inside the
180 particular association.
181 Sequence numbers can be specified as numeric values from 0 to 15.
183 For output assotiations sequence numbers encode speaker pairs positions:
184 0 - Front, 1 - Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side.
185 Standard combinations are: (0) - Stereo; (0, 2), (0, 4) - Quadro;
186 (0, 1, 2), (0, 1, 4) - 5.1; (0, 1, 2, 4) - 7.1.
188 The sequence number 15 has a special meaning for output associations.
189 Output pins with this number and device type
191 will duplicate (with automatic mute if jack detection is supported) the
192 first pin in that association.
195 Can be specified as a number from 0 to 15 or as a name:
203 .Dq Li Modem-handset ,
213 The device type also describes the pin direction (in/out).
216 always means an input pin, while
218 always means an output.
221 Can be specified as a number from 0 to 3.
222 The connection type can also be specified as one of the special names
228 Pins with a connection type of
232 Connector physical type.
233 Can be specified as a number from 0 to 15.
234 This is a reference only value.
240 Can be specified as a number from 0 to 15 or as one of the names
258 This is a reference only value.
263 Connector physical location.
264 Can be specified as a number from 0 to 63.
265 This is a reference only value.
271 Can be specified as a number from 0 to 15.
272 Bit 0 has a special meaning. When set it means that jack detection is
273 not implemented in hardware.
275 .Ss Runtime Configuration
278 variables are available in addition to those available to all
281 .Bl -tag -width ".Va dev.hdac.%d.polling" -offset indent
282 .It Va dev.hdac.%d.polling
283 Enables polling mode.
284 In this mode the driver operates by querying the device state on timer
287 instead of interrupts.
288 Polling is disabled by default.
289 Do not enable it unless you are facing weird interrupt problems or if the
290 device cannot generate interrupts at all.
291 .It Va dev.hdac.%d.polling_interval
292 Controller/Jack Sense polling interval (1-1000 ms)
293 .It Va dev.hdac.%d.pindump
294 Setting this to a non-zero value dumps the current pin configuration, main
295 capabilities and jack sense status to console and syslog.
298 Taking HP Compaq DX2300 with Realtek ALC888 HDA codec for example.
299 This system has two audio connectors on a front side, three audio connectors
300 on a rear side and one internal speaker.
301 According to verbose driver output and the codec datasheet,
302 this codec has five stereo DACs and two stereo ADCs, all of them are routable to
303 any codec pin (external connector).
304 All codec pins are reversible (could be configured either as input or output).
306 So high codec uniformity and flexibility allow driver to configure it in many
307 different ways, depending on requested pins usage described by pins configuration.
308 The driver reports such default pin configuration when verbose messages enabled:
310 hdac0: nid 20 0x01014020 as 2 seq 0 Line-out Jack jack 1 loc 1 color Green misc 0
311 hdac0: nid 21 0x99130110 as 1 seq 0 Speaker Fixed jack 3 loc 25 color Unknown misc 1
312 hdac0: nid 22 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1
313 hdac0: nid 23 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1
314 hdac0: nid 24 0x01a19830 as 3 seq 0 Mic Jack jack 1 loc 1 color Pink misc 8
315 hdac0: nid 25 0x02a1983f as 3 seq 15 Mic Jack jack 1 loc 2 color Pink misc 8
316 hdac0: nid 26 0x01813031 as 3 seq 1 Line-in Jack jack 1 loc 1 color Blue misc 0
317 hdac0: nid 27 0x0221401f as 1 seq 15 Headphones Jack jack 1 loc 2 color Green misc 0
318 hdac0: nid 28 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1
319 hdac0: nid 30 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1
320 hdac0: nid 31 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1
323 Here we can see, that the nodes with ID (nid) 25 and 27 are front panel
324 connectors (Jack, loc 2), nids 20, 24 and 26 are rear panel connectors
325 (Jack, loc 1) and nid 21 is a built-in speaker (Fixed, loc 25).
326 Pins with nids 22, 23, 28, 30 and 31 will be disabled by driver due to "None"
327 connectivity. So the pin count and description matches to connectors that
330 Using association (as) and sequence (seq) fields values pins are grouped into
333 hdac0: Association 0 (1) out:
334 hdac0: Pin nid=21 seq=0
335 hdac0: Pin nid=27 seq=15
336 hdac0: Association 1 (2) out:
337 hdac0: Pin nid=20 seq=0
338 hdac0: Association 2 (3) in:
339 hdac0: Pin nid=24 seq=0
340 hdac0: Pin nid=26 seq=1
341 hdac0: Pin nid=25 seq=15
346 device uses two associations: one for playback and one for recording.
347 Associations processed and assigned to
349 devices in increasing numerical order.
350 In this case association #0 (1) will become
352 device playback, using the internal speakers and
354 jack with speaker automute on the headphones jack connection.
355 Association #1 (2) will become
360 Association #2 (3) will become
362 recording, using the external microphones and the
368 driver provides extensive verbose messages to diagnose its operation
369 logic and describe its current codec configuration.
373 it is possible to modify the configuration of the existing pins,
374 allowing a broad range of different audio setups.
375 Here are a few examples of some setups possible for this particular
382 hint.hdac.0.cad0.nid20.config="as=1"
383 hint.hdac.0.cad0.nid21.config="as=2"
386 will swap line-out and speaker functions.
389 device will play to the line-out and headphones jacks. Line-out will
390 be muted on the headphones jack connection.
393 will go from two external microphones and line-in jacks.
395 playback will go to the internal speaker.
402 hint.hdac.0.cad0.nid20.config="as=1 seq=15 device=Headphones"
403 hint.hdac.0.cad0.nid27.config="as=2 seq=0"
404 hint.hdac.0.cad0.nid25.config="as=4 seq=0"
407 will split the headphones and one of the microphones to a separate device.
410 device will play to the internal speaker and to the line-out jack, with
411 speaker automute on the line-out jack connection.
414 will use input from one external microphone and the line-in jacks.
417 device will be completely dedicated to a headset (headphones and mic)
418 connected to the front connectors.
425 hint.hdac.0.cad0.nid20.config="as=1 seq=0"
426 hint.hdac.0.cad0.nid26.config="as=2 seq=0"
427 hint.hdac.0.cad0.nid27.config="as=3 seq=0"
428 hint.hdac.0.cad0.nid25.config="as=4 seq=0"
429 hint.hdac.0.cad0.nid24.config="as=5 seq=0 device=Line-out"
430 hint.hdac.0.cad0.nid21.config="as=6 seq=0"
433 will give 4 independent devices:
435 .Pq line-out and line-in ,
437 .Pq headphones and mic ,
439 .Pq additional line-out via retasked rear mic jack ,
442 .Pq internal speaker .
449 hint.hdac.0.cad0.nid20.config="as=1 seq=0"
450 hint.hdac.0.cad0.nid24.config="as=1 seq=1 device=Line-out"
451 hint.hdac.0.cad0.nid26.config="as=1 seq=2 device=Line-out"
452 hint.hdac.0.cad0.nid21.config="as=2 seq=0"
457 for 5.1 playback via 3 rear connectors (line-out and retasked
458 mic and line-in) and headset (headphones and mic) at front connectors.
460 for internal speaker playback.
461 On headphones connection rear connectors will be muted.
463 Depending on codec configuration, these controls and signal sources could be
466 .Bl -tag -width ".Va speaker" -offset indent
468 overall output level (volume)
470 overall recording level
472 input-to-output monitoring loopback level
474 external amplifier control
480 first external or second internal microphone input
482 first internal or second external microphone input
483 .It Va line , Va line1 , Va line2, Va line3
485 .It Va dig1 , Va dig2 , Va dig3
486 digital (S/PDIF, HDMI or DisplayPort) inputs
491 .It Va phin , Va phout , Va radio . Va video
495 Controls have different precision. Some could be just an on/off triggers.
496 Most of controls use logarithmic scale.
500 driver supports many Intel HDA compatible audio chipsets including the
558 The following and many other codecs have been verified to work:
562 Analog Devices AD1981HD
564 Analog Devices AD1983
566 Analog Devices AD1984
568 Analog Devices AD1986A
570 Analog Devices AD1988
572 Analog Devices AD1988B
576 Conexant CX20549 (Venice)
578 Conexant CX20551 (Waikiki)
580 Conexant CX20561 (Hermosa)
610 Sigmatel STAC9220D / 9223D
651 device driver first appeared in
657 driver was written by
658 .An Stephane E. Potvin Aq sepotvin@videotron.ca ,
659 .An Ariff Abdullah Aq ariff@FreeBSD.org
661 .An Alexander Motin Aq mav@FreeBSD.org .
662 This manual page was written by
663 .An Joel Dahl Aq joel@FreeBSD.org ,
664 .An Alexander Motin Aq mav@FreeBSD.org
666 .An Giorgos Keramidas Aq keramida@FreeBSD.org .
668 A few Hardware/OEM vendors tend to screw up BIOS settings, thus
672 This usually results in a state where the
674 driver seems to attach and work, but no sound is played.
675 Some cases can be solved by tuning
678 Before trying to fix problem that way, make sure that there really is a problem
679 and that the PCM audio device in use really corresponds to the expected
682 Some vendors use non-standardized General Purpose I/O (GPIO) pins of the codec
683 to control external amplifiers.
684 In some cases setting a combination of GPIO bits may be needed to make
685 sound work on a specific device.
687 HDMI and DisplayPort audio may also require support from video driver.