All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: "Daniel W. S. Almeida" <dwlsalmeida@gmail.com>
Cc: " <skhan@linuxfoundation.org>,
	"@osuosl.org, "r.verdejo@samsung.com" <r.verdejo@samsung.com>,
	linux-kernel@vger.kernel.org,
	"nicolas@ndufresne.ca" <nicolas@ndufresne.ca>,
	" <linux-kernel@vger.kernel.org>"@osuosl.org,
	"linux-media@vger.kernel.org\"
	<linux-media@vger.kernel.org@casper.infradead.org>,
	"@osuosl.org, "  <linux-kernel-mentees@lists.linuxfoundation.org>,
	"@osuosl.org, linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [Linux-kernel-mentees] [v10 0/4] media: vidtv: Implement a virtual DVB driver
Date: Sat, 12 Sep 2020 09:38:45 +0200	[thread overview]
Message-ID: <20200912093845.6fdd7352@coco.lan> (raw)
In-Reply-To: <78C65222-868B-404B-974E-D8808586845A@getmailspring.com>

Em Fri, 11 Sep 2020 23:54:15 -0300
"Daniel W. S. Almeida" <dwlsalmeida@gmail.com> escreveu:

> Hi Mauro,
> 
> > Ok, I guess I got what should be done here. ETSI TS 102 154 says that
> > SMPTE 302M should use the "registration_descriptor".
> > 
> > From the specs, such descriptor should be filled with 
> > format_identifier = 0x42535344.
> > 
> > We need to add this on both at v4l-utils and at the vidtv driver.  
> 
> vidtv will already attach a registration descriptor for s302m audio, i.e.
> 
> dvb_parse_section: table 0x02, extension ID 0x0880: done
> PMT
> | table_id 0x02
> | section_length 24
> | one 2
> | zero 0
> | syntax 1
> | transport_stream_id 2176
> | current_next 1
> | version 1
> | one2 3
> | section_number 0
> | last_section_number 0
> |- pcr_pid 0200
> | reserved2 7
> | descriptor length 0
> | zero3 0
> | reserved3 15
> |\
> |- stream 0x0111: ISO/IEC 13818-1 Private Data (6)
> | descriptor length 6
> | 0x05: registration_descriptor
> | 42 53 53 44 BSSD <<<<<<<<<<< here it is
> |_ 1 streams
> 
> So I guess I need to add support for it on v4l-utils then? Any tips on
> how to get started?

This is easier if I do myself than to explain it, especially because
the registration descriptor is not decoded yet.

Just added support for decoding the registration descriptor:

	https://git.linuxtv.org/v4l-utils.git/commit/?id=d070107d6267f617bb7331d84507701c8e2d673c

The actual patch making dvbv5-scan libraries to support it is trivial:

	https://git.linuxtv.org/v4l-utils.git/commit/?id=fcbd7fae7c2208e01a7f670f8ba2f34d62ea6a4d

> 
> By the way,
> 
> > My plan is to write some patches on the top of yours, in order to
> > address the problems I'll find on it. If not something more critical
> > won't be solved in time, we may still add it at staging/media. 
> > Let's see.  
> 
> Can you teach me how this works in git? Am I supposed to cherry-pick
> your patches, or apply & rebase -i & squash, or something else?

Well, the basic stuff is all there: the driver loads and unloads
fine (after my patch), and it does what's expected. So, no need
to put it under staging. 

I'll just merge the 4 patches from you, plus the one I wrote fixing
unloading it at the media tree.

You can write any other patch on the top of it.

I'll do the same, c/c you on the patches I write afterwards.

> >Well, if you have some spare time, you could try to write
> >a debugfs binding for vidtv. The best would be to have it
> >on a separate file. Failing to bind debugfs should not
> >prevent loading the bridge driver.  
> 
> Sure, can you provide more details on how this and vidtv should play
> together? I will catch up on
> the documentation for debugfs in the meantime

I'm thinking on something like:

	echo 1 >/sys/kernel/debug/vidtv/discontinuity

to generate a frame numbering discontinuity

and other things like that, changing S/N ratio and other parameters
and injecting errors, in order to test the effects on user apps.

> 
> As for vidtv_s302m_write_frame:
> 
> >doing that didn't work. Yet, this check inside the driver:  
> 
> What didn't work? It didn't compile? I should have sent a proper diff
> but I was short on time, sorry...

No. I meant the audio was not a sinusoidal wave after such change.

-

Anyway, now that rmmod is working, modifying the driver is a lot
easier, as you don't need to reboot the Kernel every time.

