#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: emdtv_board.c,v 1.1 2011/07/11 18:02:04 jmcneill Exp $");
#include <sys/types.h>
#include <sys/device.h>
#include <dev/usb/usbdevs.h>
#include <dev/usb/emdtvvar.h>
static const struct emdtv_board emdtv_boards[] = {
{
.eb_name = "ATI TV Wonder 600 USB",
.eb_vendor = USB_VENDOR_AMD,
.eb_product = USB_PRODUCT_AMD_TV_WONDER_600_USB,
.eb_tuner = EMDTV_TUNER_XC3028L,
.eb_demod = EMDTV_DEMOD_LG3303,
.eb_manual_gpio = true,
.eb_gpio_regs = {
.ts1_on = EMDTV_GPIO_BIT_VAL(0, 0, 0),
.a_on = EMDTV_GPIO_BIT_VAL(1, 0, 0),
.t1_on = EMDTV_GPIO_BIT_VAL(6, 0, 0),
.t1_reset = EMDTV_GPIO_BIT_VAL(4, 0, 1),
.d1_reset = EMDTV_GPIO_BIT_VAL(19, 0, 1),
},
},
{
.eb_name = "Pinnacle PCTV HD Pro Stick 800e",
.eb_vendor = USB_VENDOR_PINNACLE,
.eb_product = USB_PRODUCT_PINNACLE_PCTV800E,
.eb_tuner = EMDTV_TUNER_XC3028,
.eb_demod = EMDTV_DEMOD_LG3303,
.eb_manual_gpio = true,
.eb_gpio_regs = {
.ts1_on = EMDTV_GPIO_BIT_VAL(0, 0, 0),
.a_on = EMDTV_GPIO_BIT_VAL(1, 0, 0),
.t1_on = EMDTV_GPIO_BIT_VAL(6, 0, 0),
.t1_reset = EMDTV_GPIO_BIT_VAL(4, 0, 1),
.d1_reset = EMDTV_GPIO_BIT_VAL(19, 0, 1),
},
},
{
.eb_name = "Empia Hybrid XS ATSC",
.eb_vendor = USB_VENDOR_EMPIA,
.eb_product = USB_PRODUCT_EMPIA_EM2883,
.eb_tuner = EMDTV_TUNER_XC5000,
.eb_demod = EMDTV_DEMOD_LG3304,
},
};
const struct emdtv_board *
emdtv_board_lookup(uint16_t vendor, uint16_t product)
{
const struct emdtv_board *eb;
unsigned int i;
for (i = 0; i < __arraycount(emdtv_boards); i++) {
eb = &emdtv_boards[i];
if (vendor == eb->eb_vendor && product == eb->eb_product)
return eb;
}
return NULL;
}