| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: auixp.c,v 1.36 2011/11/24 03:35:58 mrg Exp $ */ | | 1 | /* $NetBSD: auixp.c,v 1.37 2011/12/02 11:58:44 jmcneill Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2004, 2005 Reinoud Zandijk <reinoud@netbsd.org> | | 4 | * Copyright (c) 2004, 2005 Reinoud Zandijk <reinoud@netbsd.org> |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. The name of the author may not be used to endorse or promote products | | 12 | * 2. The name of the author may not be used to endorse or promote products |
13 | * derived from this software without specific prior written permission. | | 13 | * derived from this software without specific prior written permission. |
14 | * 3. All advertising materials mentioning features or use of this software | | 14 | * 3. All advertising materials mentioning features or use of this software |
| @@ -40,27 +40,27 @@ | | | @@ -40,27 +40,27 @@ |
40 | * encodings. | | 40 | * encodings. |
41 | * | | 41 | * |
42 | * Known problems and issues : | | 42 | * Known problems and issues : |
43 | * - SPDIF is untested and needs some work still (LED stays off) | | 43 | * - SPDIF is untested and needs some work still (LED stays off) |
44 | * - 32 bit audio playback failed last time i tried but that might an AC'97 | | 44 | * - 32 bit audio playback failed last time i tried but that might an AC'97 |
45 | * codec support problem. | | 45 | * codec support problem. |
46 | * - 32 bit recording works but can't try out playing: see above. | | 46 | * - 32 bit recording works but can't try out playing: see above. |
47 | * - no suspend/resume support yet. | | 47 | * - no suspend/resume support yet. |
48 | * - multiple codecs are `supported' but not tested; the implemetation needs | | 48 | * - multiple codecs are `supported' but not tested; the implemetation needs |
49 | * some cleaning up. | | 49 | * some cleaning up. |
50 | */ | | 50 | */ |
51 | | | 51 | |
52 | #include <sys/cdefs.h> | | 52 | #include <sys/cdefs.h> |
53 | __KERNEL_RCSID(0, "$NetBSD: auixp.c,v 1.36 2011/11/24 03:35:58 mrg Exp $"); | | 53 | __KERNEL_RCSID(0, "$NetBSD: auixp.c,v 1.37 2011/12/02 11:58:44 jmcneill Exp $"); |
54 | | | 54 | |
55 | #include <sys/types.h> | | 55 | #include <sys/types.h> |
56 | #include <sys/errno.h> | | 56 | #include <sys/errno.h> |
57 | #include <sys/null.h> | | 57 | #include <sys/null.h> |
58 | #include <sys/param.h> | | 58 | #include <sys/param.h> |
59 | #include <sys/systm.h> | | 59 | #include <sys/systm.h> |
60 | #include <sys/kmem.h> | | 60 | #include <sys/kmem.h> |
61 | #include <sys/device.h> | | 61 | #include <sys/device.h> |
62 | #include <sys/conf.h> | | 62 | #include <sys/conf.h> |
63 | #include <sys/exec.h> | | 63 | #include <sys/exec.h> |
64 | #include <sys/select.h> | | 64 | #include <sys/select.h> |
65 | #include <sys/audioio.h> | | 65 | #include <sys/audioio.h> |
66 | #include <sys/queue.h> | | 66 | #include <sys/queue.h> |
| @@ -1803,19 +1803,19 @@ auixp_dumpreg(void) | | | @@ -1803,19 +1803,19 @@ auixp_dumpreg(void) |
1803 | iot = sc->sc_iot; | | 1803 | iot = sc->sc_iot; |
1804 | ioh = sc->sc_ioh; | | 1804 | ioh = sc->sc_ioh; |
1805 | printf("%s register dump:\n", device_xname(&sc->sc_dev)); | | 1805 | printf("%s register dump:\n", device_xname(&sc->sc_dev)); |
1806 | for (i = 0; i < 256; i+=4) { | | 1806 | for (i = 0; i < 256; i+=4) { |
1807 | printf("\t0x%02x: 0x%08x\n", i, bus_space_read_4(iot, ioh, i)); | | 1807 | printf("\t0x%02x: 0x%08x\n", i, bus_space_read_4(iot, ioh, i)); |
1808 | } | | 1808 | } |
1809 | printf("\n"); | | 1809 | printf("\n"); |
1810 | } | | 1810 | } |
1811 | #endif | | 1811 | #endif |
1812 | | | 1812 | |
1813 | static void | | 1813 | static void |
1814 | auixp_get_locks(void *addr, kmutex_t **intr, kmutex_t **proc) | | 1814 | auixp_get_locks(void *addr, kmutex_t **intr, kmutex_t **proc) |
1815 | { | | 1815 | { |
1816 | struct auixp_softc *sc; | | 1816 | struct auixp_codec *co = addr; |
| | | 1817 | struct auixp_softc *sc = co->sc; |
1817 | | | 1818 | |
1818 | sc = addr; | | | |
1819 | *intr = &sc->sc_intr_lock; | | 1819 | *intr = &sc->sc_intr_lock; |
1820 | *proc = &sc->sc_lock; | | 1820 | *proc = &sc->sc_lock; |
1821 | } | | 1821 | } |