Mailing List archive

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

[linux-dvb] Re: C/A routing Question



Ralph Metzler wrote:
Johannes Stezenbach writes:
> > - Move the memory frontends to separate devices.
> > Either also call them frontend with type memory frontend
> > or call them memfrontend, mfrontend, dvrin, ... whatever
> > They should offer mmap, write, etc. maybe even a software controlled
> > rate control (some chips have it in hardware) to allow for decent > > non-blocking writing.
> > Each demuxN can select which frontend (no matter if real or memory)
> > to use as input.
> > I seen that you've already defined FE_MEMORY and FE_NET in your
> version of the API header files.
> > I for one would be happy with a /dev/.../frontend of type FE_MEMORY.
> How do we handle capabilites, i.e. if we can feed TS, PS and/or AVPES
> into the frontend? Is this handled by the demux that we connect to
> the frontend?

Yes, this should be the responsibility of the demux. Just add
capability ioctls there.
The frontend could be rather dumb. Syncing to TS boundaries, etc. can
also be handled by the demux. It will have to do that anyway for budget cards which deliver unaligned data (e.g. Bt878/fusion cards).
Demux hardware usually does it by itself.

> I'm not shure how to handle DMA capable playback from HDD or DVD.
> Maybe someone else has an idea.

Not so easy to answer. mmap only saves one copy.
DMA to/from user mem would of course be best. Wasn't there some
discussion beore how to do that for the HDD side?
it's possible but not easy. I tried to investigate this a while ago, maybe the architecture in the kernel changed a bit. In those days you would had to access the filesystem's kiobuf's directly and needed to struggle around with the dirty-flags manually in order to keep your filesystem consistent.

The basic idea for playback was to grab a memory mapped buffer in the filesystem, fault this page so that the buffer will get swapped in, then pass this buffer to the (currently inactive) DMA pointer of the demux.

On the recording side we would have to resize the file, then grab the new buffer, pass it to the DMA engine until the MPEG data is written into this buffer, mark this buffer as dirty and flush it.

A bit later there was a long discussion about the O_DIRECT flag in the 2.5 kernel filesystem code on the lkml, but this flag was designed for database-alike filesystem accesses. Maybe everything is getting easier now but I'm not sure because I did not followed the 2.5 filesystem development last time close enough.

Holger



--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index