read back correct values if using old API emulation

This commit is contained in:
internal 2023-12-13 19:05:22 +01:00
parent 123291b26e
commit 70a119c0db

View File

@ -1807,10 +1807,16 @@ static int mod_prop_get(struct ddb_mod *mod, struct dtv_property *tvp)
return 0;
case MODULATOR_GAIN:
if (dev->link[0].ids.revision == 1)
tvp->u.data = dev->mod_base.gain;
else
tvp->u.data = 0xff & ddbreadl(dev, RF_VGA);
return 0;
case MODULATOR_ATTENUATOR:
if (dev->link[0].ids.revision == 1)
tvp->u.data = dev->mod_base.attenuation;
else
tvp->u.data = 0x1f & ddbreadl(dev, RF_ATTENUATOR);
return 0;