ioctl VIDIOC_DBG_G_CHIP_IDENT
&manvol;
VIDIOC_DBG_G_CHIP_IDENTIdentify the chips on a TV cardint ioctlint fdint requeststruct v4l2_dbg_chip_ident
*argpArgumentsfd&fd;requestVIDIOC_DBG_G_CHIP_IDENTargpDescriptionExperimentalThis is an experimental interface and may change in
the future.For driver debugging purposes this ioctl allows test
applications to query the driver about the chips present on the TV
card. Regular applications must not use it. When you found a chip
specific bug, please contact the linux-media mailing list (&v4l-ml;)
so it can be fixed.To query the driver applications must initialize the
match.type and
match.addr or match.name
fields of a &v4l2-dbg-chip-ident;
and call VIDIOC_DBG_G_CHIP_IDENT with a pointer to
this structure. On success the driver stores information about the
selected chip in the ident and
revision fields. On failure the structure
remains unchanged.When match.type is
V4L2_CHIP_MATCH_HOST,
match.addr selects the nth non-&i2c; chip
on the TV card. You can enumerate all chips by starting at zero and
incrementing match.addr by one until
VIDIOC_DBG_G_CHIP_IDENT fails with an &EINVAL;.
The number zero always selects the host chip, ⪚ the chip connected
to the PCI or USB bus.When match.type is
V4L2_CHIP_MATCH_I2C_DRIVER,
match.name contains the I2C driver name.
For instance
"saa7127" will match any chip
supported by the saa7127 driver, regardless of its &i2c; bus address.
When multiple chips supported by the same driver are present, the
ioctl will return V4L2_IDENT_AMBIGUOUS in the
ident field.When match.type is
V4L2_CHIP_MATCH_I2C_ADDR,
match.addr selects a chip by its 7 bit
&i2c; bus address.When match.type is
V4L2_CHIP_MATCH_AC97,
match.addr selects the nth AC97 chip
on the TV card. You can enumerate all chips by starting at zero and
incrementing match.addr by one until
VIDIOC_DBG_G_CHIP_IDENT fails with an &EINVAL;.On success, the ident field will
contain a chip ID from the Linux
media/v4l2-chip-ident.h header file, and the
revision field will contain a driver
specific value, or zero if no particular revision is associated with
this chip.When the driver could not identify the selected chip,
ident will contain
V4L2_IDENT_UNKNOWN. When no chip matched
the ioctl will succeed but the
ident field will contain
V4L2_IDENT_NONE. If multiple chips matched,
ident will contain
V4L2_IDENT_AMBIGUOUS. In all these cases the
revision field remains unchanged.This ioctl is optional, not all drivers may support it. It
was introduced in Linux 2.6.21, but the API was changed to the
one described here in 2.6.29.We recommended the v4l2-dbg
utility over calling this ioctl directly. It is available from the
LinuxTV v4l-dvb repository; see http://linuxtv.org/repo/ for
access instructions.
struct v4l2_dbg_match
&cs-ustr;
__u32typeSee for a list of
possible types.union(anonymous)__u32addrMatch a chip by this number, interpreted according
to the type field.charname[32]Match a chip by this name, interpreted according
to the type field.
struct v4l2_dbg_chip_ident
&cs-str;
struct v4l2_dbg_matchmatchHow to match the chip, see .__u32identA chip identifier as defined in the Linux
media/v4l2-chip-ident.h header file, or one of
the values from .__u32revisionA chip revision, chip and driver specific.
Chip Match Types
&cs-def;
V4L2_CHIP_MATCH_HOST0Match the nth chip on the card, zero for the
host chip. Does not match &i2c; chips.V4L2_CHIP_MATCH_I2C_DRIVER1Match an &i2c; chip by its driver name.V4L2_CHIP_MATCH_I2C_ADDR2Match a chip by its 7 bit &i2c; bus address.V4L2_CHIP_MATCH_AC973Match the nth anciliary AC97 chip.
Chip Identifiers
&cs-def;
V4L2_IDENT_NONE0No chip matched.V4L2_IDENT_AMBIGUOUS1Multiple chips matched.V4L2_IDENT_UNKNOWN2A chip is present at this address, but the driver
could not identify it.
&return-value;
EINVALThe driver does not support this ioctl, or the
match_type is invalid.