From patchwork Fri May 22 20:28:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jemma Denson X-Patchwork-Id: 6467651 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3C4629F1C1 for ; Fri, 22 May 2015 20:29:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5026F203E6 for ; Fri, 22 May 2015 20:29:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E0CE20439 for ; Fri, 22 May 2015 20:29:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757341AbbEVU3D (ORCPT ); Fri, 22 May 2015 16:29:03 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:34812 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757371AbbEVU3C (ORCPT ); Fri, 22 May 2015 16:29:02 -0400 Received: by wghq2 with SMTP id q2so27646942wgh.1 for ; Fri, 22 May 2015 13:29:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SPhdTDbGFNuP92yr1yhDUY8+9QiCApwcOlNKGDJJ3bk=; b=rDPWyv5vEmZ8VkTeZXcjBOyaFJm+0D6i+7VtTbrPRd09y1vWCAx2+wgDM1t7gPIjkB afBUqQKkKhuPJPmoKdV4D63eSYr1OHriwrKhvbSr+G6u5P/czH2pJMzGdUePfHTwIzFg AkAZ3Jgww3vOUVM0OTO+nLdeKH9Cq+uDLv9tCq8NYxAi6JYE1dOpi9y/KRMdluwX14zE KabNFNU0s4DLQwXluhb1IuHQn0UjCmF9MmrDQr0s8GymcFrYIVlejLBbLJgDeAQtOOWY Nc7Ucq8xhOFc3hY434Ru37k8h8Wyc4+aj/A4biFwBY8N034t5zcXsRY4vN6BBMiQdmFY MkzA== X-Received: by 10.180.91.137 with SMTP id ce9mr10579970wib.76.1432326541396; Fri, 22 May 2015 13:29:01 -0700 (PDT) Received: from jemma-pc.denson.org.uk ([84.92.43.36]) by mx.google.com with ESMTPSA id vz2sm1968004wjc.20.2015.05.22.13.29.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 May 2015 13:29:00 -0700 (PDT) From: Jemma Denson To: linux-media@vger.kernel.org Cc: mchehab@osg.samsung.com, patrick.boettcher@posteo.de, Jemma Denson Subject: [PATCH 2/4] b2c2: Allow external stream control Date: Fri, 22 May 2015 21:28:26 +0100 Message-Id: <1432326508-6825-3-git-send-email-jdenson@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1432326508-6825-1-git-send-email-jdenson@gmail.com> References: <1432326508-6825-1-git-send-email-jdenson@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch brings in a feature present in the gpl patch portion of the SkystarS2 driver available for download from Technisat. The patch is identical save for renaming the configuration variable, and also directly exposing the flexcop_rcv_data_ctrl() instead of wrapping it around a separate function. The feature added is to allow passing control of the flexcop receive stream to another device, such as the demod chip. Signed-off-by: Jemma Denson --- drivers/media/common/b2c2/flexcop-common.h | 2 ++ drivers/media/common/b2c2/flexcop-hw-filter.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/media/common/b2c2/flexcop-common.h b/drivers/media/common/b2c2/flexcop-common.h index 2b2460e..7075043 100644 --- a/drivers/media/common/b2c2/flexcop-common.h +++ b/drivers/media/common/b2c2/flexcop-common.h @@ -91,6 +91,7 @@ struct flexcop_device { int feedcount; int pid_filtering; int fullts_streaming_state; + int external_stream_control; int skip_6_hw_pid_filter; /* bus specific callbacks */ @@ -174,6 +175,7 @@ void flexcop_dump_reg(struct flexcop_device *fc, flexcop_ibi_register reg, int num); /* from flexcop-hw-filter.c */ +void flexcop_rcv_data_ctrl(struct flexcop_device *fc, int onoff); int flexcop_pid_feed_control(struct flexcop_device *fc, struct dvb_demux_feed *dvbdmxfeed, int onoff); void flexcop_hw_filter_init(struct flexcop_device *fc); diff --git a/drivers/media/common/b2c2/flexcop-hw-filter.c b/drivers/media/common/b2c2/flexcop-hw-filter.c index 8220257..eceb9c5 100644 --- a/drivers/media/common/b2c2/flexcop-hw-filter.c +++ b/drivers/media/common/b2c2/flexcop-hw-filter.c @@ -5,7 +5,7 @@ */ #include "flexcop.h" -static void flexcop_rcv_data_ctrl(struct flexcop_device *fc, int onoff) +void flexcop_rcv_data_ctrl(struct flexcop_device *fc, int onoff) { flexcop_set_ibi_value(ctrl_208, Rcv_Data_sig, onoff); deb_ts("rcv_data is now: '%s'\n", onoff ? "on" : "off"); @@ -206,7 +206,9 @@ int flexcop_pid_feed_control(struct flexcop_device *fc, /* if it was the first or last feed request change the stream-status */ if (fc->feedcount == onoff) { - flexcop_rcv_data_ctrl(fc, onoff); + if (!fc->external_stream_control) + flexcop_rcv_data_ctrl(fc, onoff); + if (fc->stream_control) /* device specific stream control */ fc->stream_control(fc, onoff);