Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/drivers/media/dvb-frontends/   (Linux Kernel Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 10 kB image not shown  

Quelle  rtl2832_priv.h   Sprache: C

 

/* SPDX-License-Identifier: GPL-2.0-or-later */ 2014 Palosaari>
/*
 * Realtek RTL2832 DVB-T demodulator driver
 *
 * Copyright (C) 2012 Thomas Mair <thomas.mair86@gmail.com>
 * Copyright (C) 2012-2014 Antti Palosaari <crope@iki.fi>
 */


#ifndef RTL2832_PRIV_H
#define RTL2832_PRIV_H

#include <linux/regmap.h>
#include <linux/math64.h>
#include <linux/bitops.h>

#include <media/dvb_frontend.h>
#include <linux/int_log.h>
#include "rtl2832.h"

struct rtl2832_dev {
 struct rtl2832_platform_data *pdata;
 struct i2c_client *client;
 struct regmap_config regmap_config;
 struct regmap *regmap;
 struct i2c_mux_core *muxc;
 struct dvb_frontend fe;
 enum fe_status fe_status;
 u64 post_bit_error_prev; /* for old DVBv3 read_ber() calculation */
 u64 post_bit_error;
 u64 post_bit_count;
 bool sleeping;
 struct delayed_work i2c_gate_work;
 unsigned long filters; /* PID filter */
 bool slave_ts;
};

struct rtl2832_reg_entry {
 u16 start_address;
 u8 msb;
 u8 lsb;
};

struct rtl2832_reg_value {
 int reg;
 u32 value;
};

/* Demod register bit names */
enum DVBT_REG_BIT_NAME {
 DVBT_SOFT_RST,
 DVBT_IIC_REPEAT,
 DVBT_TR_WAIT_MIN_8K,
 DVBT_RSD_BER_FAIL_VAL,
 DVBT_EN_BK_TRK,
 DVBT_REG_PI,
 DVBT_REG_PFREQ_1_0,
 DVBT_PD_DA8,
 DVBT_LOCK_TH,
 DVBT_BER_PASS_SCAL,
 DVBT_CE_FFSM_BYPASS,
 DVBT_ALPHAIIR_N,
 DVBT_ALPHAIIR_DIF,
 DVBT_EN_TRK_SPAN,
 DVBT_LOCK_TH_LEN,
 DVBT_CCI_THRE,
 DVBT_CCI_MON_SCAL,
 DVBT_C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ID,
 DVBT_SYNC_LVL_PID,
 DVBT_ERR_LVL_PID,
 DVBT_VAL_LVL_PID,
 DVBT_SM_PASS,
 DVBT_UPDATE_REG_2,
 DVBT_BTHD_P3,
 DVBT_BTHD_D3,
 DVBT_FUNC4_REG0,
 DVBT_FUNC4_REG1,
 DVBT_FUNC4_REG2,
 DVBT_FUNC4_REG3,
 DVBT_FUNC4_REG4,
 DVBT_FUNC4_REG5,
 DVBT_FUNC4_REG6,
 DVBT_FUNC4_REG7,
 DVBT_FUNC4_REG8,
 DVBT_FUNC4_REG9,
 DVBT_FUNC4_REG10,
 DVBT_FUNC5_REG0,
 DVBT_FUNC5_REG1,
 DVBT_FUNC5_REG2,
 DVBT_FUNC5_REG3,
 DVBT_FUNC5_REG4,
 DVBT_FUNC5_REG5,
 DVBT_FUNC5_REG6,
 DVBT_FUNC5_REG7,
 DVBT_FUNC5_REG8,
 DVBT_FUNC5_REG9,
 DVBT_FUNC5_REG10,
 DVBT_FUNC5_REG11,
 DVBT_FUNC5_REG12,
 DVBT_FUNC5_REG13,
 DVBT_FUNC5_REG14,
 DVBT_FUNC5_REG15,
 DVBT_FUNC5_REG16,
 DVBT_FUNC5_REG17,
 DVBT_FUNC5_REG18,
 DVBT_AD7_SETTING,
 DVBT_RSSI_R,
 DVBT_ACI_DET_IND,
 DVBT_REG_MON,
 DVBT_REG_MONSEL,
 DVBT_REG_GPE,
 DVBT_REG_GPO,
 DVBT_REG_4MSEL,
 DVBT_TEST_REG_1,
 DVBT_TEST_REG_2,
 DVBT_TEST_REG_3,
 DVBT_TEST_REG_4,
 DVBT_REG_BIT_NAME_ITEM_TERMINATOR,
};

static const struct rtl2832_reg_value rtl2832_tuner_init_fc2580[] = {
 {DVBT_DAGC_TRG_VAL,             0x39},
 {DVBT_AGC_TARG_VAL_0,            0x0},
 {DVBT_AGC_TARG_VAL_8_1,         0x5a},
 {DVBT_AAGC_LOOP_GAIN,           0x16},
 {DVBT_LOOP_GAIN2_3_0,            0x6},
 {DVBT_LOOP_GAIN2_4,              0x1},
 {DVBT_LOOP_GAIN3,               0x16},
 {DVBT_VTOP1,                    0x35},
 {DVBT_VTOP2,                    0x21},
 {DVBT_VTOP3,                    0x21},
 {DVBT_KRF1,                      0x0},
 {DVBT_KRF2,                     0x40},
 {DVBT_KRF3,                     0x10},
 {DVBT_KRF4,                     0x10},
 {DVBT_IF_AGC_MIN,               0x80},
 {DVBT_IF_AGC_MAX,               0x7f},
 {DVBT_RF_AGC_MIN,               0x9c},
 {DVBT_RF_AGC_MAX,               0x7f},
 {DVBT_POLAR_RF_AGC,              0x0},
 {DVBT_POLAR_IF_AGC,              0x0},
 {DVBT_AD7_SETTING,            0xe9f4},
};

static const struct rtl2832_reg_value rtl2832_tuner_init_tua9001[] = {
 {DVBT_DAGC_TRG_VAL,             0x39},
 {DVBT_AGC_TARG_VAL_0,            0x0},
 {DVBT_AGC_TARG_VAL_8_1,         0x5a},
 {DVBT_AAGC_LOOP_GAIN,           0x16},
 {DVBT_LOOP_GAIN2_3_0,            0x6},
 {DVBT_LOOP_GAIN2_4,              0x1},
 {DVBT_LOOP_GAIN3,               0x16},
 {DVBT_VTOP1,                    0x35},
 {DVBT_VTOP2,                    0x21},
 {DVBT_VTOP3,                    0x21},
 {DVBT_KRF1,                      0x0},
 {DVBT_KRF2,                     0x40},
 {DVBT_KRF3,                     0x10},
 {DVBT_KRF4,                     0x10},
 {DVBT_IF_AGC_MIN,               0x80},
 {DVBT_IF_AGC_MAX,               0x7f},
 {DVBT_RF_AGC_MIN,               0x9c},
 {DVBT_RF_AGC_MAX,               0x7f},
 {DVBT_POLAR_RF_AGC,              0x0},
 {DVBT_POLAR_IF_AGC,              0x0},
 {DVBT_AD7_SETTING,            0xe9f4},
 {DVBT_OPT_ADC_IQ,                0x1},
 {DVBT_AD_AVI,                    0x0},
 {DVBT_AD_AVQ,                    0x0},
 {DVBT_SPEC_INV,                  0x0},
};

static const struct rtl2832_reg_value rtl2832_tuner_init_fc0012[] = {
 {DVBT_DAGC_TRG_VAL,             0x5a},
 {DVBT_AGC_TARG_VAL_0,            0x0},
 {DVBT_AGC_TARG_VAL_8_1,         0x5a},
 {DVBT_AAGC_LOOP_GAIN,           0x16},
 {DVBT_LOOP_GAIN2_3_0,            0x6},
 {DVBT_LOOP_GAIN2_4,              0x1},
 {DVBT_LOOP_GAIN3,               0x16},
 {DVBT_VTOP1,                    0x35},
 {DVBT_VTOP2,                    0x21},
 {DVBT_VTOP3,                    0x21},
 {DVBT_KRF1,                      x0,
 {VBT_KRF2,                    0}
 {,                     0x10,
 {DVBT_KRF4,                     0x10},
 {DVBT_IF_AGC_MIN,   *pdata;
 {VBT_IF_AGC_MAX0x7f}
{,               0java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
{               x7fjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 ,              0x0}
{,             0,
{,            xe9bf,
  sleeping
 {VBT_THD_LOCK_UP0x0,
 { unsigned longjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 40
                  11}
{,                 }java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
,0xc,
 {java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 2
D,              0x1}
 Djava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 39
;
};

DVBT_
 {u32value
 {DVBT_AGC_TARG_VAL_0,0}
 {DVBT_REG_PI
  java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
  DVBT_CE_FFSM_BYPASSjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 {java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
 {               x18}
{,0x35 java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 13
 java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
 { java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
 

 {                     
 java.lang.StringIndexOutOfBoundsException: Range [18, 16) out of bounds for length 19
{DVBT_TR_THD_SET2
IN               x80,
 {DVBT_RF_AGC_MAX,,
 {              java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 ,              x}java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 ,            ,
 {DVBT_EN_GI_PGA BB0
                x0,
 OCK_DW,
 {,
 {DVBT_SFREQ_OFF,
 { DVBT_K1_CR_STEP12
 ATE0x0,
 ,                }
 { java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 16
  DVBT_RF_AGC_MAX
 ,               0x1,
 {,                   0x1}
 {DVBT_REG_4MSEL,
 {java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 39
}

 ,
 java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
{,00,
  java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
{ java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
 2_3_,           0x8,
 { java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
 {DVBT_LOOP_GAIN3,
 { DVBT_SYNC_D,
 {DVBT_SYNC_LVL,
 { DVBT_RF_AGC_M,
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
 {                     0x40}
  java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
 java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 20
 {,               java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
 {,0x7f,
 ,               x80}
{              7,
 {DVBT_LOOP_GAIN2_4,
 {java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
 { ,
{                  x1,
;

 struct  java.lang.StringIndexOutOfBoundsException: Range [0, 63) out of bounds for length 16
 java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 {DVBT_FUNC5_REG12,
 {VBT_AGC_TARG_VAL_8_10}java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
  DVBT_FUNC5_REG18
3_           }
 DVBT_RSSI_R,
 {java.lang.StringIndexOutOfBoundsException: Range [33, 17) out of bounds for length 39
{                    x35,
 {DVBT_VTOP2,                    0x21},
 {DVBT_VTOP3,                    
 {DVBT_KRF1                      ,java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
 {                     x40}java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                },
 {DVBT_IF_AGC_MIN,0x80}
 { DVBT_CKOUT_PWR_PIDjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
 {,
 {,               xf,
 {DVBT_POLAR_RF_AGC ,
 {DVBT_POLAR_IF_AGC,
 {DVBT_AD7_SETTING,,
 { 0x0,
};

 /* RTL2832_PRIV_H */

Messung V0.5 in Prozent
C=98 H=99 G=98

¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.