Mon Mar 21 09:20:04 2022 UTC ()
hdaudio: Obsolete HDAUDIO_ENABLE_DISPLAYPORT and HDAUDIO_ENABLE_HDMI

Enable display port and HDMI devices by default rather than making this
a compile time option.


(jmcneill)
diff -r1.21 -r1.22 src/share/man/man4/hdaudio.4
diff -r1.105 -r1.106 src/sys/arch/evbarm/conf/GENERIC
diff -r1.194 -r1.195 src/sys/arch/evbarm/conf/GENERIC64
diff -r1.5 -r1.6 src/sys/dev/hdaudio/files.hdaudio
diff -r1.26 -r1.27 src/sys/dev/hdaudio/hdafg.c

cvs diff -r1.21 -r1.22 src/share/man/man4/hdaudio.4 (expand / switch to unified diff)

--- src/share/man/man4/hdaudio.4 2021/04/10 08:01:21 1.21
+++ src/share/man/man4/hdaudio.4 2022/03/21 09:20:04 1.22
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: hdaudio.4,v 1.21 2021/04/10 08:01:21 nia Exp $ 1.\" $NetBSD: hdaudio.4,v 1.22 2022/03/21 09:20:04 jmcneill Exp $
2.\" 2.\"
3.\" Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. 3.\" Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Precedence Technologies Ltd 7.\" by Precedence Technologies Ltd
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
@@ -17,41 +17,39 @@ @@ -17,41 +17,39 @@
17.\" 17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 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 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 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 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 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 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 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE. 28.\" POSSIBILITY OF SUCH DAMAGE.
29.\" 29.\"
30.Dd March 12, 2021 30.Dd March 21, 2022
31.Dt HDAUDIO 4 31.Dt HDAUDIO 4
32.Os 32.Os
33.Sh NAME 33.Sh NAME
34.Nm hdaudio 34.Nm hdaudio
35.Nd High Definition Audio device driver 35.Nd High Definition Audio device driver
36.Sh SYNOPSIS 36.Sh SYNOPSIS
37.Cd "hdaudio* at pci? dev ? function ?" 37.Cd "hdaudio* at pci? dev ? function ?"
38.Cd "hdafg* at hdaudiobus?" 38.Cd "hdafg* at hdaudiobus?"
39.Cd "audio* at audiobus?" 39.Cd "audio* at audiobus?"
40.Pp 40.Pp
41.Cd "options HDAUDIOVERBOSE" 41.Cd "options HDAUDIOVERBOSE"
42.Cd "options HDAUDIO_DEBUG" 42.Cd "options HDAUDIO_DEBUG"
43.Cd "options HDAUDIO_ENABLE_DISPLAYPORT" 
44.Cd "options HDAUDIO_ENABLE_HDMI" 
45.Cd "options HDAFG_DEBUG" 43.Cd "options HDAFG_DEBUG"
46.Sh DESCRIPTION 44.Sh DESCRIPTION
47The 45The
48.Nm 46.Nm
49device driver is expected to support any PCI device which is 47device driver is expected to support any PCI device which is
50compliant to the High Definition Audio Specification 1.0. 48compliant to the High Definition Audio Specification 1.0.
51It was written from scratch following the Intel HD Audio and Microsoft 49It was written from scratch following the Intel HD Audio and Microsoft
52Universal Audio Architecture specifications. 50Universal Audio Architecture specifications.
53.Pp 51.Pp
54The driver consists of two interlinked components, which reflects the 52The driver consists of two interlinked components, which reflects the
55hardware design. 53hardware design.
56The 54The
57.Nm 55.Nm
@@ -74,33 +72,26 @@ The tree of widgets must be parsed and m @@ -74,33 +72,26 @@ The tree of widgets must be parsed and m
74.Xr mixer 4 72.Xr mixer 4
75controls. 73controls.
76As part of this process, loops in the inter-codec links must be detected 74As part of this process, loops in the inter-codec links must be detected
77and muted, bi-directional pins must be set up appropriately and the locations 75and muted, bi-directional pins must be set up appropriately and the locations
78of pins determined. 76of pins determined.
79.Nm 77.Nm
80works backwards by starting with a list of desired, consistent and compatible 78works backwards by starting with a list of desired, consistent and compatible
81.Xr mixer 4 79.Xr mixer 4
82controls and configuring/discovering appropriate widget link routes to fit. 80controls and configuring/discovering appropriate widget link routes to fit.
83.Pp 81.Pp
84By following the published mechanisms for common implementations of widget 82By following the published mechanisms for common implementations of widget
85parsing, it is expected that nearly all High Definition Audio devices will 83parsing, it is expected that nearly all High Definition Audio devices will
86be supported without requiring per-device quirks. 84be supported without requiring per-device quirks.
87.Pp 
88The 
89.Dv HDAUDIO_ENABLE_DISPLAYPORT 
90and 
91.Dv HDAUDIO_ENABLE_HDMI 
92options enable support for DisplayPort and HDMI audio output, which is disabled 
93by default. 
94.Sh HARDWARE 85.Sh HARDWARE
95In addition to many on-board sound cards included in mainboards, the following 86In addition to many on-board sound cards included in mainboards, the following
96add-on card is supported: 87add-on card is supported:
97.Bl -tag -width 20n 88.Bl -tag -width 20n
98.It TerraTec Aureon 7.1 PCIe 89.It TerraTec Aureon 7.1 PCIe
99.El 90.El
100.Sh SEE ALSO 91.Sh SEE ALSO
101.Xr audio 4 , 92.Xr audio 4 ,
102.Xr mixer 4 , 93.Xr mixer 4 ,
103.Xr pci 4 , 94.Xr pci 4 ,
104.Xr hdaudioctl 8 , 95.Xr hdaudioctl 8 ,
105.Pp 96.Pp
106.Lk http://www.intel.com/design/chipsets/hdaudio.htm "Intel High Definition Audio" 97.Lk http://www.intel.com/design/chipsets/hdaudio.htm "Intel High Definition Audio"

