aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-12-09 05:53:36 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-09 17:49:05 -0500
commit48763e2c6e76fbaa64229219593c1a456fd32c67 (patch)
tree8d2716b2ae7d8f62aa9fe953e11a6fa89c366fcf /drivers/media/dvb
parent0433cd28f3a421e0be708c856c7d0c66d3f60bd7 (diff)
[media] drxk: Switch the delivery system on FE_SET_PROPERTY
The DRX-K doesn't change the delivery system at set_properties, but do it at frontend init. This causes problems on programs like w_scan that, by default, opens both frontends. Instead, explicitly set the format when set_parameters callback is called. Tested-by: Eddi De Pieri <eddi@depieri.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/frontends/drxk_hard.c15
-rw-r--r--drivers/media/dvb/frontends/drxk_hard.h2
2 files changed, 12 insertions, 5 deletions
diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c
index 95cbc98176f..038e470bf03 100644
--- a/drivers/media/dvb/frontends/drxk_hard.c
+++ b/drivers/media/dvb/frontends/drxk_hard.c
@@ -1847,6 +1847,7 @@ static int SetOperationMode(struct drxk_state *state,
1847 */ 1847 */
1848 switch (oMode) { 1848 switch (oMode) {
1849 case OM_DVBT: 1849 case OM_DVBT:
1850 dprintk(1, ": DVB-T\n");
1850 state->m_OperationMode = oMode; 1851 state->m_OperationMode = oMode;
1851 status = SetDVBTStandard(state, oMode); 1852 status = SetDVBTStandard(state, oMode);
1852 if (status < 0) 1853 if (status < 0)
@@ -1854,6 +1855,8 @@ static int SetOperationMode(struct drxk_state *state,
1854 break; 1855 break;
1855 case OM_QAM_ITU_A: /* fallthrough */ 1856 case OM_QAM_ITU_A: /* fallthrough */
1856 case OM_QAM_ITU_C: 1857 case OM_QAM_ITU_C:
1858 dprintk(1, ": DVB-C Annex %c\n",
1859 (state->m_OperationMode == OM_QAM_ITU_A) ? 'A' : 'C');
1857 state->m_OperationMode = oMode; 1860 state->m_OperationMode = oMode;
1858 status = SetQAMStandard(state, oMode); 1861 status = SetQAMStandard(state, oMode);
1859 if (status < 0) 1862 if (status < 0)
@@ -6183,7 +6186,10 @@ static int drxk_c_init(struct dvb_frontend *fe)
6183 dprintk(1, "\n"); 6186 dprintk(1, "\n");
6184 if (mutex_trylock(&state->ctlock) == 0) 6187 if (mutex_trylock(&state->ctlock) == 0)
6185 return -EBUSY; 6188 return -EBUSY;
6186 SetOperationMode(state, OM_QAM_ITU_A); 6189 if (state->m_itut_annex_c)
6190 SetOperationMode(state, OM_QAM_ITU_C);
6191 else
6192 SetOperationMode(state, OM_QAM_ITU_A);
6187 return 0; 6193 return 0;
6188} 6194}
6189 6195
@@ -6219,12 +6225,11 @@ static int drxk_set_parameters(struct dvb_frontend *fe,
6219 return -EINVAL; 6225 return -EINVAL;
6220 } 6226 }
6221 6227
6222 if (state->m_OperationMode == OM_QAM_ITU_A || 6228 if (fe->ops.info.type == FE_QAM) {
6223 state->m_OperationMode == OM_QAM_ITU_C) {
6224 if (fe->dtv_property_cache.rolloff == ROLLOFF_13) 6229 if (fe->dtv_property_cache.rolloff == ROLLOFF_13)
6225 state->m_OperationMode = OM_QAM_ITU_C; 6230 state->m_itut_annex_c = true;
6226 else 6231 else
6227 state->m_OperationMode = OM_QAM_ITU_A; 6232 state->m_itut_annex_c = false;
6228 } 6233 }
6229 6234
6230 if (fe->ops.i2c_gate_ctrl) 6235 if (fe->ops.i2c_gate_ctrl)
diff --git a/drivers/media/dvb/frontends/drxk_hard.h b/drivers/media/dvb/frontends/drxk_hard.h
index a05c32eecdc..85a423f9196 100644
--- a/drivers/media/dvb/frontends/drxk_hard.h
+++ b/drivers/media/dvb/frontends/drxk_hard.h
@@ -263,6 +263,8 @@ struct drxk_state {
263 u8 m_TSDataStrength; 263 u8 m_TSDataStrength;
264 u8 m_TSClockkStrength; 264 u8 m_TSClockkStrength;
265 265
266 bool m_itut_annex_c; /* If true, uses ITU-T DVB-C Annex C, instead of Annex A */
267
266 enum DRXMPEGStrWidth_t m_widthSTR; /**< MPEG start width */ 268 enum DRXMPEGStrWidth_t m_widthSTR; /**< MPEG start width */
267 u32 m_mpegTsStaticBitrate; /**< Maximum bitrate in b/s in case 269 u32 m_mpegTsStaticBitrate; /**< Maximum bitrate in b/s in case
268 static clockrate is selected */ 270 static clockrate is selected */