Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/jmcneill-audiomp3]: src/sys/arch/amiga/dev port this to audiomp branch. ...
details: https://anonhg.NetBSD.org/src/rev/2e546258bf2e
branches: jmcneill-audiomp3
changeset: 771333:2e546258bf2e
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Nov 20 10:27:36 2011 +0000
description:
port this to audiomp branch. no allocm/freem here, no detach, so just
add/initialise sc_lock and sc_intr_lock, and add get_locks() support.
XXX: untested, but amiga kernels compile now.
diffstat:
sys/arch/amiga/dev/repulse.c | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diffs (72 lines):
diff -r c8d730cdb582 -r 2e546258bf2e sys/arch/amiga/dev/repulse.c
--- a/sys/arch/amiga/dev/repulse.c Sun Nov 20 09:40:19 2011 +0000
+++ b/sys/arch/amiga/dev/repulse.c Sun Nov 20 10:27:36 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: repulse.c,v 1.17 2011/07/19 15:55:27 dyoung Exp $ */
+/* $NetBSD: repulse.c,v 1.17.4.1 2011/11/20 10:27:36 mrg Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: repulse.c,v 1.17 2011/07/19 15:55:27 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: repulse.c,v 1.17.4.1 2011/11/20 10:27:36 mrg Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -85,6 +85,7 @@
int rep_get_port(void *, mixer_ctrl_t *);
int rep_query_devinfo(void *, mixer_devinfo_t *);
size_t rep_round_buffersize(void *, int, size_t);
+void rep_get_locks(void *, kmutex_t **, kmutex_t **);
int rep_start_input(void *, void *, int, void (*)(void *), void *);
int rep_start_output(void *, void *, int, void (*)(void *), void *);
@@ -122,6 +123,8 @@
/* trigger_output */ 0,
/* trigger_input */ 0,
/* dev_ioctl */ 0,
+ /* powerstate */ 0,
+ rep_get_locks,
};
/* hardware registers */
@@ -219,6 +222,8 @@
int sc_playscale;
unsigned sc_playflags;
+ kmutex_t sc_lock;
+ kmutex_t sc_intr_lock;
};
int repulse_match (struct device *, struct cfdata *, void *);
@@ -310,7 +315,10 @@
sc->sc_achost.attach = repac_attach;
sc->sc_achost.flags = 0;
- if (ac97_attach(&sc->sc_achost, self)) {
+ mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE);
+ mutex_init(&sc->sc_intr_lock, MUTEX_DEFAULT, IPL_SCHED);
+
+ if (ac97_attach(&sc->sc_achost, self, &sc->sc_lock)) {
printf("%s: error attaching codec\n", self->dv_xname);
return;
}
@@ -579,6 +587,15 @@
return size;
}
+void
+rep_get_locks(void *opaque, kmutex_t **intr, kmutex_t **thread)
+{
+ struct repulse_softc *sc = opaque;
+
+ *intr = &sc->sc_intr_lock;
+ *thread = &sc->sc_lock;
+}
+
int
rep_set_params(void *addr, int setmode, int usemode,
Home |
Main Index |
Thread Index |
Old Index