cvs diff -r1.105 -r1.106 src/sys/arch/evbarm/conf/GENERIC (expand / switch to unified diff)

--- src/sys/arch/evbarm/conf/GENERIC 2022/01/28 16:38:56 1.105
+++ src/sys/arch/evbarm/conf/GENERIC 2022/03/21 09:20:04 1.106
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1# 1#
2# $NetBSD: GENERIC,v 1.105 2022/01/28 16:38:56 jakllsch Exp $ 2# $NetBSD: GENERIC,v 1.106 2022/03/21 09:20:04 jmcneill Exp $
3# 3#
4# GENERIC ARM (aarch32) kernel 4# GENERIC ARM (aarch32) kernel
5# 5#
6 6
7include "arch/evbarm/conf/std.generic" 7include "arch/evbarm/conf/std.generic"
8include "arch/evbarm/conf/files.generic" 8include "arch/evbarm/conf/files.generic"
9include "arch/evbarm/conf/GENERIC.common" 9include "arch/evbarm/conf/GENERIC.common"
10 10
11options CPU_CORTEX 11options CPU_CORTEX
12 12
13options SOC_AM33XX 13options SOC_AM33XX
14options SOC_BCM2836 14options SOC_BCM2836
15options SOC_EXYNOS5422 15options SOC_EXYNOS5422
@@ -432,28 +432,26 @@ sunxithermal* at fdt? # Thermal senso @@ -432,28 +432,26 @@ sunxithermal* at fdt? # Thermal senso
432# BCM2835 VCHIQ, etc 432# BCM2835 VCHIQ, etc
433vchiq0 at fdt? 433vchiq0 at fdt?
434vcaudio0 at vchiq0 434vcaudio0 at vchiq0
435 435
436# Audio 436# Audio
437a64acodec* at fdt? # Allwinner A64 audio codec (analog part) 437a64acodec* at fdt? # Allwinner A64 audio codec (analog part)
438aaci* at fdt? # ARM PrimeCell AACI 438aaci* at fdt? # ARM PrimeCell AACI
439ausoc* at fdt? # Simple SoC audio card 439ausoc* at fdt? # Simple SoC audio card
440h3codec* at fdt? # Allwinner H3 audio codec (analog part) 440h3codec* at fdt? # Allwinner H3 audio codec (analog part)
441v3scodec* at fdt? # Allwinner V3s audio codec (analog part) 441v3scodec* at fdt? # Allwinner V3s audio codec (analog part)
442hdaudio* at fdt? # Intel HDA 442hdaudio* at fdt? # Intel HDA
443hdafg* at hdaudiobus? 443hdafg* at hdaudiobus?
444options HDAUDIOVERBOSE 444options HDAUDIOVERBOSE
445options HDAUDIO_ENABLE_HDMI 
446options HDAUDIO_ENABLE_DISPLAYPORT 
447sun8icodec* at fdt? # Audio codec (sun8i) 445sun8icodec* at fdt? # Audio codec (sun8i)
448sunxicodec* at fdt? # Allwinner audio codec 446sunxicodec* at fdt? # Allwinner audio codec
449sunxii2s* at fdt? # I2S/PCM 447sunxii2s* at fdt? # I2S/PCM
450audio* at audiobus? 448audio* at audiobus?
451spkr* at audio? 449spkr* at audio?
452 450
453# SDMMC 451# SDMMC
454bcmsdhost* at fdt? # Broadcom BCM283x SD Host Interface 452bcmsdhost* at fdt? # Broadcom BCM283x SD Host Interface
455dwcmmc* at fdt? # DesignWare SDMMC 453dwcmmc* at fdt? # DesignWare SDMMC
456mesonsdio* at fdt? # Amlogic Meson SDIO controller 454mesonsdio* at fdt? # Amlogic Meson SDIO controller
457mesonsdhc* at fdt? # Amlogic Meson SDHC controller 455mesonsdhc* at fdt? # Amlogic Meson SDHC controller
458mmcpwrseq* at fdt? # Simple MMC power sequence provider 456mmcpwrseq* at fdt? # Simple MMC power sequence provider
459plmmc* at fdt? # ARM PrimeCell MCI 457plmmc* at fdt? # ARM PrimeCell MCI

