From: Mauro Carvalho Chehab Date: Fri, 9 Dec 2011 10:01:01 +0000 (-0200) Subject: [media] xc5000: Add support for 7MHz bandwidth for DVB-C/DVB-T X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0433cd28f3a421e0be708c856c7d0c66d3f60bd7;p=mv-sheeva.git [media] xc5000: Add support for 7MHz bandwidth for DVB-C/DVB-T While xc5000 supports 7MHz bandwidth, the driver were lacking the code implementing this feature, causing tuning issues with VHF chanels used in Countries like Italy. After this patch: >>> tune to: 177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE 0x0000 0x0d49: pmt_pid 0x0102 RAI -- Rai 1 (running) 0x0000 0x0d4a: pmt_pid 0x0101 RAI -- Rai 2 (running) 0x0000 0x0d4b: pmt_pid 0x0100 RAI -- Rai 3 TGR Veneto (running) 0x0000 0x0d53: pmt_pid 0x0118 RAI -- Rai News (running) 0x0000 0x0d54: pmt_pid 0x0119 Rai -- Rai 3 TGR Emilia Romagna (running) 0x0000 0x0d4c: pmt_pid 0x0103 Rai -- Rai Radio1 (running) 0x0000 0x0d4d: pmt_pid 0x0104 Rai -- Rai Radio2 (running) 0x0000 0x0d4e: pmt_pid 0x0105 Rai -- Rai Radio3 (running) Network Name 'Rai' Tested-by: Eddi De Pieri Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c index 19990bcbf5b..97ad3389634 100644 --- a/drivers/media/common/tuners/xc5000.c +++ b/drivers/media/common/tuners/xc5000.c @@ -676,8 +676,10 @@ static int xc5000_set_params(struct dvb_frontend *fe, priv->freq_hz = params->frequency - 1750000; break; case BANDWIDTH_7_MHZ: - printk(KERN_ERR "xc5000 bandwidth 7MHz not supported\n"); - return -EINVAL; + priv->bandwidth = BANDWIDTH_7_MHZ; + priv->video_standard = DTV7; + priv->freq_hz = params->frequency - 2250000; + break; case BANDWIDTH_8_MHZ: priv->bandwidth = BANDWIDTH_8_MHZ; priv->video_standard = DTV8; @@ -715,6 +717,10 @@ static int xc5000_set_params(struct dvb_frontend *fe, priv->bandwidth = BANDWIDTH_6_MHZ; priv->video_standard = DTV6; priv->freq_hz = params->frequency - 1750000; + } else if (bw <= 7000000) { + priv->bandwidth = BANDWIDTH_7_MHZ; + priv->video_standard = DTV7; + priv->freq_hz = params->frequency - 2250000; } else { priv->bandwidth = BANDWIDTH_8_MHZ; priv->video_standard = DTV7_8;