Changes in uspace/drv/audio/hdaudio/hdactl.c [cf78637:a64970e1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/hdactl.c
rcf78637 ra64970e1 1 1 /* 2 * Copyright (c) 20 14Jiri Svoboda2 * Copyright (c) 2025 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 628 628 } 629 629 630 void hda_ctl_quiesce(hda_ctl_t *ctl) 631 { 632 uint32_t gctl; 633 634 ddf_msg(LVL_DEBUG, "hda_ctl_quiesce(): Resetting controller."); 635 gctl = hda_reg32_read(&ctl->hda->regs->gctl); 636 hda_reg32_write(&ctl->hda->regs->gctl, 637 gctl & ~BIT_V(uint32_t, gctl_crst)); 638 } 639 630 640 errno_t hda_cmd(hda_t *hda, uint32_t verb, uint32_t *resp) 631 641 { … … 670 680 } 671 681 682 static void hda_ctl_check_fifo_error(hda_ctl_t *ctl) 683 { 684 int i; 685 uint8_t sts; 686 687 /* 688 * XXX Ideally the interrupt handler would tell us which stream 689 * has the error. 690 */ 691 692 for (i = 0; i < 30; i++) { 693 sts = hda_reg8_read(&ctl->hda->regs->sdesc[i].sts); 694 if ((sts & BIT_V(uint8_t, sdsts_fifoe)) != 0 && (sts & 0x80) == 0) { 695 ddf_msg(LVL_WARN, "sts[%d] = 0x%hhx\n", i, sts); 696 hda_reg8_write(&ctl->hda->regs->sdesc[i].sts, 697 BIT_V(uint8_t, sdsts_fifoe)); 698 } 699 } 700 } 701 672 702 void hda_ctl_interrupt(hda_ctl_t *ctl) 673 703 { 704 ddf_msg(LVL_DEBUG, "hda_ctl_interrupt"); 705 hda_ctl_check_fifo_error(ctl); 674 706 hda_ctl_process_rirb(ctl); 675 707 }
Note:
See TracChangeset
for help on using the changeset viewer.