Return-path: Received: from mailout3.w2.samsung.com ([211.189.100.13]:35066 "EHLO usmailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755936AbaGVRDK (ORCPT ); Tue, 22 Jul 2014 13:03:10 -0400 Received: from uscpsbgm1.samsung.com (u114.gpu85.samsung.co.kr [203.254.195.114]) by usmailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N9400CANI18A940@usmailout3.samsung.com> for linux-media@vger.kernel.org; Tue, 22 Jul 2014 13:03:08 -0400 (EDT) Date: Tue, 22 Jul 2014 14:03:04 -0300 From: Mauro Carvalho Chehab To: Luis Alves Cc: linux-media , Antti Palosaari Subject: Re: [PATCH] si2157: Fix DVB-C bandwidth. Message-id: <20140722140304.79ba1bcd.m.chehab@samsung.com> In-reply-to: References: <1406027388-10336-1-git-send-email-ljalvs@gmail.com> <20140722131059.4ad26777.m.chehab@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: Em Tue, 22 Jul 2014 17:28:07 +0100 Luis Alves escreveu: > That's right, > A few days ago I also checked that with Antti. I've also had made some > debugging and DVB core is in fact passing the correct bandwidth to the > driver. > > But the true is that it doesn't work... > The sample I have is a dvb-c mux using QAM128 @ 6 Mbaud (which results > in 7MHz bw) using 7MHz filter value will make the TS stream > unwatchable (lots of continuity errors). > > Can this be a hardware fault? > All closed source drivers I've seen are hardcoding this value to 8MHz > when working in dvb-c (easily seen on i2c sniffs). Could be. Well, here, the DVB-C channel operators use 6MHz-spaced channels, with symbol rate equal to 5,217 Kbaud. I'll see if I can test it latter this week with a PCTV 292e. Regards, Mauro > > > On Tue, Jul 22, 2014 at 5:10 PM, Mauro Carvalho Chehab > wrote: > > Em Tue, 22 Jul 2014 12:09:48 +0100 > > Luis Alves escreveu: > > > >> This patch fixes DVB-C reception. > >> Without setting the bandwidth to 8MHz the received stream gets corrupted. > >> > >> Regards, > >> Luis > >> > >> Signed-off-by: Luis Alves > >> --- > >> drivers/media/tuners/si2157.c | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c > >> index 6c53edb..e2de428 100644 > >> --- a/drivers/media/tuners/si2157.c > >> +++ b/drivers/media/tuners/si2157.c > >> @@ -245,6 +245,7 @@ static int si2157_set_params(struct dvb_frontend *fe) > >> break; > >> case SYS_DVBC_ANNEX_A: > >> delivery_system = 0x30; > >> + bandwidth = 0x08; > > > > Hmm... this patch looks wrong, as it will break DVB-C support where > > the bandwidth is lower than 6MHz. > > > > The DVB core sets c->bandwidth_hz for DVB-C based on the rolloff and > > the symbol rate. If this is not working for you, then something else > > is likely wrong. > > > > I suggest you to add a printk() there to show what's the value set > > at c->bandwidth_hz and what's the symbol rate that you're using. > > > > On DVB-C, the rolloff is fixed (1.15 for annex A and 1.13 for Annex C). > > Not sure if DVB-C2 allows selecting a different rolloff factor, nor > > if si2157 works with DVB-C2. > > > >> break; > >> default: > >> ret = -EINVAL;