From a47b6251397b58240a52c6dbd675738316c7c83a Mon Sep 17 00:00:00 2001 From: Marcin Kaluza Date: Tue, 24 Oct 2017 11:50:52 +0200 Subject: [PATCH] New API: keep setting MODULATOR_INPUT_BITRATE compatible with the old way --- ddbridge/ddbridge-modulator.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ddbridge/ddbridge-modulator.c b/ddbridge/ddbridge-modulator.c index 0a00a30..5514849 100644 --- a/ddbridge/ddbridge-modulator.c +++ b/ddbridge/ddbridge-modulator.c @@ -1541,7 +1541,10 @@ static int mod_prop_proc(struct ddb_mod *mod, struct dtv_property *tvp) return mod_set_attenuator(mod->port->dev, tvp->u.data); case MODULATOR_INPUT_BITRATE: - return mod_set_ibitrate(mod, ((u64)tvp->u.data) << 32); + if ((tvp->u.data64 & 0xFFFFFFFF00000000ULL) == 0) + return mod_set_ibitrate(mod, ((u64)tvp->u.data) << 32); + else + return mod_set_ibitrate(mod, tvp->u.data64); case MODULATOR_GAIN: if (mod->port->dev->link[0].info->version == 2)