Skip to contentSkip to conversation

HDA driver without interrupt

DISCUSSION liufc 3 participants 4 messages May 2, 2012 – May 3, 2012 1 message not in the archive

lore
Share & tools
lore

liufc

author
#0 lore raw

Hi guys,I'm trying to implement an alsa driver based on the Intel HDA driver.However due to some hardware defects,I'm not able to use interrupt.So I wonder whether there is a way to do the job without the help of interrupt.Can anyone give me a suggestion?

#1 lore raw
Quoted 4 lines · liufc

Hi guys,I'm trying to implement an alsa driver based on the Intel HDA driver.However due to some hardware defects,I'm not able to use interrupt.So I wonder whether there is a way to do the job without the help of interrupt.Can anyone give me a suggestion?

What interrupt are you talking about? ALSA has the ability to discard periodic interrupts but the user-space code needs to explicitly request this mode (eg PulseAudio/AudioHAL). Regular/legacy apps do need an interrupt coming from the hardware.
-Pierre

#2 lore raw
In reply to liufc
Quoted 3 lines · liufc

Hi guys,I'm trying to implement an alsa driver based on the Intel HDA driver.However due to some hardware defects,I'm not able to use interrupt.

How does your hardware work then?

Regards,
Clemens

#4 lore raw
In reply to a message not in the archive
Quoted 2 lines · Fanchao Liu

It can transfer data via DMA,the problem is I don't know when to update hw_ptr and other pointers without interrupt.

Does the hardware have some other means to at least read the current position?

Quoted 2 lines

I set a timer and call snd_pcm_period_elapsed() every 50ms but get underrun error.

With a call to snd_pcm_period_elapsed(), the driver guarantees that the current position is at or after the next period boundary.

Regards,
Clemens