anchor.diff:         do (setf (aref (hda-codecs hda) i) (enumerate-codec hda i)))
       (mezzano.driver.sound:register-sound-card hda))
     t)
  -
  -(pci:define-pci-driver intel-hda intel-hda-probe
  -  ((#x8086 #x2668) ; ICH6 HDA
  -   (#x8086 #x27D8)) ; ICH7 HDA
  -  ())
   
   (defun write-bdl (hda entry base length)
     (let ((array (hda-corb/rirb/dmap hda))
  
positive.code:    (rirbsize :initarg :rirbsize :accessor hda-rirbsize)
     (rirb-read-pointer :initarg :rirb-read-pointer :accessor hda-rirb-read-pointer)
     (codecs :initarg :codecs :accessor hda-codecs)
     (interrupt-latch :initarg :interrupt-latch :accessor hda-interrupt-latch)
     (interrupt-handler :initarg :interrupt-handler :accessor hda-interrupt-handler)
     (dma-buffer-phys :initarg :dma-buffer-phys :accessor hda-dma-buffer-phys)
     (dma-buffer-virt :initarg :dma-buffer-virt :accessor hda-dma-buffer-virt)
     (dma-buffer-size :initarg :dma-buffer-size :accessor hda-dma-buffer-size))
  
negative.code:   (setf (sd-reg/8 hda stream (+ +sdnctlsts+ 3)) (ash 1 2))) ; bcis
  
  (defun wait-for-buffer-interrupt (hda)
    (let ((irq (hda-irq hda))
          (stream (first-output-stream hda)))
      (loop
         (sync:wait-for-objects irq (pci:pci-device-boot-id (hda-pci-device hda)))
         (with-hda-access (hda)
           (when (logbitp stream (global-reg/32 hda +intsts+))
             (clear-pending-interrupt hda stream)
             (mezzano.supervisor:simple-irq-unmask irq)
             (return)))
         (mezzano.supervisor:simple-irq-unmask irq))))
  
  ;; Return a list of all pin widgets.
  (defun pin-widgets (hda)
  