anchor.diff:    (command hda codec dac #x3b07f) ; unmute L/R out
     (command hda codec pin #x3b07f) ; unmute L/R out
     (command hda codec pin #x70740) ; enable output
  +  ;; Enable global and stream interrupts.
  +  (setf (global-reg/32 hda +intctl+) (logior #x80000000 (ash 1 (first-output-stream hda))))
     (stream-go hda (first-output-stream hda)))
  +
  +(defun wait-for-buffer-interrupt (hda)
  +  (let ((latch (hda-interrupt-latch hda))
  +        (stream (first-output-stream hda)))
  +    (loop
  +       (mezzano.supervisor:simple-irq-unmask (hda-interrupt-handler hda))
  +       (mezzano.supervisor:latch-wait latch)
  +       (mezzano.supervisor:latch-reset latch)
  +       (when (logbitp stream (global-reg/32 hda +intsts+))
  +         ;; qemu is picky and requires a write to the 8-bit status part of
  +         ;; the register.
  +         (setf (sd-reg/8 hda stream (+ +sdnctlsts+ 3)) (ash 1 2)) ; bcis
  +         (return)))))
   
   ;; TODO: This should stream to anything that looks vaugely output-like, instead
   ;; of a single pin.
  
positive.code:     (setf (sys.int::memref-unsigned-byte-32 array (+ offset 0)) (ldb (byte 32 0) base)
            (sys.int::memref-unsigned-byte-32 array (+ offset 1)) (ldb (byte 32 32) base)
            (sys.int::memref-unsigned-byte-32 array (+ offset 2)) length
            (sys.int::memref-unsigned-byte-32 array (+ offset 3)) 0)))
  
  (defun read-bdl (hda entry)
    (let ((array (hda-corb/rirb/dmap hda))
  
negative.code:     (setf sound-position buf-len)
      (multiple-value-bind (converter mixer)
          (output-path output-pin)
        (start-playback hda buffer (cad output-pin) (nid converter) (nid output-pin) (and mixer (nid mixer))))
      (unwind-protect
           (loop
              ;; Wait for the dma position to move from the
  