diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-10-23 19:09:42 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-05 15:40:37 -0500 |
commit | 06d3a396b26e48012ce0f2ee21b1fdff092d8d4a (patch) | |
tree | 8f2b9209663b1597a391e1eff6c2be46aeec94a5 /drivers/media/dvb | |
parent | b232a012adfea9f535702e8296ea6b76e691f436 (diff) |
V4L/DVB (13157): dvb_frontend: represent all DVBS2API commands via macro
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 159 |
1 files changed, 26 insertions, 133 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index e9ec8e911056..07461222a7f5 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -895,104 +895,27 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe) | |||
895 | } | 895 | } |
896 | 896 | ||
897 | static struct dtv_cmds_h dtv_cmds[] = { | 897 | static struct dtv_cmds_h dtv_cmds[] = { |
898 | [DTV_TUNE] = { | 898 | _DTV_CMD(DTV_TUNE, 1, 0), |
899 | .name = "DTV_TUNE", | 899 | _DTV_CMD(DTV_CLEAR, 1, 0), |
900 | .cmd = DTV_TUNE, | ||
901 | .set = 1, | ||
902 | }, | ||
903 | [DTV_CLEAR] = { | ||
904 | .name = "DTV_CLEAR", | ||
905 | .cmd = DTV_CLEAR, | ||
906 | .set = 1, | ||
907 | }, | ||
908 | 900 | ||
909 | /* Set */ | 901 | /* Set */ |
910 | [DTV_FREQUENCY] = { | 902 | _DTV_CMD(DTV_FREQUENCY, 1, 0), |
911 | .name = "DTV_FREQUENCY", | 903 | _DTV_CMD(DTV_BANDWIDTH_HZ, 1, 0), |
912 | .cmd = DTV_FREQUENCY, | 904 | _DTV_CMD(DTV_MODULATION, 1, 0), |
913 | .set = 1, | 905 | _DTV_CMD(DTV_INVERSION, 1, 0), |
914 | }, | 906 | _DTV_CMD(DTV_DISEQC_MASTER, 1, 1), |
915 | [DTV_BANDWIDTH_HZ] = { | 907 | _DTV_CMD(DTV_SYMBOL_RATE, 1, 0), |
916 | .name = "DTV_BANDWIDTH_HZ", | 908 | _DTV_CMD(DTV_INNER_FEC, 1, 0), |
917 | .cmd = DTV_BANDWIDTH_HZ, | 909 | _DTV_CMD(DTV_VOLTAGE, 1, 0), |
918 | .set = 1, | 910 | _DTV_CMD(DTV_TONE, 1, 0), |
919 | }, | 911 | _DTV_CMD(DTV_PILOT, 1, 0), |
920 | [DTV_MODULATION] = { | 912 | _DTV_CMD(DTV_ROLLOFF, 1, 0), |
921 | .name = "DTV_MODULATION", | 913 | _DTV_CMD(DTV_DELIVERY_SYSTEM, 1, 0), |
922 | .cmd = DTV_MODULATION, | 914 | _DTV_CMD(DTV_HIERARCHY, 1, 0), |
923 | .set = 1, | 915 | _DTV_CMD(DTV_CODE_RATE_HP, 1, 0), |
924 | }, | 916 | _DTV_CMD(DTV_CODE_RATE_LP, 1, 0), |
925 | [DTV_INVERSION] = { | 917 | _DTV_CMD(DTV_GUARD_INTERVAL, 1, 0), |
926 | .name = "DTV_INVERSION", | 918 | _DTV_CMD(DTV_TRANSMISSION_MODE, 1, 0), |
927 | .cmd = DTV_INVERSION, | ||
928 | .set = 1, | ||
929 | }, | ||
930 | [DTV_DISEQC_MASTER] = { | ||
931 | .name = "DTV_DISEQC_MASTER", | ||
932 | .cmd = DTV_DISEQC_MASTER, | ||
933 | .set = 1, | ||
934 | .buffer = 1, | ||
935 | }, | ||
936 | [DTV_SYMBOL_RATE] = { | ||
937 | .name = "DTV_SYMBOL_RATE", | ||
938 | .cmd = DTV_SYMBOL_RATE, | ||
939 | .set = 1, | ||
940 | }, | ||
941 | [DTV_INNER_FEC] = { | ||
942 | .name = "DTV_INNER_FEC", | ||
943 | .cmd = DTV_INNER_FEC, | ||
944 | .set = 1, | ||
945 | }, | ||
946 | [DTV_VOLTAGE] = { | ||
947 | .name = "DTV_VOLTAGE", | ||
948 | .cmd = DTV_VOLTAGE, | ||
949 | .set = 1, | ||
950 | }, | ||
951 | [DTV_TONE] = { | ||
952 | .name = "DTV_TONE", | ||
953 | .cmd = DTV_TONE, | ||
954 | .set = 1, | ||
955 | }, | ||
956 | [DTV_PILOT] = { | ||
957 | .name = "DTV_PILOT", | ||
958 | .cmd = DTV_PILOT, | ||
959 | .set = 1, | ||
960 | }, | ||
961 | [DTV_ROLLOFF] = { | ||
962 | .name = "DTV_ROLLOFF", | ||
963 | .cmd = DTV_ROLLOFF, | ||
964 | .set = 1, | ||
965 | }, | ||
966 | [DTV_DELIVERY_SYSTEM] = { | ||
967 | .name = "DTV_DELIVERY_SYSTEM", | ||
968 | .cmd = DTV_DELIVERY_SYSTEM, | ||
969 | .set = 1, | ||
970 | }, | ||
971 | [DTV_HIERARCHY] = { | ||
972 | .name = "DTV_HIERARCHY", | ||
973 | .cmd = DTV_HIERARCHY, | ||
974 | .set = 1, | ||
975 | }, | ||
976 | [DTV_CODE_RATE_HP] = { | ||
977 | .name = "DTV_CODE_RATE_HP", | ||
978 | .cmd = DTV_CODE_RATE_HP, | ||
979 | .set = 1, | ||
980 | }, | ||
981 | [DTV_CODE_RATE_LP] = { | ||
982 | .name = "DTV_CODE_RATE_LP", | ||
983 | .cmd = DTV_CODE_RATE_LP, | ||
984 | .set = 1, | ||
985 | }, | ||
986 | [DTV_GUARD_INTERVAL] = { | ||
987 | .name = "DTV_GUARD_INTERVAL", | ||
988 | .cmd = DTV_GUARD_INTERVAL, | ||
989 | .set = 1, | ||
990 | }, | ||
991 | [DTV_TRANSMISSION_MODE] = { | ||
992 | .name = "DTV_TRANSMISSION_MODE", | ||
993 | .cmd = DTV_TRANSMISSION_MODE, | ||
994 | .set = 1, | ||
995 | }, | ||
996 | 919 | ||
997 | _DTV_CMD(DTV_ISDBT_PARTIAL_RECEPTION, 1, 0), | 920 | _DTV_CMD(DTV_ISDBT_PARTIAL_RECEPTION, 1, 0), |
998 | _DTV_CMD(DTV_ISDBT_SOUND_BROADCASTING, 1, 0), | 921 | _DTV_CMD(DTV_ISDBT_SOUND_BROADCASTING, 1, 0), |
@@ -1035,43 +958,13 @@ static struct dtv_cmds_h dtv_cmds[] = { | |||
1035 | _DTV_CMD(DTV_ISDBS_TS_ID, 1, 0), | 958 | _DTV_CMD(DTV_ISDBS_TS_ID, 1, 0), |
1036 | 959 | ||
1037 | /* Get */ | 960 | /* Get */ |
1038 | [DTV_DISEQC_SLAVE_REPLY] = { | 961 | _DTV_CMD(DTV_DISEQC_SLAVE_REPLY, 0, 1), |
1039 | .name = "DTV_DISEQC_SLAVE_REPLY", | 962 | _DTV_CMD(DTV_API_VERSION, 0, 0), |
1040 | .cmd = DTV_DISEQC_SLAVE_REPLY, | 963 | _DTV_CMD(DTV_CODE_RATE_HP, 0, 0), |
1041 | .set = 0, | 964 | _DTV_CMD(DTV_CODE_RATE_LP, 0, 0), |
1042 | .buffer = 1, | 965 | _DTV_CMD(DTV_GUARD_INTERVAL, 0, 0), |
1043 | }, | 966 | _DTV_CMD(DTV_TRANSMISSION_MODE, 0, 0), |
1044 | 967 | _DTV_CMD(DTV_HIERARCHY, 0, 0), | |
1045 | [DTV_API_VERSION] = { | ||
1046 | .name = "DTV_API_VERSION", | ||
1047 | .cmd = DTV_API_VERSION, | ||
1048 | .set = 0, | ||
1049 | }, | ||
1050 | [DTV_CODE_RATE_HP] = { | ||
1051 | .name = "DTV_CODE_RATE_HP", | ||
1052 | .cmd = DTV_CODE_RATE_HP, | ||
1053 | .set = 0, | ||
1054 | }, | ||
1055 | [DTV_CODE_RATE_LP] = { | ||
1056 | .name = "DTV_CODE_RATE_LP", | ||
1057 | .cmd = DTV_CODE_RATE_LP, | ||
1058 | .set = 0, | ||
1059 | }, | ||
1060 | [DTV_GUARD_INTERVAL] = { | ||
1061 | .name = "DTV_GUARD_INTERVAL", | ||
1062 | .cmd = DTV_GUARD_INTERVAL, | ||
1063 | .set = 0, | ||
1064 | }, | ||
1065 | [DTV_TRANSMISSION_MODE] = { | ||
1066 | .name = "DTV_TRANSMISSION_MODE", | ||
1067 | .cmd = DTV_TRANSMISSION_MODE, | ||
1068 | .set = 0, | ||
1069 | }, | ||
1070 | [DTV_HIERARCHY] = { | ||
1071 | .name = "DTV_HIERARCHY", | ||
1072 | .cmd = DTV_HIERARCHY, | ||
1073 | .set = 0, | ||
1074 | }, | ||
1075 | }; | 968 | }; |
1076 | 969 | ||
1077 | static void dtv_property_dump(struct dtv_property *tvp) | 970 | static void dtv_property_dump(struct dtv_property *tvp) |