mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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: "Daniel W. S. Almeida" <dwlsalmeida@gmail.com>,
	linux-media@vger.kernel.org, skhan@linuxfoundation.org,
	linux-kernel-mentees@lists.linuxfoundation.org,
	linux-kernel@vger.kernel.org
Subject: [RFC, WIP, v3 0/6] media: vidtv: implement a virtual DVB driver
Date: Mon,  6 Apr 2020 20:20:49 -0300	[thread overview]
Message-ID: <20200406232055.1023946-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 applies on top of this branch
https://git.linuxtv.org/mchehab/experimental.git/log/?h=media-kconfig
for now, as these changes have not been applied to the media tree yet.
The changes in this branch have reorganized where test drivers go in
the subsystem. The dummy driver written by Emard was left untouched.

As for vidtv, we currently have a tuner driver, a demodulator driver, a
bridge driver and some MPEG PSI code. This should be, therefore, a
minimum viable example for what this driver intends to become in the
future.

I appreciate any feedback given. Thank you.


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 (6):
  media: vidtv: add Kconfig entry
  media: vidtv: implement a tuner driver
  media: vidtv: implement a demodulator driver
  media: vidtv: implement a PSI generator
  media: vidtv: move config structs into a common header
  media: vidtv: add a bridge driver

 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     |   6 +
 .../media/test_drivers/vidtv/vidtv_bridge.c   | 736 ++++++++++++++
 .../media/test_drivers/vidtv/vidtv_bridge.h   |  51 +
 .../media/test_drivers/vidtv/vidtv_common.c   |  44 +
 .../media/test_drivers/vidtv/vidtv_common.h   | 105 ++
 .../media/test_drivers/vidtv/vidtv_demod.c    | 493 +++++++++
 .../media/test_drivers/vidtv/vidtv_demod.h    |  34 +
 drivers/media/test_drivers/vidtv/vidtv_psi.c  | 960 ++++++++++++++++++
 drivers/media/test_drivers/vidtv/vidtv_psi.h  | 294 ++++++
 .../media/test_drivers/vidtv/vidtv_tuner.c    | 403 ++++++++
 13 files changed, 3148 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_common.c
 create mode 100644 drivers/media/test_drivers/vidtv/vidtv_common.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_psi.c
 create mode 100644 drivers/media/test_drivers/vidtv/vidtv_psi.h
 create mode 100644 drivers/media/test_drivers/vidtv/vidtv_tuner.c

-- 
2.26.0


             reply	other threads:[~2020-04-06 23:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 23:20 Daniel W. S. Almeida [this message]
2020-04-06 23:20 ` [RFC, WIP, v3 1/6] media: vidtv: add Kconfig entry Daniel W. S. Almeida
2020-04-06 23:20 ` [RFC, WIP, v3 2/6] media: vidtv: implement a tuner driver Daniel W. S. Almeida
2020-04-06 23:20 ` [RFC, WIP, v3 3/6] media: vidtv: implement a demodulator driver Daniel W. S. Almeida
2020-04-06 23:20 ` [RFC, WIP, v3 4/6] media: vidtv: implement a PSI generator Daniel W. S. Almeida
2020-04-06 23:20 ` [RFC, WIP, v3 5/6] media: vidtv: move config structs into a common header Daniel W. S. Almeida
2020-04-06 23:20 ` [RFC, WIP, v3 6/6] media: vidtv: add a bridge driver Daniel W. S. Almeida

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=20200406232055.1023946-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=skhan@linuxfoundation.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

all inboxes | Powered by JetHome®