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;
        }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to