Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] dvb/cvs: _SFBUF must be called? doh!
- To: linux-dvb@linuxtv.org
- Subject: [linux-dvb] dvb/cvs: _SFBUF must be called? doh!
- From: Guido Draheim <guidod-2003-@gmx.de>
- Date: Wed, 11 Jun 2003 03:45:04 +0200
- Content-type: multipart/mixed;boundary="------------040203090307000200040404"
- Sender: linux-dvb-bounce@linuxtv.org
- User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.1) Gecko/20020826
The _SWIN (set window/format) ioctl call will fail
without a prior call to _SFBUF (set frame buffer).
Reason: move_to() rejects the initial null set into data->buffer
during av7110_*_attach. To require _SFBUF seems wrong to me, but
I did not find a good V4L(1) api description anyway (according
to V4L2 it is really wrong). No _SWIN ioctl can ever succeed ATM.
Just wondering about that while debugging into problems of
my `zapping` v4l viewer with dvb modules for 2.4, cvs version.
Here there is even a more severe problem, as it does also
_read_ the current window size from the driver but the
current dvb modules do not implement this functionality.
The following patch can fix parts of bad behavior
with implementing VIDIOCGWIN / SAA7146_V4L_GWIN.
That one just copies back the data->window area
to the user space. We also change the behavior
of SAA7146_V4L_SWIN slightly, so that the two
data->window.height and .width members are setup
after some successful set_window() call (where
they can be asserted) which is before that move_to()
call that will still fail (for the _SFBUF not yet
performed).
Only with this patch I can run the v4l viewer with
latest cvs dvb drivers (on a siemens dvb-s 1.3).
cheers,
-- guido http://google.de/search?q=guidod
GCS/E/S/P C++/++++$ ULHS L++w- N++@ d(+-) s+a- r+@>+++ y++ 5++X- (geekcode)
? dvb-v4l_gwin-03.patch
Index: driver/av7110/av7110.c
===================================================================
RCS file: /cvs/linuxtv/DVB/driver/av7110/av7110.c,v
retrieving revision 1.52
diff -u -r1.52 av7110.c
--- driver/av7110/av7110.c 2 Jun 2003 18:02:19 -0000 1.52
+++ driver/av7110/av7110.c 11 Jun 2003 01:33:04 -0000
@@ -3091,7 +3091,10 @@
case VIDIOCGWIN:
{
+ struct video_window *w = arg;
dprintk(KERN_ERR "dvb: VIDIOCGWIN called\n");
+
+ saacomm(SAA7146_V4L_GWIN, w);
return 0;
}
Index: driver/av7110/saa7146_v4l.c
===================================================================
RCS file: /cvs/linuxtv/DVB/driver/av7110/saa7146_v4l.c,v
retrieving revision 1.3
diff -u -r1.3 saa7146_v4l.c
--- driver/av7110/saa7146_v4l.c 7 Nov 2002 19:43:32 -0000 1.3
+++ driver/av7110/saa7146_v4l.c 11 Jun 2003 01:33:04 -0000
@@ -153,7 +153,11 @@
video_setmode(saa, 0);
saa7146_write(saa->mem, MC1, (MASK_21));
- set_window(saa, vw->width, vw->height,0,0,0);
+ if (! set_window(saa, vw->width, vw->height,0,0,0))
+ {
+ data->window.height = vw->height;
+ data->window.width = vw->width;
+ }
//saa->port, saa->sync);
if (move_to(saa, vw->x, vw->y, vw->height, data->buffer.width,
data->buffer.depth, data->buffer.bytesperline,
@@ -227,6 +231,12 @@
video_setmode(saa, 1);
break;
}
+ case SAA7146_V4L_GWIN:
+ {
+ memcpy(arg, &data->window, sizeof(struct video_window));
+ break;
+ }
+
case SAA7146_V4L_CCAPTURE:
{
Index: driver/av7110/saa7146_v4l.h
===================================================================
RCS file: /cvs/linuxtv/DVB/driver/av7110/saa7146_v4l.h,v
retrieving revision 1.2
diff -u -r1.2 saa7146_v4l.h
--- driver/av7110/saa7146_v4l.h 10 Oct 2002 19:22:29 -0000 1.2
+++ driver/av7110/saa7146_v4l.h 11 Jun 2003 01:33:04 -0000
@@ -25,6 +25,8 @@
#define SAA7146_V4L_TSCAPTURE _IOW('d', (SAA7146_V4L_BASE+11), int)
+#define SAA7146_V4L_GWIN _IOW('d', (SAA7146_V4L_BASE+12), struct video_window)
+
extern int saa7146_v4l_init (void);
extern void saa7146_v4l_exit (void);
Home |
Main Index |
Thread Index