Fix lowband tuning with tda8261
PATCH 1/1 Fix lowband tuning with tda8261
Attached is a patch which fixes tuning to low frequency channels with stb0899+tda8261 cards like the KNC TV-Station DVB-S2.
The cause of the issue was a broken if construct, which should have been an if/else if, so that the setting for the lowest matching frequency is applied.
Without this patch for example tuning to "arte" on Astra 19.2, 10744MHz SR22000 failed most times and when it failed the communication between driver and tda8261 was completely broken. This problem disappears with the attached patch.
linux/drivers/media/dvb/frontends/tda8261.c +2 -2
@@ -136,9 +136,9 @@if (frequency <1450000 ) buf[3 ] =0x00 ; -if (frequency <2000000 ) +else if (frequency <2000000 ) buf[3 ] =0x40 ; -if (frequency <2150000 ) +else if (frequency <2150000 ) buf[3 ] =0x80 ;/* Set params */
Quoted 11 lines · Julian Scheel
Attached is a patch which fixes tuning to low frequency channels with stb0899+tda8261 cards like the KNC TV-Station DVB-S2.
The cause of the issue was a broken if construct, which should have been an if/else if, so that the setting for the lowest matching frequency is applied.Without this patch for example tuning to "arte" on Astra 19.2, 10744MHz SR22000 failed most times and when it failed the communication between driver and tda8261 was completely broken.
This problem disappears with the attached patch.
Please replay with your Signed Off By.
Alex
Quoted 19 lines
diff -r
6477aa1782d5linux/drivers/media/dvb/frontends/tda8261.c---a/linux/drivers/media/dvb/frontends/tda8261.cTue Jul 21 09:17:24 2009 -0300
+++b/linux/drivers/media/dvb/frontends/tda8261.cFri Jul 31 18:36:07 2009 +0200linux/drivers/media/dvb/frontends/tda8261.c +2
-2@@ -136,9 +136,9 @@ if (frequency < 1450000) buf[3] = 0x00; - if (frequency < 2000000) + else if (frequency < 2000000) buf[3] = 0x40; - if (frequency < 2150000) + else if (frequency < 2150000) buf[3] = 0x80; /* Set params */
Quoted 36 lines · Alex Deucher
Quoted 6 lines · Julian Scheel
Attached is a patch which fixes tuning to low frequency channels with stb0899+tda8261 cards like the KNC TV-Station DVB-S2.
The cause of the issue was a broken if construct, which should have been an if/else if, so that the setting for the lowest matching frequency is applied.Quoted 6 lines
Without this patch for example tuning to "arte" on Astra 19.2, 10744MHz SR22000 failed most times and when it failed the communication between driver and tda8261 was completely broken.
This problem disappears with the attached patch.Please replay with your Signed Off By.
Alex
Quoted 16 lines
diff -r
6477aa1782d5linux/drivers/media/dvb/frontends/tda8261.c
---a/linux/drivers/media/dvb/frontends/tda8261.cTue Jul 21 09:17:24
2009 -0300
+++b/linux/drivers/media/dvb/frontends/tda8261.cFri Jul 31 18:36:07
2009 +0200linux/drivers/media/dvb/frontends/tda8261.c +2
-2@@ -136,9 +136,9 @@if (frequency <1450000 ) buf[3 ] =0x00 ; -if (frequency <2000000 ) +else if (frequency <2000000 ) buf[3 ] =0x40 ; -if (frequency <2150000 ) +else if (frequency <2150000 ) buf[3 ] =0x80 ;
Quoted 4 lines
linux/drivers/media/dvb/frontends/tda8261.c line 144
Quoted 4 lines
linux/drivers/media/dvb/frontends/tda8261.c +0
-0/* Set params */