Re: DMA Transfer problem



Thank You, James,

But the problem with sound card drivers are that they dont have a configurable clock on them, do they??? and as far as i know, this ADC card involves a lot of register writings for the counter ICs that help configuring the clock speed for the DMA transfer.... First we set the control properties, which involves the IRQ, start channel, stop channel, etc (the card is an 8-channel ADC), (the jumper settings configure the DMA channels that should be used, 1 or 3). Now we initialize the DMA controller, so that it throws an interrupt once the transfer of DMA_COUNT samples of data. The interrupt service routine for this interrupt can handle the data transfer to the user program. Roughly thats how the driver works... Now, the problem is that, when running on the Chino-Laxsons board PCs, the DMA transfers take varying time to complete (say, if one transfer takes one second, the next might take one and a half), but this is not supposed to (and doesnt) happen on any other machines we tested on. Its absolutely synchronous with the clock, and theres the minimal drift. Can anyone suggest why this could be happening on this particular board??? And another interesting thing is that, this card seems to work fine with the Windows driver available to it (provided by the company.). I need help on this very urgently. If anybody has had any such experience, and solved it, please let me know.

Thanks in advance,
Harish.

James Courtier-Dutton wrote:

Harish K Harshan wrote:

Hello,

Im having problems with DMA transfer on Linux, for an ADC card. The card is AxiomTek AX5621H, and can use DMA channels 1 and 3. I tried both the channels, but the DMA transfers are irregular (i.e.) at different speeds (which of course is not acceptable, since that application is time critical). The device driver (which I wrote) seems to work fine for all the other systems I tried it on. But this problem occurs only on one particular model of computer (Chino-Laxsons Pentium-4 boards). I tried another system with the same configuration, but the same resulted. After some time of execution, I get the kernel panic screen, which says the CPU context is corrupt. Please help me with this problem, as I need to get this driver working somehow on the P4 systems. I tried the Redhat-9 kernel (2.4.20-8) and the debian kernel too (2.2.20).... gave the same results.

Could an ADC card be treated as a ALSA sound card PCM device.
That card seems to have features very similar to a sound card.
Sample rate.
Variable gain.
Multi-channels.
ADC
DMA

I only suggest this, because it could result in a driver that is much easier to implement as ALSA supplies a lot of generalised support code at the kernel level.

James

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Relevant Pages

  • Re: Reading audio samples immediately
    ... driver assembly code for my particular soundcard and set up, ... stopped the card and the DMA controller myself. ... wishing some special mode would be created for use of real-time sound. ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Udp sending performance in Gbit Ethernet
    ... > saw a sudden drop of perfromance for certain packet sizes. ... > there can be just so many reasons like interrupts and DMA. ... > such as the maximum DMA block size or alike, which forces the driver to ... Try different versions of the driver for the card. ...
    (microsoft.public.development.device.drivers)
  • RE: [UPDATED PATCH] EFI support for ia32 kernels
    ... >> reuse a single driver image for multiple architectures assuming there ... As one of the people responsible for the EFI Specification and our ... Perhaps the UNDI network card interface that Intel developed ... BIOS can't shadow that much ROM code. ...
    (Linux-Kernel)
  • Re: Udp sending performance in Gbit Ethernet
    ... >> saw a sudden drop of perfromance for certain packet sizes. ... >> such as the maximum DMA block size or alike, which forces the driver to ... >> split frames into several DMA transfers. ... Try different versions of the driver for the card. ...
    (microsoft.public.development.device.drivers)
  • Re: Linux, X, ld, gcc, linking, shared libraries and stuff
    ... >> because, originally, video cards / system RAM could NOT afford to have ... > GL actually "copies" everything, but it's done by the graphics card, so ... > anyway if it's not hardware accelerated. ... installed the proper driver, then it zooms around the screen... ...
    (alt.lang.asm)