linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: "Daniel W. S. Almeida" <dwlsalmeida@gmail.com>
Cc: "r.verdejo@samsung.com" <r.verdejo@samsung.com>,
	"nicolas@ndufresne.ca" <nicolas@ndufresne.ca>,
	"  <skhan@linuxfoundation.org>,
	 "@lists.linuxfoundation.org,
	linux-kernel-mentees@lists.linuxfoundation,
	"linux-media@vger.kernel.org\"         
	<linux-media@vger.kernel.org>,
	 "@lists.linuxfoundation.org, skhan@linuxfoundation.org,
	"org\"" <linux-kernel-mentees@lists.linuxfoundation.org>,
	"linux-kernel@vger.kernel.org\"
	<linux-kernel@vger.kernel.org>"@osuosl.org
Subject: Re: [Linux-kernel-mentees] [v10 0/4] media: vidtv: Implement a virtual DVB driver
Date: Fri, 11 Sep 2020 15:56:40 +0200	[thread overview]
Message-ID: <20200911155640.79a15a14@coco.lan> (raw)
In-Reply-To: <20200911151046.076abb79@coco.lan>

Em Fri, 11 Sep 2020 15:10:46 +0200
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> escreveu:

> Em Fri, 11 Sep 2020 09:18:20 -0300
> "Daniel W. S. Almeida" <dwlsalmeida@gmail.com> escreveu:

> > > 	3. dvbv5-zap wrote an empty audio file (without -P flag).
> > > 	   Probably there are still some issues at the program
> > > 	   channel descriptor or service;    
> > 
> > I don't remember whether I tried this. I tried dumping the stream to a
> > file with dvbzap, which should work. By the way, I guess we should be
> > comparing the output to this
> > 
> > $ ffmpeg -f lavfi -i sine=frequency=1000:duration=5 -ac 2 -c:a s302m
> > -strict -2 out.ts
> > 
> > Since it produces a playable transport stream file that actually sounds
> > like a sine tone.
> > 
> > Inspecting ffmpeg & vidtv output side by side in dvbinspector, you'll
> > see that they're mostly the same. I have a separate PID for the PCR and
> > some other minor differences.  
> 
> The problem is here:
> 
> 	$ dvbv5-zap -c dvb_channel.conf "S302m: Sine Wave PCM Audio" -t 30 -o pcm_audio.ts -P
> 	using demux 'dvb0.demux0'
> 	reading channels from file 'dvb_channel.conf'
> 	service has pid type 06:  273
> 
> See, it identified the EL type ID as type 6, which is handled by
> dvbv5 library here:
> 
> 		case 0x06: /* private data */
> 			/*
> 			* Those can be used by sub-titling, teletext and/or
> 			* DVB AC-3. So, need to seek for the AC-3 descriptors
> 			*/
> 			dvb_desc_find(struct dvb_desc_service, desc, stream, AC_3_descriptor)
> 				has_ac3 = 1;
> 
> 			dvb_desc_find(struct dvb_desc_service, desc, stream, enhanced_AC_3_descriptor)
> 				has_ac3 = 1;
> 
> 			if (has_ac3) {
> 				entry->audio_pid = realloc(entry->audio_pid,
> 							   sizeof(*entry->audio_pid) *
> 							   (audio_len + 1));
> 				entry->audio_pid[audio_len] = pid;
> 				audio_len++;
> 			} else {
> 				entry->other_el_pid = realloc(entry->other_el_pid,
> 							   sizeof(*entry->other_el_pid) *
> 							   (other_len + 1));
> 				entry->other_el_pid[other_len].type = stream->type;
> 				entry->other_el_pid[other_len].pid = pid;
> 				other_len++;
> 			}
> 			break;
> 
> Basically, it is not recognizing the stream as an audio PID, but
> as some other random data. Due to that, the output of
> dvb_channel.conf will be wrong.
> 
> As type 6 seems to be the correct one for SMPTE 302M, we need to fix
> dvbv5-tools (and likely other tools like kaffeine), in order to
> recognize it as audio as well.

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.


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-11 13:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21 12:58 [Linux-kernel-mentees] [v10 0/4] media: vidtv: Implement a virtual DVB driver Daniel W. S. Almeida
2020-08-21 12:58 ` [Linux-kernel-mentees] [v10 1/4] media: vidtv: implement a tuner driver Daniel W. S. Almeida
2020-08-21 12:58 ` [Linux-kernel-mentees] [v10 2/4] media: vidtv: implement a demodulator driver Daniel W. S. Almeida
2020-08-21 12:58 ` [Linux-kernel-mentees] [v10 3/4] media: vidtv: add a bridge driver Daniel W. S. Almeida
2020-09-15 11:53   ` Geert Uytterhoeven
2020-09-15 13:26     ` Daniel W. S. Almeida
2020-09-15 13:35       ` Geert Uytterhoeven
2020-09-15 18:13         ` Daniel W. S. Almeida
2020-09-16  7:01         ` Mauro Carvalho Chehab
2020-08-21 12:58 ` [Linux-kernel-mentees] [v10 4/4] media: Documentation: vidtv: Add ReST documentation for vidtv Daniel W. S. Almeida
2020-09-11  8:02 ` [Linux-kernel-mentees] [v10 0/4] media: vidtv: Implement a virtual DVB driver Mauro Carvalho Chehab
2020-09-11 12:18   ` Daniel W. S. Almeida
2020-09-11 13:10     ` Mauro Carvalho Chehab
2020-09-11 13:56       ` Mauro Carvalho Chehab [this message]
2020-09-12  2:54         ` Daniel W. S. Almeida
2020-09-12  7:38           ` Mauro Carvalho Chehab
2020-09-12  8:21 ` Hans Verkuil
2020-09-12  9:15   ` Mauro Carvalho Chehab
2020-09-12 14:49     ` Daniel W. S. Almeida
2020-09-12 17:57       ` Mauro Carvalho Chehab
2020-09-14  8:33         ` Hans Verkuil
2020-09-12  8:35 ` 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=20200911155640.79a15a14@coco.lan \
    --to=mchehab+huawei@kernel.org \
    --cc="  <skhan@linuxfoundation.org>,  "@lists.linuxfoundation.org \
    --cc="linux-kernel@vger.kernel.org\" <linux-kernel@vger.kernel.org>"@osuosl.org \
    --cc="linux-media@vger.kernel.org\"          <linux-media@vger.kernel.org>,  "@lists.linuxfoundation.org \
    --cc=dwlsalmeida@gmail.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=nicolas@ndufresne.ca \
    --cc=r.verdejo@samsung.com \
    --cc=skhan@linuxfoundation.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 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).