Date: Tue, 31 Jul 2018 17:18:58 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> 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 Message-ID: <201807311718.w6VHIwQ2015656@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807311718.w6VHIwQ2015656>