you could just do something like this:

    $ sudo rmmod dvb_vidtv_bridge dvb_vidtv_demod dvb_vidtv_tuner; make drivers/media/test-drivers/ && sudo cp drivers/media/test-drivers/vidtv/*.ko /lib/modules/5.9.0-rc1+/kernel/drivers/media/test-drivers/vidtv/ && sudo modprobe dvb-vidtv-bridge && dvbv5-zap -c dvb_channel.conf "S302m: Sine Wave PCM Audio" -P -v -t 4 -o pcm_audio.ts

which is a lot faster.

Thanks,
Mauro
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  reply	other threads:[~2020-09-12  7:38 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21 12:58 [v10 0/4] media: vidtv: Implement a virtual DVB driver Daniel W. S. Almeida
2020-08-21 12:58 ` [Linux-kernel-mentees] " Daniel W. S. Almeida
2020-08-21 12:58 ` [v10 1/4] media: vidtv: implement a tuner driver Daniel W. S. Almeida
2020-08-21 12:58   ` [Linux-kernel-mentees] " Daniel W. S. Almeida
2020-08-21 12:58 ` [v10 2/4] media: vidtv: implement a demodulator driver Daniel W. S. Almeida
2020-08-21 12:58   ` [Linux-kernel-mentees] " Daniel W. S. Almeida
2020-08-21 12:58 ` [v10 3/4] media: vidtv: add a bridge driver Daniel W. S. Almeida
2020-08-21 12:58   ` [Linux-kernel-mentees] " Daniel W. S. Almeida
2020-09-15 11:53   ` Geert Uytterhoeven
2020-09-15 11:53     ` [Linux-kernel-mentees] " Geert Uytterhoeven
2020-09-15 13:26     ` Daniel W. S. Almeida
2020-09-15 13:26       ` [Linux-kernel-mentees] " Daniel W. S. Almeida
2020-09-15 13:35       ` Geert Uytterhoeven
2020-09-15 13:35         ` [Linux-kernel-mentees] " Geert Uytterhoeven
2020-09-15 18:13         ` Daniel W. S. Almeida
2020-09-15 18:13           ` [Linux-kernel-mentees] " Daniel W. S. Almeida
2020-09-16  7:01         ` Mauro Carvalho Chehab
2020-09-16  7:09           ` Geert Uytterhoeven
2020-08-21 12:58 ` [v10 4/4] media: Documentation: vidtv: Add ReST documentation for vidtv Daniel W. S. Almeida
2020-08-21 12:58   ` [Linux-kernel-mentees] " Daniel W. S. Almeida
2020-09-11  8:02 ` [v10 0/4] media: vidtv: Implement a virtual DVB driver Mauro Carvalho Chehab
2020-09-11  8:02   ` [Linux-kernel-mentees] " Mauro Carvalho Chehab
2020-09-11 12:18   ` Daniel W. S. Almeida
2020-09-11 12:18     ` [Linux-kernel-mentees] " Daniel W. S. Almeida
2020-09-11 13:10     ` Mauro Carvalho Chehab
2020-09-11 13:56       ` Mauro Carvalho Chehab
2020-09-12  2:54         ` Daniel W. S. Almeida
2020-09-12  7:38           ` Mauro Carvalho Chehab [this message]
2020-09-12  8:21 ` Hans Verkuil
2020-09-12  8:21   ` [Linux-kernel-mentees] " Hans Verkuil
2020-09-12  9:15   ` Mauro Carvalho Chehab
2020-09-12  9:15     ` [Linux-kernel-mentees] " Mauro Carvalho Chehab
2020-09-12 14:49     ` Daniel W. S. Almeida
2020-09-12 14:49       ` [Linux-kernel-mentees] " Daniel W. S. Almeida
2020-09-12 17:57       ` Mauro Carvalho Chehab
2020-09-12 17:57         ` [Linux-kernel-mentees] " Mauro Carvalho Chehab
2020-09-14  8:33         ` Hans Verkuil
2020-09-14  8:33           ` [Linux-kernel-mentees] " Hans Verkuil
2020-09-12  8:35 ` Hans Verkuil
2020-09-12  8:35   ` [Linux-kernel-mentees] " Hans Verkuil

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=20200912093845.6fdd7352@coco.lan \
    --to=mchehab+huawei@kernel.org \
    --cc="  <linux-kernel-mentees@lists.linuxfoundation.org>, "@osuosl.org \
    --cc=" <linux-kernel@vger.kernel.org>"@osuosl.org \
    --cc=" <skhan@linuxfoundation.org>, "@osuosl.org \
    --cc="linux-media@vger.kernel.org\" <linux-media@vger.kernel.org@casper.infradead.org>, "@osuosl.org \
    --cc=dwlsalmeida@gmail.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas@ndufresne.ca \
    --cc=r.verdejo@samsung.com \
    /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.