Changeset 0d59ea7e in mainline for uspace/drv/audio/hdaudio/hdactl.c
- Timestamp:
- 2022-07-02T14:34:36Z (21 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6ab7aad4, a247c32, baa2a33, d9dda26
- Parents:
- 9e9d9bc6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/hdactl.c
r9e9d9bc6 r0d59ea7e 1 1 /* 2 * Copyright (c) 20 14Jiri Svoboda2 * Copyright (c) 2022 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 670 670 } 671 671 672 static void hda_ctl_check_fifo_error(hda_ctl_t *ctl) 673 { 674 int i; 675 uint8_t sts; 676 677 /* 678 * XXX Ideally the interrupt handler would tell us which stream 679 * has the error. 680 */ 681 682 for (i = 0; i < 30; i++) { 683 sts = hda_reg8_read(&ctl->hda->regs->sdesc[i].sts); 684 if ((sts & BIT_V(uint8_t, sdsts_fifoe)) != 0 && (sts & 0x80) == 0) { 685 ddf_msg(LVL_WARN, "sts[%d] = 0x%hhx\n", i, sts); 686 hda_reg8_write(&ctl->hda->regs->sdesc[i].sts, 687 BIT_V(uint8_t, sdsts_fifoe)); 688 } 689 } 690 } 691 672 692 void hda_ctl_interrupt(hda_ctl_t *ctl) 673 693 { 694 ddf_msg(LVL_DEBUG, "hda_ctl_interrupt"); 695 hda_ctl_check_fifo_error(ctl); 674 696 hda_ctl_process_rirb(ctl); 675 697 }
Note:
See TracChangeset
for help on using the changeset viewer.