aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/firewire/firedtv-avc.c
diff options
context:
space:
mode:
authorTommy Jonsson <quazzie2@gmail.com>2010-09-12 16:03:45 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 07:54:09 -0200
commitd2fd44a33083973157d6e0e0e8bcfd5faa214bbb (patch)
tree0e7c54a391db750e543397ba9ad61733942524a6 /drivers/media/dvb/firewire/firedtv-avc.c
parentb4d752b308493b08b51ea04361848ef63d0cad42 (diff)
downloadkernel_samsung_smdk4412-d2fd44a33083973157d6e0e0e8bcfd5faa214bbb.zip
kernel_samsung_smdk4412-d2fd44a33083973157d6e0e0e8bcfd5faa214bbb.tar.gz
kernel_samsung_smdk4412-d2fd44a33083973157d6e0e0e8bcfd5faa214bbb.tar.bz2
[media] firedtv: support for PSK8 for S2 devices. To watch HD
Add support for tuning with PSK8 modulation, pilot and rolloff with the S2 versions of firedtv. Signed-off-by: Tommy Jonsson <quazzie2@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (trivial simplification) Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/firewire/firedtv-avc.c')
-rw-r--r--drivers/media/dvb/firewire/firedtv-avc.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/drivers/media/dvb/firewire/firedtv-avc.c b/drivers/media/dvb/firewire/firedtv-avc.c
index 28294af..1f3d1fb 100644
--- a/drivers/media/dvb/firewire/firedtv-avc.c
+++ b/drivers/media/dvb/firewire/firedtv-avc.c
@@ -24,6 +24,8 @@
#include <linux/wait.h>
#include <linux/workqueue.h>
+#include <dvb_frontend.h>
+
#include "firedtv.h"
#define FCP_COMMAND_REGISTER 0xfffff0000b00ULL
@@ -368,10 +370,30 @@ static int avc_tuner_tuneqpsk(struct firedtv *fdtv,
c->operand[12] = 0;
if (fdtv->type == FIREDTV_DVB_S2) {
- c->operand[13] = 0x1;
- c->operand[14] = 0xff;
- c->operand[15] = 0xff;
-
+ if (fdtv->fe.dtv_property_cache.delivery_system == SYS_DVBS2) {
+ switch (fdtv->fe.dtv_property_cache.modulation) {
+ case QAM_16: c->operand[13] = 0x1; break;
+ case QPSK: c->operand[13] = 0x2; break;
+ case PSK_8: c->operand[13] = 0x3; break;
+ default: c->operand[13] = 0x2; break;
+ }
+ switch (fdtv->fe.dtv_property_cache.rolloff) {
+ case ROLLOFF_AUTO: c->operand[14] = 0x2; break;
+ case ROLLOFF_35: c->operand[14] = 0x2; break;
+ case ROLLOFF_20: c->operand[14] = 0x0; break;
+ case ROLLOFF_25: c->operand[14] = 0x1; break;
+ /* case ROLLOFF_NONE: c->operand[14] = 0xff; break; */
+ }
+ switch (fdtv->fe.dtv_property_cache.pilot) {
+ case PILOT_AUTO: c->operand[15] = 0x0; break;
+ case PILOT_OFF: c->operand[15] = 0x0; break;
+ case PILOT_ON: c->operand[15] = 0x1; break;
+ }
+ } else {
+ c->operand[13] = 0x1; /* auto modulation */
+ c->operand[14] = 0xff; /* disable rolloff */
+ c->operand[15] = 0xff; /* disable pilot */
+ }
return 16;
} else {
return 13;