Moderator Control Panel ]

How to compile driver to use only one adapter

It's important to keep your driver and software updated.

How to compile driver to use only one adapter

Postby jpeg » Thu May 05, 2016 3:31 am

Dear,
I'm using TBS6991SE and for some reason & some case, I need to use only one input instead of two.
I got errors from my backend if the input is left unconnected

Existing a way to compile the driver & to load the driver for only one adapter (not both ?)
I want to see
root@streamy3p:/home/jp# ls /dev/dvb/ -l
drwxr-xr-x 2 root root 140 May 3 21:00 adapter0

instead of
root@streamy3p:/home/jp# ls /dev/dvb/ -l
drwxr-xr-x 2 root root 140 May 3 21:00 adapter0
drwxr-xr-x 2 root root 140 May 3 21:00 adapter1


Thanks in advance
JP
jpeg
 
Posts: 7
Joined: Tue Apr 19, 2016 3:08 am

Re: How to compile driver to use only one adapter

Postby luchy » Thu May 05, 2016 11:56 am

please open and edit linux-tbs-drivers/linux/drivers/media/common/saa716x/saa716x_tbs.c
there are two places can be changed.

1)change:

static struct saa716x_config saa716x_tbs6991se_config = {
.model_name = SAA716x_MODEL_TURBOSIGHT_TBS6991SE,
.dev_type = SAA716x_DEV_TURBOSIGHT_TBS6991SE,
.boot_mode = SAA716x_EXT_BOOT,
.load_config = &load_config_tbs6991se,
.adapters = 2,
.frontend_attach = saa716x_tbs6991se_frontend_attach,
.irq_handler = saa716x_tbs6991se_pci_irq,
.i2c_rate[0] = SAA716x_I2C_RATE_400,
.i2c_rate[1] = SAA716x_I2C_RATE_400,
.adap_config = {
{
/* adapter 0 */
.ts_port = 1
},
{
/* adapter 1 */
.ts_port = 3
},
}
};

to :

static struct saa716x_config saa716x_tbs6991se_config = {
.model_name = SAA716x_MODEL_TURBOSIGHT_TBS6991SE,
.dev_type = SAA716x_DEV_TURBOSIGHT_TBS6991SE,
.boot_mode = SAA716x_EXT_BOOT,
.load_config = &load_config_tbs6991se,
.adapters = 1,
.frontend_attach = saa716x_tbs6991se_frontend_attach,
.irq_handler = saa716x_tbs6991se_pci_irq,
.i2c_rate[0] = SAA716x_I2C_RATE_400,
.i2c_rate[1] = SAA716x_I2C_RATE_400,
.adap_config = {
{
/* adapter 0 */
.ts_port = 1
},

}
};
2) in
static int saa716x_tbs6991se_frontend_attach(struct saa716x_adapter *adapter, int count)

{
.................
change:
if (count == 0 || count == 1) {

to
if (count == 0 ) { // simple don't deal with adapter 1
.....................

}

maybe you only need do 2) is ok, please have a try :)
luchy
 
Posts: 55
Joined: Wed Apr 14, 2010 9:14 am

Re: How to compile driver to use only one adapter

Postby jpeg » Sat May 07, 2016 4:22 pm

Thanks
jpeg
 
Posts: 7
Joined: Tue Apr 19, 2016 3:08 am


Return to Driver & Software Update

Who is online

Users browsing this forum: No registered users and 1 guest

cron