drivers/media/usb/dvb-usb-v2/au6610.c
Source file repositories/reference/linux-study-clean/drivers/media/usb/dvb-usb-v2/au6610.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/dvb-usb-v2/au6610.c- Extension
.c- Size
- 4554 bytes
- Lines
- 201
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
au6610.hzl10353.hqt1010.h
Detected Declarations
function au6610_usb_msgfunction au6610_i2c_msgfunction au6610_i2c_xferfunction au6610_i2c_funcfunction au6610_zl10353_frontend_attachfunction au6610_qt1010_tuner_attachfunction au6610_init
Annotated Snippet
if (i+1 < num && (msg[i+1].flags & I2C_M_RD)) {
if (au6610_i2c_msg(d, msg[i].addr, msg[i].buf,
msg[i].len, msg[i+1].buf,
msg[i+1].len) < 0)
break;
i++;
} else if (au6610_i2c_msg(d, msg[i].addr, msg[i].buf,
msg[i].len, NULL, 0) < 0)
break;
}
mutex_unlock(&d->i2c_mutex);
return i;
}
static u32 au6610_i2c_func(struct i2c_adapter *adapter)
{
return I2C_FUNC_I2C;
}
static const struct i2c_algorithm au6610_i2c_algo = {
.master_xfer = au6610_i2c_xfer,
.functionality = au6610_i2c_func,
};
/* Callbacks for DVB USB */
static struct zl10353_config au6610_zl10353_config = {
.demod_address = 0x0f,
.no_tuner = 1,
.parallel_ts = 1,
};
static int au6610_zl10353_frontend_attach(struct dvb_usb_adapter *adap)
{
adap->fe[0] = dvb_attach(zl10353_attach, &au6610_zl10353_config,
&adap_to_d(adap)->i2c_adap);
if (adap->fe[0] == NULL)
return -ENODEV;
return 0;
}
static struct qt1010_config au6610_qt1010_config = {
.i2c_address = 0x62
};
static int au6610_qt1010_tuner_attach(struct dvb_usb_adapter *adap)
{
return dvb_attach(qt1010_attach, adap->fe[0],
&adap_to_d(adap)->i2c_adap,
&au6610_qt1010_config) == NULL ? -ENODEV : 0;
}
static int au6610_init(struct dvb_usb_device *d)
{
/* TODO: this functionality belongs likely to the streaming control */
/* bInterfaceNumber 0, bAlternateSetting 5 */
return usb_set_interface(d->udev, 0, 5);
}
static struct dvb_usb_device_properties au6610_props = {
.driver_name = KBUILD_MODNAME,
.owner = THIS_MODULE,
.adapter_nr = adapter_nr,
.i2c_algo = &au6610_i2c_algo,
.frontend_attach = au6610_zl10353_frontend_attach,
.tuner_attach = au6610_qt1010_tuner_attach,
.init = au6610_init,
.num_adapters = 1,
.adapter = {
{
.stream = DVB_USB_STREAM_ISOC(0x82, 5, 40, 942, 1),
},
},
};
static const struct usb_device_id au6610_id_table[] = {
{ DVB_USB_DEVICE(USB_VID_ALCOR_MICRO, USB_PID_SIGMATEK_DVB_110,
&au6610_props, "Sigmatek DVB-110", NULL) },
{ }
};
MODULE_DEVICE_TABLE(usb, au6610_id_table);
static struct usb_driver au6610_driver = {
.name = KBUILD_MODNAME,
.id_table = au6610_id_table,
.probe = dvb_usbv2_probe,
Annotation
- Immediate include surface: `au6610.h`, `zl10353.h`, `qt1010.h`.
- Detected declarations: `function au6610_usb_msg`, `function au6610_i2c_msg`, `function au6610_i2c_xfer`, `function au6610_i2c_func`, `function au6610_zl10353_frontend_attach`, `function au6610_qt1010_tuner_attach`, `function au6610_init`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.