#ifndef __PHSTBHDMI_TDA998X_COMPATIBILITY_H__
#define __PHSTBHDMI_TDA998X_COMPATIBILITY_H__

/*****************************************************************************/
/* Copyright (c) 2009 NXP B.V.                                               */
/*                                                                           */
/* This program is free software; you can redistribute it and/or modify      */
/* it under the terms of the GNU General Public License as published by      */
/* the Free Software Foundation, using version 2 of the License.             */
/*                                                                           */
/* This program is distributed in the hope that it will be useful,           */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of            */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the              */
/* GNU General Public License for more details.                              */
/*                                                                           */
/* You should have received a copy of the GNU General Public License         */
/* along with this program; if not, write to the Free Software               */
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307       */
/* USA.                                                                      */
/*                                                                           */
/*****************************************************************************/

/**
    @file   phstbhdmi_tda998x_compatibility.h

    Compatibility layer. Use phStbHdmi.h in preference!
*//*

Rev Date        Author      Comments
--------------------------------------------------------------------------------
  1 20090217    batelaan    Initial
  2 20090324    amccurdy    Remove TDA998[34]_MODULE_DESCRIPTION definitions
  3 20090325    amccurdy    Sync with San Jose, add get_TxObject_t typedef
                            and remaining legacy API functions.
  4 20090329    amccurdy    Fix tda998x_RegisterStatusCallback compile problem
  5 20090402    amccurdy    Remove legacy in-kernel API
--------------------------------------------------------------------------------
    For consistency and standardisation retain the Section Separators.
*/

#if defined(__cplusplus)
extern "C" {
#endif

//------------------------------------------------------------------------------
//                              I O C T L ' s  constants & data structures
//------------------------------------------------------------------------------

#define TDA998X_AFMT_SPDIF          PH_STBHDMI_AFMT_SPDIF
#define TDA998X_AFMT_I2S            PH_STBHDMI_AFMT_I2S
#define TDA998X_AFMT_OBA            PH_STBHDMI_AFMT_OBA
#define TDA998X_AFMT_DST            PH_STBHDMI_AFMT_DST
#define TDA998X_AFMT_HBR            PH_STBHDMI_AFMT_HBR
typedef phStbHdmi_audio_fmt_t tda998x_audio_fmt_t;

#define TDA998X_SMPLSIZE_HEADER     PH_STBHDMI_SMPLSIZE_HEADER
#define TDA998X_SMPLSIZE_16BITS     PH_STBHDMI_SMPLSIZE_16BITS
#define TDA998X_SMPLSIZE_20BITS     PH_STBHDMI_SMPLSIZE_20BITS
#define TDA998X_SMPLSIZE_24BITS     PH_STBHDMI_SMPLSIZE_24BITS
typedef phStbHdmi_sample_size_t tda998x_sample_size_t;

#define TDA9983_AFS_32K             PH_STBHDMI_AFS_32K
#define TDA9983_AFS_32k             PH_STBHDMI_AFS_32K
#define TDA9983_AFS_44_1K           PH_STBHDMI_AFS_44_1K
#define TDA9983_AFS_44_1k           PH_STBHDMI_AFS_44_1K
#define TDA9983_AFS_48K             PH_STBHDMI_AFS_48K
#define TDA9983_AFS_88_2K           PH_STBHDMI_AFS_88_2K
#define TDA9983_AFS_96K             PH_STBHDMI_AFS_96K
#define TDA9983_AFS_176_4K          PH_STBHDMI_AFS_176_4K
#define TDA9983_AFS_192K            PH_STBHDMI_AFS_192K

typedef phStbHdmi_afs_t tda9983_afs_t;
typedef phStbHdmi_afs_t tda998x_afs_t;

typedef phStbHdmi_aud_t tda998x_aud_t;
typedef phStbHdmi_raw_edid_t tda998x_raw_edid_t;
typedef phStbHdmi_EdidSad_t tda998x_EdidSad_t;
typedef phStbHdmi_audio_cap_t tda998x_audio_cap_t;
typedef phStbHdmi_video_cap_t tda998x_video_cap_t;
typedef phStbHdmi_start_hdcp_t tda998x_start_hdcp_t;
typedef phStbHdmi_TxObject_t get_TxObject_t;


//------------------------------------------------------------------------------
//                              I O C T L ' s  definition
//------------------------------------------------------------------------------

/** Define Legacy IOCTLs */
#define TDA9983_IOCTL_SET_AUDIO_RATE        PH_STBHDMI_IOCTL_SET_AUDIO_RATE
#define TDA9983_IOCTL_SET_VIDEO_MODE        PH_STBHDMI_IOCTL_SET_VIDEO_MODE
#define TDA9983_IOCTL_GET_EDID_BLKCNT       PH_STBHDMI_IOCTL_GET_EDID_BLKCNT
#define TDA9983_IOCTL_GET_EDID_DATA         PH_STBHDMI_IOCTL_GET_EDID_DATA
#define TDA9983_IOCTL_DISABLE_HDMI_OUTPUT   PH_STBHDMI_IOCTL_DISABLE_HDMI_OUTPUT
#define TDA9983_IOCTL_ENABLE_HDMI_OUTPUT    PH_STBHDMI_IOCTL_ENABLE_HDMI_OUTPUT
#define TDA9983_IOCTL_GET_AUDIO_CAP         PH_STBHDMI_IOCTL_GET_AUDIO_CAP
#define TDA9983_IOCTL_GET_VIDEO_CAP         PH_STBHDMI_IOCTL_GET_VIDEO_CAP
#define TDA9983_IOCTL_GET_HOTPLUG_STATUS    PH_STBHDMI_IOCTL_GET_HOTPLUG_STATUS
#define TDA9983_IOCTL_GET_RXSENSE_STATUS    PH_STBHDMI_IOCTL_GET_RXSENSE_STATUS
#define TDA9983_IOCTL_GET_SINK_TYPE         PH_STBHDMI_IOCTL_GET_SINK_TYPE
#define TDA9983_IOCTL_WAIT_CALLBACK_STATUS  PH_STBHDMI_IOCTL_WAIT_CALLBACK_STATUS
#define TDA9983_IOCTL_UNBLOCK_CALLBACK      PH_STBHDMI_IOCTL_UNBLOCK_CALLBACK
#define TDA9983_IOCTL_DISABLE_AUDIO_OUTPUT  PH_STBHDMI_IOCTL_DISABLE_AUDIO_OUTPUT
#define TDA9983_IOCTL_ENABLE_AUDIO_OUTPUT   PH_STBHDMI_IOCTL_ENABLE_AUDIO_OUTPUT
#define TDA9983_IOCTL_START_HDCP            PH_STBHDMI_IOCTL_START_HDCP
#define TDA9983_IOCTL_STOP_HDCP             PH_STBHDMI_IOCTL_STOP_HDCP
#define TDA9983_IOCTL_GET_HDCP_STATUS       PH_STBHDMI_IOCTL_GET_HDCP_STATUS
#define TDA9983_IOCTL_USE_ALT_480P          PH_STBHDMI_IOCTL_USE_ALT_480P
#define TDA9983_IOCTL_SET_TEST_PATTERN      PH_STBHDMI_IOCTL_SET_TEST_PATTERN
#define TDA9983_IOCTL_GET_TX_OBJECT         PH_STBHDMI_IOCTL_GET_TX_OBJECT


#if defined(__cplusplus)
}
#endif
#endif /* __PHSTBHDMI_TDA998X_COMPATIBILITY_H__ */

