From: Mauro Carvalho Chehab <maurochehab@gmail.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Gilles Gigan <gilles.gigan@gmail.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: Switching input during capture
Date: Sat, 29 Oct 2011 00:30:12 +0200 [thread overview]
Message-ID: <4EAB2CF4.4040007@gmail.com> (raw)
In-Reply-To: <201110281442.21776.laurent.pinchart@ideasonboard.com>
Em 28-10-2011 14:42, Laurent Pinchart escreveu:
> Hi Gilles,
>
> On Friday 28 October 2011 03:31:53 Gilles Gigan wrote:
>> Hi,
>> I would like to know what is the correct way to switch the current
>> video input during capture on a card with a single BT878 chip and 4
>> inputs
>> (http://store.bluecherry.net/products/PV%252d143-%252d-4-port-video-captur
>> e-card-%2830FPS%29-%252d-OEM.html). I tried doing it in two ways:
>> - using VIDIOC_S_INPUT to change the current input. While this works,
>> the next captured frame shows video from the old input in its top half
>> and video from the new input in the bottom half.
This is is likely easy to fix. The driver has already a logic to prevent changing
the buffer while in the middle of a buffer filling. I suspect that the BKL removal
patches might have broken it somewhat, allowing things like that. basically, it
should be as simple as not allowing changing the input at the top half.
Please try the enclosed patch.
Regards,
Mauro
-
bttv: Avoid switching the video input at the top half.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 3dd0660..6a3be6f 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -3978,7 +3978,7 @@ bttv_irq_switch_video(struct bttv *btv)
bttv_set_dma(btv, 0);
/* switch input */
- if (UNSET != btv->new_input) {
+ if (! btv->curr.top && UNSET != btv->new_input) {
video_mux(btv,btv->new_input);
btv->new_input = UNSET;
}
next prev parent reply other threads:[~2011-10-28 22:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-28 1:31 Switching input during capture Gilles Gigan
2011-10-28 12:42 ` Laurent Pinchart
2011-10-28 22:30 ` Mauro Carvalho Chehab [this message]
2011-10-29 7:52 ` Laurent Pinchart
2011-11-07 14:50 ` Mauro Carvalho Chehab
2011-11-07 22:19 ` Gilles Gigan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EAB2CF4.4040007@gmail.com \
--to=maurochehab@gmail.com \
--cc=gilles.gigan@gmail.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox