summaryrefslogtreecommitdiff
path: root/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_hdmi.h
blob: fc79bd9b8f469c295b558a47c18fc3acb470273c (plain)
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
71
72
/**********************************************************************
 *
 * HDFF firmware command interface library
 *
 * Copyright (C) 2011  Andreas Regel
 *
 * 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.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 *********************************************************************/

#ifndef HDFFCMD_HDMI_H
#define HDFFCMD_HDMI_H


typedef enum HdffVideoMode_t
{
    HDFF_VIDEO_MODE_576P50 = 18,
    HDFF_VIDEO_MODE_720P50 = 19,
    HDFF_VIDEO_MODE_1080I50 = 20,
    HDFF_VIDEO_MODE_576I50 = 22
} HdffVideoMode_t;

typedef enum HdffVideoModeAdaption_t
{
    HDFF_VIDEO_MODE_ADAPT_OFF,
    HDFF_VIDEO_MODE_ADAPT_FRAME_RATE,
    HDFF_VIDEO_MODE_ADAPT_ONLY_FOR_HD,
    HDFF_VIDEO_MODE_ADAPT_ALWAYS
} HdffVideoModeAdaption_t;

typedef struct HdffHdmiConfig_t
{
    int TransmitAudio;
    int ForceDviMode;
    int CecEnabled;
    HdffVideoModeAdaption_t VideoModeAdaption;
    char CecDeviceName[14];
} HdffHdmiConfig_t;

typedef enum HdffCecCommand_t
{
    HDFF_CEC_COMMAND_TV_ON,
    HDFF_CEC_COMMAND_TV_OFF,
    HDFF_CEC_COMMAND_ACTIVE_SOURCE,
    HDFF_CEC_COMMAND_INACTIVE_SOURCE
} HdffCecCommand_t;


int HdffCmdHdmiSetVideoMode(int OsdDevice, HdffVideoMode_t VideoMode);

int HdffCmdHdmiConfigure(int OsdDevice, const HdffHdmiConfig_t * Config);

int HdffCmdHdmiSendCecCommand(int OsdDevice, HdffCecCommand_t Command);

int HdffCmdHdmiSendRawCecCommand(int OsdDevice, uint8_t Destination,
                                 uint8_t Opcode, const uint8_t * Operand,
                                 uint8_t OperandLength);

#endif /* HDFFCMD_HDMI_H */