From patchwork Tue Aug 21 00:42:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: CrazyCat X-Patchwork-Id: 1351421 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9D5293FC33 for ; Tue, 21 Aug 2012 00:53:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754300Ab2HUAxW (ORCPT ); Mon, 20 Aug 2012 20:53:22 -0400 Received: from forward5h.mail.yandex.net ([84.201.186.23]:35794 "EHLO forward5h.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752744Ab2HUAxV (ORCPT ); Mon, 20 Aug 2012 20:53:21 -0400 X-Greylist: delayed 654 seconds by postgrey-1.27 at vger.kernel.org; Mon, 20 Aug 2012 20:53:20 EDT Received: from web18h.yandex.ru (web18h.yandex.ru [84.201.186.47]) by forward5h.mail.yandex.net (Yandex) with ESMTP id 20BF9D0182C; Tue, 21 Aug 2012 04:42:24 +0400 (MSK) Received: from 127.0.0.1 (localhost.localdomain [127.0.0.1]) by web18h.yandex.ru (Yandex) with ESMTP id 1496C6B00190; Tue, 21 Aug 2012 04:42:22 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1345509743; bh=bGgcB+Vdj9AVv8zqRKwGXncV7nryc1F2Yzje4zCrvwA=; h=From:To:Cc:In-Reply-To:References:Subject:MIME-Version:Message-Id: Date:Content-Transfer-Encoding:Content-Type; b=VF9bJl8gNu5UAylxcVZqjS0EtwRrumEcqHBSPcDI7JmaQFWwwlC8as6UeFadMTXfZ YUFmgIHsVQK6D2iszjsUDUtMJBuyE89PhUBgiwjSqNrQ1mLf+Jh9RD/vVRo5g7MXj7 JmGNFlmEc/tyt7lB0AlQqVgF31Nm1w8menDJ1Dak= Received: from usa.globax.biz (usa.globax.biz [75.126.74.185]) by web18h.yandex.ru with HTTP; Tue, 21 Aug 2012 04:42:20 +0400 From: CrazyCat To: Mauro Carvalho Chehab Cc: Antti Palosaari , "linux-media@vger.kernel.org" In-Reply-To: <502E94FA.6080301@redhat.com> References: <53381345139167@web11e.yandex.ru> <502D37CF.7030608@iki.fi> <839331345224097@web14d.yandex.ru> <502E94FA.6080301@redhat.com> Subject: Re: [PATCH] dvb_frontend: Multistream support MIME-Version: 1.0 Message-Id: <168391345509740@web18h.yandex.ru> Date: Tue, 21 Aug 2012 03:42:20 +0300 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Multistream support with all recommendations. Signed-off-by: Evgeny Plehov --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index bb51edf..a6a6839 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h @@ -62,6 +62,7 @@ typedef enum fe_caps { FE_CAN_8VSB = 0x200000, FE_CAN_16VSB = 0x400000, FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */ + FE_CAN_MULTISTREAM = 0x4000000, /* frontend supports DVB-S2 multistream filtering */ FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */ FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */ FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */ @@ -338,9 +339,9 @@ struct dvb_frontend_event { #define DTV_ISDBT_LAYER_ENABLED 41 -#define DTV_ISDBS_TS_ID 42 - -#define DTV_DVBT2_PLP_ID 43 +#define DTV_STREAM_ID 42 +#define DTV_ISDBS_TS_ID_LEGACY DTV_STREAM_ID +#define DTV_DVBT2_PLP_ID_LEGACY 43 #define DTV_ENUM_DELSYS 44 @@ -436,6 +437,7 @@ enum atscmh_rs_code_mode { ATSCMH_RSCODE_RES = 3, }; +#define NO_STREAM_ID_FILTER (~0U) struct dtv_cmds_h { char *name; /* A display name for debugging purposes */ diff --git a/drivers/media/dvb-core/dvb_frontend.h b/drivers/media/dvb-core/dvb_frontend.h index db309db..33996a0 100644 --- a/drivers/media/dvb-core/dvb_frontend.h +++ b/drivers/media/dvb-core/dvb_frontend.h @@ -370,11 +370,8 @@ struct dtv_frontend_properties { u8 interleaving; } layer[3]; - /* ISDB-T specifics */ - u32 isdbs_ts_id; - - /* DVB-T2 specifics */ - u32 dvbt2_plp_id; + /* Multistream specifics */ + u32 stream_id; /* ATSC-MH specifics */ u8 atscmh_fic_ver; diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index aa4d4d8..fc0c0ca 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -946,8 +946,7 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe) c->layer[i].segment_count = 0; } - c->isdbs_ts_id = 0; - c->dvbt2_plp_id = 0; + c->stream_id = NO_STREAM_ID_FILTER; switch (c->delivery_system) { case SYS_DVBS: @@ -1018,8 +1017,8 @@ static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND + 1] = { _DTV_CMD(DTV_ISDBT_LAYERC_SEGMENT_COUNT, 1, 0), _DTV_CMD(DTV_ISDBT_LAYERC_TIME_INTERLEAVING, 1, 0), - _DTV_CMD(DTV_ISDBS_TS_ID, 1, 0), - _DTV_CMD(DTV_DVBT2_PLP_ID, 1, 0), + _DTV_CMD(DTV_STREAM_ID, 1, 0), + _DTV_CMD(DTV_DVBT2_PLP_ID_LEGACY, 1, 0), /* Get */ _DTV_CMD(DTV_DISEQC_SLAVE_REPLY, 0, 1), @@ -1387,11 +1386,11 @@ static int dtv_property_process_get(struct dvb_frontend *fe, case DTV_ISDBT_LAYERC_TIME_INTERLEAVING: tvp->u.data = c->layer[2].interleaving; break; - case DTV_ISDBS_TS_ID: - tvp->u.data = c->isdbs_ts_id; - break; - case DTV_DVBT2_PLP_ID: - tvp->u.data = c->dvbt2_plp_id; + + /* Multistream support */ + case DTV_STREAM_ID: + case DTV_DVBT2_PLP_ID_LEGACY: + tvp->u.data = c->stream_id; break; /* ATSC-MH */ @@ -1779,11 +1778,11 @@ static int dtv_property_process_set(struct dvb_frontend *fe, case DTV_ISDBT_LAYERC_TIME_INTERLEAVING: c->layer[2].interleaving = tvp->u.data; break; - case DTV_ISDBS_TS_ID: - c->isdbs_ts_id = tvp->u.data; - break; - case DTV_DVBT2_PLP_ID: - c->dvbt2_plp_id = tvp->u.data; + + /* Multistream support */ + case DTV_STREAM_ID: + case DTV_DVBT2_PLP_ID_LEGACY: + c->stream_id = tvp->u.data; break; /* ATSC-MH */