All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	"Daniel W. S. Almeida" <dwlsalmeida@gmail.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: [PATCH 18/31] media: vidtv: fix service_id at SDT table
Date: Tue, 24 Nov 2020 12:06:14 +0100	[thread overview]
Message-ID: <73dd5dbc98b68f9c47cae01017a0617862a5c87c.1606215584.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1606215584.git.mchehab+huawei@kernel.org>

The service_id there should be equal to the one used
on other tables, otherwise, EIT entries won't be valid.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/test-drivers/vidtv/vidtv_channel.c | 3 ++-
 drivers/media/test-drivers/vidtv/vidtv_psi.c     | 5 +++--
 drivers/media/test-drivers/vidtv/vidtv_psi.h     | 3 ++-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/media/test-drivers/vidtv/vidtv_channel.c b/drivers/media/test-drivers/vidtv/vidtv_channel.c
index eaa596f5520f..023e3dc04ce2 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_channel.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_channel.c
@@ -425,7 +425,8 @@ int vidtv_channel_si_init(struct vidtv_mux *m)
 	if (!m->si.pat)
 		return -ENOMEM;
 
-	m->si.sdt = vidtv_psi_sdt_table_init(m->transport_stream_id);
+	m->si.sdt = vidtv_psi_sdt_table_init(m->network_id,
+					     m->transport_stream_id);
 	if (!m->si.sdt)
 		goto free_pat;
 
diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.c b/drivers/media/test-drivers/vidtv/vidtv_psi.c
index 5c887639b676..77bb560342a6 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_psi.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_psi.c
@@ -1271,7 +1271,8 @@ void vidtv_psi_pmt_table_destroy(struct vidtv_psi_table_pmt *pmt)
 	kfree(pmt);
 }
 
-struct vidtv_psi_table_sdt *vidtv_psi_sdt_table_init(u16 transport_stream_id)
+struct vidtv_psi_table_sdt *vidtv_psi_sdt_table_init(u16 network_id,
+						     u16 transport_stream_id)
 {
 	struct vidtv_psi_table_sdt *sdt;
 	const u16 RESERVED = 0xff;
@@ -1307,7 +1308,7 @@ struct vidtv_psi_table_sdt *vidtv_psi_sdt_table_init(u16 transport_stream_id)
 	 * This can be changed to something more useful, when support for
 	 * NIT gets added
 	 */
-	sdt->network_id = cpu_to_be16(0xff01);
+	sdt->network_id = cpu_to_be16(network_id);
 	sdt->reserved = RESERVED;
 
 	vidtv_psi_sdt_table_update_sec_len(sdt);
diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.h b/drivers/media/test-drivers/vidtv/vidtv_psi.h
index 3937d1dde3f4..1bf0103e6840 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_psi.h
+++ b/drivers/media/test-drivers/vidtv/vidtv_psi.h
@@ -366,7 +366,8 @@ struct vidtv_psi_table_pat *vidtv_psi_pat_table_init(u16 transport_stream_id);
 struct vidtv_psi_table_pmt *vidtv_psi_pmt_table_init(u16 program_number,
 						     u16 pcr_pid);
 
-struct vidtv_psi_table_sdt *vidtv_psi_sdt_table_init(u16 transport_stream_id);
+struct vidtv_psi_table_sdt *vidtv_psi_sdt_table_init(u16 network_id,
+						     u16 transport_stream_id);
 
 struct vidtv_psi_table_sdt_service*
 vidtv_psi_sdt_service_init(struct vidtv_psi_table_sdt_service *head,
-- 
2.28.0


  parent reply	other threads:[~2020-11-24 11:07 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 11:05 [PATCH 00/31] vidtv: address several issues at the driver Mauro Carvalho Chehab
2020-11-24 11:05 ` [PATCH 01/31] media: vidtv: reorganize includes Mauro Carvalho Chehab
2020-11-24 11:05 ` [PATCH 02/31] media: vidtv: add error checks Mauro Carvalho Chehab
2020-11-24 11:05 ` [PATCH 03/31] media: vidtv: don't use recursive functions Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 04/31] media: vidtv: fix the name of the program Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 05/31] media: vidtv: fix the tone generator logic Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 06/31] media: vidtv: fix some notes at the tone generator Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 07/31] media: vidtv: avoid data copy when initializing the multiplexer Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 08/31] media: vidtv: avoid copying data for PES structs Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 09/31] media: vidtv: do some cleanups at the driver Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 10/31] media: vidtv: remove some unused functions Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 11/31] media: vidtv: pre-initialize mux arrays Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 12/31] media: vidtv: cleanup null packet initialization logic Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 13/31] media: vidtv: improve EIT data Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 14/31] media: vidtv: fix the network ID range Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 15/31] media: vidtv: properly fill EIT service_id Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 16/31] media: vidtv: add a PID entry for the NIT table Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 17/31] media: vidtv: fix service type Mauro Carvalho Chehab
2020-11-24 11:06 ` Mauro Carvalho Chehab [this message]
2020-11-24 11:06 ` [PATCH 19/31] media: vidtv: add date to the current event Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 20/31] media: vidtv: simplify PSI write function Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 21/31] media: vidtv: simplify the crc writing logic Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 22/31] media: vidtv: cleanup PSI descriptor write function Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 23/31] media: vidtv: cleanup PSI table header function Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 24/31] media: vidtv: cleanup PAT write function Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 25/31] media: vidtv: cleanup PMT write table function Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 26/31] media: vidtv: simplify SDT write function Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 27/31] media: vidtv: simplify NIT " Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 28/31] media: vidtv: simplify EIT " Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 29/31] media: vidtv.rst: update vidtv documentation Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 30/31] media: vidtv.rst: add kernel-doc markups Mauro Carvalho Chehab
2020-11-24 11:06 ` [PATCH 31/31] media: vidtv: cleanup a few coding style issues Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73dd5dbc98b68f9c47cae01017a0617862a5c87c.1606215584.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=dwlsalmeida@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.