Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Mauro Carvalho Chehab <mchehab <at> infradead.org>
Subject: [RFC] Audio standards definitions for V4L2 API
Newsgroups: gmane.comp.video.video4linux
Date: Thursday 15th November 2007 13:59:37 UTC (over 10 years ago)
In the past, all audio decoders were smart enough to properly decode an
audio standard without needing to know explicitly what would be the
audio format. 

However, a silicon tuner device (xc3028) implements an audio decoder
inside the silicon. This decoder needs to explicitly know what audio
standard would be used.

On V4L2 API, just one 64 bit mask is used to selects several different
issues related to a video standard. 3 ioctls are used to
enumerate/get/set several different aspects of the standard:
	- it is a 50Hz or a 60Hz standard;
	- monochromatic standard (STD/M, STD/B, ..);
	- color standard (PAL, NTSC, SECAM);
	- audio standard (NTSC/Jp, NTSC/Kr, NTSC/M).

Yet, the way audio standard is selected is not nice, since it associates
a color standard (NTSC/M) with audio (NTSC/Jp, for example is NTSC +
EIAJ, while NTSC/M is NTSC + BTSC).

This RFC proposes to use some bits of the bitmask to allow explicit
setting the supported standards.

To preserve backward compatibility, if all audio bits are 0, it means
that the decoder auto-detects between all different audio standards.

---

Those are the new definitions needed to be added to fully support all
v2.7 Xceive firmware types:

#define V4L2_STD_SECAM_K3	(0x04000000)

/* Audio types */

#define V4L2_STD_A2_A		(1L<<32)
#define V4L2_STD_A2_B		(1L<<33)
#define V4L2_STD_NICAM_A	(1L<<34)
#define V4L2_STD_NICAM_B	(1L<<35)
#define V4L2_STD_AM		(1L<<36)
#define V4L2_STD_BTSC		(1L<<37)
#define V4L2_STD_EIAJ		(1L<<38)

#define V4L2_STD_A2		(V4L2_STD_A2_A    | V4L2_STD_A2_B)
#define V4L2_STD_NICAM		(V4L2_STD_NICAM_A | V4L2_STD_NICAM_B)

/* To preserve backward compatibilty,
   (std & V4L2_STD_AUDIO) = 0 means that ALL audio stds are supported
 */

#define V4L2_STD_AUDIO		(V4L2_STD_A2    | \
				 V4L2_STD_NICAM | \
				 V4L2_STD_AM    | \
				 V4L2_STD_BTSC  | \
				 V4L2_STD_EIAJ)

/* Used standards on Xc3028 with audio restrictions */

#define V4L2_STD_PAL_BG_A2_A	(V4L2_STD_PAL_BG | V4L2_STD_A2_A)
#define V4L2_STD_PAL_BG_A2_B	(V4L2_STD_PAL_BG | V4L2_STD_A2_B)
#define V4L2_STD_PAL_BG_NICAM_A	(V4L2_STD_PAL_BG | V4L2_STD_NICAM_A)
#define V4L2_STD_PAL_BG_NICAM_B	(V4L2_STD_PAL_BG | V4L2_STD_NICAM_B)
#define V4L2_STD_PAL_DK_A2	(V4L2_STD_PAL_DK | V4L2_STD_A2)
#define V4L2_STD_PAL_DK_NICAM	(V4L2_STD_PAL_DK | V4L2_STD_NICAM)
#define V4L2_STD_SECAM_L_NICAM	(V4L2_STD_SECAM_L | V4L2_STD_NICAM)
#define V4L2_STD_SECAM_L_AM	(V4L2_STD_SECAM_L | V4L2_STD_AM)

-- 
Cheers,
Mauro

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
 
CD: 2ms