1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

add raw mode, selected either via module option or input parameter

This commit is contained in:
none 2020-08-29 14:57:02 +02:00
parent 982dc4d366
commit ddac58d082
5 changed files with 22 additions and 6 deletions

View File

@ -56,6 +56,10 @@ static int xo2_speed = 2;
module_param(xo2_speed, int, 0444); module_param(xo2_speed, int, 0444);
MODULE_PARM_DESC(xo2_speed, "default transfer speed for xo2 based duoflex, 0=55,1=75,2=90,3=104 MBit/s, default=2, use attribute to change for individual cards"); MODULE_PARM_DESC(xo2_speed, "default transfer speed for xo2 based duoflex, 0=55,1=75,2=90,3=104 MBit/s, default=2, use attribute to change for individual cards");
static int raw_stream;
module_param(raw_stream, int, 0444);
MODULE_PARM_DESC(raw_stream, "send data as raw stream to DVB layer");
#ifdef __arm__ #ifdef __arm__
static int alt_dma = 1; static int alt_dma = 1;
#else #else
@ -2401,9 +2405,15 @@ static void input_write_dvb(struct ddb_input *input,
if (alt_dma) if (alt_dma)
dma_sync_single_for_cpu(dev->dev, dma2->pbuf[dma->cbuf], dma_sync_single_for_cpu(dev->dev, dma2->pbuf[dma->cbuf],
dma2->size, DMA_FROM_DEVICE); dma2->size, DMA_FROM_DEVICE);
dvb_dmx_swfilter_packets(&dvb->demux, if (raw_stream || input->con)
dma2->vbuf[dma->cbuf], dvb_dmx_swfilter_raw(&dvb->demux,
dma2->size / 188); dma2->vbuf[dma->cbuf],
dma2->size);
else
dvb_dmx_swfilter_packets(&dvb->demux,
dma2->vbuf[dma->cbuf],
dma2->size / 188);
dma->cbuf = (dma->cbuf + 1) % dma2->num; dma->cbuf = (dma->cbuf + 1) % dma2->num;
if (ack) if (ack)
ddbwritel(dev, (dma->cbuf << 11), ddbwritel(dev, (dma->cbuf << 11),

View File

@ -388,6 +388,7 @@ struct dvb_frontend *ddb_mci_attach(struct ddb_input *input, struct mci_cfg *cfg
state->nr = nr; state->nr = nr;
state->demod = nr; state->demod = nr;
state->tuner = tuner; state->tuner = tuner;
state->input = input;
if (cfg->init) if (cfg->init)
cfg->init(state); cfg->init(state);
return &state->fe; return &state->fe;

View File

@ -759,6 +759,7 @@ struct mci_base {
}; };
struct mci { struct mci {
struct ddb_io *input;
struct mci_base *base; struct mci_base *base;
struct dvb_frontend fe; struct dvb_frontend fe;
int nr; int nr;

View File

@ -354,7 +354,8 @@ unlock:
cmd.tuner = state->mci.tuner; cmd.tuner = state->mci.tuner;
cmd.demod = state->mci.demod; cmd.demod = state->mci.demod;
cmd.output = state->mci.nr; cmd.output = state->mci.nr;
if (p->stream_id == 0x80000000) if ((p->stream_id != NO_STREAM_ID_FILTER) &&
(p->stream_id & 0x80000000))
cmd.output |= 0x80; cmd.output |= 0x80;
stat = ddb_mci_cmd(&state->mci, &cmd, NULL); stat = ddb_mci_cmd(&state->mci, &cmd, NULL);
if (stat) if (stat)
@ -426,13 +427,15 @@ static int set_parameters(struct dvb_frontend *fe)
int stat = 0; int stat = 0;
struct sx8 *state = fe->demodulator_priv; struct sx8 *state = fe->demodulator_priv;
struct dtv_frontend_properties *p = &fe->dtv_property_cache; struct dtv_frontend_properties *p = &fe->dtv_property_cache;
u32 ts_config = SX8_TSCONFIG_MODE_NORMAL, iq_mode = 0, isi; u32 ts_config = SX8_TSCONFIG_MODE_NORMAL, iq_mode = 0, isi, ts_mode = 0;
isi = p->stream_id; isi = p->stream_id;
if (isi != NO_STREAM_ID_FILTER) { if (isi != NO_STREAM_ID_FILTER) {
iq_mode = (isi & 0x30000000) >> 28; iq_mode = (isi & 0x30000000) >> 28;
ts_mode = (isi & 0x03000000) >> 24;
} }
state->mci.input->con = ts_mode << 8;
printk("ts_mode = %02x\n", ts_mode);
if (iq_mode) if (iq_mode)
ts_config = (SX8_TSCONFIG_TSHEADER | SX8_TSCONFIG_MODE_IQ); ts_config = (SX8_TSCONFIG_TSHEADER | SX8_TSCONFIG_MODE_IQ);
stop(fe); stop(fe);

View File

@ -256,6 +256,7 @@ struct ddb_io {
struct ddb_port *port; struct ddb_port *port;
u32 nr; u32 nr;
u32 regs; u32 regs;
u32 con;
struct ddb_dma *dma; struct ddb_dma *dma;
struct ddb_io *redo; struct ddb_io *redo;
struct ddb_io *redi; struct ddb_io *redi;