linux/drivers/media/dvb-frontends/drx39xyj/drx_driver.h

/*
  Copyright (c), 2004-2005,2007-2010 Trident Microsystems, Inc.
  All rights reserved.

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are met:

  * Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.
  * Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
	and/or other materials provided with the distribution.
  * Neither the name of Trident Microsystems nor Hauppauge Computer Works
    nor the names of its contributors may be used to endorse or promote
	products derived from this software without specific prior written
	permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef __DRXDRIVER_H__
#define __DRXDRIVER_H__

#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/i2c.h>

/*
 * This structure contains the I2C address, the device ID and a user_data pointer.
 * The user_data pointer can be used for application specific purposes.
 */
struct i2c_device_addr {};

/*
* \def IS_I2C_10BIT( addr )
* \brief Determine if I2C address 'addr' is a 10 bits address or not.
* \param addr The I2C address.
* \return int.
* \retval 0 if address is not a 10 bits I2C address.
* \retval 1 if address is a 10 bits I2C address.
*/
#define IS_I2C_10BIT(addr)

/*------------------------------------------------------------------------------
Exported FUNCTIONS
------------------------------------------------------------------------------*/

/*
* \fn drxbsp_i2c_init()
* \brief Initialize I2C communication module.
* \return int Return status.
* \retval 0 Initialization successful.
* \retval -EIO Initialization failed.
*/
int drxbsp_i2c_init(void);

/*
* \fn drxbsp_i2c_term()
* \brief Terminate I2C communication module.
* \return int Return status.
* \retval 0 Termination successful.
* \retval -EIO Termination failed.
*/
int drxbsp_i2c_term(void);

/*
* \fn int drxbsp_i2c_write_read( struct i2c_device_addr *w_dev_addr,
*                                       u16 w_count,
*                                       u8 * wData,
*                                       struct i2c_device_addr *r_dev_addr,
*                                       u16 r_count,
*                                       u8 * r_data)
* \brief Read and/or write count bytes from I2C bus, store them in data[].
* \param w_dev_addr The device i2c address and the device ID to write to
* \param w_count   The number of bytes to write
* \param wData    The array to write the data to
* \param r_dev_addr The device i2c address and the device ID to read from
* \param r_count   The number of bytes to read
* \param r_data    The array to read the data from
* \return int Return status.
* \retval 0 Success.
* \retval -EIO Failure.
* \retval -EINVAL Parameter 'wcount' is not zero but parameter
*                                       'wdata' contains NULL.
*                                       Idem for 'rcount' and 'rdata'.
*                                       Both w_dev_addr and r_dev_addr are NULL.
*
* This function must implement an atomic write and/or read action on the I2C bus
* No other process may use the I2C bus when this function is executing.
* The critical section of this function runs from and including the I2C
* write, up to and including the I2C read action.
*
* The device ID can be useful if several devices share an I2C address.
* It can be used to control a "switch" on the I2C bus to the correct device.
*/
int drxbsp_i2c_write_read(struct i2c_device_addr *w_dev_addr,
					u16 w_count,
					u8 *wData,
					struct i2c_device_addr *r_dev_addr,
					u16 r_count, u8 *r_data);

/*
* \fn drxbsp_i2c_error_text()
* \brief Returns a human readable error.
* Counter part of numerical drx_i2c_error_g.
*
* \return char* Pointer to human readable error text.
*/
char *drxbsp_i2c_error_text(void);

/*
* \var drx_i2c_error_g;
* \brief I2C specific error codes, platform dependent.
*/
extern int drx_i2c_error_g;

#define TUNER_MODE_SUB0
#define TUNER_MODE_SUB1
#define TUNER_MODE_SUB2
#define TUNER_MODE_SUB3
#define TUNER_MODE_SUB4
#define TUNER_MODE_SUB5
#define TUNER_MODE_SUB6
#define TUNER_MODE_SUB7

#define TUNER_MODE_DIGITAL
#define TUNER_MODE_ANALOG
#define TUNER_MODE_SWITCH
#define TUNER_MODE_LOCK
#define TUNER_MODE_6MHZ
#define TUNER_MODE_7MHZ
#define TUNER_MODE_8MHZ

