Changeset dda5848 in mainline for uspace/drv/audio/hdaudio/hdactl.c
- Timestamp:
- 2014-08-26T23:07:47Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9034876
- Parents:
- 2f6b916
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/hdactl.c
r2f6b916 rdda5848 106 106 * 107 107 * We always use the largest available size. In @a sizecap each of bits 108 * 0, 1, 2 determine whether one of the supported size (0 == 2 en ries,108 * 0, 1, 2 determine whether one of the supported size (0 == 2 entries, 109 109 * 1 == 16 entries, 2 == 256 entries) is supported. @a *selsz is set to 110 110 * one of 0, 1, 2 on success. … … 249 249 } 250 250 rirbsz = rirbsz & ~BIT_RANGE(uint8_t, rirbsize_size_h, rirbsize_size_l); 251 rirbsz = rirbsz | selsz;251 rirbsz = rirbsz | (selsz << rirbsize_size_l); 252 252 253 253 ddf_msg(LVL_NOTE, "Setting RIRB Size register to 0x%x", rirbsz); … … 395 395 return ENOENT; 396 396 397 ++hda->ctl->rirb_rp;397 hda->ctl->rirb_rp = (hda->ctl->rirb_rp + 1) % hda->ctl->rirb_entries; 398 398 resp = rirb[hda->ctl->rirb_rp]; 399 399 … … 415 415 while (count > 0) { 416 416 while (count > 0 && hda->ctl->solrb_rp != hda->ctl->solrb_wp) { 417 ++hda->ctl->solrb_rp;417 hda->ctl->solrb_rp = (hda->ctl->solrb_rp + 1) % softrb_entries; 418 418 resp = hda->ctl->solrb[hda->ctl->solrb_rp]; 419 419 … … 629 629 } 630 630 631 void hda_ctl_dump_info(hda_ctl_t *ctl) 632 { 633 ddf_msg(LVL_NOTE, "corbwp=%d, corbrp=%d", 634 hda_reg16_read(&ctl->hda->regs->corbwp), 635 hda_reg16_read(&ctl->hda->regs->corbrp)); 636 ddf_msg(LVL_NOTE, "corbctl=0x%x, corbsts=0x%x", 637 hda_reg8_read(&ctl->hda->regs->corbctl), 638 hda_reg8_read(&ctl->hda->regs->corbsts)); 639 ddf_msg(LVL_NOTE, "rirbwp=0x%x, soft-rirbrp=0x%x", 640 hda_reg16_read(&ctl->hda->regs->rirbwp), 641 ctl->rirb_rp); 642 ddf_msg(LVL_NOTE, "solrb_wp=0x%x, solrb_rp=0x%x", 643 ctl->solrb_wp, ctl->solrb_wp); 644 } 645 631 646 /** @} 632 647 */
Note:
See TracChangeset
for help on using the changeset viewer.