Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/hdaudio Skip stream reset if HDAUDIO_FLAG_NO_STREAM_...



details:   https://anonhg.NetBSD.org/src/rev/a6bec4a23008
branches:  trunk
changeset: 809668:a6bec4a23008
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Jul 26 17:54:33 2015 +0000

description:
Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.

diffstat:

 sys/dev/hdaudio/hdaudio.c    |  7 ++++---
 sys/dev/hdaudio/hdaudiovar.h |  5 ++++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (47 lines):

diff -r 4f486eedbb15 -r a6bec4a23008 sys/dev/hdaudio/hdaudio.c
--- a/sys/dev/hdaudio/hdaudio.c Sun Jul 26 17:37:38 2015 +0000
+++ b/sys/dev/hdaudio/hdaudio.c Sun Jul 26 17:54:33 2015 +0000
@@ -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 <support%precedence.co.uk@localhost>
@@ -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 @@
        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
diff -r 4f486eedbb15 -r a6bec4a23008 sys/dev/hdaudio/hdaudiovar.h
--- a/sys/dev/hdaudio/hdaudiovar.h      Sun Jul 26 17:37:38 2015 +0000
+++ b/sys/dev/hdaudio/hdaudiovar.h      Sun Jul 26 17:54:33 2015 +0000
@@ -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 <support%precedence.co.uk@localhost>
@@ -157,6 +157,9 @@
        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 *);



Home | Main Index | Thread Index | Old Index