Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/audio/hdaudio/hdactl.c

    rcf78637 r0d59ea7e  
    11/*
    2  * Copyright (c) 2014 Jiri Svoboda
     2 * Copyright (c) 2022 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    670670}
    671671
     672static 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
    672692void hda_ctl_interrupt(hda_ctl_t *ctl)
    673693{
     694        ddf_msg(LVL_DEBUG, "hda_ctl_interrupt");
     695        hda_ctl_check_fifo_error(ctl);
    674696        hda_ctl_process_rirb(ctl);
    675697}
Note: See TracChangeset for help on using the changeset viewer.