summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2008-02-13 23:35:09 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2008-02-13 23:35:09 +0000
commit591ec9c696216b317f0cdacee2e00d34789c0a08 (patch)
tree7b7643fafc2c5ed16acef50b8ef5b5ec9d111c89 /sys
parent99998a5b6e728b1c06f6176495c48bc63845a97c (diff)
Since SPDIF support for the auixp driver is still half done
disable it for now since some chipset revisions will freak out on the aparent half-initialisation. Also delay the setting of the DMA bits until after the codec detection but before the enabling of interrupts. Note that the DMA has to be explicitly started when the device is opened. From reinoud NetBSD via brad@ tested by ian@ and matthieu@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/auixp.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/sys/dev/pci/auixp.c b/sys/dev/pci/auixp.c
index f4573f82788..da1d0b3e5a0 100644
--- a/sys/dev/pci/auixp.c
+++ b/sys/dev/pci/auixp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auixp.c,v 1.16 2008/02/13 23:30:51 jakemsr Exp $ */
+/* $OpenBSD: auixp.c,v 1.17 2008/02/13 23:35:08 jakemsr Exp $ */
/* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */
/*
@@ -1256,21 +1256,6 @@ auixp_attach(struct device *parent, struct device *self, void *aux)
if (!sc->sc_output_dma || !sc->sc_input_dma)
return;
- /* fill in the missing details about the dma channels. */
-
- /* for output */
- sc->sc_output_dma->linkptr = ATI_REG_OUT_DMA_LINKPTR;
- sc->sc_output_dma->dma_enable_bit = ATI_REG_CMD_OUT_DMA_EN |
- ATI_REG_CMD_SEND_EN;
- /* have spdif? then this too! XXX not seeing LED yet! XXX */
- if (sc->has_spdif)
- sc->sc_output_dma->dma_enable_bit |= ATI_REG_CMD_SPDF_OUT_EN;
-
- /* and for input */
- sc->sc_input_dma->linkptr = ATI_REG_IN_DMA_LINKPTR;
- sc->sc_input_dma->dma_enable_bit = ATI_REG_CMD_IN_DMA_EN |
- ATI_REG_CMD_RECEIVE_EN;
-
#if 0
/* could preliminary program DMA chain */
auixp_program_dma_chain(sc, sc->sc_output_dma);
@@ -1364,6 +1349,23 @@ auixp_post_config(void *self)
audio_attach_mi(&auixp_hw_if, codec, &sc->sc_dev);
}
+ if (sc->has_spdif)
+ sc->has_spdif = 0;
+
+ /* fill in the missing details about the dma channels. */
+ /* for output */
+ sc->sc_output_dma->linkptr = ATI_REG_OUT_DMA_LINKPTR;
+ sc->sc_output_dma->dma_enable_bit = ATI_REG_CMD_OUT_DMA_EN |
+ ATI_REG_CMD_SEND_EN;
+ /* have spdif? then this too! XXX not seeing LED yet! XXX */
+ if (sc->has_spdif)
+ sc->sc_output_dma->dma_enable_bit |= ATI_REG_CMD_SPDF_OUT_EN;
+
+ /* and for input */
+ sc->sc_input_dma->linkptr = ATI_REG_IN_DMA_LINKPTR;
+ sc->sc_input_dma->dma_enable_bit = ATI_REG_CMD_IN_DMA_EN |
+ ATI_REG_CMD_RECEIVE_EN;
+
/* done! now enable all interrupts we can service */
auixp_enable_interrupts(sc);
}