diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2009-09-09 00:26:58 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2009-09-09 00:26:58 +0000 |
commit | 96848e74fceda9b2a96d319a1901c7aedbe867dd (patch) | |
tree | 49a9a9fb376e929c9b1d409089566b72cb1a7945 /sys | |
parent | 6aa31a6cfc8d5e5d83670a1418b2c1f7834ce938 (diff) |
azalia.h:
* remove irrelevant comment
* this driver uses at most 2 converter groups per group set, don't
allocate more than needed
* remove unused members from codec_t
azalia.c:
* macros for register values
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/azalia.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/azalia.h | 11 |
2 files changed, 10 insertions, 11 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c index 946fbc68cb4..dc3f6d64e48 100644 --- a/sys/dev/pci/azalia.c +++ b/sys/dev/pci/azalia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia.c,v 1.144 2009/09/08 23:30:17 jakemsr Exp $ */ +/* $OpenBSD: azalia.c,v 1.145 2009/09/09 00:26:57 jakemsr Exp $ */ /* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */ /*- @@ -96,6 +96,8 @@ int az_debug = 0; #define ICH_PCI_HDCTL_CLKDETEN 0x04 #define ICH_PCI_HDCTL_CLKDETINV 0x02 #define ICH_PCI_HDCTL_SIGNALMODE 0x01 +#define ICH_PCI_HDTCSEL 0x44 +#define ICH_PCI_HDTCSEL_MASK 0x7 /* internal types */ @@ -386,8 +388,10 @@ azalia_pci_attach(struct device *parent, struct device *self, void *aux) pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, v | PCI_COMMAND_BACKTOBACK_ENABLE); - v = pci_conf_read(pa->pa_pc, pa->pa_tag, 0x44); - pci_conf_write(pa->pa_pc, pa->pa_tag, 0x44, v & (~0x7)); + /* traffic class select */ + v = pci_conf_read(pa->pa_pc, pa->pa_tag, ICH_PCI_HDTCSEL); + pci_conf_write(pa->pa_pc, pa->pa_tag, ICH_PCI_HDTCSEL, + v & ~(ICH_PCI_HDTCSEL_MASK)); /* enable PCIe snoop */ switch (PCI_PRODUCT(pa->pa_id)) { diff --git a/sys/dev/pci/azalia.h b/sys/dev/pci/azalia.h index f423108b9e2..72955435c93 100644 --- a/sys/dev/pci/azalia.h +++ b/sys/dev/pci/azalia.h @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia.h,v 1.52 2009/06/09 05:16:42 jakemsr Exp $ */ +/* $OpenBSD: azalia.h,v 1.53 2009/09/09 00:26:57 jakemsr Exp $ */ /* $NetBSD: azalia.h,v 1.6 2006/01/16 14:15:26 kent Exp $ */ /*- @@ -607,12 +607,12 @@ typedef struct { typedef struct { int nconv; - nid_t conv[HDA_MAX_CHANNELS]; /* front, surround, clfe, side, ... */ + nid_t conv[HDA_MAX_CHANNELS]; } convgroup_t; typedef struct { int cur; int ngroups; - convgroup_t groups[32]; + convgroup_t groups[2]; } convgroupset_t; typedef struct { @@ -635,8 +635,6 @@ struct io_pin { }; typedef struct codec_t { - int (*comresp)(const struct codec_t *, nid_t, uint32_t, uint32_t, uint32_t *); - struct azalia_t *az; uint32_t vid; /* codec vendor/device ID */ uint32_t subid; /* PCI subvendor/device ID */ @@ -698,9 +696,6 @@ typedef struct codec_t { nid_t sense_pins[HDA_MAX_SENSE_PINS]; int nsense_pins; - - uint32_t *extra; - u_int rate; } codec_t; int azalia_codec_init_vtbl(codec_t *); |