#define TUNER_MODE_SUB_MAX
#define TUNER_MODE_SUBALL


enum tuner_lock_status {};

struct tuner_common {};

struct tuner_instance;

tuner_open_func_t;
tuner_close_func_t;

tuner_set_frequency_func_t;

tuner_get_frequency_func_t;

tuner_lock_status_func_t;

tune_ri2c_write_read_func_t;

struct tuner_ops {};

struct tuner_instance {};

int drxbsp_tuner_set_frequency(struct tuner_instance *tuner,
					u32 mode,
					s32 frequency);

int drxbsp_tuner_get_frequency(struct tuner_instance *tuner,
					u32 mode,
					s32 *r_ffrequency,
					s32 *i_ffrequency);

int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner,
						struct i2c_device_addr *w_dev_addr,
						u16 w_count,
						u8 *wData,
						struct i2c_device_addr *r_dev_addr,
						u16 r_count, u8 *r_data);

/*************
*
* This section configures the DRX Data Access Protocols (DAPs).
*
**************/

/*
* \def DRXDAP_SINGLE_MASTER
* \brief Enable I2C single or I2C multimaster mode on host.
*
* Set to 1 to enable single master mode
* Set to 0 to enable multi master mode
*
* The actual DAP implementation may be restricted to only one of the modes.
* A compiler warning or error will be generated if the DAP implementation
* overrides or cannot handle the mode defined below.
*/
#ifndef DRXDAP_SINGLE_MASTER
#define DRXDAP_SINGLE_MASTER
#endif

/*
* \def DRXDAP_MAX_WCHUNKSIZE
* \brief Defines maximum chunksize of an i2c write action by host.
*
* This indicates the maximum size of data the I2C device driver is able to
* write at a time. This includes I2C device address and register addressing.
*
* This maximum size may be restricted by the actual DAP implementation.
* A compiler warning or error will be generated if the DAP implementation
* overrides or cannot handle the chunksize defined below.
*
* Beware that the DAP uses  DRXDAP_MAX_WCHUNKSIZE to create a temporary data
* buffer. Do not undefine or choose too large, unless your system is able to
* handle a stack buffer of that size.
*
*/
#ifndef DRXDAP_MAX_WCHUNKSIZE
#define DRXDAP_MAX_WCHUNKSIZE
#endif

/*
* \def DRXDAP_MAX_RCHUNKSIZE
* \brief Defines maximum chunksize of an i2c read action by host.
*
* This indicates the maximum size of data the I2C device driver is able to read
* at a time. Minimum value is 2. Also, the read chunk size must be even.
*
* This maximum size may be restricted by the actual DAP implementation.
* A compiler warning or error will be generated if the DAP implementation
* overrides or cannot handle the chunksize defined below.
*/
#ifndef DRXDAP_MAX_RCHUNKSIZE
#define DRXDAP_MAX_RCHUNKSIZE
#endif

/*************
*
* This section describes drxdriver defines.
*
**************/

/*
* \def DRX_UNKNOWN
* \brief Generic UNKNOWN value for DRX enumerated types.
*
* Used to indicate that the parameter value is unknown or not yet initialized.
*/
#ifndef DRX_UNKNOWN
#define DRX_UNKNOWN
#endif

/*
* \def DRX_AUTO
* \brief Generic AUTO value for DRX enumerated types.
*
* Used to instruct the driver to automatically determine the value of the
* parameter.
*/
#ifndef DRX_AUTO
#define DRX_AUTO
#endif

/*************
*
* This section describes flag definitions for the device capbilities.
*
**************/

