Ticket #3356: hda_snippet

File hda_snippet, 919 bytes (added by rudolfc, 11 years ago)
Line 
1
2//code snippet from file hda_controller.cpp, routine routine hda_interrupt_handler()
3
4...
5 /* Check for sending errors */
6 if (corbStatus) {
7 controller->Write8(HDAC_CORB_STATUS, corbStatus);
8
9 if ((corbStatus & CORB_STATUS_MEMORY_ERROR) != 0)
10 dprintf("hda: CORB Memory Error!\n");
11 }
12 }
13
14 if ((intrStatus & INTR_STATUS_STREAM_MASK) != 0) {
15
16 for (uint32 index = 0; index < HDA_MAX_STREAMS; index++) {
17 if ((intrStatus & (1 << index)) != 0) {
18
19if(intrStatus & 0x01)//this if statement added by rudolf
20{
21new_time = system_time();
22dprintf("H5: %d\n", new_time - old_time);
23old_time = new_time;
24
25}
26
27
28
29 if (controller->streams[index]) {
30 stream_handle_interrupt(controller,
31 controller->streams[index]);
32 } else {
33 dprintf("hda: Stream interrupt for unconfigured stream "
34 "%ld!\n", index);
35 }
36 }
37 }
38 }
39
40 /* NOTE: See HDA001 => CIS/GIS cannot be cleared! */
41
42 return handled;
43}