Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.
This commit is contained in:
parent
dcfd25196e
commit
8a9ff04ba8
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: mi,v 1.1098 2015/03/22 09:57:42 ast Exp $
|
||||
# $NetBSD: mi,v 1.1099 2015/03/28 14:09:58 jmcneill Exp $
|
||||
#
|
||||
# Note: Don't delete entries from here - mark them as "obsolete" instead,
|
||||
# unless otherwise stated below.
|
||||
|
@ -867,6 +867,7 @@
|
|||
./usr/include/dev/dtv base-c-usr
|
||||
./usr/include/dev/eisa base-obsolete obsolete
|
||||
./usr/include/dev/filemon base-c-usr
|
||||
./usr/include/dev/hdaudio base-c-usr
|
||||
./usr/include/dev/hpc base-c-usr
|
||||
./usr/include/dev/i2c base-c-usr
|
||||
./usr/include/dev/i2o base-c-usr
|
||||
|
@ -883,7 +884,7 @@
|
|||
./usr/include/dev/ofisa base-obsolete obsolete
|
||||
./usr/include/dev/ofw base-c-usr
|
||||
./usr/include/dev/pci base-c-usr
|
||||
./usr/include/dev/pci/hdaudio base-c-usr
|
||||
./usr/include/dev/pci/hdaudio base-obsolete obsolete
|
||||
./usr/include/dev/pckbc base-c-usr
|
||||
./usr/include/dev/pcmcia base-c-usr
|
||||
./usr/include/dev/pud base-c-usr
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: mi,v 1.1947 2015/02/17 20:29:20 joerg Exp $
|
||||
# $NetBSD: mi,v 1.1948 2015/03/28 14:09:58 jmcneill Exp $
|
||||
#
|
||||
# Note: don't delete entries from here - mark them as "obsolete" instead.
|
||||
#
|
||||
|
@ -398,6 +398,8 @@
|
|||
./usr/include/dev/filemon/filemon.h comp-c-include
|
||||
./usr/include/dev/fssvar.h comp-c-include
|
||||
./usr/include/dev/hpc/hpcfbio.h comp-c-include
|
||||
./usr/include/dev/hdaudio/hdaudioio.h comp-c-include
|
||||
./usr/include/dev/hdaudio/hdaudioreg.h comp-c-include
|
||||
./usr/include/dev/i2c/i2c_bus.h comp-obsolete obsolete
|
||||
./usr/include/dev/i2c/i2c_eeprom.h comp-obsolete obsolete
|
||||
./usr/include/dev/i2c/i2c_io.h comp-c-include
|
||||
|
@ -614,8 +616,8 @@
|
|||
./usr/include/dev/ofw/openfirmio.h comp-c-include
|
||||
./usr/include/dev/pci/amrio.h comp-c-include
|
||||
./usr/include/dev/pci/amrreg.h comp-c-include
|
||||
./usr/include/dev/pci/hdaudio/hdaudioio.h comp-c-include
|
||||
./usr/include/dev/pci/hdaudio/hdaudioreg.h comp-c-include
|
||||
./usr/include/dev/pci/hdaudio/hdaudioio.h comp-obsolete obsolete
|
||||
./usr/include/dev/pci/hdaudio/hdaudioreg.h comp-obsolete obsolete
|
||||
./usr/include/dev/pci/if_devar.h comp-obsolete obsolete
|
||||
./usr/include/dev/pci/if_fxpreg.h comp-obsolete obsolete
|
||||
./usr/include/dev/pci/if_fxpvar.h comp-obsolete obsolete
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: md.amd64,v 1.55 2015/03/09 12:32:11 riastradh Exp $
|
||||
# $NetBSD: md.amd64,v 1.56 2015/03/28 14:09:58 jmcneill Exp $
|
||||
#
|
||||
# NOTE that there are two sets of files here:
|
||||
# @MODULEDIR@ and amd64-xen
|
||||
|
@ -89,6 +89,8 @@
|
|||
./@MODULEDIR@/hdafg/hdafg.kmod base-kernel-modules kmod
|
||||
./@MODULEDIR@/hdaudio base-kernel-modules kmod
|
||||
./@MODULEDIR@/hdaudio/hdaudio.kmod base-kernel-modules kmod
|
||||
./@MODULEDIR@/hdaudio_pci base-kernel-modules kmod
|
||||
./@MODULEDIR@/hdaudio_pci/hdaudio_pci.kmod base-kernel-modules kmod
|
||||
./@MODULEDIR@/hdaudioverbose base-kernel-modules kmod
|
||||
./@MODULEDIR@/hdaudioverbose/hdaudioverbose.kmod base-kernel-modules kmod
|
||||
./@MODULEDIR@/hpacel base-kernel-modules kmod
|
||||
|
@ -338,6 +340,8 @@
|
|||
./stand/amd64-xen/@OSRELEASE@/modules/hdafg/hdafg.kmod base-kernel-modules kmod,compatmodules
|
||||
./stand/amd64-xen/@OSRELEASE@/modules/hdaudio base-kernel-modules kmod,compatmodules
|
||||
./stand/amd64-xen/@OSRELEASE@/modules/hdaudio/hdaudio.kmod base-kernel-modules kmod,compatmodules
|
||||
./stand/amd64-xen/@OSRELEASE@/modules/hdaudio_pci base-kernel-modules kmod,compatmodules
|
||||
./stand/amd64-xen/@OSRELEASE@/modules/hdaudio_pci/hdaudio_pci.kmod base-kernel-modules kmod,compatmodules
|
||||
./stand/amd64-xen/@OSRELEASE@/modules/hdaudioverbose base-kernel-modules kmod,compatmodules
|
||||
./stand/amd64-xen/@OSRELEASE@/modules/hdaudioverbose/hdaudioverbose.kmod base-kernel-modules kmod,compatmodules
|
||||
./stand/amd64-xen/@OSRELEASE@/modules/hfs base-kernel-modules kmod,compatmodules
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: md.i386,v 1.57 2015/03/08 04:21:41 christos Exp $
|
||||
# $NetBSD: md.i386,v 1.58 2015/03/28 14:09:58 jmcneill Exp $
|
||||
#
|
||||
# NOTE that there are three sets of files here:
|
||||
# @MODULEDIR@, i386-xen, and i386pae-xen
|
||||
|
@ -89,6 +89,8 @@
|
|||
./@MODULEDIR@/hdafg/hdafg.kmod base-kernel-modules kmod
|
||||
./@MODULEDIR@/hdaudio base-kernel-modules kmod
|
||||
./@MODULEDIR@/hdaudio/hdaudio.kmod base-kernel-modules kmod
|
||||
./@MODULEDIR@/hdaudio_pci base-kernel-modules kmod
|
||||
./@MODULEDIR@/hdaudio_pci/hdaudio_pci.kmod base-kernel-modules kmod
|
||||
./@MODULEDIR@/hdaudioverbose base-kernel-modules kmod
|
||||
./@MODULEDIR@/hdaudioverbose/hdaudioverbose.kmod base-kernel-modules kmod
|
||||
./@MODULEDIR@/hpacel base-kernel-modules kmod
|
||||
|
@ -357,6 +359,8 @@
|
|||
./stand/i386-xen/@OSRELEASE@/modules/hdafg/hdafg.kmod base-kernel-modules kmod,compatmodules
|
||||
./stand/i386-xen/@OSRELEASE@/modules/hdaudio base-kernel-modules kmod,compatmodules
|
||||
./stand/i386-xen/@OSRELEASE@/modules/hdaudio/hdaudio.kmod base-kernel-modules kmod,compatmodules
|
||||
./stand/i386-xen/@OSRELEASE@/modules/hdaudio_pci base-kernel-modules kmod,compatmodules
|
||||
./stand/i386-xen/@OSRELEASE@/modules/hdaudio_pci/hdaudio_pci.kmod base-kernel-modules kmod,compatmodules
|
||||
./stand/i386-xen/@OSRELEASE@/modules/hdaudioverbose base-kernel-modules kmod,compatmodules
|
||||
./stand/i386-xen/@OSRELEASE@/modules/hdaudioverbose/hdaudioverbose.kmod base-kernel-modules kmod,compatmodules
|
||||
./stand/i386-xen/@OSRELEASE@/modules/hfs base-kernel-modules kmod,compatmodules
|
||||
|
@ -762,6 +766,8 @@
|
|||
./stand/i386pae-xen/@OSRELEASE@/modules/hdafg/hdafg.kmod base-kernel-modules kmod,compatmodules
|
||||
./stand/i386pae-xen/@OSRELEASE@/modules/hdaudio base-kernel-modules kmod,compatmodules
|
||||
./stand/i386pae-xen/@OSRELEASE@/modules/hdaudio/hdaudio.kmod base-kernel-modules kmod,compatmodules
|
||||
./stand/i386pae-xen/@OSRELEASE@/modules/hdaudio_pci base-kernel-modules kmod,compatmodules
|
||||
./stand/i386pae-xen/@OSRELEASE@/modules/hdaudio_pci/hdaudio_pci.kmod base-kernel-modules kmod,compatmodules
|
||||
./stand/i386pae-xen/@OSRELEASE@/modules/hdaudioverbose base-kernel-modules kmod,compatmodules
|
||||
./stand/i386pae-xen/@OSRELEASE@/modules/hdaudioverbose/hdaudioverbose.kmod base-kernel-modules kmod,compatmodules
|
||||
./stand/i386pae-xen/@OSRELEASE@/modules/hfs base-kernel-modules kmod,compatmodules
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: files,v 1.1128 2015/02/13 17:50:48 maxv Exp $
|
||||
# $NetBSD: files,v 1.1129 2015/03/28 14:09:58 jmcneill Exp $
|
||||
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
|
||||
|
||||
version 20141030
|
||||
|
@ -319,6 +319,9 @@ define firmload
|
|||
|
||||
include "dev/files.audio"
|
||||
|
||||
# High definition audio
|
||||
include "dev/hdaudio/files.hdaudio"
|
||||
|
||||
# Base verbose vendor/product printing support
|
||||
file dev/dev_verbose.c
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# $NetBSD: Makefile,v 1.35 2012/06/20 21:38:26 sjg Exp $
|
||||
# $NetBSD: Makefile,v 1.36 2015/03/28 14:09:58 jmcneill Exp $
|
||||
|
||||
SUBDIR= apm ata bluetooth dec dm dmover dtv filemon hpc \
|
||||
SUBDIR= apm ata bluetooth dec dm dmover dtv filemon hdaudio hpc \
|
||||
i2c i2o ic ieee1394 ir isa \
|
||||
microcode ofw pci pckbport pcmcia pud putter raidframe sbus scsipi \
|
||||
sun tc usb vme wscons
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# $NetBSD: Makefile,v 1.1 2009/09/16 20:58:07 sborrill Exp $
|
||||
# $NetBSD: Makefile,v 1.1 2015/03/28 14:09:59 jmcneill Exp $
|
||||
|
||||
INCSDIR= /usr/include/dev/pci/hdaudio
|
||||
INCSDIR= /usr/include/dev/hdaudio
|
||||
|
||||
# Only install includes which are used by userland
|
||||
INCS= hdaudioio.h hdaudioreg.h
|
|
@ -1,11 +1,11 @@
|
|||
# $NetBSD: Makefile.hdaudiodevs,v 1.2 2014/09/21 14:30:22 christos Exp $
|
||||
# $NetBSD: Makefile.hdaudiodevs,v 1.1 2015/03/28 14:09:59 jmcneill Exp $
|
||||
#
|
||||
# As per tron@NetBSD.org, the proper procedure is
|
||||
#
|
||||
# 1.) Change "src/sys/dev/hdaudio/hdaudiodevs".
|
||||
# 2.) Commit "src/sys/dev/hdaudio/hdaudiodevs".
|
||||
# 3.) Execute "make -f Makefile.hdaudiodevs" in "src/sys/dev/pci/hdaudio".
|
||||
# 4.) Commit "src/sys/dev/hdaudio/hdaudiodevs.h" and "src/sys/dev/pci/hdaudio/hdaudiodevs_data.h".
|
||||
# 3.) Execute "make -f Makefile.hdaudiodevs" in "src/sys/dev/hdaudio".
|
||||
# 4.) Commit "src/sys/dev/hdaudio/hdaudiodevs.h" and "src/sys/dev/hdaudio/hdaudiodevs_data.h".
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ceareg.h,v 1.1 2011/02/12 15:15:34 jmcneill Exp $ */
|
||||
/* $NetBSD: ceareg.h,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011 Jared D. McNeill <jmcneill@invisible.ca>
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: eldreg.h,v 1.1 2011/02/12 15:15:34 jmcneill Exp $ */
|
||||
/* $NetBSD: eldreg.h,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011 Jared D. McNeill <jmcneill@invisible.ca>
|
|
@ -0,0 +1,16 @@
|
|||
# $NetBSD: files.hdaudio,v 1.1 2015/03/28 14:09:59 jmcneill Exp $
|
||||
|
||||
#
|
||||
# Intel High Definition Audio (Revision 1.0)
|
||||
#
|
||||
defflag HDAUDIOVERBOSE
|
||||
|
||||
define hdaudiobus {[nid = -1]}
|
||||
device hdaudio: hdaudiobus
|
||||
file dev/hdaudio/hdaudio.c hdaudio
|
||||
file dev/hdaudio/hdaudio_verbose.c hdaudio & hdaudioverbose
|
||||
|
||||
device hdafg: audiobus, auconv, aurateconv, mulaw
|
||||
attach hdafg at hdaudiobus
|
||||
file dev/hdaudio/hdafg.c hdafg
|
||||
file dev/hdaudio/hdafg_dd.c hdafg
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdafg.c,v 1.26 2015/02/11 00:37:25 christos Exp $ */
|
||||
/* $NetBSD: hdafg.c,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk>
|
||||
|
@ -60,7 +60,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.26 2015/02/11 00:37:25 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.1 2015/03/28 14:09:59 jmcneill Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdafg_dd.c,v 1.2 2012/08/29 18:52:31 dholland Exp $ */
|
||||
/* $NetBSD: hdafg_dd.c,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011 Jared D. McNeill <jmcneill@invisible.ca>
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdafg_dd.c,v 1.2 2012/08/29 18:52:31 dholland Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdafg_dd.c,v 1.1 2015/03/28 14:09:59 jmcneill Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -42,7 +42,6 @@ __KERNEL_RCSID(0, "$NetBSD: hdafg_dd.c,v 1.2 2012/08/29 18:52:31 dholland Exp $"
|
|||
|
||||
#include "hdaudioreg.h"
|
||||
#include "hdaudiovar.h"
|
||||
#include "hdaudio_pci.h"
|
||||
#include "hdafg_dd.h"
|
||||
|
||||
int
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdafg_dd.h,v 1.2 2012/08/29 18:52:32 dholland Exp $ */
|
||||
/* $NetBSD: hdafg_dd.h,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011 Jared D. McNeill <jmcneill@invisible.ca>
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdaudio.c,v 1.25 2015/02/11 00:37:25 christos Exp $ */
|
||||
/* $NetBSD: hdaudio.c,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk>
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdaudio.c,v 1.25 2015/02/11 00:37:25 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdaudio.c,v 1.1 2015/03/28 14:09:59 jmcneill Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -1601,11 +1601,7 @@ hdaudioioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
|
|||
return err;
|
||||
}
|
||||
|
||||
MODULE(MODULE_CLASS_DRIVER, hdaudio, "pci");
|
||||
|
||||
#ifdef _MODULE
|
||||
#include "ioconf.c"
|
||||
#endif
|
||||
MODULE(MODULE_CLASS_DRIVER, hdaudio, NULL);
|
||||
|
||||
static int
|
||||
hdaudio_modcmd(modcmd_t cmd, void *opaque)
|
||||
|
@ -1618,24 +1614,15 @@ hdaudio_modcmd(modcmd_t cmd, void *opaque)
|
|||
switch (cmd) {
|
||||
case MODULE_CMD_INIT:
|
||||
#ifdef _MODULE
|
||||
error = config_init_component(cfdriver_ioconf_hdaudio,
|
||||
cfattach_ioconf_hdaudio, cfdata_ioconf_hdaudio);
|
||||
if (error)
|
||||
return error;
|
||||
error = devsw_attach("hdaudio", NULL, &bmaj,
|
||||
&hdaudio_cdevsw, &cmaj);
|
||||
if (error)
|
||||
config_fini_component(cfdriver_ioconf_hdaudio,
|
||||
cfattach_ioconf_hdaudio, cfdata_ioconf_hdaudio);
|
||||
#endif
|
||||
return error;
|
||||
case MODULE_CMD_FINI:
|
||||
#ifdef _MODULE
|
||||
devsw_detach(NULL, &hdaudio_cdevsw);
|
||||
error = config_fini_component(cfdriver_ioconf_hdaudio,
|
||||
cfattach_ioconf_hdaudio, cfdata_ioconf_hdaudio);
|
||||
#endif
|
||||
return error;
|
||||
return 0;
|
||||
default:
|
||||
return ENOTTY;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdaudio_config.h,v 1.1 2011/02/12 15:15:34 jmcneill Exp $ */
|
||||
/* $NetBSD: hdaudio_config.h,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011 Jared D. McNeill <jmcneill@invisible.ca>
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdaudio_mixer.h,v 1.3 2009/09/07 11:49:27 jmcneill Exp $ */
|
||||
/* $NetBSD: hdaudio_mixer.h,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk>
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdaudio_verbose.c,v 1.2 2014/09/21 14:30:22 christos Exp $ */
|
||||
/* $NetBSD: hdaudio_verbose.c,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
|
@ -27,13 +27,13 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdaudio_verbose.c,v 1.2 2014/09/21 14:30:22 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdaudio_verbose.c,v 1.1 2015/03/28 14:09:59 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/module.h>
|
||||
|
||||
#include <dev/pci/hdaudio/hdaudio_verbose.h>
|
||||
#include <dev/pci/hdaudio/hdaudiodevs.h>
|
||||
#include <dev/pci/hdaudio/hdaudiodevs_data.h>
|
||||
#include <dev/hdaudio/hdaudio_verbose.h>
|
||||
#include <dev/hdaudio/hdaudiodevs.h>
|
||||
#include <dev/hdaudio/hdaudiodevs_data.h>
|
||||
|
||||
DEV_VERBOSE_MODULE_DEFINE(hdaudio, NULL)
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdaudio_verbose.h,v 1.2 2014/09/21 14:30:22 christos Exp $ */
|
||||
/* $NetBSD: hdaudio_verbose.h,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: hdaudiodevs,v 1.2 2015/01/19 14:31:32 njoly Exp $
|
||||
$NetBSD: hdaudiodevs,v 1.1 2015/03/28 14:09:59 jmcneill Exp $
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010 Jared D. McNeill <jmcneill@invisible.ca>
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdaudiodevs.h,v 1.3 2015/01/19 14:32:08 njoly Exp $ */
|
||||
/* $NetBSD: hdaudiodevs.h,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdaudiodevs_data.h,v 1.3 2015/01/19 14:32:08 njoly Exp $ */
|
||||
/* $NetBSD: hdaudiodevs_data.h,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdaudioio.h,v 1.3 2009/10/11 08:50:12 sborrill Exp $ */
|
||||
/* $NetBSD: hdaudioio.h,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk>
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdaudioreg.h,v 1.7 2011/09/06 10:48:28 jmcneill Exp $ */
|
||||
/* $NetBSD: hdaudioreg.h,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk>
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdaudiovar.h,v 1.10 2015/02/11 00:37:25 christos Exp $ */
|
||||
/* $NetBSD: hdaudiovar.h,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk>
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdmireg.h,v 1.1 2011/02/12 15:15:34 jmcneill Exp $ */
|
||||
/* $NetBSD: hdmireg.h,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011 Jared D. McNeill <jmcneill@invisible.ca>
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: files.pci,v 1.375 2015/03/27 05:57:28 msaitoh Exp $
|
||||
# $NetBSD: files.pci,v 1.376 2015/03/28 14:09:59 jmcneill Exp $
|
||||
#
|
||||
# Config file and device description for machine-independent PCI code.
|
||||
# Included by ports that need it. Requires that the SCSI files be
|
||||
|
@ -1064,7 +1064,8 @@ file dev/pci/voyager.c voyager
|
|||
defflag opt_voyager.h VOYAGER_DEBUG
|
||||
|
||||
# High Definition Audio
|
||||
include "dev/pci/hdaudio/files.hdaudio"
|
||||
attach hdaudio at pci with hdaudio_pci
|
||||
file dev/pci/hdaudio_pci.c hdaudio_pci
|
||||
|
||||
# Permedia 2 / Sun PGX32 / Raptor
|
||||
device pm2fb: wsemuldisplaydev, rasops8, rasops32, vcons, videomode, i2cbus, i2c_bitbang, ddc_read_edid, edid, glyphcache
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
# $NetBSD: files.hdaudio,v 1.7 2014/11/09 20:14:01 nonaka Exp $
|
||||
|
||||
#
|
||||
# Intel High Definition Audio (Revision 1.0)
|
||||
#
|
||||
defflag HDAUDIOVERBOSE
|
||||
|
||||
define hdaudiobus {[nid = -1]}
|
||||
device hdaudio: hdaudiobus
|
||||
file dev/pci/hdaudio/hdaudio.c hdaudio
|
||||
file dev/pci/hdaudio/hdaudio_verbose.c hdaudio & hdaudioverbose
|
||||
|
||||
device hdafg: audiobus, auconv, aurateconv, mulaw
|
||||
attach hdafg at hdaudiobus
|
||||
file dev/pci/hdaudio/hdafg.c hdafg
|
||||
file dev/pci/hdaudio/hdafg_dd.c hdafg
|
||||
|
||||
# hdaudio@pci
|
||||
attach hdaudio at pci with hdaudio_pci
|
||||
file dev/pci/hdaudio/hdaudio_pci.c hdaudio_pci
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdaudio_pci.c,v 1.13 2014/10/28 02:49:52 nonaka Exp $ */
|
||||
/* $NetBSD: hdaudio_pci.c,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk>
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdaudio_pci.c,v 1.13 2014/10/28 02:49:52 nonaka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdaudio_pci.c,v 1.1 2015/03/28 14:09:59 jmcneill Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -43,13 +43,14 @@ __KERNEL_RCSID(0, "$NetBSD: hdaudio_pci.c,v 1.13 2014/10/28 02:49:52 nonaka Exp
|
|||
#include <sys/conf.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/intr.h>
|
||||
#include <sys/module.h>
|
||||
|
||||
#include <dev/pci/pcidevs.h>
|
||||
#include <dev/pci/pcivar.h>
|
||||
|
||||
#include "hdaudioreg.h"
|
||||
#include "hdaudiovar.h"
|
||||
#include "hdaudio_pci.h"
|
||||
#include <dev/hdaudio/hdaudioreg.h>
|
||||
#include <dev/hdaudio/hdaudiovar.h>
|
||||
#include <dev/pci/hdaudio_pci.h>
|
||||
|
||||
struct hdaudio_pci_softc {
|
||||
struct hdaudio_softc sc_hdaudio; /* must be first */
|
||||
|
@ -261,3 +262,32 @@ hdaudio_pci_resume(device_t self, const pmf_qual_t *qual)
|
|||
hdaudio_pci_reinit(sc);
|
||||
return hdaudio_resume(&sc->sc_hdaudio);
|
||||
}
|
||||
|
||||
MODULE(MODULE_CLASS_DRIVER, hdaudio_pci, "hdaudio");
|
||||
|
||||
#ifdef _MODULE
|
||||
#include "ioconf.c"
|
||||
#endif
|
||||
|
||||
static int
|
||||
hdaudio_pci_modcmd(modcmd_t cmd, void *opaque)
|
||||
{
|
||||
int error = 0;
|
||||
|
||||
switch (cmd) {
|
||||
case MODULE_CMD_INIT:
|
||||
#ifdef _MODULE
|
||||
error = config_init_component(cfdriver_ioconf_hdaudio_pci,
|
||||
cfattach_ioconf_hdaudio_pci, cfdata_ioconf_hdaudio_pci);
|
||||
#endif
|
||||
return error;
|
||||
case MODULE_CMD_FINI:
|
||||
#ifdef _MODULE
|
||||
error = config_fini_component(cfdriver_ioconf_hdaudio_pci,
|
||||
cfattach_ioconf_hdaudio_pci, cfdata_ioconf_hdaudio_pci);
|
||||
#endif
|
||||
return error;
|
||||
default:
|
||||
return ENOTTY;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdaudio_pci.h,v 1.1 2010/08/07 16:59:48 jmcneill Exp $ */
|
||||
/* $NetBSD: hdaudio_pci.h,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010 Jared D. McNeill <jmcneill@invisible.ca>
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.143 2015/03/07 14:16:51 jmcneill Exp $
|
||||
# $NetBSD: Makefile,v 1.144 2015/03/28 14:09:58 jmcneill Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
|
@ -136,6 +136,7 @@ SUBDIR+= coretemp
|
|||
SUBDIR+= est
|
||||
SUBDIR+= hdafg
|
||||
SUBDIR+= hdaudio
|
||||
SUBDIR+= hdaudio_pci
|
||||
SUBDIR+= hdaudioverbose
|
||||
SUBDIR+= hpet
|
||||
SUBDIR+= odcm
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2014/11/19 00:17:10 pooka Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.2 2015/03/28 14:09:59 jmcneill Exp $
|
||||
|
||||
# This file is used by modules and rump kernels
|
||||
|
||||
IOCONFDIR:= ${.PARSEDIR}
|
||||
.PATH: ${NETBSDSRCDIR}/sys/dev/pci/hdaudio ${IOCONFDIR}
|
||||
.PATH: ${NETBSDSRCDIR}/sys/dev/hdaudio ${IOCONFDIR}
|
||||
|
||||
IOCONF= hdafg.ioconf
|
||||
SRCS= hdafg.c hdafg_dd.c
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
# $NetBSD: hdafg.ioconf,v 1.1 2011/01/07 15:32:11 jmcneill Exp $
|
||||
# $NetBSD: hdafg.ioconf,v 1.2 2015/03/28 14:09:59 jmcneill Exp $
|
||||
|
||||
ioconf hdafg
|
||||
|
||||
include "conf/files"
|
||||
# XXX shouldn't be here, but nbconfig crashes without it
|
||||
include "dev/pci/files.pci"
|
||||
|
||||
pseudo-root hdaudio*
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.4 2014/11/19 00:17:10 pooka Exp $
|
||||
# $NetBSD: Makefile,v 1.5 2015/03/28 14:09:59 jmcneill Exp $
|
||||
|
||||
# This file is used by modules and rump kernels
|
||||
|
||||
.include "../Makefile.inc"
|
||||
.include "${.CURDIR}/Makefile.inc"
|
||||
|
||||
KMOD= hdaudio
|
||||
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2014/11/19 00:17:10 pooka Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.2 2015/03/28 14:09:59 jmcneill Exp $
|
||||
|
||||
# This file is used by modules and rump kernels
|
||||
|
||||
IOCONFDIR:= ${.PARSEDIR}
|
||||
|
||||
.PATH: ${NETBSDSRCDIR}/sys/dev/pci/hdaudio ${IOCONFDIR}
|
||||
|
||||
IOCONF= hdaudio.ioconf
|
||||
.PATH: ${S}/dev/hdaudio
|
||||
SRCS= hdaudio.c
|
||||
SRCS+= hdaudio_pci.c
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.1 2015/03/28 14:09:59 jmcneill Exp $
|
||||
|
||||
.include "../Makefile.inc"
|
||||
.include "${.CURDIR}/Makefile.inc"
|
||||
|
||||
KMOD= hdaudio_pci
|
||||
|
||||
.include <bsd.kmodule.mk>
|
|
@ -0,0 +1,10 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2015/03/28 14:09:59 jmcneill Exp $
|
||||
|
||||
# This file is used by modules and rump kernels
|
||||
|
||||
IOCONFDIR:= ${.PARSEDIR}
|
||||
|
||||
.PATH: ${NETBSDSRCDIR}/sys/dev/pci ${IOCONFDIR}
|
||||
|
||||
IOCONF= hdaudio_pci.ioconf
|
||||
SRCS= hdaudio_pci.c
|
|
@ -1,6 +1,6 @@
|
|||
# $NetBSD: hdaudio.ioconf,v 1.1 2011/01/07 15:32:12 jmcneill Exp $
|
||||
# $NetBSD: hdaudio_pci.ioconf,v 1.1 2015/03/28 14:09:59 jmcneill Exp $
|
||||
|
||||
ioconf hdaudio
|
||||
ioconf hdaudio_pci
|
||||
|
||||
include "conf/files"
|
||||
include "dev/pci/files.pci"
|
|
@ -1,10 +1,10 @@
|
|||
# $NetBSD: Makefile,v 1.1 2014/09/19 17:25:47 christos Exp $
|
||||
# $NetBSD: Makefile,v 1.2 2015/03/28 14:09:59 jmcneill Exp $
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
||||
KMOD= hdaudioverbose
|
||||
|
||||
.PATH: ${S}/dev/pci/hdaudio
|
||||
.PATH: ${S}/dev/hdaudio
|
||||
SRCS= hdaudio_verbose.c
|
||||
|
||||
.include <bsd.kmodule.mk>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
# $NetBSD: Makefile,v 1.1 2014/11/19 00:18:58 pooka Exp $
|
||||
# $NetBSD: Makefile,v 1.2 2015/03/28 14:09:59 jmcneill Exp $
|
||||
#
|
||||
|
||||
RUMPTOP=${TOPRUMP}
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include "${NETBSDSRCDIR}/sys/modules/hdaudio/Makefile.inc"
|
||||
.include "${NETBSDSRCDIR}/sys/modules/hdaudio_pci/Makefile.inc"
|
||||
|
||||
LIB= rumpdev_pci_hdaudio
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: graph.c,v 1.2 2010/08/10 13:52:13 joerg Exp $ */
|
||||
/* $NetBSD: graph.c,v 1.3 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk>
|
||||
|
@ -40,8 +40,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <dev/pci/hdaudio/hdaudioio.h>
|
||||
#include <dev/pci/hdaudio/hdaudioreg.h>
|
||||
#include <dev/hdaudio/hdaudioio.h>
|
||||
#include <dev/hdaudio/hdaudioreg.h>
|
||||
|
||||
#include "hdaudioctl.h"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdaudioctl.c,v 1.1 2009/10/11 08:57:54 sborrill Exp $ */
|
||||
/* $NetBSD: hdaudioctl.c,v 1.2 2015/03/28 14:09:59 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk>
|
||||
|
@ -42,8 +42,8 @@
|
|||
#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <dev/pci/hdaudio/hdaudioio.h>
|
||||
#include <dev/pci/hdaudio/hdaudioreg.h>
|
||||
#include <dev/hdaudio/hdaudioio.h>
|
||||
#include <dev/hdaudio/hdaudioreg.h>
|
||||
|
||||
#include "hdaudioctl.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue