Module Name: src
Committed By: jmcneill
Date: Sun Jul 26 17:54:33 UTC 2015
Modified Files:
src/sys/dev/hdaudio: hdaudio.c hdaudiovar.h
Log Message:
Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hdaudio/hdaudio.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/hdaudio/hdaudiovar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/hdaudio/hdaudio.c
diff -u src/sys/dev/hdaudio/hdaudio.c:1.2 src/sys/dev/hdaudio/hdaudio.c:1.3
--- src/sys/dev/hdaudio/hdaudio.c:1.2 Wed May 20 18:28:32 2015
+++ src/sys/dev/hdaudio/hdaudio.c Sun Jul 26 17:54:33 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: hdaudio.c,v 1.2 2015/05/20 18:28:32 riastradh Exp $ */
+/* $NetBSD: hdaudio.c,v 1.3 2015/07/26 17:54:33 jmcneill Exp $ */
/*
* Copyright (c) 2009 Precedence Technologies Ltd <[email protected]>
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdaudio.c,v 1.2 2015/05/20 18:28:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdaudio.c,v 1.3 2015/07/26 17:54:33 jmcneill Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -1215,7 +1215,8 @@ hdaudio_stream_start(struct hdaudio_stre
KASSERT(st->st_bdl.dma_valid == true);
hdaudio_stream_stop(st);
- hdaudio_stream_reset(st);
+ if ((sc->sc_flags & HDAUDIO_FLAG_NO_STREAM_RESET) == 0)
+ hdaudio_stream_reset(st);
/*
* Configure buffer descriptor list
Index: src/sys/dev/hdaudio/hdaudiovar.h
diff -u src/sys/dev/hdaudio/hdaudiovar.h:1.3 src/sys/dev/hdaudio/hdaudiovar.h:1.4
--- src/sys/dev/hdaudio/hdaudiovar.h:1.3 Sat May 30 13:47:03 2015
+++ src/sys/dev/hdaudio/hdaudiovar.h Sun Jul 26 17:54:33 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: hdaudiovar.h,v 1.3 2015/05/30 13:47:03 jmcneill Exp $ */
+/* $NetBSD: hdaudiovar.h,v 1.4 2015/07/26 17:54:33 jmcneill Exp $ */
/*
* Copyright (c) 2009 Precedence Technologies Ltd <[email protected]>
@@ -157,6 +157,9 @@ struct hdaudio_softc {
struct hdaudio_stream sc_stream[HDAUDIO_MAX_STREAMS];
uint32_t sc_stream_mask;
kmutex_t sc_stream_mtx;
+
+ uint32_t sc_flags;
+#define HDAUDIO_FLAG_NO_STREAM_RESET 0x0001
};
int hdaudio_attach(device_t, struct hdaudio_softc *);