cvs diff -r1.194 -r1.195 src/sys/arch/evbarm/conf/GENERIC64 (expand / switch to unified diff)

--- src/sys/arch/evbarm/conf/GENERIC64 2022/01/31 09:16:09 1.194
+++ src/sys/arch/evbarm/conf/GENERIC64 2022/03/21 09:20:04 1.195
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1# 1#
2# $NetBSD: GENERIC64,v 1.194 2022/01/31 09:16:09 ryo Exp $ 2# $NetBSD: GENERIC64,v 1.195 2022/03/21 09:20:04 jmcneill Exp $
3# 3#
4# GENERIC ARM (aarch64) kernel 4# GENERIC ARM (aarch64) kernel
5# 5#
6 6
7include "arch/evbarm/conf/std.generic64" 7include "arch/evbarm/conf/std.generic64"
8include "arch/evbarm/conf/files.generic64" 8include "arch/evbarm/conf/files.generic64"
9include "arch/evbarm/conf/GENERIC.common" 9include "arch/evbarm/conf/GENERIC.common"
10 10
11maxusers 64 11maxusers 64
12 12
13options CPU_CORTEX 13options CPU_CORTEX
14options CPU_THUNDERX 14options CPU_THUNDERX
15options SOC_APPLE 15options SOC_APPLE
@@ -416,28 +416,26 @@ sun6ispi* at fdt? # Allwinner SPI @@ -416,28 +416,26 @@ sun6ispi* at fdt? # Allwinner SPI
416spi* at spibus? 416spi* at spibus?
417m25p* at spi? 417m25p* at spi?
418spiflash* at spiflashbus? 418spiflash* at spiflashbus?
419 419
420# Broadcom VCHIQ, etc 420# Broadcom VCHIQ, etc
421vchiq0 at fdt? 421vchiq0 at fdt?
422vcaudio0 at vchiq0 422vcaudio0 at vchiq0
423 423
424# Audio support 424# Audio support
425hdaudio* at fdt? # Intel HDA 425hdaudio* at fdt? # Intel HDA
426hdaudio* at pci? dev ? function ? 426hdaudio* at pci? dev ? function ?
427hdafg* at hdaudiobus? 427hdafg* at hdaudiobus?
428options HDAUDIOVERBOSE 428options HDAUDIOVERBOSE
429options HDAUDIO_ENABLE_HDMI 
430options HDAUDIO_ENABLE_DISPLAYPORT 
431ausoc* at fdt? # Simple SoC audio card 429ausoc* at fdt? # Simple SoC audio card
432simpleamp* at fdt? # Simple amplifier 430simpleamp* at fdt? # Simple amplifier
433spdiftx* at fdt? # SPDIF transmitter 431spdiftx* at fdt? # SPDIF transmitter
434rki2s* at fdt? # Rockchip I2S/PCM 432rki2s* at fdt? # Rockchip I2S/PCM
435sunxicodec* at fdt? # Allwinner audio codec 433sunxicodec* at fdt? # Allwinner audio codec
436sun8icodec* at fdt? # Allwinner audio codec (sun8i/sun50i) 434sun8icodec* at fdt? # Allwinner audio codec (sun8i/sun50i)
437h3codec* at fdt? # Allwinner H3 audio codec (analog part) 435h3codec* at fdt? # Allwinner H3 audio codec (analog part)
438a64acodec* at fdt? # Allwinner A64 audio codec (analog part) 436a64acodec* at fdt? # Allwinner A64 audio codec (analog part)
439sunxii2s* at fdt? # Allwinner I2S/PCM 437sunxii2s* at fdt? # Allwinner I2S/PCM
440audio* at audiobus? 438audio* at audiobus?
441 439
442spkr* at audio? # PC speaker (synthesized) 440spkr* at audio? # PC speaker (synthesized)
443 441