/*
* \brief LNA capability flag
*
* Device has a Low Noise Amplifier
*
*/
#define DRX_CAPABILITY_HAS_LNA
/*
* \brief OOB-RX capability flag
*
* Device has OOB-RX
*
*/
#define DRX_CAPABILITY_HAS_OOBRX
/*
* \brief ATV capability flag
*
* Device has ATV
*
*/
#define DRX_CAPABILITY_HAS_ATV
/*
* \brief DVB-T capability flag
*
* Device has DVB-T
*
*/
#define DRX_CAPABILITY_HAS_DVBT
/*
* \brief  ITU-B capability flag
*
* Device has ITU-B
*
*/
#define DRX_CAPABILITY_HAS_ITUB
/*
* \brief  Audio capability flag
*
* Device has Audio
*
*/
#define DRX_CAPABILITY_HAS_AUD
/*
* \brief  SAW switch capability flag
*
* Device has SAW switch
*
*/
#define DRX_CAPABILITY_HAS_SAWSW
/*
* \brief  GPIO1 capability flag
*
* Device has GPIO1
*
*/
#define DRX_CAPABILITY_HAS_GPIO1
/*
* \brief  GPIO2 capability flag
*
* Device has GPIO2
*
*/
#define DRX_CAPABILITY_HAS_GPIO2
/*
* \brief  IRQN capability flag
*
* Device has IRQN
*
*/
#define DRX_CAPABILITY_HAS_IRQN
/*
* \brief  8VSB capability flag
*
* Device has 8VSB
*
*/
#define DRX_CAPABILITY_HAS_8VSB
/*
* \brief  SMA-TX capability flag
*
* Device has SMATX
*
*/
#define DRX_CAPABILITY_HAS_SMATX
/*
* \brief  SMA-RX capability flag
*
* Device has SMARX
*
*/
#define DRX_CAPABILITY_HAS_SMARX
/*
* \brief  ITU-A/C capability flag
*
* Device has ITU-A/C
*
*/
#define DRX_CAPABILITY_HAS_ITUAC

/*-------------------------------------------------------------------------
MACROS
-------------------------------------------------------------------------*/
/* Macros to stringify the version number */
#define DRX_VERSIONSTRING(MAJOR, MINOR, PATCH)
#define DRX_VERSIONSTRING_HELP(NUM)

/*
* \brief Macro to create byte array elements from 16 bit integers.
* This macro is used to create byte arrays for block writes.
* Block writes speed up I2C traffic between host and demod.
* The macro takes care of the required byte order in a 16 bits word.
* x->lowbyte(x), highbyte(x)
*/
#define DRX_16TO8(x)

/*
* \brief Macro to convert 16 bit register value to a s32
*/
#define DRX_U16TODRXFREQ(x)

/*-------------------------------------------------------------------------
ENUM
-------------------------------------------------------------------------*/

/*
* \enum enum drx_standard
* \brief Modulation standards.
*/
enum drx_standard {};

/*
* \enum enum drx_standard
* \brief Modulation sub-standards.
*/
enum drx_substandard {};

/*
* \enum enum drx_bandwidth
* \brief Channel bandwidth or channel spacing.
*/
enum drx_bandwidth {};

/*
* \enum enum drx_mirror
* \brief Indicate if channel spectrum is mirrored or not.
*/
enum drx_mirror {};

/*
* \enum enum drx_modulation
* \brief Constellation type of the channel.
*/
enum drx_modulation {};

/*
* \enum enum drx_hierarchy
* \brief Hierarchy of the channel.
*/
enum drx_hierarchy {};

/*
* \enum enum drx_priority
* \brief Channel priority in case of hierarchical transmission.
*/
enum drx_priority {};

/*
* \enum enum drx_coderate
* \brief Channel priority in case of hierarchical transmission.
*/
enum drx_coderate {};

/*
* \enum enum drx_guard
* \brief Guard interval of a channel.
*/
enum drx_guard {};

/*
* \enum enum drx_fft_mode
* \brief FFT mode.
*/
enum drx_fft_mode {};

/*
* \enum enum drx_classification
* \brief Channel classification.
*/
enum drx_classification {};

/*
* /enum enum drx_interleave_mode
* /brief Interleave modes
*/
enum drx_interleave_mode {};

/*
* \enum enum drx_carrier_mode
* \brief Channel Carrier Mode.
*/
enum drx_carrier_mode {};

/*
* \enum enum drx_frame_mode
* \brief Channel Frame Mode.
*/
enum drx_frame_mode {};

/*
* \enum enum drx_tps_frame
* \brief Frame number in current super-frame.
*/
enum drx_tps_frame {};

/*
* \enum enum drx_ldpc
* \brief TPS LDPC .
*/
enum drx_ldpc {};

