diff options
author | Andreas Oberritter <obi@linuxtv.org> | 2011-05-08 19:03:37 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 18:51:59 -0400 |
commit | 61cb27af660168e3ad9a8922508c44a7d7453927 (patch) | |
tree | 484d205f76492446d22f31bdfd81ebcf4a8bd2eb /drivers/media | |
parent | e23d9ae343f9d196382ab213612d76126f9c99af (diff) |
[media] DVB: dvb_frontend: rename parameters to parameters_in
- Preparation to distinguish input parameters from output parameters.
Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index fe6cd73620e6..19ffb7178e8f 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -105,7 +105,7 @@ struct dvb_frontend_private { | |||
105 | 105 | ||
106 | /* thread/frontend values */ | 106 | /* thread/frontend values */ |
107 | struct dvb_device *dvbdev; | 107 | struct dvb_device *dvbdev; |
108 | struct dvb_frontend_parameters parameters; | 108 | struct dvb_frontend_parameters parameters_in; |
109 | struct dvb_fe_events events; | 109 | struct dvb_fe_events events; |
110 | struct semaphore sem; | 110 | struct semaphore sem; |
111 | struct list_head list_head; | 111 | struct list_head list_head; |
@@ -160,7 +160,7 @@ static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status) | |||
160 | 160 | ||
161 | e = &events->events[events->eventw]; | 161 | e = &events->events[events->eventw]; |
162 | 162 | ||
163 | memcpy (&e->parameters, &fepriv->parameters, | 163 | memcpy (&e->parameters, &fepriv->parameters_in, |
164 | sizeof (struct dvb_frontend_parameters)); | 164 | sizeof (struct dvb_frontend_parameters)); |
165 | 165 | ||
166 | if (status & FE_HAS_LOCK) | 166 | if (status & FE_HAS_LOCK) |
@@ -277,12 +277,12 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra | |||
277 | int ready = 0; | 277 | int ready = 0; |
278 | int fe_set_err = 0; | 278 | int fe_set_err = 0; |
279 | struct dvb_frontend_private *fepriv = fe->frontend_priv; | 279 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
280 | int original_inversion = fepriv->parameters.inversion; | 280 | int original_inversion = fepriv->parameters_in.inversion; |
281 | u32 original_frequency = fepriv->parameters.frequency; | 281 | u32 original_frequency = fepriv->parameters_in.frequency; |
282 | 282 | ||
283 | /* are we using autoinversion? */ | 283 | /* are we using autoinversion? */ |
284 | autoinversion = ((!(fe->ops.info.caps & FE_CAN_INVERSION_AUTO)) && | 284 | autoinversion = ((!(fe->ops.info.caps & FE_CAN_INVERSION_AUTO)) && |
285 | (fepriv->parameters.inversion == INVERSION_AUTO)); | 285 | (fepriv->parameters_in.inversion == INVERSION_AUTO)); |
286 | 286 | ||
287 | /* setup parameters correctly */ | 287 | /* setup parameters correctly */ |
288 | while(!ready) { | 288 | while(!ready) { |
@@ -348,18 +348,18 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra | |||
348 | fepriv->auto_step, fepriv->auto_sub_step, fepriv->started_auto_step); | 348 | fepriv->auto_step, fepriv->auto_sub_step, fepriv->started_auto_step); |
349 | 349 | ||
350 | /* set the frontend itself */ | 350 | /* set the frontend itself */ |
351 | fepriv->parameters.frequency += fepriv->lnb_drift; | 351 | fepriv->parameters_in.frequency += fepriv->lnb_drift; |
352 | if (autoinversion) | 352 | if (autoinversion) |
353 | fepriv->parameters.inversion = fepriv->inversion; | 353 | fepriv->parameters_in.inversion = fepriv->inversion; |
354 | if (fe->ops.set_frontend) | 354 | if (fe->ops.set_frontend) |
355 | fe_set_err = fe->ops.set_frontend(fe, &fepriv->parameters); | 355 | fe_set_err = fe->ops.set_frontend(fe, &fepriv->parameters_in); |
356 | if (fe_set_err < 0) { | 356 | if (fe_set_err < 0) { |
357 | fepriv->state = FESTATE_ERROR; | 357 | fepriv->state = FESTATE_ERROR; |
358 | return fe_set_err; | 358 | return fe_set_err; |
359 | } | 359 | } |
360 | 360 | ||
361 | fepriv->parameters.frequency = original_frequency; | 361 | fepriv->parameters_in.frequency = original_frequency; |
362 | fepriv->parameters.inversion = original_inversion; | 362 | fepriv->parameters_in.inversion = original_inversion; |
363 | 363 | ||
364 | fepriv->auto_sub_step++; | 364 | fepriv->auto_sub_step++; |
365 | return 0; | 365 | return 0; |
@@ -383,7 +383,7 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe) | |||
383 | if (fepriv->state & FESTATE_RETUNE) { | 383 | if (fepriv->state & FESTATE_RETUNE) { |
384 | if (fe->ops.set_frontend) | 384 | if (fe->ops.set_frontend) |
385 | retval = fe->ops.set_frontend(fe, | 385 | retval = fe->ops.set_frontend(fe, |
386 | &fepriv->parameters); | 386 | &fepriv->parameters_in); |
387 | if (retval < 0) | 387 | if (retval < 0) |
388 | fepriv->state = FESTATE_ERROR; | 388 | fepriv->state = FESTATE_ERROR; |
389 | else | 389 | else |
@@ -413,8 +413,8 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe) | |||
413 | 413 | ||
414 | /* if we're tuned, then we have determined the correct inversion */ | 414 | /* if we're tuned, then we have determined the correct inversion */ |
415 | if ((!(fe->ops.info.caps & FE_CAN_INVERSION_AUTO)) && | 415 | if ((!(fe->ops.info.caps & FE_CAN_INVERSION_AUTO)) && |
416 | (fepriv->parameters.inversion == INVERSION_AUTO)) { | 416 | (fepriv->parameters_in.inversion == INVERSION_AUTO)) { |
417 | fepriv->parameters.inversion = fepriv->inversion; | 417 | fepriv->parameters_in.inversion = fepriv->inversion; |
418 | } | 418 | } |
419 | return; | 419 | return; |
420 | } | 420 | } |
@@ -594,7 +594,7 @@ restart: | |||
594 | 594 | ||
595 | if (fepriv->state & FESTATE_RETUNE) { | 595 | if (fepriv->state & FESTATE_RETUNE) { |
596 | dprintk("%s: Retune requested, FESTATE_RETUNE\n", __func__); | 596 | dprintk("%s: Retune requested, FESTATE_RETUNE\n", __func__); |
597 | params = &fepriv->parameters; | 597 | params = &fepriv->parameters_in; |
598 | fepriv->state = FESTATE_TUNED; | 598 | fepriv->state = FESTATE_TUNED; |
599 | } | 599 | } |
600 | 600 | ||
@@ -616,7 +616,7 @@ restart: | |||
616 | dprintk("%s: Frontend ALGO = DVBFE_ALGO_CUSTOM, state=%d\n", __func__, fepriv->state); | 616 | dprintk("%s: Frontend ALGO = DVBFE_ALGO_CUSTOM, state=%d\n", __func__, fepriv->state); |
617 | if (fepriv->state & FESTATE_RETUNE) { | 617 | if (fepriv->state & FESTATE_RETUNE) { |
618 | dprintk("%s: Retune requested, FESTAT_RETUNE\n", __func__); | 618 | dprintk("%s: Retune requested, FESTAT_RETUNE\n", __func__); |
619 | params = &fepriv->parameters; | 619 | params = &fepriv->parameters_in; |
620 | fepriv->state = FESTATE_TUNED; | 620 | fepriv->state = FESTATE_TUNED; |
621 | } | 621 | } |
622 | /* Case where we are going to search for a carrier | 622 | /* Case where we are going to search for a carrier |
@@ -625,7 +625,7 @@ restart: | |||
625 | */ | 625 | */ |
626 | if (fepriv->algo_status & DVBFE_ALGO_SEARCH_AGAIN) { | 626 | if (fepriv->algo_status & DVBFE_ALGO_SEARCH_AGAIN) { |
627 | if (fe->ops.search) { | 627 | if (fe->ops.search) { |
628 | fepriv->algo_status = fe->ops.search(fe, &fepriv->parameters); | 628 | fepriv->algo_status = fe->ops.search(fe, &fepriv->parameters_in); |
629 | /* We did do a search as was requested, the flags are | 629 | /* We did do a search as was requested, the flags are |
630 | * now unset as well and has the flags wrt to search. | 630 | * now unset as well and has the flags wrt to search. |
631 | */ | 631 | */ |
@@ -636,7 +636,7 @@ restart: | |||
636 | /* Track the carrier if the search was successful */ | 636 | /* Track the carrier if the search was successful */ |
637 | if (fepriv->algo_status == DVBFE_ALGO_SEARCH_SUCCESS) { | 637 | if (fepriv->algo_status == DVBFE_ALGO_SEARCH_SUCCESS) { |
638 | if (fe->ops.track) | 638 | if (fe->ops.track) |
639 | fe->ops.track(fe, &fepriv->parameters); | 639 | fe->ops.track(fe, &fepriv->parameters_in); |
640 | } else { | 640 | } else { |
641 | fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; | 641 | fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; |
642 | fepriv->delay = HZ / 2; | 642 | fepriv->delay = HZ / 2; |
@@ -1076,7 +1076,7 @@ static void dtv_property_legacy_params_sync(struct dvb_frontend *fe) | |||
1076 | { | 1076 | { |
1077 | const struct dtv_frontend_properties *c = &fe->dtv_property_cache; | 1077 | const struct dtv_frontend_properties *c = &fe->dtv_property_cache; |
1078 | struct dvb_frontend_private *fepriv = fe->frontend_priv; | 1078 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
1079 | struct dvb_frontend_parameters *p = &fepriv->parameters; | 1079 | struct dvb_frontend_parameters *p = &fepriv->parameters_in; |
1080 | 1080 | ||
1081 | p->frequency = c->frequency; | 1081 | p->frequency = c->frequency; |
1082 | p->inversion = c->inversion; | 1082 | p->inversion = c->inversion; |
@@ -1124,7 +1124,7 @@ static void dtv_property_adv_params_sync(struct dvb_frontend *fe) | |||
1124 | { | 1124 | { |
1125 | const struct dtv_frontend_properties *c = &fe->dtv_property_cache; | 1125 | const struct dtv_frontend_properties *c = &fe->dtv_property_cache; |
1126 | struct dvb_frontend_private *fepriv = fe->frontend_priv; | 1126 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
1127 | struct dvb_frontend_parameters *p = &fepriv->parameters; | 1127 | struct dvb_frontend_parameters *p = &fepriv->parameters_in; |
1128 | 1128 | ||
1129 | p->frequency = c->frequency; | 1129 | p->frequency = c->frequency; |
1130 | p->inversion = c->inversion; | 1130 | p->inversion = c->inversion; |
@@ -1361,7 +1361,7 @@ static int dtv_property_process_set(struct dvb_frontend *fe, | |||
1361 | dtv_property_cache_submit(fe); | 1361 | dtv_property_cache_submit(fe); |
1362 | 1362 | ||
1363 | r = dvb_frontend_ioctl_legacy(file, FE_SET_FRONTEND, | 1363 | r = dvb_frontend_ioctl_legacy(file, FE_SET_FRONTEND, |
1364 | &fepriv->parameters); | 1364 | &fepriv->parameters_in); |
1365 | break; | 1365 | break; |
1366 | case DTV_FREQUENCY: | 1366 | case DTV_FREQUENCY: |
1367 | fe->dtv_property_cache.frequency = tvp->u.data; | 1367 | fe->dtv_property_cache.frequency = tvp->u.data; |
@@ -1792,7 +1792,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file, | |||
1792 | struct dvb_frontend_tune_settings fetunesettings; | 1792 | struct dvb_frontend_tune_settings fetunesettings; |
1793 | 1793 | ||
1794 | if(fe->dtv_property_cache.state == DTV_TUNE) { | 1794 | if(fe->dtv_property_cache.state == DTV_TUNE) { |
1795 | if (dvb_frontend_check_parameters(fe, &fepriv->parameters) < 0) { | 1795 | if (dvb_frontend_check_parameters(fe, &fepriv->parameters_in) < 0) { |
1796 | err = -EINVAL; | 1796 | err = -EINVAL; |
1797 | break; | 1797 | break; |
1798 | } | 1798 | } |
@@ -1802,9 +1802,9 @@ static int dvb_frontend_ioctl_legacy(struct file *file, | |||
1802 | break; | 1802 | break; |
1803 | } | 1803 | } |
1804 | 1804 | ||
1805 | memcpy (&fepriv->parameters, parg, | 1805 | memcpy (&fepriv->parameters_in, parg, |
1806 | sizeof (struct dvb_frontend_parameters)); | 1806 | sizeof (struct dvb_frontend_parameters)); |
1807 | dtv_property_cache_sync(fe, &fepriv->parameters); | 1807 | dtv_property_cache_sync(fe, &fepriv->parameters_in); |
1808 | } | 1808 | } |
1809 | 1809 | ||
1810 | memset(&fetunesettings, 0, sizeof(struct dvb_frontend_tune_settings)); | 1810 | memset(&fetunesettings, 0, sizeof(struct dvb_frontend_tune_settings)); |
@@ -1813,15 +1813,15 @@ static int dvb_frontend_ioctl_legacy(struct file *file, | |||
1813 | 1813 | ||
1814 | /* force auto frequency inversion if requested */ | 1814 | /* force auto frequency inversion if requested */ |
1815 | if (dvb_force_auto_inversion) { | 1815 | if (dvb_force_auto_inversion) { |
1816 | fepriv->parameters.inversion = INVERSION_AUTO; | 1816 | fepriv->parameters_in.inversion = INVERSION_AUTO; |
1817 | fetunesettings.parameters.inversion = INVERSION_AUTO; | 1817 | fetunesettings.parameters.inversion = INVERSION_AUTO; |
1818 | } | 1818 | } |
1819 | if (fe->ops.info.type == FE_OFDM) { | 1819 | if (fe->ops.info.type == FE_OFDM) { |
1820 | /* without hierarchical coding code_rate_LP is irrelevant, | 1820 | /* without hierarchical coding code_rate_LP is irrelevant, |
1821 | * so we tolerate the otherwise invalid FEC_NONE setting */ | 1821 | * so we tolerate the otherwise invalid FEC_NONE setting */ |
1822 | if (fepriv->parameters.u.ofdm.hierarchy_information == HIERARCHY_NONE && | 1822 | if (fepriv->parameters_in.u.ofdm.hierarchy_information == HIERARCHY_NONE && |
1823 | fepriv->parameters.u.ofdm.code_rate_LP == FEC_NONE) | 1823 | fepriv->parameters_in.u.ofdm.code_rate_LP == FEC_NONE) |
1824 | fepriv->parameters.u.ofdm.code_rate_LP = FEC_AUTO; | 1824 | fepriv->parameters_in.u.ofdm.code_rate_LP = FEC_AUTO; |
1825 | } | 1825 | } |
1826 | 1826 | ||
1827 | /* get frontend-specific tuning settings */ | 1827 | /* get frontend-specific tuning settings */ |
@@ -1834,8 +1834,8 @@ static int dvb_frontend_ioctl_legacy(struct file *file, | |||
1834 | switch(fe->ops.info.type) { | 1834 | switch(fe->ops.info.type) { |
1835 | case FE_QPSK: | 1835 | case FE_QPSK: |
1836 | fepriv->min_delay = HZ/20; | 1836 | fepriv->min_delay = HZ/20; |
1837 | fepriv->step_size = fepriv->parameters.u.qpsk.symbol_rate / 16000; | 1837 | fepriv->step_size = fepriv->parameters_in.u.qpsk.symbol_rate / 16000; |
1838 | fepriv->max_drift = fepriv->parameters.u.qpsk.symbol_rate / 2000; | 1838 | fepriv->max_drift = fepriv->parameters_in.u.qpsk.symbol_rate / 2000; |
1839 | break; | 1839 | break; |
1840 | 1840 | ||
1841 | case FE_QAM: | 1841 | case FE_QAM: |
@@ -1877,7 +1877,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file, | |||
1877 | 1877 | ||
1878 | case FE_GET_FRONTEND: | 1878 | case FE_GET_FRONTEND: |
1879 | if (fe->ops.get_frontend) { | 1879 | if (fe->ops.get_frontend) { |
1880 | memcpy (parg, &fepriv->parameters, sizeof (struct dvb_frontend_parameters)); | 1880 | memcpy (parg, &fepriv->parameters_in, sizeof (struct dvb_frontend_parameters)); |
1881 | err = fe->ops.get_frontend(fe, (struct dvb_frontend_parameters*) parg); | 1881 | err = fe->ops.get_frontend(fe, (struct dvb_frontend_parameters*) parg); |
1882 | } | 1882 | } |
1883 | break; | 1883 | break; |