cvs diff -r1.5 -r1.6 src/sys/dev/hdaudio/files.hdaudio (expand / switch to unified diff)

--- src/sys/dev/hdaudio/files.hdaudio 2019/07/25 00:30:45 1.5
+++ src/sys/dev/hdaudio/files.hdaudio 2022/03/21 09:20:04 1.6
@@ -1,21 +1,22 @@ @@ -1,21 +1,22 @@
1# $NetBSD: files.hdaudio,v 1.5 2019/07/25 00:30:45 jmcneill Exp $ 1# $NetBSD: files.hdaudio,v 1.6 2022/03/21 09:20:04 jmcneill Exp $
2 2
3# 3#
4# Intel High Definition Audio (Revision 1.0) 4# Intel High Definition Audio (Revision 1.0)
5# 5#
6defflag HDAUDIOVERBOSE 6defflag HDAUDIOVERBOSE
7defflag opt_hdaudio.h HDAUDIO_ENABLE_HDMI 
8defflag opt_hdaudio.h HDAUDIO_ENABLE_DISPLAYPORT 
9defflag opt_hdaudio.h HDAUDIO_DEBUG 7defflag opt_hdaudio.h HDAUDIO_DEBUG
10defflag opt_hdaudio.h HDAFG_DEBUG 8defflag opt_hdaudio.h HDAFG_DEBUG
11defflag opt_hdaudio.h HDAFG_HDMI_DEBUG 9defflag opt_hdaudio.h HDAFG_HDMI_DEBUG
12 10
 11obsolete defflag HDAUDIO_ENABLE_HDMI
 12obsolete defflag HDAUDIO_ENABLE_DISPLAYPORT
 13
13define hdaudiobus {[nid = -1]} 14define hdaudiobus {[nid = -1]}
14device hdaudio: hdaudiobus 15device hdaudio: hdaudiobus
15file dev/hdaudio/hdaudio.c hdaudio 16file dev/hdaudio/hdaudio.c hdaudio
16file dev/hdaudio/hdaudio_verbose.c hdaudio & hdaudioverbose 17file dev/hdaudio/hdaudio_verbose.c hdaudio & hdaudioverbose
17 18
18device hdafg: audiobus 19device hdafg: audiobus
19attach hdafg at hdaudiobus 20attach hdafg at hdaudiobus
20file dev/hdaudio/hdafg.c hdafg 21file dev/hdaudio/hdafg.c hdafg
21file dev/hdaudio/hdafg_dd.c hdafg 22file dev/hdaudio/hdafg_dd.c hdafg

cvs diff -r1.26 -r1.27 src/sys/dev/hdaudio/hdafg.c (expand / switch to unified diff)