/*
* \enum enum drx_pilot_mode
* \brief Pilot modes in DTMB.
*/
enum drx_pilot_mode {};

/*
 * enum drxu_code_action - indicate if firmware has to be uploaded or verified.
 * @UCODE_UPLOAD:	Upload the microcode image to device
 * @UCODE_VERIFY:	Compare microcode image with code on device
 */
enum drxu_code_action {};

/*
* \enum enum drx_lock_status * \brief Used to reflect current lock status of demodulator.
*
* The generic lock states have device dependent semantics.

		DRX_NEVER_LOCK = 0,
			      **< Device will never lock on this signal *
		DRX_NOT_LOCKED,
			      **< Device has no lock at all             *
		DRX_LOCK_STATE_1,
			      **< Generic lock state                    *
		DRX_LOCK_STATE_2,
			      **< Generic lock state                    *
		DRX_LOCK_STATE_3,
			      **< Generic lock state                    *
		DRX_LOCK_STATE_4,
			      **< Generic lock state                    *
		DRX_LOCK_STATE_5,
			      **< Generic lock state                    *
		DRX_LOCK_STATE_6,
			      **< Generic lock state                    *
		DRX_LOCK_STATE_7,
			      **< Generic lock state                    *
		DRX_LOCK_STATE_8,
			      **< Generic lock state                    *
		DRX_LOCK_STATE_9,
			      **< Generic lock state                    *
		DRX_LOCKED    **< Device is in lock                     *
*/

enum drx_lock_status {};

/*
* \enum enum drx_uio* \brief Used to address a User IO (UIO).
*/
enum drx_uio {};

/*
* \enum enum drxuio_mode * \brief Used to configure the modus oprandi of a UIO.
*
* DRX_UIO_MODE_FIRMWARE is an old uio mode.
* It is replaced by the modes DRX_UIO_MODE_FIRMWARE0 .. DRX_UIO_MODE_FIRMWARE9.
* To be backward compatible DRX_UIO_MODE_FIRMWARE is equivalent to
* DRX_UIO_MODE_FIRMWARE0.
*/
enum drxuio_mode {};

/*
* \enum enum drxoob_downstream_standard * \brief Used to select OOB standard.
*
* Based on ANSI 55-1 and 55-2
*/
enum drxoob_downstream_standard {};

/*-------------------------------------------------------------------------
STRUCTS
-------------------------------------------------------------------------*/

/*============================================================================*/
/*============================================================================*/
/*== CTRL CFG related data structures ========================================*/
/*============================================================================*/
/*============================================================================*/

#ifndef DRX_CFG_BASE
#define DRX_CFG_BASE
#endif

#define DRX_CFG_MPEG_OUTPUT
#define DRX_CFG_PKTERR
#define DRX_CFG_SYMCLK_OFFS
#define DRX_CFG_SMA
#define DRX_CFG_PINSAFE
#define DRX_CFG_SUBSTANDARD
#define DRX_CFG_AUD_VOLUME
#define DRX_CFG_AUD_RDS
#define DRX_CFG_AUD_AUTOSOUND
#define DRX_CFG_AUD_ASS_THRES
#define DRX_CFG_AUD_DEVIATION
#define DRX_CFG_AUD_PRESCALE
#define DRX_CFG_AUD_MIXER
#define DRX_CFG_AUD_AVSYNC
#define DRX_CFG_AUD_CARRIER
#define DRX_CFG_I2S_OUTPUT
#define DRX_CFG_ATV_STANDARD
#define DRX_CFG_SQI_SPEED
#define DRX_CTRL_CFG_MAX

#define DRX_CFG_PINS_SAFE_MODE
/*============================================================================*/
/*============================================================================*/
/*== CTRL related data structures ============================================*/
/*============================================================================*/
/*============================================================================*/

/*
 * struct drxu_code_info	Parameters for microcode upload and verfiy.
 *
 * @mc_file:	microcode file name
 *
 * Used by DRX_CTRL_LOAD_UCODE and DRX_CTRL_VERIFY_UCODE
 */
struct drxu_code_info {};

