| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
I am writing an audio driver for a PCI card. I am not getting any_______________________________________________
interrupts from the card.
I can talk to all the registers on the card just fine, and I am sure
that the card itself is configured to generate interrupts. The DMA
engines are running, as I can see the DMA count registers changing.
To alleviate any potential questions regarding whether I have taken
care of the fundamentals, I will mention first that in my IOAudioEngine
subclass, in the initHardware() function, I do the following:
super::initHardware(provider);
....
fInterruptEventSource =
IOFilterInterruptEventSource::filterInterruptEventSource(this,
MyAudioEngine::InterruptHandler,
MyAudioEngine::InterruptFilter,
audioDevice->getProvider());
....
workLoop = this->getWorkLoop();
workLoop->addEventSource(fInterruptEventSource);
And later, in performAudioEngineStart(), I do:
fInterruptEventSource->enable();
After some experimentation, I have observed what I believe is the
reason why I do not get any interrupts. One of the PCI configuration
registers, at address 0x3C, is Interrupt Pin and Line. Bits 0-7
of this register indicate interrupt line routing. The docs I have
indicate that a value of 0xFF indicates that the card has no
connection to the Interrupt Controller. I printed the contents of
this register at three points in my driver initialization: when
the driver first loads, after adding the interrupt event source to
the workloop, and after calling enable() on the interrupt event
source. In all three cases the value of this register is 0xFF.
I have another driver for a (totally) different PCI audio card,
which works fine, and I did the same experiment with that driver,
and the value of this register is 0x00, at the same points
during driver initialization.
I assume that this 0xFF value indicates my card's IRQ line is not
routed to one of the inputs of the interrupt controller, and this
naturally would explain why I do not get interrupts from my card.
But I have no idea why my card would not be connected to the
interrupt controller. I assume the darwin kernel, at some point
during bootup, or perhaps when my driver is loaded, is supposed to
connect my card's IRQ line to the interrupt controller. What would
cause this to not happen?
I am using a PowerMac G4, 500MHz. On the off chance it may be
relevant, I will mention that this card does not implement memory
space access, only I/O Space access. As I already mentioned,
reading and writing the card's registers all works fine.
Any insight to resolve this mystery would be greatly appreciated.
Emmett
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.
| References: | |
| >PCI interrupt line routing (From: Emmett James <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.