--- src/sys/dev/hdaudio/hdafg.c 2022/01/07 07:34:10 1.26
+++ src/sys/dev/hdaudio/hdafg.c 2022/03/21 09:20:04 1.27
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: hdafg.c,v 1.26 2022/01/07 07:34:10 mlelstv Exp $ */ 1/* $NetBSD: hdafg.c,v 1.27 2022/03/21 09:20:04 jmcneill Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk> 4 * Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk>
5 * Copyright (c) 2009-2011 Jared D. McNeill <jmcneill@invisible.ca> 5 * Copyright (c) 2009-2011 Jared D. McNeill <jmcneill@invisible.ca>
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * This code is derived from software contributed to The NetBSD Foundation 8 * This code is derived from software contributed to The NetBSD Foundation
9 * by Precedence Technologies Ltd 9 * by Precedence Technologies Ltd
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -50,27 +50,27 @@ @@ -50,27 +50,27 @@
50 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 50 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
51 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 51 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
52 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 52 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
53 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 53 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 54 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
55 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 55 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
56 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 56 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
57 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
58 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
59 * SUCH DAMAGE. 59 * SUCH DAMAGE.
60 */ 60 */
61 61
62#include <sys/cdefs.h> 62#include <sys/cdefs.h>
63__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.26 2022/01/07 07:34:10 mlelstv Exp $"); 63__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.27 2022/03/21 09:20:04 jmcneill Exp $");
64 64
65#include <sys/types.h> 65#include <sys/types.h>
66#include <sys/param.h> 66#include <sys/param.h>
67#include <sys/systm.h> 67#include <sys/systm.h>
68#include <sys/kernel.h> 68#include <sys/kernel.h>
69#include <sys/device.h> 69#include <sys/device.h>
70#include <sys/conf.h> 70#include <sys/conf.h>
71#include <sys/bus.h> 71#include <sys/bus.h>
72#include <sys/kmem.h> 72#include <sys/kmem.h>
73#include <sys/module.h> 73#include <sys/module.h>
74 74
75#include <sys/audioio.h> 75#include <sys/audioio.h>
76#include <dev/audio/audio_if.h> 76#include <dev/audio/audio_if.h>
@@ -3797,33 +3797,26 @@ hdafg_attach(device_t parent, device_t s @@ -3797,33 +3797,26 @@ hdafg_attach(device_t parent, device_t s
3797 defparams.channels = 2; 3797 defparams.channels = 2;
3798 defparams.sample_rate = sc->sc_fixed_rate ? sc->sc_fixed_rate : 48000; 3798 defparams.sample_rate = sc->sc_fixed_rate ? sc->sc_fixed_rate : 48000;
3799 defparams.precision = defparams.validbits = 16; 3799 defparams.precision = defparams.validbits = 16;
3800 defparams.encoding = AUDIO_ENCODING_SLINEAR_LE; 3800 defparams.encoding = AUDIO_ENCODING_SLINEAR_LE;
3801 sc->sc_pparam = sc->sc_rparam = defparams; 3801 sc->sc_pparam = sc->sc_rparam = defparams;
3802 hdafg_stream_connect(sc, AUMODE_PLAY); 3802 hdafg_stream_connect(sc, AUMODE_PLAY);
3803 hdafg_stream_connect(sc, AUMODE_RECORD); 3803 hdafg_stream_connect(sc, AUMODE_RECORD);
3804 3804
3805 for (i = 0; i < sc->sc_nassocs; i++) { 3805 for (i = 0; i < sc->sc_nassocs; i++) {
3806 astype |= (1 << sc->sc_assocs[i].as_digital); 3806 astype |= (1 << sc->sc_assocs[i].as_digital);
3807 } 3807 }
3808 hda_debug(sc, "assoc type mask: %x\n", astype); 3808 hda_debug(sc, "assoc type mask: %x\n", astype);
3809 3809
3810#ifndef HDAUDIO_ENABLE_HDMI 
3811 astype &= ~(1 << HDAFG_AS_HDMI); 
3812#endif 
3813#ifndef HDAUDIO_ENABLE_DISPLAYPORT 
3814 astype &= ~(1 << HDAFG_AS_DISPLAYPORT); 
3815#endif 
3816 
3817 if (astype == 0) 3810 if (astype == 0)
3818 return; 3811 return;
3819 3812
3820 hda_debug(sc, "attaching audio device\n"); 3813 hda_debug(sc, "attaching audio device\n");
3821 sc->sc_audiodev.ad_audiodev = audio_attach_mi(&hdafg_hw_if, 3814 sc->sc_audiodev.ad_audiodev = audio_attach_mi(&hdafg_hw_if,
3822 &sc->sc_audiodev, self); 3815 &sc->sc_audiodev, self);
3823} 3816}
3824 3817
3825static int 3818static int
3826hdafg_detach(device_t self, int flags) 3819hdafg_detach(device_t self, int flags)
3827{ 3820{
3828 struct hdafg_softc *sc = device_private(self); 3821 struct hdafg_softc *sc = device_private(self);
3829 struct hdaudio_widget *wl, *w = sc->sc_widgets; 3822 struct hdaudio_widget *wl, *w = sc->sc_widgets;