Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: CVS UNLOCKED



Michael Hunold wrote:

On 10/28/04 19:49, Holger Waechtler schrieb:

I'd like to try to go even one step further and mmap both the TS ringbuffer and a special memory page containing the current DMA pointer, frontend status parameters and the DMA buffer partitioning table to userspace. If this works and makes sense it may simplify the API while allowing trivial-to-implement v3 backward compability.

Hopefully all existing budget cards will support that interface. It would be a pity if there is some hardware design limitation (for example broken or ill dma capabilties) that prevents it from using your proposal.

I think there should be no serious problems, but to verify this we need to set up the testcase. The planned DMA buffer partitioning table and write pointer position exposed to userspace may look like this:

struct dma_stuff {
volatile unsigned long current_dma_buffer; /* last completely filled buffer */
volatile unsigned long dma_pos; /* DMA write pointer in buffer [(current_dma_buffer+1)%num_dma_buffers] */
const int num_dma_buffers;
const struct { unsigned long offset; unsigned long len;} dma_buffer_tab [] = {
/* ... */
};
}

I think this is flexible enough for all the hardware I've seen so far, does anybody knows an exception where this approach may fail?

Holger





Home | Main Index | Thread Index