Changeset 903eff5 in mainline
- Timestamp:
- 2014-08-25T11:05:05Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 31ccd42a
- Parents:
- a10f3f3
- Location:
- uspace/drv/audio/hdaudio
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/hdactl.c
ra10f3f3 r903eff5 485 485 intctl | BIT_V(uint32_t, intctl_gie) | BIT_V(uint32_t, intctl_cie)); 486 486 hda_reg32_write(&hda->regs->intctl, intctl | 487 BIT_V(uint32_t, intctl_gie) | BIT_V(uint32_t, intctl_cie)); 487 BIT_V(uint32_t, intctl_gie) | BIT_V(uint32_t, intctl_cie) | 488 0x3fffffff); 488 489 489 490 rc = hda_corb_init(hda); … … 501 502 goto error; 502 503 } 504 505 async_usleep(5*1000*1000); 506 ddf_msg(LVL_NOTE, "intsts=0x%x", hda_reg32_read(&hda->regs->intsts)); 507 ddf_msg(LVL_NOTE, "sdesc[%d].sts=0x%x", 508 hda->ctl->iss, hda_reg8_read(&hda->regs->sdesc[hda->ctl->iss].sts)); 503 509 504 510 return ctl; -
uspace/drv/audio/hdaudio/hdaudio.c
ra10f3f3 r903eff5 81 81 { 82 82 .cmd = CMD_PIO_READ_8, 83 .addr = NULL, 83 .addr = NULL, /* rirbsts */ 84 84 .dstarg = 2 85 85 }, … … 97 97 { 98 98 .cmd = CMD_PIO_WRITE_8, 99 .addr = NULL, 99 .addr = NULL, /* rirbsts */ 100 100 .value = BIT_V(uint8_t, rirbsts_intfl), 101 101 }, -
uspace/drv/audio/hdaudio/stream.c
ra10f3f3 r903eff5 34 34 35 35 #include <as.h> 36 #include <bitops.h> 37 #include <byteorder.h> 36 38 #include <ddf/log.h> 37 39 #include <ddi.h> 38 40 #include <errno.h> 41 #include <macros.h> 39 42 #include <stdlib.h> 40 43 … … 90 93 goto error; 91 94 95 ddf_msg(LVL_NOTE, "Stream buf phys=0x%llx virt=%p", 96 (unsigned long long)buffer_phys, buffer); 97 92 98 stream->buf[i] = buffer; 93 99 stream->buf_phys[i] = buffer_phys; … … 105 111 /* Fill in BDL */ 106 112 for (i = 0; i < stream->nbuffers; i++) { 107 stream->bdl[i].address = stream->buf_phys[i];108 stream->bdl[i].length = stream->bufsize;109 stream->bdl[i].flags = 0 ;113 stream->bdl[i].address = host2uint64_t_le(stream->buf_phys[i]); 114 stream->bdl[i].length = host2uint32_t_le(stream->bufsize); 115 stream->bdl[i].flags = 0/*BIT_V(uint32_t, bdf_ioc)*/; 110 116 } 111 117 … … 118 124 { 119 125 hda_sdesc_regs_t *sdregs; 126 uint8_t ctl1; 127 uint8_t ctl3; 128 129 ctl3 = (stream->sid << 4); 130 ctl1 = 0x4; 120 131 121 132 sdregs = &stream->hda->regs->sdesc[stream->sdid]; 133 hda_reg8_write(&sdregs->ctl3, ctl3); 134 hda_reg8_write(&sdregs->ctl1, ctl1); 122 135 hda_reg32_write(&sdregs->cbl, stream->nbuffers * stream->bufsize); 123 136 hda_reg16_write(&sdregs->lvi, stream->nbuffers - 1); 124 137 hda_reg16_write(&sdregs->fmt, stream->fmt); 138 hda_reg32_write(&sdregs->bdpl, LOWER32(stream->bdl_phys)); 139 hda_reg32_write(&sdregs->bdpu, UPPER32(stream->bdl_phys)); 125 140 } 126 141
Note:
See TracChangeset
for help on using the changeset viewer.