1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25#ifndef __SOLO6X10_TW28_H
26#define __SOLO6X10_TW28_H
27
28#include "solo6x10.h"
29
30#define TW_NUM_CHIP 4
31#define TW_BASE_ADDR 0x28
32#define TW_CHIP_OFFSET_ADDR(n) (TW_BASE_ADDR + (n))
33
34
35#define TW_AV_STAT_ADDR 0x5a
36#define TW_HUE_ADDR(n) (0x07 | ((n) << 4))
37#define TW_SATURATION_ADDR(n) (0x08 | ((n) << 4))
38#define TW_CONTRAST_ADDR(n) (0x09 | ((n) << 4))
39#define TW_BRIGHTNESS_ADDR(n) (0x0a | ((n) << 4))
40#define TW_AUDIO_OUTPUT_VOL_ADDR 0x70
41#define TW_AUDIO_INPUT_GAIN_ADDR(n) (0x60 + ((n > 1) ? 1 : 0))
42
43
44#define TW286x_AV_STAT_ADDR 0xfd
45#define TW286x_HUE_ADDR(n) (0x06 | ((n) << 4))
46#define TW286x_SATURATIONU_ADDR(n) (0x04 | ((n) << 4))
47#define TW286x_SATURATIONV_ADDR(n) (0x05 | ((n) << 4))
48#define TW286x_CONTRAST_ADDR(n) (0x02 | ((n) << 4))
49#define TW286x_BRIGHTNESS_ADDR(n) (0x01 | ((n) << 4))
50#define TW286x_SHARPNESS(n) (0x03 | ((n) << 4))
51#define TW286x_AUDIO_OUTPUT_VOL_ADDR 0xdf
52#define TW286x_AUDIO_INPUT_GAIN_ADDR(n) (0xD0 + ((n > 1) ? 1 : 0))
53
54int solo_tw28_init(struct solo_dev *solo_dev);
55
56int tw28_set_ctrl_val(struct solo_dev *solo_dev, u32 ctrl, u8 ch, s32 val);
57int tw28_get_ctrl_val(struct solo_dev *solo_dev, u32 ctrl, u8 ch, s32 *val);
58bool tw28_has_sharpness(struct solo_dev *solo_dev, u8 ch);
59
60u8 tw28_get_audio_gain(struct solo_dev *solo_dev, u8 ch);
61void tw28_set_audio_gain(struct solo_dev *solo_dev, u8 ch, u8 val);
62int tw28_get_video_status(struct solo_dev *solo_dev, u8 ch);
63
64#if 0
65unsigned int tw2815_get_audio_status(struct SOLO *solo);
66void tw2815_Set_AudioOutVol(struct SOLO *solo, unsigned int u_val);
67#endif
68
69#endif
70