/*
* \struct drx_mc_version_rec_t
* \brief Microcode version record
* Version numbers are stored in BCD format, as usual:
*   o major number = bits 31-20 (first three nibbles of MSW)
*   o minor number = bits 19-16 (fourth nibble of MSW)
*   o patch number = bits 15-0  (remaining nibbles in LSW)
*
* The device type indicates for which the device is meant. It is based on the
* JTAG ID, using everything except the bond ID and the metal fix.
*
* Special values:
* - mc_dev_type == 0         => any device allowed
* - mc_base_version == 0.0.0 => full microcode (mc_version is the version)
* - mc_base_version != 0.0.0 => patch microcode, the base microcode version
*                             (mc_version is the version)
*/
#define AUX_VER_RECORD

struct drx_mc_version_rec {};

/*========================================*/

/*
* \struct drx_filter_info_t
* \brief Parameters for loading filter coefficients
*
* Used by DRX_CTRL_LOAD_FILTER
*/
struct drx_filter_info {};

/*========================================*/

/*
* \struct struct drx_channel * \brief The set of parameters describing a single channel.
*
* Used by DRX_CTRL_SET_CHANNEL and DRX_CTRL_GET_CHANNEL.
* Only certain fields need to be used for a specific standard.
*
*/
struct drx_channel {};

/*========================================*/

enum drx_cfg_sqi_speed {};

/*========================================*/

/*
* \struct struct drx_complex * A complex number.
*
* Used by DRX_CTRL_CONSTEL.
*/
struct drx_complex {};

/*========================================*/

/*
* \struct struct drx_frequency_plan * Array element of a frequency plan.
*
* Used by DRX_CTRL_SCAN_INIT.
*/
struct drx_frequency_plan {};

/*========================================*/

/*
* \struct struct drx_scan_param * Parameters for channel scan.
*
* Used by DRX_CTRL_SCAN_INIT.
*/
struct drx_scan_param {};

/*========================================*/

/*
* \brief Scan commands.
* Used by scanning algorithms.
*/
enum drx_scan_command {};

/*========================================*/

/*
* \brief Inner scan function prototype.
*/
drx_scan_func_t;

/*========================================*/

/*
* \struct struct drxtps_info * TPS information, DVB-T specific.
*
* Used by DRX_CTRL_TPS_INFO.
*/
	struct drxtps_info {};

/*========================================*/

/*
* \brief Power mode of device.
*
* Used by DRX_CTRL_SET_POWER_MODE.
*/
	enum drx_power_mode {};

/*========================================*/

/*
* \enum enum drx_module * \brief Software module identification.
*
* Used by DRX_CTRL_VERSION.
*/
	enum drx_module {};

/*
* \enum struct drx_version * \brief Version information of one software module.
*
* Used by DRX_CTRL_VERSION.
*/
	struct drx_version {};

/*
* \enum struct drx_version_list * \brief List element of NULL terminated, linked list for version information.
*
* Used by DRX_CTRL_VERSION.
*/
struct drx_version_list {};

/*========================================*/

/*
* \brief Parameters needed to confiugure a UIO.
*
* Used by DRX_CTRL_UIO_CFG.
*/
	struct drxuio_cfg {};

/*========================================*/

/*
* \brief Parameters needed to read from or write to a UIO.
*
* Used by DRX_CTRL_UIO_READ and DRX_CTRL_UIO_WRITE.
*/
	struct drxuio_data {};

/*========================================*/

/*
* \brief Parameters needed to configure OOB.
*
* Used by DRX_CTRL_SET_OOB.
*/
	struct drxoob {};

/*========================================*/

/*
* \brief Metrics from OOB.
*
* Used by DRX_CTRL_GET_OOB.
*/
	struct drxoob_status {};

/*========================================*/

/*
* \brief Device dependent configuration data.
*
* Used by DRX_CTRL_SET_CFG and DRX_CTRL_GET_CFG.
* A sort of nested drx_ctrl() functionality for device specific controls.
*/
	struct drx_cfg {};

/*========================================*/

/*
* /struct DRXMpegStartWidth_t
* MStart width [nr MCLK cycles] for serial MPEG output.
*/

	enum drxmpeg_str_width {};

