From owner-svn-soc-all@freebsd.org Sat Jun 18 17:09:07 2016 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A15F1A789A3 for ; Sat, 18 Jun 2016 17:09:07 +0000 (UTC) (envelope-from iateaca@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 820011E41 for ; Sat, 18 Jun 2016 17:09:07 +0000 (UTC) (envelope-from iateaca@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.15.2/8.15.2) with ESMTP id u5IH971Q041176 for ; Sat, 18 Jun 2016 17:09:07 GMT (envelope-from iateaca@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.15.2/8.15.2/Submit) id u5IH96XD041173 for svn-soc-all@FreeBSD.org; Sat, 18 Jun 2016 17:09:06 GMT (envelope-from iateaca@FreeBSD.org) Date: Sat, 18 Jun 2016 17:09:06 GMT Message-Id: <201606181709.u5IH96XD041173@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to iateaca@FreeBSD.org using -f From: iateaca@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r305336 - soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2016 17:09:07 -0000 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; }