From 25009b3afd2de3c5b3a5ef92a216c73142921b3d Mon Sep 17 00:00:00 2001 From: internal <> Date: Mon, 12 Jun 2023 11:32:14 +0200 Subject: [PATCH] forgot to check in setmod1.c --- apps/setmod1.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 apps/setmod1.c diff --git a/apps/setmod1.c b/apps/setmod1.c new file mode 100644 index 0000000..41e11d5 --- /dev/null +++ b/apps/setmod1.c @@ -0,0 +1,33 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +int main() +{ + int fd; + struct dvb_mod_params mp; + struct dvb_mod_channel_params mc; + + fd = open("/dev/dvb/adapter1/mod0", O_RDONLY); + + mp.base_frequency = 722000000; + mp.attenuator = 0; + ioctl(fd, DVB_MOD_SET, &mp); + + mc.modulation = QAM_256; + mc.input_bitrate = 40000000ULL << 32; + mc.pcr_correction = 0; + ioctl(fd, DVB_MOD_CHANNEL_SET, &mc); + close(fd); +} +