diff options
author | Steven Toth <stoth@linuxtv.org> | 2008-09-11 23:53:50 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:37:05 -0400 |
commit | 80a773c9bcc6f67944e186de3d2ab8b582889bc8 (patch) | |
tree | 02f19034a5168b0b2b26328417d551ac2671ab56 /drivers/media | |
parent | d7c1500183bc138b634377ed90c046e722b887d8 (diff) |
V4L/DVB (9002): S2API: Ensure cache->delivery_system is set at all times.
This helps complex demods which support different modulation types
be better informed.
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index dc76f9935c81..205f60262c37 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -1010,11 +1010,13 @@ void dtv_property_cache_sync(struct dvb_frontend *fe, struct dvb_frontend_parame | |||
1010 | case FE_QPSK: | 1010 | case FE_QPSK: |
1011 | c->symbol_rate = p->u.qpsk.symbol_rate; | 1011 | c->symbol_rate = p->u.qpsk.symbol_rate; |
1012 | c->fec_inner = p->u.qpsk.fec_inner; | 1012 | c->fec_inner = p->u.qpsk.fec_inner; |
1013 | c->delivery_system = SYS_DVBS; | ||
1013 | break; | 1014 | break; |
1014 | case FE_QAM: | 1015 | case FE_QAM: |
1015 | c->symbol_rate = p->u.qam.symbol_rate; | 1016 | c->symbol_rate = p->u.qam.symbol_rate; |
1016 | c->fec_inner = p->u.qam.fec_inner; | 1017 | c->fec_inner = p->u.qam.fec_inner; |
1017 | c->modulation = p->u.qam.modulation; | 1018 | c->modulation = p->u.qam.modulation; |
1019 | c->delivery_system = SYS_DVBC_ANNEX_AC; | ||
1018 | break; | 1020 | break; |
1019 | case FE_OFDM: | 1021 | case FE_OFDM: |
1020 | c->bandwidth = p->u.ofdm.bandwidth; | 1022 | c->bandwidth = p->u.ofdm.bandwidth; |
@@ -1024,9 +1026,14 @@ void dtv_property_cache_sync(struct dvb_frontend *fe, struct dvb_frontend_parame | |||
1024 | c->transmission_mode = p->u.ofdm.transmission_mode; | 1026 | c->transmission_mode = p->u.ofdm.transmission_mode; |
1025 | c->guard_interval = p->u.ofdm.guard_interval; | 1027 | c->guard_interval = p->u.ofdm.guard_interval; |
1026 | c->hierarchy = p->u.ofdm.hierarchy_information; | 1028 | c->hierarchy = p->u.ofdm.hierarchy_information; |
1029 | c->delivery_system = SYS_DVBT; | ||
1027 | break; | 1030 | break; |
1028 | case FE_ATSC: | 1031 | case FE_ATSC: |
1029 | c->modulation = p->u.vsb.modulation; | 1032 | c->modulation = p->u.vsb.modulation; |
1033 | if ((c->modulation == VSB_8) || (c->modulation == VSB_16)) | ||
1034 | c->delivery_system = SYS_ATSC; | ||
1035 | else | ||
1036 | c->delivery_system = SYS_DVBC_ANNEX_B; | ||
1030 | break; | 1037 | break; |
1031 | } | 1038 | } |
1032 | } | 1039 | } |
@@ -1050,12 +1057,14 @@ void dtv_property_legacy_params_sync(struct dvb_frontend *fe) | |||
1050 | printk("%s() Preparing QPSK req\n", __FUNCTION__); | 1057 | printk("%s() Preparing QPSK req\n", __FUNCTION__); |
1051 | p->u.qpsk.symbol_rate = c->symbol_rate; | 1058 | p->u.qpsk.symbol_rate = c->symbol_rate; |
1052 | p->u.qpsk.fec_inner = c->fec_inner; | 1059 | p->u.qpsk.fec_inner = c->fec_inner; |
1060 | c->delivery_system = SYS_DVBS; | ||
1053 | break; | 1061 | break; |
1054 | case FE_QAM: | 1062 | case FE_QAM: |
1055 | printk("%s() Preparing QAM req\n", __FUNCTION__); | 1063 | printk("%s() Preparing QAM req\n", __FUNCTION__); |
1056 | p->u.qam.symbol_rate = c->symbol_rate; | 1064 | p->u.qam.symbol_rate = c->symbol_rate; |
1057 | p->u.qam.fec_inner = c->fec_inner; | 1065 | p->u.qam.fec_inner = c->fec_inner; |
1058 | p->u.qam.modulation = c->modulation; | 1066 | p->u.qam.modulation = c->modulation; |
1067 | c->delivery_system = SYS_DVBC_ANNEX_AC; | ||
1059 | break; | 1068 | break; |
1060 | case FE_OFDM: | 1069 | case FE_OFDM: |
1061 | printk("%s() Preparing OFDM req\n", __FUNCTION__); | 1070 | printk("%s() Preparing OFDM req\n", __FUNCTION__); |
@@ -1066,10 +1075,15 @@ void dtv_property_legacy_params_sync(struct dvb_frontend *fe) | |||
1066 | p->u.ofdm.transmission_mode = c->transmission_mode; | 1075 | p->u.ofdm.transmission_mode = c->transmission_mode; |
1067 | p->u.ofdm.guard_interval = c->guard_interval; | 1076 | p->u.ofdm.guard_interval = c->guard_interval; |
1068 | p->u.ofdm.hierarchy_information = c->hierarchy; | 1077 | p->u.ofdm.hierarchy_information = c->hierarchy; |
1078 | c->delivery_system = SYS_DVBT; | ||
1069 | break; | 1079 | break; |
1070 | case FE_ATSC: | 1080 | case FE_ATSC: |
1071 | printk("%s() Preparing VSB req\n", __FUNCTION__); | 1081 | printk("%s() Preparing VSB req\n", __FUNCTION__); |
1072 | p->u.vsb.modulation = c->modulation; | 1082 | p->u.vsb.modulation = c->modulation; |
1083 | if ((c->modulation == VSB_8) || (c->modulation == VSB_16)) | ||
1084 | c->delivery_system = SYS_ATSC; | ||
1085 | else | ||
1086 | c->delivery_system = SYS_DVBC_ANNEX_B; | ||
1073 | break; | 1087 | break; |
1074 | } | 1088 | } |
1075 | } | 1089 | } |