Release 4.7 drivers/media/firewire/firedtv-fe.c
/*
* FireDTV driver (formerly known as FireSAT)
*
* Copyright (C) 2004 Andreas Monitzer <andy@monitzer.com>
* Copyright (C) 2008 Henrik Kurelid <henrik@kurelid.se>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*/
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/types.h>
#include <dvb_frontend.h>
#include "firedtv.h"
static int fdtv_dvb_init(struct dvb_frontend *fe)
{
struct firedtv *fdtv = fe->sec_priv;
int err;
/* FIXME - allocate free channel at IRM */
fdtv->isochannel = fdtv->adapter.num;
err = cmp_establish_pp_connection(fdtv, fdtv->subunit,
fdtv->isochannel);
if (err) {
dev_err(fdtv->device,
"could not establish point to point connection\n");
return err;
}
return fdtv_start_iso(fdtv);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 39 | 53.42% | 1 | 16.67% |
stefan richter | stefan richter | 17 | 23.29% | 3 | 50.00% |
rambaldi | rambaldi | 9 | 12.33% | 1 | 16.67% |
henrik kurelid | henrik kurelid | 8 | 10.96% | 1 | 16.67% |
| Total | 73 | 100.00% | 6 | 100.00% |
static int fdtv_sleep(struct dvb_frontend *fe)
{
struct firedtv *fdtv = fe->sec_priv;
fdtv_stop_iso(fdtv);
cmp_break_pp_connection(fdtv, fdtv->subunit, fdtv->isochannel);
fdtv->isochannel = -1;
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 35 | 72.92% | 1 | 20.00% |
rambaldi | rambaldi | 8 | 16.67% | 1 | 20.00% |
henrik kurelid | henrik kurelid | 3 | 6.25% | 1 | 20.00% |
stefan richter | stefan richter | 2 | 4.17% | 2 | 40.00% |
| Total | 48 | 100.00% | 5 | 100.00% |
#define LNBCONTROL_DONTCARE 0xff
static int fdtv_diseqc_send_master_cmd(struct dvb_frontend *fe,
struct dvb_diseqc_master_cmd *cmd)
{
struct firedtv *fdtv = fe->sec_priv;
return avc_lnb_control(fdtv, LNBCONTROL_DONTCARE, LNBCONTROL_DONTCARE,
LNBCONTROL_DONTCARE, 1, cmd);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 36 | 87.80% | 1 | 33.33% |
rambaldi | rambaldi | 4 | 9.76% | 1 | 33.33% |
stefan richter | stefan richter | 1 | 2.44% | 1 | 33.33% |
| Total | 41 | 100.00% | 3 | 100.00% |
static int fdtv_diseqc_send_burst(struct dvb_frontend *fe,
enum fe_sec_mini_cmd minicmd)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 15 | 83.33% | 1 | 33.33% |
mauro carvalho chehab | mauro carvalho chehab | 2 | 11.11% | 1 | 33.33% |
rambaldi | rambaldi | 1 | 5.56% | 1 | 33.33% |
| Total | 18 | 100.00% | 3 | 100.00% |
static int fdtv_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone)
{
struct firedtv *fdtv = fe->sec_priv;
fdtv->tone = tone;
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 27 | 81.82% | 1 | 33.33% |
rambaldi | rambaldi | 4 | 12.12% | 1 | 33.33% |
mauro carvalho chehab | mauro carvalho chehab | 2 | 6.06% | 1 | 33.33% |
| Total | 33 | 100.00% | 3 | 100.00% |
static int fdtv_set_voltage(struct dvb_frontend *fe,
enum fe_sec_voltage voltage)
{
struct firedtv *fdtv = fe->sec_priv;
fdtv->voltage = voltage;
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 27 | 81.82% | 1 | 33.33% |
rambaldi | rambaldi | 4 | 12.12% | 1 | 33.33% |
mauro carvalho chehab | mauro carvalho chehab | 2 | 6.06% | 1 | 33.33% |
| Total | 33 | 100.00% | 3 | 100.00% |
static int fdtv_read_status(struct dvb_frontend *fe, enum fe_status *status)
{
struct firedtv *fdtv = fe->sec_priv;
struct firedtv_tuner_status stat;
if (avc_tuner_status(fdtv, &stat))
return -EINVAL;
if (stat.no_rf)
*status = 0;
else
*status = FE_HAS_SIGNAL | FE_HAS_VITERBI | FE_HAS_SYNC |
FE_HAS_CARRIER | FE_HAS_LOCK;
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 58 | 81.69% | 1 | 20.00% |
stefan richter | stefan richter | 7 | 9.86% | 2 | 40.00% |
rambaldi | rambaldi | 4 | 5.63% | 1 | 20.00% |
mauro carvalho chehab | mauro carvalho chehab | 2 | 2.82% | 1 | 20.00% |
| Total | 71 | 100.00% | 5 | 100.00% |
static int fdtv_read_ber(struct dvb_frontend *fe, u32 *ber)
{
struct firedtv *fdtv = fe->sec_priv;
struct firedtv_tuner_status stat;
if (avc_tuner_status(fdtv, &stat))
return -EINVAL;
*ber = stat.ber;
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 41 | 78.85% | 1 | 25.00% |
stefan richter | stefan richter | 7 | 13.46% | 2 | 50.00% |
rambaldi | rambaldi | 4 | 7.69% | 1 | 25.00% |
| Total | 52 | 100.00% | 4 | 100.00% |
static int fdtv_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
{
struct firedtv *fdtv = fe->sec_priv;
struct firedtv_tuner_status stat;
if (avc_tuner_status(fdtv, &stat))
return -EINVAL;
*strength = stat.signal_strength << 8;
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 40 | 74.07% | 1 | 20.00% |
stefan richter | stefan richter | 7 | 12.96% | 2 | 40.00% |
rambaldi | rambaldi | 4 | 7.41% | 1 | 20.00% |
henrik kurelid | henrik kurelid | 3 | 5.56% | 1 | 20.00% |
| Total | 54 | 100.00% | 5 | 100.00% |
static int fdtv_read_snr(struct dvb_frontend *fe, u16 *snr)
{
struct firedtv *fdtv = fe->sec_priv;
struct firedtv_tuner_status stat;
if (avc_tuner_status(fdtv, &stat))
return -EINVAL;
/* C/N[dB] = -10 * log10(snr / 65535) */
*snr = stat.carrier_noise_ratio * 257;
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
henrik kurelid | henrik kurelid | 26 | 47.27% | 1 | 20.00% |
greg kroah-hartman | greg kroah-hartman | 17 | 30.91% | 1 | 20.00% |
stefan richter | stefan richter | 8 | 14.55% | 2 | 40.00% |
rambaldi | rambaldi | 4 | 7.27% | 1 | 20.00% |
| Total | 55 | 100.00% | 5 | 100.00% |
static int fdtv_read_uncorrected_blocks(struct dvb_frontend *fe, u32 *ucblocks)
{
return -EOPNOTSUPP;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 18 | 94.74% | 1 | 50.00% |
rambaldi | rambaldi | 1 | 5.26% | 1 | 50.00% |
| Total | 19 | 100.00% | 2 | 100.00% |
static int fdtv_set_frontend(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct firedtv *fdtv = fe->sec_priv;
return avc_tuner_dsd(fdtv, p);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 21 | 55.26% | 1 | 20.00% |
mauro carvalho chehab | mauro carvalho chehab | 11 | 28.95% | 1 | 20.00% |
rambaldi | rambaldi | 4 | 10.53% | 1 | 20.00% |
stefan richter | stefan richter | 2 | 5.26% | 2 | 40.00% |
| Total | 38 | 100.00% | 5 | 100.00% |
void fdtv_frontend_init(struct firedtv *fdtv, const char *name)
{
struct dvb_frontend_ops *ops = &fdtv->fe.ops;
struct dvb_frontend_info *fi = &ops->info;
ops->init = fdtv_dvb_init;
ops->sleep = fdtv_sleep;
ops->set_frontend = fdtv_set_frontend;
ops->read_status = fdtv_read_status;
ops->read_ber = fdtv_read_ber;
ops->read_signal_strength = fdtv_read_signal_strength;
ops->read_snr = fdtv_read_snr;
ops->read_ucblocks = fdtv_read_uncorrected_blocks;
ops->diseqc_send_master_cmd = fdtv_diseqc_send_master_cmd;
ops->diseqc_send_burst = fdtv_diseqc_send_burst;
ops->set_tone = fdtv_set_tone;
ops->set_voltage = fdtv_set_voltage;
switch (fdtv->type) {
case FIREDTV_DVB_S:
ops->delsys[0] = SYS_DVBS;
fi->frequency_min = 950000;
fi->frequency_max = 2150000;
fi->frequency_stepsize = 125;
fi->symbol_rate_min = 1000000;
fi->symbol_rate_max = 40000000;
fi->caps = FE_CAN_INVERSION_AUTO |
FE_CAN_FEC_1_2 |
FE_CAN_FEC_2_3 |
FE_CAN_FEC_3_4 |
FE_CAN_FEC_5_6 |
FE_CAN_FEC_7_8 |
FE_CAN_FEC_AUTO |
FE_CAN_QPSK;
break;
case FIREDTV_DVB_S2:
ops->delsys[0] = SYS_DVBS;
ops->delsys[1] = SYS_DVBS2;
fi->frequency_min = 950000;
fi->frequency_max = 2150000;
fi->frequency_stepsize = 125;
fi->symbol_rate_min = 1000000;
fi->symbol_rate_max = 40000000;
fi->caps = FE_CAN_INVERSION_AUTO |
FE_CAN_FEC_1_2 |
FE_CAN_FEC_2_3 |
FE_CAN_FEC_3_4 |
FE_CAN_FEC_5_6 |
FE_CAN_FEC_7_8 |
FE_CAN_FEC_AUTO |
FE_CAN_QPSK |
FE_CAN_2G_MODULATION;
break;
case FIREDTV_DVB_C:
ops->delsys[0] = SYS_DVBC_ANNEX_A;
fi->frequency_min = 47000000;
fi->frequency_max = 866000000;
fi->frequency_stepsize = 62500;
fi->symbol_rate_min = 870000;
fi->symbol_rate_max = 6900000;
fi->caps = FE_CAN_INVERSION_AUTO |
FE_CAN_QAM_16 |
FE_CAN_QAM_32 |
FE_CAN_QAM_64 |
FE_CAN_QAM_128 |
FE_CAN_QAM_256 |
FE_CAN_QAM_AUTO;
break;
case FIREDTV_DVB_T:
ops->delsys[0] = SYS_DVBT;
fi->frequency_min = 49000000;
fi->frequency_max = 861000000;
fi->frequency_stepsize = 62500;
fi->caps = FE_CAN_INVERSION_AUTO |
FE_CAN_FEC_2_3 |
FE_CAN_TRANSMISSION_MODE_AUTO |
FE_CAN_GUARD_INTERVAL_AUTO |
FE_CAN_HIERARCHY_AUTO;
break;
default:
dev_err(fdtv->device, "no frontend for model type %d\n",
fdtv->type);
}
strcpy(fi->name, name);
fdtv->fe.dvb = &fdtv->adapter;
fdtv->fe.sec_priv = fdtv;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stefan richter | stefan richter | 155 | 38.56% | 3 | 30.00% |
greg kroah-hartman | greg kroah-hartman | 120 | 29.85% | 1 | 10.00% |
tommy jonsson | tommy jonsson | 53 | 13.18% | 1 | 10.00% |
mauro carvalho chehab | mauro carvalho chehab | 45 | 11.19% | 2 | 20.00% |
rambaldi | rambaldi | 25 | 6.22% | 1 | 10.00% |
beat michel liechti | beat michel liechti | 3 | 0.75% | 1 | 10.00% |
henrik kurelid | henrik kurelid | 1 | 0.25% | 1 | 10.00% |
| Total | 402 | 100.00% | 10 | 100.00% |
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 505 | 52.44% | 1 | 7.69% |
stefan richter | stefan richter | 220 | 22.85% | 5 | 38.46% |
rambaldi | rambaldi | 77 | 8.00% | 1 | 7.69% |
mauro carvalho chehab | mauro carvalho chehab | 64 | 6.65% | 3 | 23.08% |
tommy jonsson | tommy jonsson | 53 | 5.50% | 1 | 7.69% |
henrik kurelid | henrik kurelid | 41 | 4.26% | 1 | 7.69% |
beat michel liechti | beat michel liechti | 3 | 0.31% | 1 | 7.69% |
| Total | 963 | 100.00% | 13 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.