From owner-svn-src-head@freebsd.org Tue Jul 31 17:18:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B561A105F3D9; Tue, 31 Jul 2018 17:18:59 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F69D7329D; Tue, 31 Jul 2018 17:18:59 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11A5616911; Tue, 31 Jul 2018 17:18:59 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6VHIwn9015657; Tue, 31 Jul 2018 17:18:58 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6VHIwQ2015656; Tue, 31 Jul 2018 17:18:58 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201807311718.w6VHIwQ2015656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 31 Jul 2018 17:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336983 - head/sys/dev/sound/pci/hda X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/sound/pci/hda X-SVN-Commit-Revision: 336983 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2018 17:18:59 -0000 Author: jhibbits Date: Tue Jul 31 17:18:58 2018 New Revision: 336983 URL: https://svnweb.freebsd.org/changeset/base/336983 Log: snd_hda: Byteswap the buffer descriptor entries as needed The buffer descriptor list entries should be in little endian format. Byte swap them on BE. This is the last piece of the puzzle for snd_hda(4) to work on PowerPC. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Tue Jul 31 17:18:35 2018 (r336982) +++ head/sys/dev/sound/pci/hda/hdac.c Tue Jul 31 17:18:58 2018 (r336983) @@ -1930,10 +1930,10 @@ hdac_stream_start(device_t dev, device_t child, addr = (uint64_t)buf; bdle = (struct hdac_bdle *)sc->streams[ss].bdl.dma_vaddr; for (i = 0; i < blkcnt; i++, bdle++) { - bdle->addrl = (uint32_t)addr; - bdle->addrh = (uint32_t)(addr >> 32); - bdle->len = blksz; - bdle->ioc = 1; + bdle->addrl = htole32((uint32_t)addr); + bdle->addrh = htole32((uint32_t)(addr >> 32)); + bdle->len = htole32(blksz); + bdle->ioc = htole32(1); addr += blksz; }