forked from bluecherrydvr/solo6x10
-
Notifications
You must be signed in to change notification settings - Fork 0
/
solo6010-tw28.h
70 lines (60 loc) · 2.49 KB
/
solo6010-tw28.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* Copyright (C) 2011 Bluecherry, LLC www.bluecherrydvr.com
*
* Original author:
* Ben Collins <[email protected]>
*
* Additional work by:
* John Brooks <[email protected]>
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*/
#ifndef __SOLO6010_TW28_H
#define __SOLO6010_TW28_H
#include "solo6010.h"
#define TW_NUM_CHIP 4
#define TW_BASE_ADDR 0x28
#define TW_CHIP_OFFSET_ADDR(n) (TW_BASE_ADDR + (n))
/* tw2815 */
#define TW_AV_STAT_ADDR 0x5a
#define TW_HUE_ADDR(n) (0x07 | ((n) << 4))
#define TW_SATURATION_ADDR(n) (0x08 | ((n) << 4))
#define TW_CONTRAST_ADDR(n) (0x09 | ((n) << 4))
#define TW_BRIGHTNESS_ADDR(n) (0x0a | ((n) << 4))
#define TW_AUDIO_OUTPUT_VOL_ADDR 0x70
#define TW_AUDIO_INPUT_GAIN_ADDR(n) (0x60 + ((n > 1) ? 1 : 0))
/* tw286x */
#define TW286x_AV_STAT_ADDR 0xfd
#define TW286x_HUE_ADDR(n) (0x06 | ((n) << 4))
#define TW286x_SATURATIONU_ADDR(n) (0x04 | ((n) << 4))
#define TW286x_SATURATIONV_ADDR(n) (0x05 | ((n) << 4))
#define TW286x_CONTRAST_ADDR(n) (0x02 | ((n) << 4))
#define TW286x_BRIGHTNESS_ADDR(n) (0x01 | ((n) << 4))
#define TW286x_SHARPNESS(n) (0x03 | ((n) << 4))
#define TW286x_AUDIO_OUTPUT_VOL_ADDR 0xdf
#define TW286x_AUDIO_INPUT_GAIN_ADDR(n) (0xD0 + ((n > 1) ? 1 : 0))
int solo_tw28_init(struct solo6010_dev *solo_dev);
int tw28_set_ctrl_val(struct solo6010_dev *solo_dev, u32 ctrl, u8 ch,
s32 val);
int tw28_get_ctrl_val(struct solo6010_dev *solo_dev, u32 ctrl, u8 ch,
s32 *val);
u8 tw28_get_audio_gain(struct solo6010_dev *solo_dev, u8 ch);
void tw28_set_audio_gain(struct solo6010_dev *solo_dev, u8 ch, u8 val);
int tw28_get_video_status(struct solo6010_dev *solo_dev, u8 ch);
#if 0
unsigned int tw2815_get_audio_status(struct SOLO6010 *solo6010);
void tw2815_Set_AudioOutVol(struct SOLO6010 *solo6010, unsigned int u_val);
#endif
#endif /* __SOLO6010_TW28_H */