[alsa-devel] ALSA: HDA ad1989 on Intel SCH interrupt issues
Hello,
I have been working on a custom audio interface, utilizing the Intel SCH and an ad1989 codec. the goal is to provide 1 stereo headphone output and 3 stereo microphone inputs. As the Intel SCH only provides two DMA engines per direction my first question will be: How do i setup interleaving of the 3 stereo ADCs provided by the ad1989, through the two DMA engines.
Additionally the more intriguing problem involves interrupt handling during capture(using APIC). Upon boot (or module reload) playback works just fine, however recording fails with "ALSA pcm_lib.c:1787: capture write error (DMA or IRQ trouble?)". This behaviour is consistent if one tries to continuously record form one stereo channel and is applicable to all 3 PCM-substreams as long as they are accessed one at a time. However if i try to record from 2 or more PCM substreams simultaneously, after a few failed attempts(same issue as above: DMA/IRQ trouble) one of the channels will engage, after which any subsequent recording request will start without any problems.
The above issues arise when i force the HDA controller in APIC mode. If the controller is left in the default MSI interrupt mode then the kernel receives no interrupts on that IRQ, resulting in playback only playing the first buffer repetitively, until timing out with "DMA or IRQ trouble?". However recording exhibits a similar behaviour to above, where after a few attempts it successfully begins to record, inspection of /proc/interrupts still returns 0 for the assigned IRQ line.
The same behaviour is exhibited when i use the default patch_analog.c module (snd-hda-codec-analog). Playback and recording through other media such as usb seem to work fine.
Attached i am sending the alsa-info outputs immediately upon boot, and after the capture streams have begun recording properly, i have included detailed lspci output at the end of each file. Additionally i am sending the patch for alsa-driver 1.0.24 that contains the code for the new module as well as the PCI_QUIRKS i have added to hda_intel.c. My working directory is available through at: git://github.com/sashkosnail/AD1989_HDA.git
I will much appreciate any input on the problem.
participants (1)
-
Aleksandar Mihaylov