Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.

This commit is contained in:
jmcneill 2015-07-26 17:54:33 +00:00
parent 01f63c44fd
commit fd314950d4
2 changed files with 8 additions and 4 deletions

View File

@ -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>
@ -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,6 +1215,7 @@ hdaudio_stream_start(struct hdaudio_stream *st, int blksize,
KASSERT(st->st_bdl.dma_valid == true);
hdaudio_stream_stop(st);
if ((sc->sc_flags & HDAUDIO_FLAG_NO_STREAM_RESET) == 0)
hdaudio_stream_reset(st);
/*

View File

@ -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>
@ -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 *);