/* CTRL CFG MPEG output */
/*
* \struct struct drx_cfg_mpeg_output * \brief Configuration parameters for MPEG output control.
*
* Used by DRX_CFG_MPEG_OUTPUT, in combination with DRX_CTRL_SET_CFG and
* DRX_CTRL_GET_CFG.
*/

	struct drx_cfg_mpeg_output {};


/*========================================*/

/*
* \struct struct drxi2c_data * \brief Data for I2C via 2nd or 3rd or etc I2C port.
*
* Used by DRX_CTRL_I2C_READWRITE.
* If port_nr is equal to primairy port_nr BSPI2C will be used.
*
*/
	struct drxi2c_data {};

/*========================================*/

/*
* \enum enum drx_aud_standard * \brief Audio standard identifier.
*
* Used by DRX_CTRL_SET_AUD.
*/
	enum drx_aud_standard {};

/* CTRL_AUD_GET_STATUS    - struct drx_aud_status */
/*
* \enum enum drx_aud_nicam_status * \brief Status of NICAM carrier.
*/
	enum drx_aud_nicam_status {};

/*
* \struct struct drx_aud_status * \brief Audio status characteristics.
*/
	struct drx_aud_status {};

/* CTRL_AUD_READ_RDS       - DRXRDSdata_t */

/*
* \struct DRXRDSdata_t
* \brief Raw RDS data array.
*/
	struct drx_cfg_aud_rds {};

/* DRX_CFG_AUD_VOLUME      - struct drx_cfg_aud_volume - set/get */
/*
* \enum DRXAudAVCDecayTime_t
* \brief Automatic volume control configuration.
*/
	enum drx_aud_avc_mode {};

/*
* /enum DRXAudMaxAVCGain_t
* /brief Automatic volume control max gain in audio baseband.
*/
	enum drx_aud_avc_max_gain {};

/*
* /enum DRXAudMaxAVCAtten_t
* /brief Automatic volume control max attenuation in audio baseband.
*/
	enum drx_aud_avc_max_atten {};
/*
* \struct struct drx_cfg_aud_volume * \brief Audio volume configuration.
*/
	struct drx_cfg_aud_volume {};

/* DRX_CFG_I2S_OUTPUT      - struct drx_cfg_i2s_output - set/get */
/*
* \enum enum drxi2s_mode * \brief I2S output mode.
*/
	enum drxi2s_mode {};

/*
* \enum enum drxi2s_word_length * \brief Width of I2S data.
*/
	enum drxi2s_word_length {};

/*
* \enum enum drxi2s_format * \brief Data wordstrobe alignment for I2S.
*/
	enum drxi2s_format {};

/*
* \enum enum drxi2s_polarity * \brief Polarity of I2S data.
*/
	enum drxi2s_polarity {};

/*
* \struct struct drx_cfg_i2s_output * \brief I2S output configuration.
*/
	struct drx_cfg_i2s_output {};

/* ------------------------------expert interface-----------------------------*/
/*
* /enum enum drx_aud_fm_deemphasis * setting for FM-Deemphasis in audio demodulator.
*
*/
	enum drx_aud_fm_deemphasis {};

/*
* /enum DRXAudDeviation_t
* setting for deviation mode in audio demodulator.
*
*/
	enum drx_cfg_aud_deviation {};

/*
* /enum enum drx_no_carrier_option * setting for carrier, mute/noise.
*
*/
	enum drx_no_carrier_option {};

/*
* \enum DRXAudAutoSound_t
* \brief Automatic Sound
*/
	enum drx_cfg_aud_auto_sound {};

/*
* \enum DRXAudASSThres_t
* \brief Automatic Sound Select Thresholds
*/
	struct drx_cfg_aud_ass_thres {};

/*
* \struct struct drx_aud_carrier * \brief Carrier detection related parameters
*/
	struct drx_aud_carrier {};

/*
* \struct struct drx_cfg_aud_carriers * \brief combining carrier A & B to one struct
*/
	struct drx_cfg_aud_carriers {};

/*
* /enum enum drx_aud_i2s_src * Selection of audio source
*/
	enum drx_aud_i2s_src {};

