V4L/DVB (10453): af9015: add MC44S803 support
Add MC44S803 support to AF9015 driver. Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
b72dbaefbd
commit
d563399859
@@ -297,5 +297,6 @@ config DVB_USB_AF9015
|
|||||||
select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE
|
select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE
|
||||||
select MEDIA_TUNER_TDA18271 if !MEDIA_TUNER_CUSTOMIZE
|
select MEDIA_TUNER_TDA18271 if !MEDIA_TUNER_CUSTOMIZE
|
||||||
select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMIZE
|
select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMIZE
|
||||||
|
select MEDIA_TUNER_MC44S803 if !MEDIA_TUNER_CUSTOMISE
|
||||||
help
|
help
|
||||||
Say Y here to support the Afatech AF9015 based DVB-T USB2.0 receiver
|
Say Y here to support the Afatech AF9015 based DVB-T USB2.0 receiver
|
||||||
|
@@ -27,9 +27,7 @@
|
|||||||
#include "qt1010.h"
|
#include "qt1010.h"
|
||||||
#include "tda18271.h"
|
#include "tda18271.h"
|
||||||
#include "mxl5005s.h"
|
#include "mxl5005s.h"
|
||||||
#if 0
|
#include "mc44s803.h"
|
||||||
#include "mc44s80x.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int dvb_usb_af9015_debug;
|
static int dvb_usb_af9015_debug;
|
||||||
module_param_named(debug, dvb_usb_af9015_debug, int, 0644);
|
module_param_named(debug, dvb_usb_af9015_debug, int, 0644);
|
||||||
@@ -280,6 +278,21 @@ Due to that the only way to select correct tuner is use demodulator I2C-gate.
|
|||||||
req.data = &msg[i+1].buf[0];
|
req.data = &msg[i+1].buf[0];
|
||||||
ret = af9015_ctrl_msg(d, &req);
|
ret = af9015_ctrl_msg(d, &req);
|
||||||
i += 2;
|
i += 2;
|
||||||
|
} else if (msg[i].flags & I2C_M_RD) {
|
||||||
|
ret = -EINVAL;
|
||||||
|
if (msg[i].addr ==
|
||||||
|
af9015_af9013_config[0].demod_address)
|
||||||
|
goto error;
|
||||||
|
else
|
||||||
|
req.cmd = READ_I2C;
|
||||||
|
req.i2c_addr = msg[i].addr;
|
||||||
|
req.addr = addr;
|
||||||
|
req.mbox = mbox;
|
||||||
|
req.addr_len = addr_len;
|
||||||
|
req.data_len = msg[i].len;
|
||||||
|
req.data = &msg[i].buf[0];
|
||||||
|
ret = af9015_ctrl_msg(d, &req);
|
||||||
|
i += 1;
|
||||||
} else {
|
} else {
|
||||||
if (msg[i].addr ==
|
if (msg[i].addr ==
|
||||||
af9015_af9013_config[0].demod_address)
|
af9015_af9013_config[0].demod_address)
|
||||||
@@ -939,7 +952,6 @@ static int af9015_read_config(struct usb_device *udev)
|
|||||||
switch (val) {
|
switch (val) {
|
||||||
case AF9013_TUNER_ENV77H11D5:
|
case AF9013_TUNER_ENV77H11D5:
|
||||||
case AF9013_TUNER_MT2060:
|
case AF9013_TUNER_MT2060:
|
||||||
case AF9013_TUNER_MC44S803:
|
|
||||||
case AF9013_TUNER_QT1010:
|
case AF9013_TUNER_QT1010:
|
||||||
case AF9013_TUNER_UNKNOWN:
|
case AF9013_TUNER_UNKNOWN:
|
||||||
case AF9013_TUNER_MT2060_2:
|
case AF9013_TUNER_MT2060_2:
|
||||||
@@ -952,6 +964,10 @@ static int af9015_read_config(struct usb_device *udev)
|
|||||||
case AF9013_TUNER_MXL5005R:
|
case AF9013_TUNER_MXL5005R:
|
||||||
af9015_af9013_config[i].rf_spec_inv = 0;
|
af9015_af9013_config[i].rf_spec_inv = 0;
|
||||||
break;
|
break;
|
||||||
|
case AF9013_TUNER_MC44S803:
|
||||||
|
af9015_af9013_config[i].gpio[1] = AF9013_GPIO_LO;
|
||||||
|
af9015_af9013_config[i].rf_spec_inv = 1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
warn("tuner id:%d not supported, please report!", val);
|
warn("tuner id:%d not supported, please report!", val);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
@@ -1139,6 +1155,11 @@ static struct mxl5005s_config af9015_mxl5005_config = {
|
|||||||
.AgcMasterByte = 0x00,
|
.AgcMasterByte = 0x00,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct mc44s803_config af9015_mc44s803_config = {
|
||||||
|
.i2c_address = 0xc0,
|
||||||
|
.dig_out = 1,
|
||||||
|
};
|
||||||
|
|
||||||
static int af9015_tuner_attach(struct dvb_usb_adapter *adap)
|
static int af9015_tuner_attach(struct dvb_usb_adapter *adap)
|
||||||
{
|
{
|
||||||
struct af9015_state *state = adap->dev->priv;
|
struct af9015_state *state = adap->dev->priv;
|
||||||
@@ -1183,15 +1204,8 @@ static int af9015_tuner_attach(struct dvb_usb_adapter *adap)
|
|||||||
DVB_PLL_TDA665X) == NULL ? -ENODEV : 0;
|
DVB_PLL_TDA665X) == NULL ? -ENODEV : 0;
|
||||||
break;
|
break;
|
||||||
case AF9013_TUNER_MC44S803:
|
case AF9013_TUNER_MC44S803:
|
||||||
#if 0
|
ret = dvb_attach(mc44s803_attach, adap->fe, i2c_adap,
|
||||||
ret = dvb_attach(mc44s80x_attach, adap->fe, i2c_adap)
|
&af9015_mc44s803_config) == NULL ? -ENODEV : 0;
|
||||||
== NULL ? -ENODEV : 0;
|
|
||||||
#else
|
|
||||||
ret = -ENODEV;
|
|
||||||
info("Freescale MC44S803 tuner found but no driver for that" \
|
|
||||||
"tuner. Look at the Linuxtv.org for tuner driver" \
|
|
||||||
"status.");
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case AF9013_TUNER_UNKNOWN:
|
case AF9013_TUNER_UNKNOWN:
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user