Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linuxdvb: add Tune Repeats for frontend
  • Loading branch information
perexg committed Dec 15, 2014
1 parent 70c65a3 commit 82cb4f7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/input/mpegts/linuxdvb/linuxdvb_frontend.c
Expand Up @@ -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",
Expand Down Expand Up @@ -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));
Expand All @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions src/input/mpegts/linuxdvb/linuxdvb_private.h
Expand Up @@ -111,6 +111,7 @@ struct linuxdvb_frontend
* Configuration
*/
int lfe_powersave;
int lfe_tune_repeats;
uint32_t lfe_skip_bytes;

/*
Expand Down

0 comments on commit 82cb4f7

Please sign in to comment.