Lines Matching full:hda
52 # creates an hda stream with at 2 buffers of buf_len
56 log.info(f"Mapping registers for hda stream {self.stream_id} at base {self.base:x}")
58 self.hda = Regs(hdamem)
59 self.hda.GCAP = 0x0000
60 self.hda.GCTL = 0x0008
61 self.hda.DPLBASE = 0x0070
62 self.hda.DPUBASE = 0x0074
63 self.hda.SPBFCH = 0x0700
64 self.hda.SPBFCTL = 0x0704
65 self.hda.PPCH = 0x0800
66 self.hda.PPCTL = 0x0804
67 self.hda.PPSTS = 0x0808
68 self.hda.SPIB = 0x0708 + stream_id*0x08
69 self.hda.freeze()
114 …g data to stream {self.stream_id}, len {bufl}, SPBFCTL {self.hda.SPBFCTL:x}, SPIB {self.hda.SPIB}")
117 self.hda.SPBFCTL |= (1 << self.stream_id)
118 self.hda.SPIB += bufl
119 ….info(f"Wrote data to stream {self.stream_id}, SPBFCTL {self.hda.SPBFCTL:x}, SPIB {self.hda.SPIB}")
159 log.debug("HDA %d: PPROC %d, CTL 0x%x, LPIB 0x%x, BDPU 0x%x, BDPL 0x%x, CBL 0x%x, LVI 0x%x",
160 … self.stream_id, (hda.PPCTL >> self.stream_id) & 1, self.regs.CTL, self.regs.LPIB, self.regs.BDPU,
187 self.hda.SPBFCTL = 0
188 self.hda.SPIB = 0
191 #self.hda.DPUBASE = self.pos_buf_addr >> 32 & 0xffffffff
192 #self.hda.DPLBASE = self.pos_buf_addr & 0xfffffff0 | 1
195 self.hda.PPCTL |= (1 << self.stream_id)
249 hda = Regs(hdamem)
250 hda.GCAP = 0x0000
251 hda.GCTL = 0x0008
252 hda.SPBFCTL = 0x0704
253 hda.PPCTL = 0x0804
256 hda_ostream_id = (hda.GCAP >> 8) & 0x0f # number of input streams
257 log.info(f"Selected output stream {hda_ostream_id} (GCAP = 0x{hda.GCAP:x})")
258 hda.SD_SPIB = 0x0708 + (8 * hda_ostream_id)
259 hda.freeze()
302 return (hda, sd, dsp, hda_ostream_id)
311 # HDA requires at least two buffers be defined, but we don't care about
410 hda.PPCTL |= (1 << 30) # GPROCEN, "global processing enable"
412 log.info("Resetting HDA device")
413 hda.GCTL = 0
414 while hda.GCTL & 1: pass
415 hda.GCTL = 1
416 while not hda.GCTL & 1: pass
427 log.info(f"Configuring HDA stream {hda_ostream_id} to transfer firmware image")
438 hda.PPCTL |= (1 << hda_ostream_id)
440 # SPIB ("Software Position In Buffer") is an Intel HDA extension
444 hda.SPBFCTL |= (1 << hda_ostream_id)
445 hda.SD_SPIB = len(fw_bytes)
513 hda.PPCTL |= (1 << 30) # GPROCEN, "global processing enable"
515 log.info("Resetting HDA device")
516 hda.GCTL = 0
517 while hda.GCTL & 1: pass
518 hda.GCTL = 1
519 while not hda.GCTL & 1: pass
552 log.info(f"Configuring HDA stream {hda_ostream_id} to transfer firmware image")
563 hda.PPCTL |= (1 << hda_ostream_id)
565 # SPIB ("Software Position In Buffer") is an Intel HDA extension
569 hda.SPBFCTL |= (1 << hda_ostream_id)
570 hda.SD_SPIB = len(fw_bytes)
831 elif data == 6: # HDA RESET (init if not exists)
838 elif data == 7: # HDA CONFIG
843 elif data == 8: # HDA START
848 elif data == 9: # HDA STOP
851 elif data == 10: # HDA VALIDATE
865 elif data == 11: # HDA HOST OUT SEND
871 elif data == 12: # HDA PRINT
939 global hda, sd, dsp, hda_ostream_id, hda_streams
942 (hda, sd, dsp, hda_ostream_id) = map_regs(args.log_only)