This is a note to let you know that I've just added the patch titled
media: dvb_frontend: Fix a regression when switching back to DVB-S
to the 3.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
media-dvb_frontend-fix-a-regression-when-switching-back-to-dvb-s.patch
and it can be found in the queue-3.3 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 3626479e482aa3247aac03724094ba6c13ea1e46 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <[email protected]>
Date: Tue, 17 Apr 2012 18:32:19 -0300
Subject: media: dvb_frontend: Fix a regression when switching back to DVB-S
From: Mauro Carvalho Chehab <[email protected]>
commit 3626479e482aa3247aac03724094ba6c13ea1e46 upstream.
There are some softwares (Kaffeine and likely xine) that uses a
DVBv5 call to switch to DVB-S2, but expects that a DVBv3 call to
switch back to DVB-S. Well, this is not right, as a DVBv3 call
doesn't know anything about delivery systems.
However, as, by accident, this used to work, we need to restore its
behavior, in order to avoid regressions with those softwares.
Reported on this Fedora 16 bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=812895
Reported-by: Dieter Roever <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/media/dvb/dvb-core/dvb_frontend.c | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -1446,6 +1446,28 @@ static int set_delivery_system(struct dv
__func__);
return -EINVAL;
}
+ /*
+ * Get a delivery system that is compatible with DVBv3
+ * NOTE: in order for this to work with softwares like Kaffeine
that
+ * uses a DVBv5 call for DVB-S2 and a DVBv3 call to go
back to
+ * DVB-S, drivers that support both should put the
SYS_DVBS entry
+ * before the SYS_DVBS2, otherwise it won't switch back to
DVB-S.
+ * The real fix is that userspace applications should not
use DVBv3
+ * and not trust on calling FE_SET_FRONTEND to switch the
delivery
+ * system.
+ */
+ ncaps = 0;
+ while (fe->ops.delsys[ncaps] && ncaps < MAX_DELSYS) {
+ if (fe->ops.delsys[ncaps] == desired_system) {
+ delsys = desired_system;
+ break;
+ }
+ ncaps++;
+ }
+ if (delsys == SYS_UNDEFINED) {
+ dprintk("%s() Couldn't find a delivery system that
matches %d\n",
+ __func__, desired_system);
+ }
} else {
/*
* This is a DVBv5 call. So, it likely knows the supported
@@ -1494,9 +1516,10 @@ static int set_delivery_system(struct dv
__func__);
return -EINVAL;
}
- c->delivery_system = delsys;
}
+ c->delivery_system = delsys;
+
/*
* The DVBv3 or DVBv5 call is requesting a different system. So,
* emulation is needed.
Patches currently in stable-queue which might be from [email protected] are
queue-3.3/media-rc-core-set-mode-for-winbond-cir.patch
queue-3.3/media-dvb_frontend-fix-a-regression-when-switching-back-to-dvb-s.patch
queue-3.3/media-drxk-does-not-unlock-mutex-if-sanity-check-failed-in-scu_command.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html