drivers/media/pci/ivtv/ivtv-cards.c
Source file repositories/reference/linux-study-clean/drivers/media/pci/ivtv/ivtv-cards.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/ivtv/ivtv-cards.c- Extension
.c- Size
- 46716 bytes
- Lines
- 1359
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
ivtv-driver.hivtv-cards.hivtv-i2c.hmedia/drv-intf/msp3400.hmedia/i2c/m52790.hmedia/i2c/wm8775.hmedia/i2c/cs53l32a.hmedia/drv-intf/cx25840.hmedia/i2c/upd64031a.h
Detected Declarations
function ivtv_get_inputfunction ivtv_get_outputfunction ivtv_get_audio_inputfunction ivtv_get_audio_output
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
Functions to query card hardware
Copyright (C) 2003-2004 Kevin Thayer <nufan_wfk at yahoo.com>
Copyright (C) 2005-2007 Hans Verkuil <hverkuil@kernel.org>
*/
#include "ivtv-driver.h"
#include "ivtv-cards.h"
#include "ivtv-i2c.h"
#include <media/drv-intf/msp3400.h>
#include <media/i2c/m52790.h>
#include <media/i2c/wm8775.h>
#include <media/i2c/cs53l32a.h>
#include <media/drv-intf/cx25840.h>
#include <media/i2c/upd64031a.h>
#define MSP_TUNER MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \
MSP_DSP_IN_TUNER, MSP_DSP_IN_TUNER)
#define MSP_SCART1 MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \
MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
#define MSP_SCART2 MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1, \
MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
#define MSP_SCART3 MSP_INPUT(MSP_IN_SCART3, MSP_IN_TUNER1, \
MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
#define MSP_MONO MSP_INPUT(MSP_IN_MONO, MSP_IN_TUNER1, \
MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
#define V4L2_STD_PAL_SECAM (V4L2_STD_PAL|V4L2_STD_SECAM)
/* usual i2c tuner addresses to probe */
static struct ivtv_card_tuner_i2c ivtv_i2c_std = {
.radio = { I2C_CLIENT_END },
.demod = { 0x43, I2C_CLIENT_END },
.tv = { 0x61, 0x60, I2C_CLIENT_END },
};
/* as above, but with possible radio tuner */
static struct ivtv_card_tuner_i2c ivtv_i2c_radio = {
.radio = { 0x60, I2C_CLIENT_END },
.demod = { 0x43, I2C_CLIENT_END },
.tv = { 0x61, I2C_CLIENT_END },
};
/* using the tda8290+75a combo */
static struct ivtv_card_tuner_i2c ivtv_i2c_tda8290 = {
.radio = { I2C_CLIENT_END },
.demod = { I2C_CLIENT_END },
.tv = { 0x4b, I2C_CLIENT_END },
};
/********************** card configuration *******************************/
/* Please add new PCI IDs to: https://pci-ids.ucw.cz/
This keeps the PCI ID database up to date. Note that the entries
must be added under vendor 0x4444 (Conexant) as subsystem IDs.
New vendor IDs should still be added to the vendor ID list. */
/* Hauppauge PVR-250 cards */
/* Note: for Hauppauge cards the tveeprom information is used instead of PCI IDs */
static const struct ivtv_card ivtv_card_pvr250 = {
.type = IVTV_CARD_PVR_250,
.name = "Hauppauge WinTV PVR-250",
.v4l2_capabilities = IVTV_CAP_ENCODER,
.hw_video = IVTV_HW_SAA7115,
.hw_audio = IVTV_HW_MSP34XX,
.hw_audio_ctrl = IVTV_HW_MSP34XX,
.hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
.video_inputs = {
{ IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
{ IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
{ IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
{ IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
{ IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
{ IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
},
.audio_inputs = {
{ IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
{ IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
{ IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
},
.radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
.i2c = &ivtv_i2c_std,
};
/* ------------------------------------------------------------------------- */
Annotation
- Immediate include surface: `ivtv-driver.h`, `ivtv-cards.h`, `ivtv-i2c.h`, `media/drv-intf/msp3400.h`, `media/i2c/m52790.h`, `media/i2c/wm8775.h`, `media/i2c/cs53l32a.h`, `media/drv-intf/cx25840.h`.
- Detected declarations: `function ivtv_get_input`, `function ivtv_get_output`, `function ivtv_get_audio_input`, `function ivtv_get_audio_output`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.