linuxdvb: add Tune Repeats for frontend
This commit is contained in:
parent
70c65a3fba
commit
82cb4f7f42
2 changed files with 17 additions and 2 deletions
|
@ -91,6 +91,13 @@ const idclass_t linuxdvb_frontend_class =
|
|||
.name = "Power Save",
|
||||
.off = offsetof(linuxdvb_frontend_t, lfe_powersave),
|
||||
},
|
||||
{
|
||||
.type = PT_U32,
|
||||
.id = "tune_repeats",
|
||||
.name = "Tune Repeats",
|
||||
.opts = PO_ADVANCED,
|
||||
.off = offsetof(linuxdvb_frontend_t, lfe_tune_repeats),
|
||||
},
|
||||
{
|
||||
.type = PT_U32,
|
||||
.id = "skip_bytes",
|
||||
|
@ -1283,7 +1290,7 @@ int
|
|||
linuxdvb_frontend_tune1
|
||||
( linuxdvb_frontend_t *lfe, mpegts_mux_instance_t *mmi, uint32_t freq )
|
||||
{
|
||||
int r;
|
||||
int r, i, rep;
|
||||
char buf1[256], buf2[256];
|
||||
|
||||
lfe->mi_display_name((mpegts_input_t*)lfe, buf1, sizeof(buf1));
|
||||
|
@ -1292,7 +1299,14 @@ linuxdvb_frontend_tune1
|
|||
|
||||
/* Tune */
|
||||
tvhtrace("linuxdvb", "%s - tuning", buf1);
|
||||
r = linuxdvb_frontend_tune0(lfe, mmi, freq);
|
||||
rep = lfe->lfe_tune_repeats > 0 ? lfe->lfe_tune_repeats : 0;
|
||||
for (i = 0; i <= rep; i++) {
|
||||
if (i > 0)
|
||||
usleep(15000);
|
||||
r = linuxdvb_frontend_tune0(lfe, mmi, freq);
|
||||
if (r)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Start monitor */
|
||||
if (!r) {
|
||||
|
|
|
@ -111,6 +111,7 @@ struct linuxdvb_frontend
|
|||
* Configuration
|
||||
*/
|
||||
int lfe_powersave;
|
||||
int lfe_tune_repeats;
|
||||
uint32_t lfe_skip_bytes;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue