Port-macppc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: tstile lockups - side note
Here is a patch that avoids the panic - but somehow I couldn't stop the
"white" noise, maybe I broke something?
Martin
Index: snapper.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/dev/snapper.c,v
retrieving revision 1.38
diff -c -u -p -r1.38 snapper.c
--- snapper.c 24 Nov 2011 03:35:57 -0000 1.38
+++ snapper.c 30 Jun 2013 18:55:47 -0000
@@ -143,6 +143,7 @@ static int snapper_set_rate(struct snapp
static void snapper_set_treble(struct snapper_softc *, u_int);
static void snapper_set_bass(struct snapper_softc *, u_int);
static void snapper_write_mixers(struct snapper_softc *);
+static int snapper_commit_settings(void *);
static int tas3004_write(struct snapper_softc *, u_int, const void *);
static int gpio_read(char *);
@@ -276,34 +277,22 @@ CFATTACH_DECL_NEW(snapper, sizeof(struct
snapper_attach, NULL, NULL);
const struct audio_hw_if snapper_hw_if = {
- NULL,
- NULL,
- NULL,
- snapper_query_encoding,
- snapper_set_params,
- snapper_round_blocksize,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- snapper_halt_output,
- snapper_halt_input,
- NULL,
- snapper_getdev,
- NULL,
- snapper_set_port,
- snapper_get_port,
- snapper_query_devinfo,
- NULL,
- NULL,
- snapper_round_buffersize,
- snapper_mappage,
- snapper_get_props,
- snapper_trigger_output,
- snapper_trigger_input,
- NULL,
- snapper_get_locks,
+ .query_encoding = snapper_query_encoding,
+ .set_params = snapper_set_params,
+ .round_blocksize = snapper_round_blocksize,
+ .commit_settings = snapper_commit_settings,
+ .halt_output = snapper_halt_output,
+ .halt_input = snapper_halt_input,
+ .getdev = snapper_getdev,
+ .set_port = snapper_set_port,
+ .get_port = snapper_get_port,
+ .query_devinfo = snapper_query_devinfo,
+ .round_buffersize = snapper_round_buffersize,
+ .mappage = snapper_mappage,
+ .get_props = snapper_get_props,
+ .trigger_output = snapper_trigger_output,
+ .trigger_input = snapper_trigger_input,
+ .get_locks = snapper_get_locks,
};
struct audio_device snapper_device = {
@@ -2153,3 +2142,15 @@ snapper_init(struct snapper_softc *sc, i
sc->mixer[5] = 0;
snapper_write_mixers(sc);
}
+
+static int
+snapper_commit_settings(void *h)
+{
+ struct snapper_softc *sc = h;
+ int rv;
+
+ rv = snapper_set_rate(sc);
+ snapper_write_mixers(sc);
+
+ return rv;
+}
Home |
Main Index |
Thread Index |
Old Index