/* * CX18_CARD_LEADTEK_DVR3100H
*/ /* Information/confirmation of proper config values provided by Terry Wu */ staticstruct zl10353_config leadtek_dvr3100h_demod = {
.demod_address = 0x1e >> 1, /* Datasheet suggested straps */
.if2 = 45600, /* 4.560 MHz IF from the XC3028 */
.parallel_ts = 1, /* Not a serial TS */
.no_tuner = 1, /* XC3028 is not behind the gate */
.disable_i2c_gate_ctrl = 1, /* Disable the I2C gate */
};
/* * CX18_CARD_YUAN_MPC718
*/ /* * Due to * * 1. an absence of information on how to program the MT352 * 2. the Linux mt352 module pushing MT352 initialization off onto us here * * We have to use an init sequence that *you* must extract from the Windows * driver (yuanrap.sys) and which we load as a firmware. * * If someone can provide me with a Zarlink MT352 (Intel CE6352?) Design Manual * with chip programming details, then I can remove this annoyance.
*/ staticint yuan_mpc718_mt352_reqfw(struct cx18_stream *stream, conststruct firmware **fw)
{ struct cx18 *cx = stream->cx; constchar *fn = FWFILE; int ret;
ret = request_firmware(fw, fn, &cx->pci_dev->dev); if (ret)
CX18_ERR("Unable to open firmware file %s\n", fn); else {
size_t sz = (*fw)->size; if (sz < 2 || sz > 64 || (sz % 2) != 0) {
CX18_ERR("Firmware %s has a bad size: %lu bytes\n",
fn, (unsignedlong) sz);
ret = -EILSEQ;
release_firmware(*fw);
*fw = NULL;
}
}
if (ret) {
CX18_ERR("The MPC718 board variant with the MT352 DVB-T demodulator will not work without it\n");
CX18_ERR("Run 'linux/scripts/get_dvb_firmware mpc718' if you need the firmware\n");
} return ret;
}
/* Kernel DVB framework calls this when the feed needs to start. * The CX18 framework should enable the transport DMA handling * and queue processing.
*/ staticint cx18_dvb_start_feed(struct dvb_demux_feed *feed)
{ struct dvb_demux *demux = feed->demux; struct cx18_stream *stream = demux->priv; struct cx18 *cx; int ret;
u32 v;
mutex_lock(&cx->serialize_lock);
ret = cx18_init_on_first_open(cx);
mutex_unlock(&cx->serialize_lock); if (ret) {
CX18_ERR("Failed to initialize firmware starting DVB feed\n"); return ret;
}
ret = -EINVAL;
switch (cx->card->type) { case CX18_CARD_HVR_1600_ESMT: case CX18_CARD_HVR_1600_SAMSUNG: case CX18_CARD_HVR_1600_S5H1411:
v = cx18_read_reg(cx, CX18_REG_DMUX_NUM_PORT_0_CONTROL);
v |= 0x00400000; /* Serial Mode */
v |= 0x00002000; /* Data Length - Byte */
v |= 0x00010000; /* Error - Polarity */
v |= 0x00020000; /* Error - Passthru */
v |= 0x000c0000; /* Error - Ignore */
cx18_write_reg(cx, v, CX18_REG_DMUX_NUM_PORT_0_CONTROL); break;
case CX18_CARD_LEADTEK_DVR3100H: case CX18_CARD_YUAN_MPC718: case CX18_CARD_GOTVIEW_PCI_DVD3: default: /* Assumption - Parallel transport - Signalling * undefined or default.
*/ break;
}
if (!demux->dmx.frontend) return -EINVAL;
mutex_lock(&stream->dvb->feedlock); if (stream->dvb->feeding++ == 0) {
CX18_DEBUG_INFO("Starting Transport DMA\n");
mutex_lock(&cx->serialize_lock);
set_bit(CX18_F_S_STREAMING, &stream->s_flags);
ret = cx18_start_v4l2_encode_stream(stream); if (ret < 0) {
CX18_DEBUG_INFO("Failed to start Transport DMA\n");
stream->dvb->feeding--; if (stream->dvb->feeding == 0)
clear_bit(CX18_F_S_STREAMING, &stream->s_flags);
}
mutex_unlock(&cx->serialize_lock);
} else
ret = 0;
mutex_unlock(&stream->dvb->feedlock);
return ret;
}
/* Kernel DVB framework calls this when the feed needs to stop. */ staticint cx18_dvb_stop_feed(struct dvb_demux_feed *feed)
{ struct dvb_demux *demux = feed->demux; struct cx18_stream *stream = demux->priv; struct cx18 *cx; int ret = -EINVAL;
if (stream) {
cx = stream->cx;
CX18_DEBUG_INFO("Stop feed: pid = 0x%x index = %d\n",
feed->pid, feed->index);
mutex_lock(&stream->dvb->feedlock); if (--stream->dvb->feeding == 0) {
CX18_DEBUG_INFO("Stopping Transport DMA\n");
mutex_lock(&cx->serialize_lock);
ret = cx18_stop_v4l2_encode_stream(stream, 0);
mutex_unlock(&cx->serialize_lock);
} else
ret = 0;
mutex_unlock(&stream->dvb->feedlock);
}
/* All the DVB attach calls go here, this function gets modified * for each new card. cx18_dvb_start_feed() will also need changes.
*/ staticint dvb_register(struct cx18_stream *stream)
{ struct cx18_dvb *dvb = stream->dvb; struct cx18 *cx = stream->cx; int ret = 0;
fe = dvb_attach(xc2028_attach, dvb->fe, &cfg); if (fe != NULL && fe->ops.tuner_ops.set_config != NULL)
fe->ops.tuner_ops.set_config(fe, &ctrl);
} break; default: /* No Digital Tv Support */ break;
}
ret = dvb_register_frontend(&dvb->dvb_adapter, dvb->fe); if (ret < 0) { if (dvb->fe->ops.release)
dvb->fe->ops.release(dvb->fe); return ret;
}
/* * The firmware seems to enable the TS DMUX clock * under various circumstances. However, since we know we * might use it, let's just turn it on ourselves here.
*/
cx18_write_reg_expect(cx,
(CX18_DMUX_CLK_MASK << 16) | CX18_DMUX_CLK_MASK,
CX18_CLOCK_ENABLE2,
CX18_DMUX_CLK_MASK,
(CX18_DMUX_CLK_MASK << 16) | CX18_DMUX_CLK_MASK);
return ret;
}
MODULE_FIRMWARE(FWFILE);
Messung V0.5
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.