From 9517d698dcb485dd7af5276d724bf227f4621140 Mon Sep 17 00:00:00 2001 From: rjkm Date: Sat, 12 Feb 2022 15:47:09 +0100 Subject: [PATCH] update modulator defines and structs --- ddbridge/ddbridge-mci.h | 125 +++++++++++++++++++++++++++------------- 1 file changed, 84 insertions(+), 41 deletions(-) diff --git a/ddbridge/ddbridge-mci.h b/ddbridge/ddbridge-mci.h index 144f4ef..e9950cb 100644 --- a/ddbridge/ddbridge-mci.h +++ b/ddbridge/ddbridge-mci.h @@ -188,49 +188,80 @@ /********************************************************/ -#define MOD_SETUP_CHANNELS (0x60) -#define MOD_SETUP_OUTPUT (0x61) -#define MOD_SETUP_STREAM (0x62) -#define MOD_SET_STREAM_CHANNEL (0x63) +#define MOD_SETUP_CHANNELS (0x60) +#define MOD_SETUP_OUTPUT (0x61) +#define MOD_SETUP_STREAM (0x62) +#define MOD_SET_STREAM_CHANNEL (0x63) -#define MOD_SETUP_FLAG_FIRST (0x01) -#define MOD_SETUP_FLAG_LAST (0x02) -#define MOD_SETUP_FLAG_VALID (0x80) +#define MOD_SETUP_FLAG_FIRST (0x01) +#define MOD_SETUP_FLAG_LAST (0x02) +#define MOD_SETUP_FLAG_VALID (0x80) -#define MOD_STANDARD_GENERIC (0x00) -#define MOD_STANDARD_DVBT_8 (0x01) -#define MOD_STANDARD_DVBT_7 (0x02) -#define MOD_STANDARD_DVBT_6 (0x03) -#define MOD_STANDARD_DVBT_5 (0x04) +#define MOD_STANDARD_GENERIC (0x00) +#define MOD_STANDARD_DVBT_8 (0x01) +#define MOD_STANDARD_DVBT_7 (0x02) +#define MOD_STANDARD_DVBT_6 (0x03) +#define MOD_STANDARD_DVBT_5 (0x04) -#define MOD_CONNECTOR_OFF (0x00) -#define MOD_CONNECTOR_F (0x01) -#define MOD_CONNECTOR_SMA (0x02) +#define MOD_STANDARD_DVBC_8 (0x08) +#define MOD_STANDARD_DVBC_7 (0x09) +#define MOD_STANDARD_DVBC_6 (0x0A) -#define MOD_UNIT_DBUV (0x00) -#define MOD_UNIT_DBM (0x01) +#define MOD_STANDARD_J83A_8 (MOD_STANDARD_DVBC_8) +#define MOD_STANDARD_J83A_7 (MOD_STANDARD_DVBC_7) +#define MOD_STANDARD_J83A_6 (MOD_STANDARD_DVBC_6) -#define MOD_FORMAT_DEFAULT (0x00) -#define MOD_FORMAT_IQ16 (0x01) -#define MOD_FORMAT_IQ8 (0x02) -#define MOD_FORMAT_IDX8 (0x03) -#define MOD_FORMAT_TS (0x04) +#define MOD_STANDARD_J83B_QAM64 (0x0B) +#define MOD_STANDARD_J83B_QAM256 (0x0C) -#define MOD_DVBT_FFT_8K (0x01) -#define MOD_DVBT_GI_1_32 (0x00) -#define MOD_DVBT_GI_1_16 (0x01) -#define MOD_DVBT_GI_1_8 (0x02) -#define MOD_DVBT_GI_1_4 (0x03) +#define MOD_STANDARD_ISDBC_QAM64 (0x0D) +#define MOD_STANDARD_ISDBC_QAM256 (0x0E) -#define MOD_DVBT_PR_1_2 (0x00) -#define MOD_DVBT_PR_2_3 (0x01) -#define MOD_DVBT_PR_3_4 (0x02) -#define MOD_DVBT_PR_5_6 (0x03) -#define MOD_DVBT_PR_7_8 (0x04) +#define MOD_STANDARD_J83C_QAM64 (MOD_STANDARD_ISDBC_QAM64 ) +#define MOD_STANDARD_J83C_QAM256 (MOD_STANDARD_ISDBC_QAM256) -#define MOD_DVBT_QPSK (0x00) -#define MOD_DVBT_16QAM (0x01) -#define MOD_DVBT_64QAM (0x02) +#define MOD_CONNECTOR_OFF (0x00) +#define MOD_CONNECTOR_F (0x01) +#define MOD_CONNECTOR_SMA (0x02) + +#define MOD_UNIT_DBUV (0x00) +#define MOD_UNIT_DBM (0x01) + +#define MOD_FORMAT_DEFAULT (0x00) +#define MOD_FORMAT_IQ16 (0x01) +#define MOD_FORMAT_IQ8 (0x02) +#define MOD_FORMAT_IDX8 (0x03) +#define MOD_FORMAT_TS (0x04) + +#define MOD_DVBT_FFT_8K (0x01) +#define MOD_DVBT_GI_1_32 (0x00) +#define MOD_DVBT_GI_1_16 (0x01) +#define MOD_DVBT_GI_1_8 (0x02) +#define MOD_DVBT_GI_1_4 (0x03) + +#define MOD_DVBT_PR_1_2 (0x00) +#define MOD_DVBT_PR_2_3 (0x01) +#define MOD_DVBT_PR_3_4 (0x02) +#define MOD_DVBT_PR_5_6 (0x03) +#define MOD_DVBT_PR_7_8 (0x04) + +#define MOD_DVBT_QPSK (0x00) +#define MOD_DVBT_16QAM (0x01) +#define MOD_DVBT_64QAM (0x02) + +#define MOD_QAM_DVBC_16 (0x00) +#define MOD_QAM_DVBC_32 (0x01) +#define MOD_QAM_DVBC_64 (0x02) +#define MOD_QAM_DVBC_128 (0x03) +#define MOD_QAM_DVBC_256 (0x04) + +#define MOD_QAM_J83B_64 (0x05) +#define MOD_QAM_J83B_256 (0x06) + +#define MOD_QAM_GENERIC (0x07) + +#define MOD_QAM_ISDBC_64 (0x08) +#define MOD_QAM_ISDBC_256 (0x09) struct mod_setup_channels { u8 flags; @@ -242,17 +273,29 @@ struct mod_setup_channels { u32 bandwidth; /* used only when Standard == 0 */ }; +struct mod_ofdm_parameter { + u8 fft_size; /* 0 = 2K, 1 = 8K (2K not yet supported) */ + u8 guard_interval; /* 0 = 1/32, 1 = 1/16, 2 = 1/8, 3 = 1/4 (DVB-T Encoding) */ + u8 puncture_rate; /* 0 = 1/2, 1 = 2/3, 2 = 3/4, 3 = 5/6, 4 = 7/8 (DVB-T Encoding) */ + u8 constellation; /* MOD_DVBT_QPSK, MOD_DVBT_16QAM, MOD_DVBT_64QAM */ + u8 rsvd2[2]; /* Reserved for DVB-T hierarchical */ + u16 cell_identifier; +}; + +struct mod_qam_parameter { + u8 modulation; + u8 rolloff; /* Legal values: 12,13,15,18 */ +}; + struct mod_setup_stream { u8 standard; u8 stream_format; u8 rsvd1[2]; u32 symbol_rate; /* only used when Standard doesn't define a fixed symbol rate */ - u8 fft_size; /* 0 = 2K, 1 = 8K (2K yet supported) */ - u8 guard_interval; /* 0 = 1/32, 1 = 1/16, 2 = 1/8, 3 = 1/4 (DVB-T Encoding) */ - u8 puncture_rate; /* 0 = 1/2, 1 = 2/3, 2 = 3/4, 3 = 5/6, 4 = 7/8 (DVB-T Encoding) */ - u8 constellation; - u8 rsvd2[2]; /* Reserved for DVB-T hierarchical */ - u16 cell_identifier; + union { + struct mod_ofdm_parameter ofdm; + struct mod_qam_parameter qam; + }; }; struct mod_setup_output {