aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-12-24 08:18:24 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-31 05:43:24 -0500
commit47b163af01068789594e950fa3a96a73576588ad (patch)
tree77ba74d13fe2c13b1c5abb793499d7c8c4e851f5 /drivers/media/dvb/dvb-usb
parentafd2b38a094c60d9a18b1a9b00bf6c879071d7a1 (diff)
[media] dib0700_devices: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to set the tuner Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r--drivers/media/dvb/dvb-usb/dib0700_devices.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index d0174fd9a087..70c3be6a1ec2 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -806,11 +806,12 @@ static struct dib0070_config dib7770p_dib0070_config = {
806 806
807static int dib7070_set_param_override(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep) 807static int dib7070_set_param_override(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep)
808{ 808{
809 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
809 struct dvb_usb_adapter *adap = fe->dvb->priv; 810 struct dvb_usb_adapter *adap = fe->dvb->priv;
810 struct dib0700_adapter_state *state = adap->priv; 811 struct dib0700_adapter_state *state = adap->priv;
811 812
812 u16 offset; 813 u16 offset;
813 u8 band = BAND_OF_FREQUENCY(fep->frequency/1000); 814 u8 band = BAND_OF_FREQUENCY(p->frequency/1000);
814 switch (band) { 815 switch (band) {
815 case BAND_VHF: offset = 950; break; 816 case BAND_VHF: offset = 950; break;
816 case BAND_UHF: 817 case BAND_UHF:
@@ -824,11 +825,12 @@ static int dib7070_set_param_override(struct dvb_frontend *fe, struct dvb_fronte
824static int dib7770_set_param_override(struct dvb_frontend *fe, 825static int dib7770_set_param_override(struct dvb_frontend *fe,
825 struct dvb_frontend_parameters *fep) 826 struct dvb_frontend_parameters *fep)
826{ 827{
827 struct dvb_usb_adapter *adap = fe->dvb->priv; 828 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
828 struct dib0700_adapter_state *state = adap->priv; 829 struct dvb_usb_adapter *adap = fe->dvb->priv;
830 struct dib0700_adapter_state *state = adap->priv;
829 831
830 u16 offset; 832 u16 offset;
831 u8 band = BAND_OF_FREQUENCY(fep->frequency/1000); 833 u8 band = BAND_OF_FREQUENCY(p->frequency/1000);
832 switch (band) { 834 switch (band) {
833 case BAND_VHF: 835 case BAND_VHF:
834 dib7000p_set_gpio(fe, 0, 0, 1); 836 dib7000p_set_gpio(fe, 0, 0, 1);
@@ -1208,11 +1210,12 @@ static struct dib0070_config dib807x_dib0070_config[2] = {
1208static int dib807x_set_param_override(struct dvb_frontend *fe, 1210static int dib807x_set_param_override(struct dvb_frontend *fe,
1209 struct dvb_frontend_parameters *fep) 1211 struct dvb_frontend_parameters *fep)
1210{ 1212{
1213 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
1211 struct dvb_usb_adapter *adap = fe->dvb->priv; 1214 struct dvb_usb_adapter *adap = fe->dvb->priv;
1212 struct dib0700_adapter_state *state = adap->priv; 1215 struct dib0700_adapter_state *state = adap->priv;
1213 1216
1214 u16 offset = dib0070_wbd_offset(fe); 1217 u16 offset = dib0070_wbd_offset(fe);
1215 u8 band = BAND_OF_FREQUENCY(fep->frequency/1000); 1218 u8 band = BAND_OF_FREQUENCY(p->frequency/1000);
1216 switch (band) { 1219 switch (band) {
1217 case BAND_VHF: 1220 case BAND_VHF:
1218 offset += 750; 1221 offset += 750;
@@ -1506,9 +1509,10 @@ static struct dib0090_config dib809x_dib0090_config = {
1506static int dib8096_set_param_override(struct dvb_frontend *fe, 1509static int dib8096_set_param_override(struct dvb_frontend *fe,
1507 struct dvb_frontend_parameters *fep) 1510 struct dvb_frontend_parameters *fep)
1508{ 1511{
1512 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
1509 struct dvb_usb_adapter *adap = fe->dvb->priv; 1513 struct dvb_usb_adapter *adap = fe->dvb->priv;
1510 struct dib0700_adapter_state *state = adap->priv; 1514 struct dib0700_adapter_state *state = adap->priv;
1511 u8 band = BAND_OF_FREQUENCY(fep->frequency/1000); 1515 u8 band = BAND_OF_FREQUENCY(p->frequency/1000);
1512 u16 target; 1516 u16 target;
1513 int ret = 0; 1517 int ret = 0;
1514 enum frontend_tune_state tune_state = CT_SHUTDOWN; 1518 enum frontend_tune_state tune_state = CT_SHUTDOWN;
@@ -1822,6 +1826,7 @@ struct dibx090p_adc dib8090p_adc_tab[] = {
1822static int dib8096p_agc_startup(struct dvb_frontend *fe, 1826static int dib8096p_agc_startup(struct dvb_frontend *fe,
1823 struct dvb_frontend_parameters *fep) 1827 struct dvb_frontend_parameters *fep)
1824{ 1828{
1829 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
1825 struct dvb_usb_adapter *adap = fe->dvb->priv; 1830 struct dvb_usb_adapter *adap = fe->dvb->priv;
1826 struct dib0700_adapter_state *state = adap->priv; 1831 struct dib0700_adapter_state *state = adap->priv;
1827 struct dibx000_bandwidth_config pll; 1832 struct dibx000_bandwidth_config pll;
@@ -1841,7 +1846,7 @@ static int dib8096p_agc_startup(struct dvb_frontend *fe,
1841 dib8000_set_wbd_ref(fe, target); 1846 dib8000_set_wbd_ref(fe, target);
1842 1847
1843 1848
1844 while (fep->frequency / 1000 > adc_table->freq) { 1849 while (p->frequency / 1000 > adc_table->freq) {
1845 better_sampling_freq = 1; 1850 better_sampling_freq = 1;
1846 adc_table++; 1851 adc_table++;
1847 } 1852 }