1.\" $NetBSD: hdaudio.4,v 1.22 2022/03/21 09:20:04 jmcneill Exp $ 2.\" 3.\" Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Precedence Technologies Ltd 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd March 21, 2022 31.Dt HDAUDIO 4 32.Os 33.Sh NAME 34.Nm hdaudio 35.Nd High Definition Audio device driver 36.Sh SYNOPSIS 37.Cd "hdaudio* at pci? dev ? function ?" 38.Cd "hdafg* at hdaudiobus?" 39.Cd "audio* at audiobus?" 40.Pp 41.Cd "options HDAUDIOVERBOSE" 42.Cd "options HDAUDIO_DEBUG" 43.Cd "options HDAFG_DEBUG" 44.Sh DESCRIPTION 45The 46.Nm 47device driver is expected to support any PCI device which is 48compliant to the High Definition Audio Specification 1.0. 49It was written from scratch following the Intel HD Audio and Microsoft 50Universal Audio Architecture specifications. 51.Pp 52The driver consists of two interlinked components, which reflects the 53hardware design. 54The 55.Nm 56component interfaces with a PCI/PCIe bus and provides an 57.Xr hdaudiobus 4 58onto which different function groups attach. 59Each function group (e.g. audio, vendor-specific modem) is exported as a 60separate child device of the 61.Nm 62controller. 63Audio function groups (a.k.a. audio codec) are exported as 64.Xr hdafg 4 65devices. 66.Pp 67Audio codecs are available from a number of manufacturers and are made up of a 68number of widgets (e.g. audio mixer, output pin, analog-to-digital converter). 69The way the widgets are interlinked varies significantly between 70implementations. 71The tree of widgets must be parsed and mapped to 72.Xr mixer 4 73controls. 74As part of this process, loops in the inter-codec links must be detected 75and muted, bi-directional pins must be set up appropriately and the locations 76of pins determined. 77.Nm 78works backwards by starting with a list of desired, consistent and compatible 79.Xr mixer 4 80controls and configuring/discovering appropriate widget link routes to fit. 81.Pp 82By following the published mechanisms for common implementations of widget 83parsing, it is expected that nearly all High Definition Audio devices will 84be supported without requiring per-device quirks. 85.Sh HARDWARE 86In addition to many on-board sound cards included in mainboards, the following 87add-on card is supported: 88.Bl -tag -width 20n 89.It TerraTec Aureon 7.1 PCIe 90.El 91.Sh SEE ALSO 92.Xr audio 4 , 93.Xr mixer 4 , 94.Xr pci 4 , 95.Xr hdaudioctl 8 , 96.Pp 97.Lk http://www.intel.com/design/chipsets/hdaudio.htm "Intel High Definition Audio" 98.Pp 99.Lk http://www.microsoft.com/whdc/device/audio/ "Audio Device Technologies for Windows" 100.Sh HISTORY 101The 102.Nm 103device driver appeared in 104.Nx 5.1 . 105.Sh AUTHORS 106The 107.Nm 108driver was written by 109.An Jared McNeill Aq Mt jmcneill@NetBSD.org 110under contract by 111.Lk http://www.precedence.co.uk/ "Precedence Technologies Ltd." 112The UAA-compliant widget parser is derived from the 113.Fx 114snd_hda(4) driver. 115.Sh BUGS 116The following items are not yet implemented: 117.Bl -bullet 118.It 119Improve power management support when driver is idle 120.It 121Add support for non-PCM output formats 122.It 123Handle unsolicited RIRB messages 124.It 125Modem function groups 126.It 12724-bit and 20-bit hardware formats cannot yet be used. 128Since the machine-independent audio layer converts all input from 129userland and the hardware layer to 16-bit precision for processing, 130there would currently be no advantage in using them. 131.El 132