From: "Daniel W. S. Almeida" <dwlsalmeida@gmail.com>
To: mchehab+huawei@kernel.org, sean@mess.org,
kstewart@linuxfoundation.org, allison@lohutok.net,
tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org,
"Daniel W. S. Almeida" <dwlsalmeida@gmail.com>,
linux-media@vger.kernel.org
Subject: [Linux-kernel-mentees] [RFC, WIP, v4 00/11] media: vidtv: implement a virtual DVB driver
Date: Sat, 2 May 2020 00:22:05 -0300 [thread overview]
Message-ID: <20200502032216.197977-1-dwlsalmeida@gmail.com> (raw)
From: "Daniel W. S. Almeida" <dwlsalmeida@gmail.com>
This series is work in progress. It represents the current work done on a
virtual DVB driver for the Linux media subsystem. I am new to the media
subsystem and to kernel development in general.
This series currently adds:
-fake tuner, demodulator and bridge drivers
-a PSI generator
-a PES/TS packetizer
-a SMPTE 302m encoder, capable of encoding AES3 audio into MPEG TS
-a barebones TS mux abstraction
I appreciate any feedback!
Changes in v4:
Added a PES packetizer
Implemented a minimum version of the SMPTE 302m encoder for AES3 audio
Fixed endianness in the PSI generator, converting fields to big endian where applicable
Added a minimal TS mux abstraction
Changes in v3:
Added a bridge driver
Renamed the driver to vidtv
Renamed/reworked commits into smaller pieces
Moved the driver into its own directory
Fixed the code for the signal strength in the tuner
Removed useless enums in the tuner driver (e.g. lock_status, power_status...)
Reworked the logic for the poll_snr thread in the demodulator driver
Moved MPEG related code to the bridge driver, as it controls the demux logic
Changed literals to #defines, used sizeof in place of integer literals when
computing the size of PSI structs
Moved the MPEG PSI tables to the heap to reduce stack space usage
Now using usleep_range in place of msleep_interruptible in the MPEG TS thread
Wrapped memcpy and memset to protect against buffer overflow when writing to the
MPEG TS buffer.
Changes in v2:
Attempted not to break assignments into multiple lines as much as possible.
Code now passes checkpatch strict mode
media: dvb_dummy_tuner: implement driver skeleton
Changed snr values to mili db
Return value from 0-100 to indicate how far off the requested
frequency is from a valid one
Use the frequency shift to interpolate between 34dB and 10dB if
we can not match against the SNR lookup table
Remove sleep calls for suspend/resume
Fix memcpy call for the config struct
media: dvb_dummy_fe.c: lose TS lock on bad snr
Randomly recover the TS lock if the signal quality improves
media: dvb_dummy_fe.c: write PSI information into DMX buffer
Split the patch into multiple header/source files
Hexadecimal literals are now lower case
Prefer short function names / reduce function signatures
Add #defines for constants when computing section lengths
Change signature for functions that take a dummy channel as
argument (i.e. channels* is now channels[NUM_CHANNELS])
Daniel W. S. Almeida (11):
media: vidtv: add Kconfig entry
media: vidtv: implement a tuner driver
media: vidtv: implement a demodulator driver
media: vidtv: move config structs into a separate header
media: vidtv: add a bridge driver
media: vidtv: add wrappers for memcpy and memset
media: vidtv: add MPEG TS common code
media: vidtv: implement a PSI generator
media: vidtv: implement a PES packetizer
media: vidtv: Implement a SMPTE 302M encoder
media: vidtv: Add a MPEG Transport Stream Multiplexer
drivers/media/test-drivers/Kconfig | 10 +
drivers/media/test-drivers/Makefile | 1 +
drivers/media/test-drivers/vidtv/Kconfig | 11 +
drivers/media/test-drivers/vidtv/Makefile | 7 +
.../media/test-drivers/vidtv/vidtv_bridge.c | 442 +++++++
.../media/test-drivers/vidtv/vidtv_bridge.h | 39 +
.../media/test-drivers/vidtv/vidtv_channel.c | 326 +++++
.../media/test-drivers/vidtv/vidtv_channel.h | 66 +
.../media/test-drivers/vidtv/vidtv_common.c | 51 +
.../media/test-drivers/vidtv/vidtv_common.h | 35 +
.../media/test-drivers/vidtv/vidtv_config.h | 35 +
.../media/test-drivers/vidtv/vidtv_demod.c | 494 +++++++
.../media/test-drivers/vidtv/vidtv_demod.h | 34 +
.../media/test-drivers/vidtv/vidtv_encoder.h | 103 ++
drivers/media/test-drivers/vidtv/vidtv_mux.c | 423 ++++++
drivers/media/test-drivers/vidtv/vidtv_mux.h | 105 ++
drivers/media/test-drivers/vidtv/vidtv_pes.c | 429 ++++++
drivers/media/test-drivers/vidtv/vidtv_pes.h | 185 +++
drivers/media/test-drivers/vidtv/vidtv_psi.c | 1155 +++++++++++++++++
drivers/media/test-drivers/vidtv/vidtv_psi.h | 362 ++++++
.../media/test-drivers/vidtv/vidtv_s302m.c | 608 +++++++++
.../media/test-drivers/vidtv/vidtv_s302m.h | 99 ++
drivers/media/test-drivers/vidtv/vidtv_ts.c | 130 ++
drivers/media/test-drivers/vidtv/vidtv_ts.h | 103 ++
.../media/test-drivers/vidtv/vidtv_tuner.c | 403 ++++++
25 files changed, 5656 insertions(+)
create mode 100644 drivers/media/test-drivers/vidtv/Kconfig
create mode 100644 drivers/media/test-drivers/vidtv/Makefile
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_bridge.c
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_bridge.h
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_channel.c
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_channel.h
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_common.c
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_common.h
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_config.h
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_demod.c
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_demod.h
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_encoder.h
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_mux.c
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_mux.h
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_pes.c
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_pes.h
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_psi.c
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_psi.h
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_s302m.c
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_s302m.h
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_ts.c
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_ts.h
create mode 100644 drivers/media/test-drivers/vidtv/vidtv_tuner.c
--
2.26.2
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
next reply other threads:[~2020-05-02 3:22 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-02 3:22 Daniel W. S. Almeida [this message]
2020-05-02 3:22 ` [Linux-kernel-mentees] [RFC, WIP, v4 01/11] media: vidtv: add Kconfig entry Daniel W. S. Almeida
2020-05-02 4:58 ` Mauro Carvalho Chehab
2020-05-02 3:22 ` [Linux-kernel-mentees] [RFC, WIP, v4 02/11] media: vidtv: implement a tuner driver Daniel W. S. Almeida
2020-05-02 5:27 ` Mauro Carvalho Chehab
2020-05-02 3:22 ` [Linux-kernel-mentees] [RFC, WIP, v4 03/11] media: vidtv: implement a demodulator driver Daniel W. S. Almeida
2020-05-02 5:58 ` Mauro Carvalho Chehab
2020-05-02 3:22 ` [Linux-kernel-mentees] [RFC, WIP, v4 04/11] media: vidtv: move config structs into a separate header Daniel W. S. Almeida
2020-05-02 6:02 ` Mauro Carvalho Chehab
2020-05-02 3:22 ` [Linux-kernel-mentees] [RFC, WIP, v4 05/11] media: vidtv: add a bridge driver Daniel W. S. Almeida
2020-05-02 6:30 ` Mauro Carvalho Chehab
2020-05-02 21:12 ` Daniel W. S. Almeida
2020-05-02 3:22 ` [Linux-kernel-mentees] [RFC, WIP, v4 06/11] media: vidtv: add wrappers for memcpy and memset Daniel W. S. Almeida
2020-05-02 6:40 ` Mauro Carvalho Chehab
2020-05-03 7:06 ` Mauro Carvalho Chehab
2020-05-02 3:22 ` [Linux-kernel-mentees] [RFC, WIP, v4 07/11] media: vidtv: add MPEG TS common code Daniel W. S. Almeida
2020-05-02 7:09 ` Mauro Carvalho Chehab
2020-05-02 22:22 ` Daniel W. S. Almeida
2020-05-03 9:50 ` Mauro Carvalho Chehab
2020-05-02 3:22 ` [Linux-kernel-mentees] [RFC, WIP, v4 08/11] media: vidtv: implement a PSI generator Daniel W. S. Almeida
2020-05-03 7:51 ` Mauro Carvalho Chehab
2020-05-06 6:28 ` Daniel W. S. Almeida
2020-05-06 8:36 ` Mauro Carvalho Chehab
2020-05-02 3:22 ` [Linux-kernel-mentees] [RFC, WIP, v4 09/11] media: vidtv: implement a PES packetizer Daniel W. S. Almeida
2020-05-03 8:16 ` Mauro Carvalho Chehab
2020-05-06 6:55 ` Daniel W. S. Almeida
2020-05-06 8:59 ` Mauro Carvalho Chehab
2020-05-02 3:22 ` [Linux-kernel-mentees] [RFC, WIP, v4 10/11] media: vidtv: Implement a SMPTE 302M encoder Daniel W. S. Almeida
2020-05-03 8:57 ` Mauro Carvalho Chehab
2020-05-02 3:22 ` [Linux-kernel-mentees] [RFC, WIP, v4 11/11] media: vidtv: Add a MPEG Transport Stream Multiplexer Daniel W. S. Almeida
2020-05-03 9:13 ` Mauro Carvalho Chehab
2020-05-06 7:05 ` Daniel W. S. Almeida
2020-05-06 9:01 ` 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=20200502032216.197977-1-dwlsalmeida@gmail.com \
--to=dwlsalmeida@gmail.com \
--cc=allison@lohutok.net \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=sean@mess.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).