From patchwork Mon Sep 21 11:43:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 255704 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B69FC43463 for ; Mon, 21 Sep 2020 11:44:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E44EE2151B for ; Mon, 21 Sep 2020 11:44:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600688669; bh=P7WGZP6A+ChGkmdwEOLUV49/gCzQmkxBCRXqvrWdFsg=; h=From:Cc:Subject:Date:In-Reply-To:References:To:List-ID:From; b=mB304MzglEEnoZrL5wVeQgpWfmJU0TSom4YGfoKbHefaNXyobrVjG2pdGtgrVd+X4 NAeBY4fXAB9YCim9H1YEQcl1i70cBTeeBAvlOCWBnkID8tPfeNuobMLgLIjPHJkfLE v2LIhMEhlUwJ5prg9IbgnUoy4hn1vd8dHsuCPXYs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726997AbgIULo2 (ORCPT ); Mon, 21 Sep 2020 07:44:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:60132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726589AbgIULnv (ORCPT ); Mon, 21 Sep 2020 07:43:51 -0400 Received: from mail.kernel.org (ip5f5ad5b1.dynamic.kabel-deutschland.de [95.90.213.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5220B2145D; Mon, 21 Sep 2020 11:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600688630; bh=P7WGZP6A+ChGkmdwEOLUV49/gCzQmkxBCRXqvrWdFsg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BA+eGFVIc/mERvkd6q8l1Q2xr66LsJArtCikh3MB65YpknzN8OOkSQRra0tFfKeyd 4yjTSyelHjbeldaknYliBBa4Fl1xbi6MjYmPgfdMzc5PVFQ2LZlhf9FQbpjcBuIwdB SvsxQ9UVt6C7STGTlDm2DUh1CFY/9PDXU1UCCSZo= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kKKEV-0004V6-WB; Mon, 21 Sep 2020 13:43:48 +0200 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , "Daniel W. S. Almeida" , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 1/9] media: vidtv: simplify PCR logic to get jiffies Date: Mon, 21 Sep 2020 13:43:38 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org There's no need to have a check when setting timing.past_jiffies, as we can simply do the initialization earlier at vidtv_mux_init(). Signed-off-by: Mauro Carvalho Chehab --- drivers/media/test-drivers/vidtv/vidtv_mux.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/media/test-drivers/vidtv/vidtv_mux.c b/drivers/media/test-drivers/vidtv/vidtv_mux.c index 43b13aa3a8bc..6a3123c51cc4 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_mux.c +++ b/drivers/media/test-drivers/vidtv/vidtv_mux.c @@ -100,11 +100,7 @@ static void vidtv_mux_update_clk(struct vidtv_mux *m) /* call this at every thread iteration */ u64 elapsed_time; - /* this will not hold a value yet if we have just started */ - m->timing.past_jiffies = m->timing.current_jiffies ? - m->timing.current_jiffies : - get_jiffies_64(); - + m->timing.past_jiffies = m->timing.current_jiffies; m->timing.current_jiffies = get_jiffies_64(); elapsed_time = jiffies_to_usecs(m->timing.current_jiffies - @@ -449,6 +445,7 @@ struct vidtv_mux *vidtv_mux_init(struct dvb_frontend *fe, m->pcr_pid = args.pcr_pid; m->transport_stream_id = args.transport_stream_id; m->priv = args.priv; + m->timing.current_jiffies = get_jiffies_64(); if (args.channels) m->channels = args.channels; From patchwork Mon Sep 21 11:43:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 255708 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FF8EC43463 for ; Mon, 21 Sep 2020 11:43:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D9915218AC for ; Mon, 21 Sep 2020 11:43:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600688631; bh=Tr3XjPMHoh3ljJ2LS3yggJgTKP0SEFpFt6kiLoOs+WA=; h=From:Cc:Subject:Date:In-Reply-To:References:To:List-ID:From; b=BNjYRmfCivnivgEfIPb0t0ts5ZEQxFjpWNuxCLifDXCyZkaWbBeRjWs5Zt+/0XdpS LUBlXGixusURkU2IstDSbCX3iiykE7K8MGXQWjtPY9uliTxdGs4wnfL4+JqgjmsS+C 9HiiWS7zL+DBgIG0AppKOaLpMZ8O5e1Ycuf613UI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726618AbgIULnv (ORCPT ); Mon, 21 Sep 2020 07:43:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:60112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726541AbgIULnu (ORCPT ); Mon, 21 Sep 2020 07:43:50 -0400 Received: from mail.kernel.org (ip5f5ad5b1.dynamic.kabel-deutschland.de [95.90.213.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5477221789; Mon, 21 Sep 2020 11:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600688630; bh=Tr3XjPMHoh3ljJ2LS3yggJgTKP0SEFpFt6kiLoOs+WA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vkPF86P1L3jgfc2igfRRYIZxohEnyQnpwEwxwJzdmJNmUUDk9+QrvLYIxsaUme6nF HuHh7h20Wa5+ID8CO51T0i4OTatdks208l7zmqckap8lH+F45rHp7TnwrO1nIgi+Kh eEC+Q8zG8BnK2lVxg2nS0EkNgfAwj6TO/8xEcRms= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kKKEW-0004V8-1E; Mon, 21 Sep 2020 13:43:48 +0200 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , "Daniel W. S. Almeida" , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 2/9] media: vidtv: remove more ENDIAN_BITFIELD nonsense Date: Mon, 21 Sep 2020 13:43:39 +0200 Message-Id: <415936c12d1506a363d088726f87651e54dd133e.1600688419.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Changeset 870e350d4e39 ("media: vidtv: get rid of ENDIAN_BITFIELD nonsense") was incomplete. There are still some wrong endannes logic at the driver. Get rid of them. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/test-drivers/vidtv/vidtv_psi.h | 8 -------- drivers/media/test-drivers/vidtv/vidtv_ts.h | 13 ------------- 2 files changed, 21 deletions(-) diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.h b/drivers/media/test-drivers/vidtv/vidtv_psi.h index c9e059bfb6eb..3f962cc78278 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_psi.h +++ b/drivers/media/test-drivers/vidtv/vidtv_psi.h @@ -132,17 +132,9 @@ struct vidtv_psi_table_pat { */ struct vidtv_psi_table_sdt_service { __be16 service_id; -#if defined(__LITTLE_ENDIAN_BITFIELD) u8 EIT_present_following:1; u8 EIT_schedule:1; u8 reserved:6; -#elif defined(__BIG_ENDIAN_BITFIELD) - u8 reserved:6; - u8 EIT_schedule:1; - u8 EIT_present_following:1; -#else -#error "Unknown bitfield ordering" -#endif __be16 bitfield; /* running_status: 3, free_ca:1, desc_loop_len:12 */ struct vidtv_psi_desc *descriptor; struct vidtv_psi_table_sdt_service *next; diff --git a/drivers/media/test-drivers/vidtv/vidtv_ts.h b/drivers/media/test-drivers/vidtv/vidtv_ts.h index fab523723633..83dcc9183b45 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_ts.h +++ b/drivers/media/test-drivers/vidtv/vidtv_ts.h @@ -24,7 +24,6 @@ struct vidtv_mpeg_ts_adaption { u8 length; struct { -#if defined(__LITTLE_ENDIAN_BITFIELD) u8 extension:1; u8 private_data:1; u8 splicing_point:1; @@ -33,18 +32,6 @@ struct vidtv_mpeg_ts_adaption { u8 priority:1; u8 random_access:1; u8 discontinued:1; -#elif defined(__BIG_ENDIAN_BITFIELD) - u8 discontinued:1; - u8 random_access:1; - u8 priority:1; - u8 PCR:1; - u8 OPCR:1; - u8 splicing_point:1; - u8 private_data:1; - u8 extension:1; -#else -#error "Unknown bitfield ordering" -#endif } __packed; u8 data[]; } __packed; From patchwork Mon Sep 21 11:43:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 255706 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF8C7C43463 for ; Mon, 21 Sep 2020 11:44:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 96D8F20EDD for ; Mon, 21 Sep 2020 11:44:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600688648; bh=VaE4tWXufOp7oxEs2ZEserdffhxIbjWsWcM033VCLe0=; h=From:Cc:Subject:Date:In-Reply-To:References:To:List-ID:From; b=jTb/GFxEn2i59C3IjPSd9O0rlBbA4idft2MgajxfOUDk3iooE+h5x1OV63jKV2FoT 2nkPpS+WQtmXsNjt1KH9nI2OmIC+nevDskuiSYkXY6UqL4BsucpjDEMCHmsYehhZZw APdaVkH/uKUdHeFMFhbqYc8IHF0EGJL5Uxj4m+XA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726920AbgIULoB (ORCPT ); Mon, 21 Sep 2020 07:44:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:60132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726795AbgIULnw (ORCPT ); Mon, 21 Sep 2020 07:43:52 -0400 Received: from mail.kernel.org (ip5f5ad5b1.dynamic.kabel-deutschland.de [95.90.213.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 38EDA20EDD; Mon, 21 Sep 2020 11:43:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600688631; bh=VaE4tWXufOp7oxEs2ZEserdffhxIbjWsWcM033VCLe0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gq2r1qm7fNdV/La/t+adrJ1EgJ8BG43remzDFbnz2Zuy7k0wp7FaRsnpQB2D+TDe3 30hQca1/KAy355zkJtxuMARC4DfW3um1LvYS5QFHxBk4arL0hRhXr2s4ho7ARhBXEu 5gopHtXk7NiiTBwfdThnIH2BcowaJRkV4rfbyn9s= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kKKEW-0004VA-2N; Mon, 21 Sep 2020 13:43:48 +0200 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , "Daniel W. S. Almeida" , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 3/9] media: vidtv: fix initialization of the network_id field at SDT Date: Mon, 21 Sep 2020 13:43:40 +0200 Message-Id: <81d9bf38ccf2a5ad014772261b2169aedce22280.1600688419.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This field should point to the network ID, and has different ranges for cable, terrestrial or satellite. It also has an special range for temporary private usage. For now, let's use the temporary private one. Once the Network Information Table (NIT) gets added, this should be reviewed. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/test-drivers/vidtv/vidtv_psi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.c b/drivers/media/test-drivers/vidtv/vidtv_psi.c index 8cdf645b4fdd..5fe3fbb765b8 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_psi.c +++ b/drivers/media/test-drivers/vidtv/vidtv_psi.c @@ -1107,7 +1107,14 @@ struct vidtv_psi_table_sdt *vidtv_psi_sdt_table_init(u16 transport_stream_id) sdt->header.section_id = 0; sdt->header.last_section = 0; - sdt->network_id = cpu_to_be16(transport_stream_id); + /* + * FIXME: The network_id range from 0xFF01 to 0xFFFF is used to + * indicate temporary private use. For now, let's use the first + * value. + * This can be changed to something more useful, when support for + * NIT gets added + */ + sdt->network_id = cpu_to_be16(0xff01); sdt->reserved = RESERVED; vidtv_psi_sdt_table_update_sec_len(sdt); From patchwork Mon Sep 21 11:43:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 255707 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 665CDC43465 for ; Mon, 21 Sep 2020 11:44:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 29E002151B for ; Mon, 21 Sep 2020 11:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600688640; bh=KMwGZxk2FiX2doZrX3ZRZ3aq9R/Lq6ePUUBFeMnPv2I=; h=From:Cc:Subject:Date:In-Reply-To:References:To:List-ID:From; b=ydzzUvMlUHzyUmNv4y0AAQMcfPzetNkeyAlYqNvavzOy3HfkQBHLfYuFyVXIZQTam Gmam7lHU/XWI29mqo6CQd5gs9aWxxYONfHiZ2lz5/VY9Wo8hpS2g0JXbzLl8UzQQxe RflJnx94jMqphnaKdtzttar8tUThciE4uOO3XDno= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726899AbgIULn4 (ORCPT ); Mon, 21 Sep 2020 07:43:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:60134 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726541AbgIULnw (ORCPT ); Mon, 21 Sep 2020 07:43:52 -0400 Received: from mail.kernel.org (ip5f5ad5b1.dynamic.kabel-deutschland.de [95.90.213.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3C01121531; Mon, 21 Sep 2020 11:43:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600688631; bh=KMwGZxk2FiX2doZrX3ZRZ3aq9R/Lq6ePUUBFeMnPv2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o54OzUTPiRzwTF7EwywbT8tgGAgzoUktmvY2psLJEhB5C/lStXu+xGUVC/GtOOxGH BIoJCjGzMuyUPw+z8gEg4SuntFhYEL4gD9/TwmcWVOyKZcFGippbxLLD78W6TQr9+w gfOm1GMFaPNpBlyBhkSOnmNEFDXb32pDJmc490w8= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kKKEW-0004VC-3I; Mon, 21 Sep 2020 13:43:48 +0200 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , "Daniel W. S. Almeida" , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 4/9] media: vidtv: cleanup PSI version numbers Date: Mon, 21 Sep 2020 13:43:41 +0200 Message-Id: <257cd4d86305d17ee0f895c5d36d2a95432efc2d.1600688419.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org There's no reason to use static vars to store PSI version numbers. Also, currently, version numbers are starting with 0x01, because there's a code being called that increases it to 1 for all table initializer code, as the code may support dynamic changes at the PS tables on some future. So, let's just initialize them to 0x1f, in order for the versions to be reported as starting from 0. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/test-drivers/vidtv/vidtv_psi.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.c b/drivers/media/test-drivers/vidtv/vidtv_psi.c index 5fe3fbb765b8..82cf67dd27c0 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_psi.c +++ b/drivers/media/test-drivers/vidtv/vidtv_psi.c @@ -756,7 +756,6 @@ vidtv_psi_pat_program_assign(struct vidtv_psi_table_pat *pat, struct vidtv_psi_table_pat *vidtv_psi_pat_table_init(u16 transport_stream_id) { struct vidtv_psi_table_pat *pat = kzalloc(sizeof(*pat), GFP_KERNEL); - static u8 pat_version; const u16 SYNTAX = 0x1; const u16 ZERO = 0x0; const u16 ONES = 0x03; @@ -767,7 +766,7 @@ struct vidtv_psi_table_pat *vidtv_psi_pat_table_init(u16 transport_stream_id) pat->header.id = cpu_to_be16(transport_stream_id); pat->header.current_next = 0x1; - pat->header.version = pat_version; + pat->header.version = 0x1f; pat->header.one2 = 0x03; pat->header.section_id = 0x0; @@ -935,7 +934,6 @@ struct vidtv_psi_table_pmt *vidtv_psi_pmt_table_init(u16 program_number, u16 pcr_pid) { struct vidtv_psi_table_pmt *pmt = kzalloc(sizeof(*pmt), GFP_KERNEL); - static u8 pmt_version; const u16 SYNTAX = 0x1; const u16 ZERO = 0x0; const u16 ONES = 0x03; @@ -953,7 +951,7 @@ struct vidtv_psi_table_pmt *vidtv_psi_pmt_table_init(u16 program_number, pmt->header.id = cpu_to_be16(program_number); pmt->header.current_next = 0x1; - pmt->header.version = pmt_version; + pmt->header.version = 0x1f; pmt->header.one2 = ONES; pmt->header.section_id = 0; @@ -1083,7 +1081,6 @@ void vidtv_psi_pmt_table_destroy(struct vidtv_psi_table_pmt *pmt) struct vidtv_psi_table_sdt *vidtv_psi_sdt_table_init(u16 transport_stream_id) { struct vidtv_psi_table_sdt *sdt = kzalloc(sizeof(*sdt), GFP_KERNEL); - static u8 sdt_version; const u16 SYNTAX = 0x1; const u16 ONE = 0x1; const u16 ONES = 0x03; @@ -1101,7 +1098,7 @@ struct vidtv_psi_table_sdt *vidtv_psi_sdt_table_init(u16 transport_stream_id) sdt->header.id = cpu_to_be16(transport_stream_id); sdt->header.current_next = ONE; - sdt->header.version = sdt_version; + sdt->header.version = 0x1f; sdt->header.one2 = ONES; sdt->header.section_id = 0;