From patchwork Sat Jun 16 19:04:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Schlabbach X-Patchwork-Id: 10468011 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E53B9600CC for ; Sat, 16 Jun 2018 19:04:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5F3B28A48 for ; Sat, 16 Jun 2018 19:04:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9ED628AE6; Sat, 16 Jun 2018 19:04:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, FROM_WORDY, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5784228A48 for ; Sat, 16 Jun 2018 19:04:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932752AbeFPTEY (ORCPT ); Sat, 16 Jun 2018 15:04:24 -0400 Received: from mout.gmx.net ([212.227.15.15]:35777 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932542AbeFPTEY (ORCPT ); Sat, 16 Jun 2018 15:04:24 -0400 Received: from [91.65.108.120] ([91.65.108.120]) by web-mail.gmx.net (3c-app-gmx-bs34.server.lan [172.19.170.86]) (via HTTP); Sat, 16 Jun 2018 21:04:22 +0200 MIME-Version: 1.0 Message-ID: From: "Robert Schlabbach" To: linux-media@vger.kernel.org Subject: [PATCH 1/1] media: em28xx: explicitly disable TS packet filter Date: Sat, 16 Jun 2018 21:04:22 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:YDLDzozhKV8zl55WCVKNuCleelfamhu08bIQpRkvaPq/tm2Dqz2Mycr097Bd6MvuHPc9X tHGH+REMHAWypxasjVIEy8rbig41Gsd5keJB28rVkBMEqtoPAALaeFyZYHGROSbV/CVY2b2BaEpC Wtbj2yksvOGYWbdV1ag8qZ7PAsC77YukIYwSQhZElHkbmyn3r3WXq4AzX+N1XOUHkDZ3nwCaa4ul mx9ZWKnfCkS5vzOqSVHD7mzM+WhETcDZmXvGN6gpRDm2ltwAlUFtDOOgi8K67WeRjhrU+xnAW8nt e0= X-UI-Out-Filterresults: notjunk:1; V01:K0:mjtw5Uv8tCs=:PUn3C4Rxml0s/FpRilTpU+ rWuOBiTOGxqkVY8GI6xs8zaO909snPFBIfHDryzRt/DQLMTB0QXlCYjpoTWIPUXUHCu5+xl88 yDkabMoqDrhT1loZX2A4g43fB2MwS0tp4oEvZxm5SJakrEsEkMmpsHocm49g3mlnrqdLbtUao zd2lJWLXjbCKvGnak3AU65vc/1Fan5nPa/zXcKzolyyZvINLmX8rx9d+qJ39QawkjohZba9Dp Vrze0otcPYXMhrjvhvnlMgzA03SeLmiTwYZYOKg35VcpuE68sIBAQLIVuipi7ew3p42QnP+C3 5p/ox0OCvY5KPPihtICT1E9rGTIgqaWEFU703g9YAzN9DjAzHQocmfwMtgmskpY0w+NG3jPrS eYeJzKHczDu0MuO1cDNBQiFfTAATgT8AZSXx+DujasOhHzH07wiIcTx2t/aJjYlbquuNLfg6f OR8g+bA1cWTpucpFlJOOmWFErk6s5u/vdKW0M9el7oh4CviqoiqT Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The em28xx driver never touched the EM2874 register bits that control the transport stream packet filters, leaving them at whatever default the firmware has set. E.g. the Pinnacle 290e disables them by default, while the Hauppauge WinTV dualHD enables discarding NULL packets by default. However, some applications require NULL packets, e.g. to determine the load in DOCSIS segments, so discarding NULL packets is undesired for such applications. This patch simply extends the bit mask when starting or stopping the transport stream packet capture, so that the filter bits are cleared. It has been verified that this makes the Hauppauge WinTV dualHD pass an unfiltered DVB-C stream including NULL packets, which it didn't before. Signed-off-by: Robert Schlabbach --- drivers/media/usb/em28xx/em28xx-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c index f70845e..45b2477 100644 --- a/drivers/media/usb/em28xx/em28xx-core.c +++ b/drivers/media/usb/em28xx/em28xx-core.c @@ -655,12 +655,12 @@ int em28xx_capture_start(struct em28xx *dev, int start) rc = em28xx_write_reg_bits(dev, EM2874_R5F_TS_ENABLE, start ? EM2874_TS1_CAPTURE_ENABLE : 0x00, - EM2874_TS1_CAPTURE_ENABLE); + EM2874_TS1_CAPTURE_ENABLE | EM2874_TS1_FILTER_ENABLE | EM2874_TS1_NULL_DISCARD); else rc = em28xx_write_reg_bits(dev, EM2874_R5F_TS_ENABLE, start ? EM2874_TS2_CAPTURE_ENABLE : 0x00, - EM2874_TS2_CAPTURE_ENABLE); + EM2874_TS2_CAPTURE_ENABLE | EM2874_TS2_FILTER_ENABLE | EM2874_TS2_NULL_DISCARD); } else { /* FIXME: which is the best order? */ /* video registers are sampled by VREF */