Gerd Knorr wrote: > > Does the memory appear contiguous to the driver? > > Virtual memory (userspace view) is linear, physical memory is > fragmented. I'm thinking of devices that don't DMA, or need to process the data in the driver. I assume the driver can write to the memory using the userspace address. > > Can the driver create a buffer this way for its own internal use, > > No. It's userspace memory, not kernel memory. Any reason why I > should allocate a buffer for internal use? If the raw data is compressed or in a proprietary format that needs to be converted. USB cameras and the ISA Winnov Videum cards use compression for larger format images because of limited I/O bandwidth. In fact, I swiped the implementation of v4l2_vmalloc_to_bus() from some USB driver. > How do I setup a second, independent stream? Same way you set up the first stream-- REQBUFS, QUERYBUF, mmap(). The second stream has be a different V4L2_BUF_TYPE. QUERYBUF tells you the offset to pass to mmap() to get the right buffer. > I think you can't do that without a second file > handle. In which case > there is no problem -- you can have one mapping per file handle. Yeah, I thought of that after I sent the email. We want to have independent buffers anyway for buffers passed from the app to the driver (assuming we come up with simple extension of the API for this). What is the big advantage to the application of one mmap() per file handle? Bill.