28 #define DRIVER_NAME "saa7164"
34 .demod_address = 0x10 >> 1,
44 .demod_address = 0x12 >> 1,
55 .atsc_6 = { .if_freq = 3250, .agc_mode = 3, .std = 3,
56 .if_lvl = 6, .rfagc_top = 0x37 },
57 .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 0,
58 .if_lvl = 6, .rfagc_top = 0x37 },
62 .std_map = &hauppauge_tda18271_std_map,
68 .std_map = &hauppauge_tda18271_std_map,
72 .rf_cal_on_startup = 1
103 static int saa7164_dvb_acquire_port(
struct saa7164_port *port)
121 static int saa7164_dvb_pause_port(
struct saa7164_port *port)
143 static int saa7164_dvb_stop_streaming(
struct saa7164_port *port)
152 ret = saa7164_dvb_pause_port(port);
153 ret = saa7164_dvb_acquire_port(port);
154 ret = saa7164_dvb_stop_port(port);
167 static int saa7164_dvb_start_port(
struct saa7164_port *port)
186 "failed, res = 0x%x\n", __func__,
result);
203 "failed, res = 0x%x\n", __func__,
result);
221 "failed, res = 0x%x\n", __func__,
result);
242 if (!demux->
dmx.frontend)
247 if (
dvb->feeding++ == 0) {
249 ret = saa7164_dvb_start_port(port);
253 __func__, port->
nr,
dvb->feeding);
271 if (--
dvb->feeding == 0) {
273 ret = saa7164_dvb_stop_streaming(port);
277 __func__, port->
nr,
dvb->feeding);
296 if (port->
hwcfg.BARLocation == 0) {
299 "(errno = %d), NO PCI configuration\n",
320 for (i = 0; i < port->
hwcfg.buffercount; i++) {
328 "(errno = %d), unable to allocate buffers\n",
340 &dev->
pci->dev, adapter_nr);
357 dvb->
demux.dmx.capabilities =
361 dvb->
demux.filternum = 256;
362 dvb->
demux.feednum = 256;
363 dvb->
demux.start_feed = saa7164_dvb_start_feed;
364 dvb->
demux.stop_feed = saa7164_dvb_stop_feed;
372 dvb->
dmxdev.filternum = 256;
374 dvb->
dmxdev.capabilities = 0;
386 "(DMX_FRONTEND_0, errno = %d)\n",
DRIVER_NAME, result);
394 "(DMX_MEMORY_FE, errno = %d)\n",
DRIVER_NAME, result);
398 result = dvb->
demux.dmx.connect_frontend(&dvb->
demux.dmx, &dvb->
fe_hw);
474 switch (dev->
board) {
484 &hauppauge_hvr2200_1_config,
487 if (port->
dvb.frontend !=
NULL) {
491 &hauppauge_hvr22x0_tuner_config);
497 &hauppauge_hvr2200_2_config,
500 if (port->
dvb.frontend !=
NULL) {
504 &hauppauge_hvr22x0s_tuner_config);
516 &hauppauge_s5h1411_config,
519 if (port->
dvb.frontend !=
NULL) {
525 &hauppauge_hvr22x0_tuner_config);
530 &hauppauge_hvr22x0s_tuner_config);
547 ret = dvb_register(port);