Re[2]: NVrec - V4L1 interface ( does mmap() work with bttv 0.8.16? )

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



Hello Justin,

Friday, June 08, 2001, 2:22:51 AM, you wrote:

JS> Eugene Kuznetsov wrote:
>> >> Next question is, why mmap() is failing? I tried to add a couple
>> >> of printk()'s to find out what happens, and this looks quite weird
>> >> for me. One of the first sanity checks in bttv_mmap() ( sources of
>> >> 0.8.16 ) fails. It is:
>> >>
>> >>         if (!(vma->vm_flags & VM_SHARED))
>> >>             return -EINVAL;
>> >>
>> >> But, if I correctly understood what happens during the mmap() syscall
>> >> ( /usr/src/linux/mm/mmap.c ), VM_SHARED flag is not set for mapping
>> >> areas read-only! I tried to change protection in parameters to
>> >> mmap(), but only to receive 'permission denied' instead of 'invalid
>> >> argument', even as root.
>> 
>> JS> Umm.. Try the attached patch - this may work...
>> 
>> As I already mentioned, applying this change does not help, because
>> then I receive 'permission denied'.

JS> Now that is strange... The patched mmap command is now identical to that
JS> used in xawtv!  Has anybody else gotten this to work with bttv 0.8.16? 
JS> If so, please let us know how!

This problem was really simple - you can't mmap() read-write when the
device is opened read-only. After I fixed that, I even managed to
capture something. I'll give more details tomorrow.

-- 
Best regards,
 Eugene



NetZero Platinum
No Banner Ads and Unlimited Access
Sign Up Today - Only $9.95 per month!
http://www.netzero.net





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux