socsvn commit: r305336 - soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve

iateaca at FreeBSD.org iateaca at FreeBSD.org
Sat Jun 18 17:09:07 UTC 2016


Author: iateaca
Date: Sat Jun 18 17:09:06 2016
New Revision: 305336
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=305336

Log:
  
  get the dir of the stream from the SDCTL register
  
  M    bhyve/pci_hda.c

Modified:
  soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/pci_hda.c

Modified: soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/pci_hda.c
==============================================================================
--- soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/pci_hda.c	Sat Jun 18 16:54:42 2016	(r305335)
+++ soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/pci_hda.c	Sat Jun 18 17:09:06 2016	(r305336)
@@ -435,6 +435,7 @@
 	uint32_t off = hda_get_offset_stream(stream_ind);
 	uint32_t sdctl = 0;
 	uint8_t strm = 0;
+	uint8_t dir = 0;
 	int i;
 
 	assert(!st->run);
@@ -478,10 +479,12 @@
 
 	sdctl = hda_get_reg_by_offset(sc, off + HDAC_SDCTL0);
 	strm = (sdctl >> 20) & 0x0f;
+	dir = (sdctl >> 19) & 0x01;
 
-	DPRINTF("strm: 0x%x\n", strm);
+	DPRINTF("strm: 0x%x, dir: 0x%x\n", strm, dir);
 
 	sc->stream_map[strm] = stream_ind;
+	st->dir = dir;
 
 	return 0;
 }


More information about the svn-soc-all mailing list