⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tlg1100api.h

📁 泰景的模拟电视全部驱动及MTK平台界面代码
💻 H
📖 第 1 页 / 共 5 页
字号:
 * @param val           Pointer to parameter to fill with the current order.
 *                      Possible values are:
 *                      - TLG_CHRLUM_NORMAL
 *                      - TLG_CHRLUM_SWAP
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetChromaLumaOrder(uint32 base_addr, uint16 *val);

/** Set the order of the Chroma/Luma.
 *
 * This procedure sets the order for the Chroma/Luma output. The setting will
 * be enabled immediatley after the call.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Value to set state to. Possible values:
 *                      - TLG_CHRLUM_NORMAL
 *                      - TLG_CHRLUM_SWAP
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetChromaLumaOrder(uint32 base_addr, uint16 val);

/** Get the current order of the Cb/Cr.
 *
 * This procedure returns the currently configured Cb/Cr order.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Pointer to parameter to fill with the current order.
 *                      Possible values are:
 *                      - TLG_CBCR_NORMAL
 *                      - TLG_CBCR_SWAP
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetCbCrOrder(uint32 base_addr, uint16 *val);

/** Set the order of the Cb/Cr.
 *
 * This procedure sets the Cb/Cr order. The setting is enabled immediately 
 * after the call is made.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Value to set state to. Possible values:
 *                      - TLG_CBCR_NORMAL
 *                      - TLG_CBCR_SWAP
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetCbCrOrder(uint32 base_addr, uint16 val);

/** Get the current audio channel configuration.
 *
 * This procedure returns the currently configured audio channel configuration.
 * Note this information only has meaning with the Audio mode is set to TLG_DAC.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Pointer to parameter to fill with the configuration.
 *                      Possible values are:
 *                      - TLG_LEFT
 *                      - TLG_LEFT_RIGHT
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetAudioChan(uint32 base_addr, uint16 *val);

/** Set the audio channel configuration.
 *
 * This procedure sets the number of audio channels when the Audio Mode is set
 * to TLG_DAC.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Value to set configuration to. Possible values:
 *                      - TLG_LEFT
 *                      - TLG_LEFT_RIGHT
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetAudioChan(uint32 base_addr, uint16 val);

/** Determine whether Audio is currently enabled/muted.
 *
 * This procedure returns whether the TLG1100 audio output is currently enabled
 * or not. This function is valid for all Audio Modes.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Pointer to parameter to fill with the state.
 *                      Possible values are:
 *                      - TLG_ENABLE
 *                      - TLG_MUTE
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetAudioEnable(uint32 base_addr, uint16 *val);

/** Enable/Mute Audio.
 *
 * This procedure enables/disables the audio output. The setting takes place
 * immediately. This function is valid for all Audio Modes.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Value to set state to. Possible values:
 *                      - TLG_ENABLE
 *                      - TLG_MUTE
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetAudioEnable(uint32 base_addr, uint16 val);

/** Get the current Audio Mode.
 *
 * This procedure gets the Audio Mode that the TLG1100 is currently set to.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Pointer to parameter to fill with the current mode.
 *                      Possible values are:
 *                      - TLG_SLAVE
 *                      - TLG_MASTER
 *                      - TLG_DAC
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetAudioMode(uint32 base_addr, uint16 *val);

/** Set the Audio Mode.
 *
 * This procedure sets the TLG1100 into the specified mode.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param val           Value to set mode to. Possible values:
 *                      - TLG_SLAVE
 *                      - TLG_MASTER
 *                      - TLG_DAC
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetAudioMode(uint32 base_addr, uint16 val);

/** Get the current audio output gain setting.
 *
 * This procedure retrieves the current audio gain settings. In TLG_MASTER or
 * TLG_SLAVE modes, the settings 0-9 are all valid. In TLG_DAC mode there are
 * six gain setting values: 0-5. 
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param aud_mode      Mode set by TLG_SetAudioMode(). Possible values:
 *                      - TLG_SLAVE
 *                      - TLG_MASTER
 *                      - TLG_DAC
 * @param val           Pointer to parameter to fill with the current gain.
 *                      Possible values are: 0-9 TLG_MASTER, TLG_SLAVE
 *                                           0-5 for TLG_DAC
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetAudioGain(uint32 base_addr, uint16 aud_mode, uint16 *val);

/** Set the audio output gain.
 *
 * This procedure sets the audio gain on the TLG1100. In TLG_MASTER or
 * TLG_SLAVE modes, the settings 0-9 are all valid. In TLG_DAC mode there are
 * six setting values: 0-5. Note that the audio gain is not intended
 * as a general purpose volume control. It is assumed that a customer's product
 * will have a separate, more fine-tuned volume control feature. It is 
 * recommended that customers find a suitable gain level to use with their 
 * product and keep the gain at that setting.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param aud_mode      Mode set by TLG_SetAudioMode(). Possible values:
 *                      - TLG_SLAVE
 *                      - TLG_MASTER
 *                      - TLG_DAC
 * @param val           Value to fill with the current gain.
 *                      Possible values are: 0-9 for TLG_MASTER, TLG_SLAVE
 *                                           0-5 for TLG_DAC
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetAudioGain(uint32 base_addr, uint16 aud_mode, uint16 val);

/** Get the currently set I2S Audio Sample Rate.
 * 
 * This procedure retrieves the currently configured Audio Sample Rate for
 * I2S audio. Note this value only applies to TLG_MASTER mode.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param rate          The rate is returned here. Possible values are:
 *                      TLG_AUD_RATE_NONE           
 *                      TLG_AUD_RATE_26_367KHZ      
 *                      TLG_AUD_RATE_32_143KHZ      
 *                      TLG_AUD_RATE_44_118KHZ      
 *                      TLG_AUD_RATE_48_214KHZ      
 *                      TLG_AUD_RATE_52_734KHZ      
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */ 
TLGDLL_API int TLG_GetAudioSampleRate(uint32 base_addr, uint16 *rate);