/*
* \enum enum drx_aud_i2s_matrix * \brief Used for selecting I2S output.
*/
	enum drx_aud_i2s_matrix {};

/*
* /enum enum drx_aud_fm_matrix * setting for FM-Matrix in audio demodulator.
*
*/
	enum drx_aud_fm_matrix {};

/*
* \struct DRXAudMatrices_t
* \brief Mixer settings
*/
struct drx_cfg_aud_mixer {};

/*
* \enum DRXI2SVidSync_t
* \brief Audio/video synchronization, interacts with I2S mode.
* AUTO_1 and AUTO_2 are for automatic video standard detection with preference
* for NTSC or Monochrome, because the frequencies are too close (59.94 & 60 Hz)
*/
	enum drx_cfg_aud_av_sync {};

/*
* \struct struct drx_cfg_aud_prescale * \brief Prescalers
*/
struct drx_cfg_aud_prescale {};

/*
* \struct struct drx_aud_beep * \brief Beep
*/
struct drx_aud_beep {};

/*
* \enum enum drx_aud_btsc_detect * \brief BTSC detetcion mode
*/
	enum drx_aud_btsc_detect {};

/*
* \struct struct drx_aud_data * \brief Audio data structure
*/
struct drx_aud_data {};

/*
* \enum enum drx_qam_lock_range * \brief QAM lock range mode
*/
	enum drx_qam_lock_range {};

/*============================================================================*/
/*============================================================================*/
/*== Data access structures ==================================================*/
/*============================================================================*/
/*============================================================================*/

/* Address on device */
	pdr_xaddr_t;

/* Protocol specific flags */
	pdr_xflags_t;

/* Write block of data to device */
	drx_write_block_func_t;

/* Read block of data from device */
	drx_read_block_func_t;

/* Write 8-bits value to device */
	drx_write_reg8func_t;

/* Read 8-bits value to device */
	drx_read_reg8func_t;

/* Read modify write 8-bits value to device */
	drx_read_modify_write_reg8func_t;	/* data to read                */

/* Write 16-bits value to device */
	drx_write_reg16func_t;

/* Read 16-bits value to device */
	drx_read_reg16func_t;

/* Read modify write 16-bits value to device */
	drx_read_modify_write_reg16func_t;	/* data to read                */

/* Write 32-bits value to device */
	drx_write_reg32func_t;

/* Read 32-bits value to device */
	drx_read_reg32func_t;

/* Read modify write 32-bits value to device */
	drx_read_modify_write_reg32func_t;	/* data to read                */

/*
* \struct struct drx_access_func * \brief Interface to an access protocol.
*/
struct drx_access_func {};

/* Register address and data for register dump function */
struct drx_reg_dump {};

/*============================================================================*/
/*============================================================================*/
/*== Demod instance data structures ==========================================*/
/*============================================================================*/
/*============================================================================*/

/*
* \struct struct drx_common_attr * \brief Set of common attributes, shared by all DRX devices.
*/
	struct drx_common_attr {};

/*
* Generic functions for DRX devices.
*/

struct drx_demod_instance;

/*
* \struct struct drx_demod_instance * \brief Top structure of demodulator instance.
*/
struct drx_demod_instance {};

/*-------------------------------------------------------------------------
MACROS
Conversion from enum values to human readable form.
-------------------------------------------------------------------------*/

/* standard */

#define DRX_STR_STANDARD(x)

/* channel */

#define DRX_STR_BANDWIDTH(x)
#define DRX_STR_FFTMODE(x)
#define DRX_STR_GUARD(x)
#define DRX_STR_CONSTELLATION(x)
#define DRX_STR_CODERATE(x)
#define DRX_STR_HIERARCHY(x)
#define DRX_STR_PRIORITY(x)
#define DRX_STR_MIRROR(x)
#define DRX_STR_CLASSIFICATION(x)

#define DRX_STR_INTERLEAVEMODE(x)

#define DRX_STR_LDPC(x)

#define DRX_STR_CARRIER(x)

#define DRX_STR_FRAMEMODE(x)

#define DRX_STR_PILOT(x)
/* TPS */

#define DRX_STR_TPS_FRAME(x)

/* lock status */

#define DRX_STR_LOCKSTATUS(x)

