提交 2e94b53c 编写于 作者: M Mauro Carvalho Chehab

[media] dib7000m/dib7000p: Add support for TRANSMISSION_MODE_4K

Fixes several warnings:

drivers/media/dvb/frontends/dib7000m.c: In function ‘dib7000m_set_channel’:
drivers/media/dvb/frontends/dib7000m.c:808:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000m.c:869:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000m.c: In function ‘dib7000m_tune’:
drivers/media/dvb/frontends/dib7000m.c:1023:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000m.c:1033:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000m.c:1043:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c: In function ‘dib7000p_set_channel’:
drivers/media/dvb/frontends/dib7000p.c:720:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c:773:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c: In function ‘dib7000p_tune’:
drivers/media/dvb/frontends/dib7000p.c:997:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c:1007:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c:1017:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’

The drivers were prepared to support 4K carriers, but as the define were added
later, they were using a "magic" value of 255.

Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 d78aa729
...@@ -805,7 +805,7 @@ static void dib7000m_set_channel(struct dib7000m_state *state, struct dvb_fronte ...@@ -805,7 +805,7 @@ static void dib7000m_set_channel(struct dib7000m_state *state, struct dvb_fronte
value = 0; value = 0;
switch (ch->u.ofdm.transmission_mode) { switch (ch->u.ofdm.transmission_mode) {
case TRANSMISSION_MODE_2K: value |= (0 << 7); break; case TRANSMISSION_MODE_2K: value |= (0 << 7); break;
case /* 4K MODE */ 255: value |= (2 << 7); break; case TRANSMISSION_MODE_4K: value |= (2 << 7); break;
default: default:
case TRANSMISSION_MODE_8K: value |= (1 << 7); break; case TRANSMISSION_MODE_8K: value |= (1 << 7); break;
} }
...@@ -866,7 +866,7 @@ static void dib7000m_set_channel(struct dib7000m_state *state, struct dvb_fronte ...@@ -866,7 +866,7 @@ static void dib7000m_set_channel(struct dib7000m_state *state, struct dvb_fronte
/* P_dvsy_sync_wait */ /* P_dvsy_sync_wait */
switch (ch->u.ofdm.transmission_mode) { switch (ch->u.ofdm.transmission_mode) {
case TRANSMISSION_MODE_8K: value = 256; break; case TRANSMISSION_MODE_8K: value = 256; break;
case /* 4K MODE */ 255: value = 128; break; case TRANSMISSION_MODE_4K: value = 128; break;
case TRANSMISSION_MODE_2K: case TRANSMISSION_MODE_2K:
default: value = 64; break; default: value = 64; break;
} }
...@@ -1020,7 +1020,7 @@ static int dib7000m_tune(struct dvb_frontend *demod, struct dvb_frontend_paramet ...@@ -1020,7 +1020,7 @@ static int dib7000m_tune(struct dvb_frontend *demod, struct dvb_frontend_paramet
value = (6 << 8) | 0x80; value = (6 << 8) | 0x80;
switch (ch->u.ofdm.transmission_mode) { switch (ch->u.ofdm.transmission_mode) {
case TRANSMISSION_MODE_2K: value |= (7 << 12); break; case TRANSMISSION_MODE_2K: value |= (7 << 12); break;
case /* 4K MODE */ 255: value |= (8 << 12); break; case TRANSMISSION_MODE_4K: value |= (8 << 12); break;
default: default:
case TRANSMISSION_MODE_8K: value |= (9 << 12); break; case TRANSMISSION_MODE_8K: value |= (9 << 12); break;
} }
...@@ -1030,7 +1030,7 @@ static int dib7000m_tune(struct dvb_frontend *demod, struct dvb_frontend_paramet ...@@ -1030,7 +1030,7 @@ static int dib7000m_tune(struct dvb_frontend *demod, struct dvb_frontend_paramet
value = (0 << 4); value = (0 << 4);
switch (ch->u.ofdm.transmission_mode) { switch (ch->u.ofdm.transmission_mode) {
case TRANSMISSION_MODE_2K: value |= 0x6; break; case TRANSMISSION_MODE_2K: value |= 0x6; break;
case /* 4K MODE */ 255: value |= 0x7; break; case TRANSMISSION_MODE_4K: value |= 0x7; break;
default: default:
case TRANSMISSION_MODE_8K: value |= 0x8; break; case TRANSMISSION_MODE_8K: value |= 0x8; break;
} }
...@@ -1040,7 +1040,7 @@ static int dib7000m_tune(struct dvb_frontend *demod, struct dvb_frontend_paramet ...@@ -1040,7 +1040,7 @@ static int dib7000m_tune(struct dvb_frontend *demod, struct dvb_frontend_paramet
value = (0 << 4); value = (0 << 4);
switch (ch->u.ofdm.transmission_mode) { switch (ch->u.ofdm.transmission_mode) {
case TRANSMISSION_MODE_2K: value |= 0x6; break; case TRANSMISSION_MODE_2K: value |= 0x6; break;
case /* 4K MODE */ 255: value |= 0x7; break; case TRANSMISSION_MODE_4K: value |= 0x7; break;
default: default:
case TRANSMISSION_MODE_8K: value |= 0x8; break; case TRANSMISSION_MODE_8K: value |= 0x8; break;
} }
......
...@@ -717,7 +717,7 @@ static void dib7000p_set_channel(struct dib7000p_state *state, struct dvb_fronte ...@@ -717,7 +717,7 @@ static void dib7000p_set_channel(struct dib7000p_state *state, struct dvb_fronte
value = 0; value = 0;
switch (ch->u.ofdm.transmission_mode) { switch (ch->u.ofdm.transmission_mode) {
case TRANSMISSION_MODE_2K: value |= (0 << 7); break; case TRANSMISSION_MODE_2K: value |= (0 << 7); break;
case /* 4K MODE */ 255: value |= (2 << 7); break; case TRANSMISSION_MODE_4K: value |= (2 << 7); break;
default: default:
case TRANSMISSION_MODE_8K: value |= (1 << 7); break; case TRANSMISSION_MODE_8K: value |= (1 << 7); break;
} }
...@@ -770,7 +770,7 @@ static void dib7000p_set_channel(struct dib7000p_state *state, struct dvb_fronte ...@@ -770,7 +770,7 @@ static void dib7000p_set_channel(struct dib7000p_state *state, struct dvb_fronte
/* P_dvsy_sync_wait */ /* P_dvsy_sync_wait */
switch (ch->u.ofdm.transmission_mode) { switch (ch->u.ofdm.transmission_mode) {
case TRANSMISSION_MODE_8K: value = 256; break; case TRANSMISSION_MODE_8K: value = 256; break;
case /* 4K MODE */ 255: value = 128; break; case TRANSMISSION_MODE_4K: value = 128; break;
case TRANSMISSION_MODE_2K: case TRANSMISSION_MODE_2K:
default: value = 64; break; default: value = 64; break;
} }
...@@ -994,7 +994,7 @@ static int dib7000p_tune(struct dvb_frontend *demod, struct dvb_frontend_paramet ...@@ -994,7 +994,7 @@ static int dib7000p_tune(struct dvb_frontend *demod, struct dvb_frontend_paramet
tmp = (6 << 8) | 0x80; tmp = (6 << 8) | 0x80;
switch (ch->u.ofdm.transmission_mode) { switch (ch->u.ofdm.transmission_mode) {
case TRANSMISSION_MODE_2K: tmp |= (7 << 12); break; case TRANSMISSION_MODE_2K: tmp |= (7 << 12); break;
case /* 4K MODE */ 255: tmp |= (8 << 12); break; case TRANSMISSION_MODE_4K: tmp |= (8 << 12); break;
default: default:
case TRANSMISSION_MODE_8K: tmp |= (9 << 12); break; case TRANSMISSION_MODE_8K: tmp |= (9 << 12); break;
} }
...@@ -1004,7 +1004,7 @@ static int dib7000p_tune(struct dvb_frontend *demod, struct dvb_frontend_paramet ...@@ -1004,7 +1004,7 @@ static int dib7000p_tune(struct dvb_frontend *demod, struct dvb_frontend_paramet
tmp = (0 << 4); tmp = (0 << 4);
switch (ch->u.ofdm.transmission_mode) { switch (ch->u.ofdm.transmission_mode) {
case TRANSMISSION_MODE_2K: tmp |= 0x6; break; case TRANSMISSION_MODE_2K: tmp |= 0x6; break;
case /* 4K MODE */ 255: tmp |= 0x7; break; case TRANSMISSION_MODE_4K: tmp |= 0x7; break;
default: default:
case TRANSMISSION_MODE_8K: tmp |= 0x8; break; case TRANSMISSION_MODE_8K: tmp |= 0x8; break;
} }
...@@ -1014,7 +1014,7 @@ static int dib7000p_tune(struct dvb_frontend *demod, struct dvb_frontend_paramet ...@@ -1014,7 +1014,7 @@ static int dib7000p_tune(struct dvb_frontend *demod, struct dvb_frontend_paramet
tmp = (0 << 4); tmp = (0 << 4);
switch (ch->u.ofdm.transmission_mode) { switch (ch->u.ofdm.transmission_mode) {
case TRANSMISSION_MODE_2K: tmp |= 0x6; break; case TRANSMISSION_MODE_2K: tmp |= 0x6; break;
case /* 4K MODE */ 255: tmp |= 0x7; break; case TRANSMISSION_MODE_4K: tmp |= 0x7; break;
default: default:
case TRANSMISSION_MODE_8K: tmp |= 0x8; break; case TRANSMISSION_MODE_8K: tmp |= 0x8; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册