/** Set the I2S Audio Sample Rate.
 * 
 * This procedure sets the specified Audio Sample Rate for
 * I2S audio. Note this value only applies to TLG_MASTER mode.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param rate          The rate is returned here. Possible values are:
 *                      TLG_AUD_RATE_26_367KHZ      
 *                      TLG_AUD_RATE_32_143KHZ      
 *                      TLG_AUD_RATE_44_118KHZ      
 *                      TLG_AUD_RATE_48_214KHZ      
 *                      TLG_AUD_RATE_52_734KHZ      
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */ 
TLGDLL_API int TLG_SetAudioSampleRate(uint32 base_addr, uint16 rate);

/** Get the current audio mode and gain settings.
 *
 * This procedure gets the Audio Mode and Gain that the TLG1100 is currently set to.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param aud_mode      Pointer to parameter to fill with the current mode.
 *                      Possible values are:
 *                      - TLG_SLAVE
 *                      - TLG_MASTER
 *                      - TLG_DAC
 * @param val			Pointer to parameter to fill with the gain value.
 *                      Possible values are: 0-9 for TLG_MASTER, TLG_SLAVE
 *                                           0-5 for TLG_DAC
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetAudioOutput(uint32 base_addr, uint16 *aud_mode, uint16 *gain);

/** Set audio mode and gain settings.
 *
 * This procedure sets the Audio Mode and Gain of the TLG1100.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * @param aud_mode      Audio mode selection.
 *                      Possible values are:
 *                      - TLG_SLAVE
 *                      - TLG_MASTER
 *                      - TLG_DAC
 * @param val			Gain values.
 *                      Possible values are: 0-9 for TLG_MASTER, TLG_SLAVE
 *                                           0-5 for TLG_DAC
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetAudioOutput(uint32 base_addr, uint16 aud_mode, uint16 gain);

/** Get the current I2S data configuration parameter.
 *
 * This procedure gets I2S data configuration value that the TLG1100 is currently set to.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * 
 * @param R				Pointer to parameter to fill with the data configuration.
 *                      Possible values are: 1-256
 *                                         
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_GetI2SAudioData(uint32 base_addr, uint16 *R);

/** Set the current I2S data configuration parameter.
 *
 * This procedure sets I2S data configuration parameter of the TLG1100; the R value 
 * should be correctly set for both I2S master and slave modes.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * 
 * @param R				I2S data configuration value.
 *                      Possible values are: 1-256
 *                                         
 * 
 * @retval TLG_ERR_SUCCESS  Call succeeded.
 * @retval TLG_ERR_PARAM    Bad parameter value passed.
 * @retval TLG_ERR_FAIL     Error during call.
 */
TLGDLL_API int TLG_SetI2SAudioData(uint32 base_addr, uint16 R);

/** Get the current I2S clock configuration parameters.
 *
 * This procedure gets I2S clock configuration parameters that the TLG1100 is 
 * currently set to.
 *
 * @param base_addr     I2c address for TLG1100 chip.
 * 
 * @param M				Pointer to parameter to fill with the clock configuration value M.
 *                      Possible values are: 1-32
 * @param S				Pointer to parameter to fill with the clock configuration value S.
 *                      Possible values are: 1-64                                     
 * 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -