mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2025-03-01 10:35:23 +00:00
Merge 065bc32fed96d2042ff067ccac301275b475dc14 into ea8e877dca1cb9c1f5ca41e5cf86297d3cc08528
This commit is contained in:
commit
0a4cf1419f
@ -25,6 +25,7 @@
|
||||
#include "ddbridge-i2c.h"
|
||||
#include "ddbridge-io.h"
|
||||
#include "ddbridge-ioctl.h"
|
||||
#include "ddbridge-core.h"
|
||||
#include <media/dvb_net.h>
|
||||
|
||||
struct workqueue_struct *ddb_wq;
|
||||
@ -105,6 +106,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
|
||||
|
||||
/* copied from dvb-core/dvbdev.c because kernel version does not export it */
|
||||
|
||||
|
||||
int ddb_dvb_usercopy(struct file *file,
|
||||
unsigned int cmd, unsigned long arg,
|
||||
int (*func)(struct file *file,
|
||||
@ -4070,7 +4072,7 @@ static struct class ddb_class = {
|
||||
.devnode = ddb_devnode,
|
||||
};
|
||||
|
||||
int ddb_class_create(void)
|
||||
static int ddb_class_create(void)
|
||||
{
|
||||
ddb_major = register_chrdev(0, DDB_NAME, &ddb_fops);
|
||||
if (ddb_major < 0)
|
||||
@ -4080,7 +4082,7 @@ int ddb_class_create(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ddb_class_destroy(void)
|
||||
static void ddb_class_destroy(void)
|
||||
{
|
||||
class_unregister(&ddb_class);
|
||||
unregister_chrdev(ddb_major, DDB_NAME);
|
||||
|
31
ddbridge/ddbridge-core.h
Normal file
31
ddbridge/ddbridge-core.h
Normal file
@ -0,0 +1,31 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* ddbridge-core.c: Digital Devices bridge core functions
|
||||
*
|
||||
* Copyright (C) 2010-2017 Digital Devices GmbH
|
||||
* Marcus Metzler <mocm@metzlerbros.de>
|
||||
* Ralph Metzler <rjkm@metzlerbros.de>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 only, as published by the Free Software Foundation.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _DDBRIDGE_SX8_H_
|
||||
#define _DDBRIDGE_SX8_H_
|
||||
|
||||
int ddb_dvb_usercopy(struct file *file,
|
||||
unsigned int cmd, unsigned long arg,
|
||||
int (*func)(struct file *file,
|
||||
unsigned int cmd, void *arg));
|
||||
#endif
|
@ -25,6 +25,7 @@
|
||||
#include "ddbridge.h"
|
||||
#include "ddbridge-io.h"
|
||||
#include "ddbridge-mci.h"
|
||||
#include "ddbridge-m4.h"
|
||||
|
||||
struct m4_base {
|
||||
struct mci_base mci_base;
|
||||
|
30
ddbridge/ddbridge-m4.h
Normal file
30
ddbridge/ddbridge-m4.h
Normal file
@ -0,0 +1,30 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* ddbridge-m4.c: Digital Devices MAX M4 driver
|
||||
*
|
||||
* Copyright (C) 2018 Digital Devices GmbH
|
||||
* Marcus Metzler <mocm@metzlerbros.de>
|
||||
* Ralph Metzler <rjkm@metzlerbros.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 only, as published by the Free Software Foundation.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, point your browser to
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*/
|
||||
|
||||
#ifndef _DDBRIDGE_M4_H_
|
||||
#define _DDBRIDGE_M4_H_
|
||||
|
||||
struct dvb_frontend *ddb_mx_attach(struct ddb_input *input, int nr, int tuner, int type);
|
||||
|
||||
#endif
|
@ -25,6 +25,8 @@
|
||||
#include "ddbridge.h"
|
||||
#include "ddbridge-io.h"
|
||||
#include "ddbridge-i2c.h"
|
||||
#include "ddbridge-sx8.h"
|
||||
#include "ddbridge-m4.h"
|
||||
|
||||
/* MAX LNB interface related module parameters */
|
||||
|
||||
@ -482,8 +484,9 @@ int ddb_fe_attach_mxl5xx(struct ddb_input *input)
|
||||
|
||||
cfg = mxl5xx;
|
||||
cfg.fw_priv = link;
|
||||
if (dev->link[0].info->type == DDB_OCTONET)
|
||||
if (dev->link[0].info->type == DDB_OCTONET) {
|
||||
;/*cfg.ts_clk = 69;*/
|
||||
}
|
||||
|
||||
demod = input->nr;
|
||||
tuner = demod & 3;
|
||||
@ -519,11 +522,6 @@ int ddb_fe_attach_mxl5xx(struct ddb_input *input)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* MAX MCI related functions */
|
||||
struct dvb_frontend *ddb_sx8_attach(struct ddb_input *input, int nr, int tuner,
|
||||
int (**fn_set_input)(struct dvb_frontend *fe, int input));
|
||||
struct dvb_frontend *ddb_mx_attach(struct ddb_input *input, int nr, int tuner, int type);
|
||||
|
||||
|
||||
int ddb_fe_attach_mci(struct ddb_input *input, u32 type)
|
||||
{
|
||||
|
@ -210,7 +210,7 @@ int ddb_mci_cmd(struct mci *state,
|
||||
}
|
||||
|
||||
|
||||
int ddb_mci_cmd_raw(struct mci *state,
|
||||
static int ddb_mci_cmd_raw(struct mci *state,
|
||||
struct mci_command *command, u32 command_len,
|
||||
struct mci_result *result, u32 result_len)
|
||||
{
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "ddbridge.h"
|
||||
#include "ddbridge-io.h"
|
||||
#include "ddbridge-mci.h"
|
||||
#include "ddbridge-sx8.h"
|
||||
|
||||
static int default_mod = 3;
|
||||
module_param(default_mod, int, 0444);
|
||||
|
29
ddbridge/ddbridge-sx8.h
Normal file
29
ddbridge/ddbridge-sx8.h
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* ddbridge-sx8.c: Digital Devices MAX SX8 driver
|
||||
*
|
||||
* Copyright (C) 2018 Digital Devices GmbH
|
||||
* Marcus Metzler <mocm@metzlerbros.de>
|
||||
* Ralph Metzler <rjkm@metzlerbros.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 only, as published by the Free Software Foundation.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, point your browser to
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*/
|
||||
|
||||
#ifndef _DDBRIDGE_SX8_H_
|
||||
#define _DDBRIDGE_SX8_H_
|
||||
|
||||
struct dvb_frontend *ddb_sx8_attach(struct ddb_input *input, int nr, int tuner,
|
||||
int (**fn_set_input)(struct dvb_frontend *fe, int input));
|
||||
#endif
|
@ -25,9 +25,8 @@
|
||||
|
||||
#include <linux/net.h>
|
||||
#include "dvb_netstream.h"
|
||||
#include "ddbridge-core.h"
|
||||
|
||||
int ddb_dvb_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
|
||||
int (*func)(struct file *file, unsigned int cmd, void *arg));
|
||||
|
||||
static ssize_t ns_write(struct file *file, const char *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
|
@ -62,16 +62,6 @@ static bool IsQAM(struct drxk_state *state)
|
||||
state->m_OperationMode == OM_QAM_ITU_C;
|
||||
}
|
||||
|
||||
bool IsA1WithPatchCode(struct drxk_state *state)
|
||||
{
|
||||
return state->m_DRXK_A1_PATCH_CODE;
|
||||
}
|
||||
|
||||
bool IsA1WithRomCode(struct drxk_state *state)
|
||||
{
|
||||
return state->m_DRXK_A1_ROM_CODE;
|
||||
}
|
||||
|
||||
#define NOA1ROM 0
|
||||
|
||||
#ifndef CHK_ERROR
|
||||
@ -492,7 +482,7 @@ static int WriteBlock(struct drxk_state *state, u32 Address,
|
||||
#define DRXK_MAX_RETRIES_POWERUP 20
|
||||
#endif
|
||||
|
||||
int PowerUpDevice(struct drxk_state *state)
|
||||
static int PowerUpDevice(struct drxk_state *state)
|
||||
{
|
||||
int status;
|
||||
u8 data = 0;
|
||||
|
@ -1609,8 +1609,9 @@ static int ofdm_lock(struct stv_state *state)
|
||||
writereg(state, R367_TSGENERAL,tmp2 & ~0x01);
|
||||
}
|
||||
msleep(FECTimeOut);
|
||||
if( (OFDM_Status & 0x98) != 0x98 )
|
||||
if( (OFDM_Status & 0x98) != 0x98 ) {
|
||||
;//return -1;
|
||||
}
|
||||
//printk("lock 2\n");
|
||||
|
||||
{
|
||||
|
@ -33,6 +33,8 @@
|
||||
|
||||
#include <media/dvb_frontend.h>
|
||||
|
||||
#include "stv6111.h"
|
||||
|
||||
static inline u32 MulDiv32(u32 a, u32 b, u32 c)
|
||||
{
|
||||
u64 tmp64;
|
||||
|
@ -34,6 +34,8 @@
|
||||
|
||||
#include <media/dvb_frontend.h>
|
||||
|
||||
#include "tda18212dd.h"
|
||||
|
||||
#ifndef CHK_ERROR
|
||||
#define CHK_ERROR(s) if ((status = s) < 0) break
|
||||
#endif
|
||||
|
@ -1307,6 +1307,8 @@ static struct dvb_tuner_ops tuner_ops = {
|
||||
.get_bandwidth = get_bandwidth,
|
||||
};
|
||||
|
||||
struct dvb_frontend *tda18271c2dd_attach(struct dvb_frontend *fe,
|
||||
struct i2c_adapter *i2c, u8 adr);
|
||||
struct dvb_frontend *tda18271c2dd_attach(struct dvb_frontend *fe,
|
||||
struct i2c_adapter *i2c, u8 adr)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user