/* version information , modules */
#define DRX_STR_MODULE(x)

#define DRX_STR_POWER_MODE(x)

#define DRX_STR_OOB_STANDARD(x)

#define DRX_STR_AUD_STANDARD(x)
#define DRX_STR_AUD_STEREO(x)

#define DRX_STR_AUD_SAP(x)

#define DRX_STR_AUD_CARRIER(x)

#define DRX_STR_AUD_RDS(x)

#define DRX_STR_AUD_NICAM_STATUS(x)

#define DRX_STR_RDS_VALID(x)

/*-------------------------------------------------------------------------
Access macros
-------------------------------------------------------------------------*/

/*
* \brief Create a compilable reference to the microcode attribute
* \param d pointer to demod instance
*
* Used as main reference to an attribute field.
* Used by both macro implementation and function implementation.
* These macros are defined to avoid duplication of code in macro and function
* definitions that handle access of demod common or extended attributes.
*
*/

#define DRX_ATTR_MCRECORD(d)
#define DRX_ATTR_MIRRORFREQSPECT(d)
#define DRX_ATTR_CURRENTPOWERMODE(d)
#define DRX_ATTR_ISOPENED(d)
#define DRX_ATTR_USEBOOTLOADER(d)
#define DRX_ATTR_CURRENTSTANDARD(d)
#define DRX_ATTR_PREVSTANDARD(d)
#define DRX_ATTR_CACHESTANDARD(d)
#define DRX_ATTR_CURRENTCHANNEL(d)
#define DRX_ATTR_MICROCODE(d)
#define DRX_ATTR_VERIFYMICROCODE(d)
#define DRX_ATTR_CAPABILITIES(d)
#define DRX_ATTR_PRODUCTID(d)
#define DRX_ATTR_INTERMEDIATEFREQ(d)
#define DRX_ATTR_SYSCLOCKFREQ(d)
#define DRX_ATTR_TUNERRFAGCPOL(d)
#define DRX_ATTR_TUNERIFAGCPOL(d)
#define DRX_ATTR_TUNERSLOWMODE(d)
#define DRX_ATTR_TUNERSPORTNR(d)
#define DRX_ATTR_I2CADDR(d)
#define DRX_ATTR_I2CDEVID(d)
#define DRX_ISMCVERTYPE(x)

/*************************/

/* Macros with device-specific handling are converted to CFG functions */

#define DRX_ACCESSMACRO_SET(demod, value, cfg_name, data_type)

#define DRX_ACCESSMACRO_GET(demod, value, cfg_name, data_type, error_value)

/* Configuration functions for usage by Access (XS) Macros */

#ifndef DRX_XS_CFG_BASE
#define DRX_XS_CFG_BASE
#endif

#define DRX_XS_CFG_PRESET
#define DRX_XS_CFG_AUD_BTSC_DETECT
#define DRX_XS_CFG_QAM_LOCKRANGE

/* Access Macros with device-specific handling */

#define DRX_SET_PRESET(d, x)
#define DRX_GET_PRESET(d, x)

#define DRX_SET_AUD_BTSC_DETECT(d, x)
#define DRX_GET_AUD_BTSC_DETECT(d, x)

#define DRX_SET_QAM_LOCKRANGE(d, x)
#define DRX_GET_QAM_LOCKRANGE(d, x)

/*
* \brief Macro to check if std is an ATV standard
* \retval true std is an ATV standard
* \retval false std is an ATV standard
*/
#define DRX_ISATVSTD(std)

/*
* \brief Macro to check if std is an QAM standard
* \retval true std is an QAM standards
* \retval false std is an QAM standards
*/
#define DRX_ISQAMSTD(std)

/*
* \brief Macro to check if std is VSB standard
* \retval true std is VSB standard
* \retval false std is not VSB standard
*/
#define DRX_ISVSBSTD(std)

/*
* \brief Macro to check if std is DVBT standard
* \retval true std is DVBT standard
* \retval false std is not DVBT standard
*/
#define DRX_ISDVBTSTD(std)

/*-------------------------------------------------------------------------
THE END
-------------------------------------------------------------------------*/
#endif				/* __DRXDRIVER_H__ */