Support of Nova S SE DVB card missing
Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card anymore:
Aug 10 16:00:43 linvdr user.info kernel: [ 13.464026] DVB: registering new adapter (TT-Budget/WinTV-NOVA-S PCI) Aug 10 16:00:43 linvdr user.warn kernel: [ 13.472474] adapter has MAC addr = 00:d0:5c:23:72:54 Aug 10 16:00:43 linvdr user.warn kernel: [ 13.590880] budget: A frontend driver was not found for device 1131/7146 subsystem 13c2/1016
Tested with kernel 2.6.25.11
Previous kernel versions (i.e. 2.6.20.1) did not show this problem:
Aug 10 16:14:12 linvdr user.info kernel: DVB: registering new adapter (TT-Budget/WinTV-NOVA-S PCI) Aug 10 16:14:12 linvdr user.warn kernel: adapter has MAC addr = 00:d0:5c:23:72:54 Aug 10 16:14:12 linvdr user.warn kernel: DVB: registering frontend 1 (Samsung S5H1420 DVB-S)...
Regards
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Quoted 3 lines · Eberhard Kaltenhaeuser
Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card anymore:
I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d
from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions. The i2c-read code was changed from:
if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1) return ret; if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1) return ret;
to:
if (state->config->repeated_start_workaround) {
ret = i2c_transfer(state->i2c, msg, 3);
if (ret != 3)
return ret;
} else {
ret = i2c_transfer(state->i2c, &msg[1], 2);
if (ret != 2)
return ret;
}-Hartmut
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Hi Hartmut and Eberhard,
thanks for pointing that out, I almost overlooked the previous mail from Eberhard.
Eberhard, are you able to try patches and to compile your own drivers in order to help finding the best solution.
One option is to put back the original code in case the repeated-start-workaround is not set. But this one looks not very protected. I mean between the two i2c_transfer-calls something else could happen.
Is there no other mean to tell to the i2c-adapter to do a repeated start within one i2c_transfer-call?
Another option would be to try to set the "repeated_start_workaround" option also for the Nova SE card.
What do you think?
Patrick.
--
Mail: [email protected]
WWW: http://www.wi-bw.tfh-wildau.de/~pboettch/
Quoted 26 lines · On Sat, 23 Aug 2008, e9hack wrote:
Quoted 3 lines · Eberhard Kaltenhaeuser
Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card anymore:
I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d
from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions. The i2c-read code was changed from:if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1) return ret; if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1) return ret;to:
if (state->config->repeated_start_workaround) { ret = i2c_transfer(state->i2c, msg, 3); if (ret != 3) return ret; } else { ret = i2c_transfer(state->i2c, &msg[1], 2); if (ret != 2) return ret; }
Quoted 2 lines
-Hartmut
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Hi,
it seems another card is also not working after the flexcop changes
(http://linuxtv.org/pipermail/linux-dvb/2008-June/026512.html). The CableStar uses also a crazy chip (stv0297), which doesn't understand repeated start conditions.
-Hartmut
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Hi Patrick,
sorry, actually, i have no environment to compile drivers or kernels.
Eberhard
Quoted 61 lines · Patrick Boettcher
Hi Hartmut and Eberhard,
thanks for pointing that out, I almost overlooked the previous mail from Eberhard.
Eberhard, are you able to try patches and to compile your own drivers in order to help finding the best solution.
One option is to put back the original code in case the repeated-start-workaround is not set. But this one looks not very protected. I mean between the two i2c_transfer-calls something else could happen.
Is there no other mean to tell to the i2c-adapter to do a repeated start within one i2c_transfer-call?
Another option would be to try to set the "
repeated_start_workaround" option also for the Nova SE card.What do you think?
Patrick.
--
Mail: [email protected]
WWW: http://www.wi-bw.tfh-wildau.de/~pboettch/Quoted 27 lines · On Sat, 23 Aug 2008, e9hack wrote:
Quoted 4 lines · Eberhard Kaltenhaeuser
Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card anymore:
I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d
from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions. The i2c-read code was changed from:if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1) return ret; if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1) return ret;to:
if (state->config->repeated_start_workaround) { ret = i2c_transfer(state->i2c, msg, 3); if (ret != 3) return ret; } else { ret = i2c_transfer(state->i2c, &msg[1], 2); if (ret != 2) return ret; }Quoted 3 lines
-Hartmut
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Signature · 12 lines
___________________________________
| |
| Eberhard Kaltenhaeuser |
_ | (+49/0)9135 Tel:799955 Fax:725517 | _
/ )| |( \
/ / | mailto:[email protected] | \ \
_( (_ | _ _ | _) )_
(((\ \>|_/ )___________________________( \_|</ /)))
(\ \ \_/ / \ \_/ / /)
\ / \ /
\ _/ \_ /
/ / \ \_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Quoted 16 lines · e9hack wrote:
Quoted 3 lines · Eberhard Kaltenhaeuser
Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card anymore:
I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d
from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions. The i2c-read code was changed from:if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1) return ret; if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1) return ret;to:
Quoted 9 lines
if (state->config->repeated_start_workaround) {
ret = i2c_transfer(state->i2c, msg, 3);
if (ret != 3)
return ret;
} else {
ret = i2c_transfer(state->i2c, &msg[1], 2);
if (ret != 2)
return ret;
}I think you are right.
Btw, I don't understand Patrick's workaround.
As the tuner does not support repeated start conditions, the solution is to send two separate messages, as it was before.
Does the attached patch fix the problem?
CU
Oliver
Signature · 3 lines
---------------------------------------------------------------- VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/ ----------------------------------------------------------------
linux/drivers/media/dvb/frontends/s5h1420.c +5 -2
@@ -94,8 +94,11 @@ static u8 s5h1420_readreg(struct s5h1420if (ret !=3 )return ret; }else { - ret =i2c_transfer (state->i2c, &msg[1 ],2 ); -if (ret !=2 ) + ret =i2c_transfer (state->i2c, &msg[1 ],1 ); +if (ret !=1 ) +return ret; + ret =i2c_transfer (state->i2c, &msg[2 ],1 ); +if (ret !=1 )return ret; }
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Hi,
Quoted 1 line · Oliver Endriss
Btw, I don't understand Patrick's workaround.
The Flexcop i2c-interface is not very flexible. You cannot send just a single write request with an independent read request following.
The same problematic applies for several USB-I2C requests as we have it in dvb-usb at several places.
In addition (see my other mail in that thread), sending two independent i2c_transfers which actually belong together is not really safe. (However I understand that for most single-receiver boards it is no real problem, as long as no one is using this i2c-adapter from user-space at the same time.)
Patrick.
--
Mail: [email protected]
WWW: http://www.wi-bw.tfh-wildau.de/~pboettch/
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Quoted 7 lines · Patrick Boettcher
Hi,
Quoted 1 line · Oliver Endriss
Btw, I don't understand Patrick's workaround.
The Flexcop i2c-interface is not very flexible. You cannot send just a single write request with an independent read request following.
Ah, ok. Maybe we should add some comments.
Quoted 5 lines
The same problematic applies for several USB-I2C requests as we have it in dvb-usb at several places.
In addition (see my other mail in that thread), sending two independent
i2c_transferswhich actually belong together is not really safe.
The current code in the else path will *never* work, because the tuner does not support repeated start conditions. The problem is not the I2C master (saa7146/flexcop) but the I2C slave (s5h1420).
Quoted 4 lines
(However
I understand that for most single-receiver boards it is no real problem, as long as no one is using this i2c-adapter from user-space at the same time.)
True.
CU
Oliver
Signature · 8 lines
---------------------------------------------------------------- VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/ ---------------------------------------------------------------- _______________________________________________ linux-dvb mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Quoted 6 lines · Oliver Endriss
Quoted 2 lines
In addition (see my other mail in that thread), sending two independent
i2c_transferswhich actually belong together is not really safe.The current code in the else path will *never* work, because the tuner does not support repeated start conditions. The problem is not the I2C master (saa7146/flexcop) but the I2C slave (s5h1420).
Wouldn't it be more correct to have a flag signaling to the i2c_tranfer-function that a repeated start is not wanted even though it is two i2c-messages glued (which are interpreted today as a read with repeated start).
Patrick.
--
Mail: [email protected]
WWW: http://www.wi-bw.tfh-wildau.de/~pboettch/
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Quoted 4 lines · Patrick Boettcher
Quoted 3 lines · Oliver Endriss
Quoted 2 lines
In addition (see my other mail in that thread), sending two independent
i2c_transferswhich actually belong together is not really safe.
Quoted 8 lines
Quoted 3 lines
The current code in the else path will *never* work, because the tuner does not support repeated start conditions. The problem is not the I2C master (saa7146/flexcop) but the I2C slave (s5h1420).
Wouldn't it be more correct to have a flag signaling to the i2c_tranfer-function that a repeated start is not wanted even though it is two i2c-messages glued (which are interpreted today as a read with repeated start).
As there is a flag I2C_M_NOSTART in the I2C subsystem in recent kernels, we could pass this flag to the I2C driver and add a workaround to the i2c master_xfer function.
I remember that we had the same discussion for the stv0297 driver a long time ago. I suggested to add a workaround to the saa7146 master_xfer routine, but Johannes stated that the frontend caused the problem, and so it should be fixed there...
For the stv0297 I have an experimental patch which intercepts the master_xfer routine, but this is not very nice either.
Usually there is no problem with the old approach, because i2c transfers are protected by the frontend mutex. But bad things may happen if someone accesses the i2c bus from user space. :-(
I'll think about the I2C_M_NOSTART mod for the master_xfer routine, but I need some time to work it out.
For now we should test whether the driver works again if we put the old code into the else path.
Btw,
b[1] = state->shadow[(reg - 1) & 0xff];
reads shadow[255] for reg == 0.
So you should change
u8 shadow[255];
to
u8 shadow[256];
CU
Oliver
Signature · 8 lines
---------------------------------------------------------------- VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/ ---------------------------------------------------------------- _______________________________________________ linux-dvb mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Quoted 3 lines · Oliver Endriss
As there is a flag
I2C_M_NOSTARTin the I2C subsystem in recent kernels, we could pass this flag to the I2C driver and add a workaround to the i2cmaster_xferfunction.
Correction. I2C_M_NOSTART cannot be used. It removes a *start* condition, but we have to insert a *stop* condition...
CU
Oliver
Signature · 8 lines
---------------------------------------------------------------- VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/ ---------------------------------------------------------------- _______________________________________________ linux-dvb mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Hi,
Quoted 9 lines · Oliver Endriss
Quoted 8 lines · Patrick Boettcher
Quoted 6 lines · Oliver Endriss
Quoted 2 lines
In addition (see my other mail in that thread), sending two independent
i2c_transferswhich actually belong together is not really safe.The current code in the else path will *never* work, because the tuner does not support repeated start conditions. The problem is not the I2C master (saa7146/flexcop) but the I2C slave (s5h1420).
Quoted 7 lines
Quoted 4 lines
Wouldn't it be more correct to have a flag signaling to the i2c_tranfer-function that a repeated start is not wanted even though it is two i2c-messages glued (which are interpreted today as a read with repeated start).
I remember that we had the same discussion for the stv0297 driver a long time ago.
See
http://linuxtv.org/pipermail/linux-dvb/2007-May/018122.html
for this interesting discussion.
Obviously the i2c maintainers were not willing to add the I2C_M_STOP flag...
Quoted 2 lines
For the stv0297 I have an experimental patch which intercepts the
master_xferroutine, but this is not very nice either.
See attachment. It will probably not apply to the current tree, but you should get the idea. Anyway, I don't want to add this crap to a frontend driver. It does not fix the userspace issues anyway.
For now I suggest to use the good old double i2c_transfer() approach for the budget driver.
Btw, I still do not understand how your repeated_start_workaround works.
struct i2c_msg msg[] = {
{ .addr = state->config->demod_address, .flags = 0, .buf = b, .len = 2 },
{ .addr = state->config->demod_address, .flags = 0, .buf = ®, .len = 1 },
{ .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = b, .len = 1 }, };
What does the flexcop master_xfer send over the i2c bus when it receives these messages?
CU
Oliver
Signature · 3 lines
---------------------------------------------------------------- VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/ ----------------------------------------------------------------
linux/drivers/media/dvb/frontends/stv0297.c +58 -39
@@ -35,6 +35,10 @@ struct stv0297_state {const struct stv0297_config *config;struct dvb_frontend frontend; +/* workaround, chip does not support repeated start condition */ +struct i2c_algorithm i2c_algo_virt; +struct i2c_adapter i2c_adap_virt; +unsigned long last_ber;unsigned long base_freq; };
@@ -47,6 +51,29 @@ struct stv0297_state {#define STV0297_CLOCK_KHZ 28900 + +static int stv0297_master_xfer_virt (struct i2c_adapter *adap,struct i2c_msg *msgs,int num) +{ +struct stv0297_state *state =i2c_get_adapdata (adap); +struct i2c_adapter *i2c_phys = adap->algo_data; +int i, rc; + +if (num ==2 && + msgs[0 ].addr == state->config->demod_address && + msgs[1 ].addr == state->config->demod_address && + msgs[0 ].flags ==0 && msgs[1 ].flags ==I2C_M_RD ) { +/* device needs a STOP between the register and data */ +for (i =0 ; i < num; i++) { + rc =i2c_transfer (i2c_phys, msgs+i,1 ); +if (rc !=1 ) +return rc; + } + rc = num; + }else + rc =i2c_transfer (i2c_phys, msgs, num); + +return rc; +}static int stv0297_writereg (struct stv0297_state *state,u8 reg,u8 data) {
@@ -72,21 +99,9 @@ static int stv0297_readreg(struct stv029 {.addr = state->config->demod_address,.flags = I2C_M_RD,.buf = b1,.len = 1} }; -// this device needs a STOP between the register and data -if (state->config->stop_during_read) { -if ((ret =i2c_transfer (state->i2c, &msg[0 ],1 )) !=1 ) { -dprintk ("%s: readreg error (reg == 0x%02x, ret == %i)\n" , __FUNCTION__, reg, ret); -return -1 ; - } -if ((ret =i2c_transfer (state->i2c, &msg[1 ],1 )) !=1 ) { -dprintk ("%s: readreg error (reg == 0x%02x, ret == %i)\n" , __FUNCTION__, reg, ret); -return -1 ; - } - }else { -if ((ret =i2c_transfer (state->i2c, msg,2 )) !=2 ) { -dprintk ("%s: readreg error (reg == 0x%02x, ret == %i)\n" , __FUNCTION__, reg, ret); -return -1 ; - } +if ((ret =i2c_transfer (state->i2c, msg,2 )) !=2 ) { +dprintk ("%s: readreg error (reg == 0x%02x, ret == %i)\n" , __FUNCTION__, reg, ret); +return -1 ; }return b1[0 ];
@@ -107,26 +122,13 @@ static int stv0297_readregs(struct stv02static int stv0297_readregs (struct stv0297_state *state,u8 reg1,u8 * b,u8 len) {int ret; -struct i2c_msg msg[] = { {.addr = state->config->demod_address,.flags =0 ,.buf = - ®1,.len =1 }, - {.addr = state->config->demod_address,.flags =I2C_M_RD ,.buf = b,.len = len} - }; - -// this device needs a STOP between the register and data -if (state->config->stop_during_read) { -if ((ret =i2c_transfer (state->i2c, &msg[0 ],1 )) !=1 ) { -dprintk ("%s: readreg error (reg == 0x%02x, ret == %i)\n" , __FUNCTION__, reg1, ret); -return -1 ; - } -if ((ret =i2c_transfer (state->i2c, &msg[1 ],1 )) !=1 ) { -dprintk ("%s: readreg error (reg == 0x%02x, ret == %i)\n" , __FUNCTION__, reg1, ret); -return -1 ; - } - }else { -if ((ret =i2c_transfer (state->i2c, msg,2 )) !=2 ) { -dprintk ("%s: readreg error (reg == 0x%02x, ret == %i)\n" , __FUNCTION__, reg1, ret); -return -1 ; - } +struct i2c_msg msg[] = { {.addr = state->config->demod_address,.flags =0 ,.buf = ®1,.len =1 }, + {.addr = state->config->demod_address,.flags =I2C_M_RD ,.buf = b,.len = len} + }; + +if ((ret =i2c_transfer (state->i2c, msg,2 )) !=2 ) { +dprintk ("%s: readreg error (reg == 0x%02x, ret == %i)\n" , __FUNCTION__, reg1, ret); +return -1 ; }return 0 ;
@@ -651,15 +653,30 @@ struct dvb_frontend *stv0297_attach(consstruct stv0297_state *state =NULL ;/* allocate memory for the internal state */ - state =kmalloc (sizeof (struct stv0297_state ),GFP_KERNEL ); + state =kzalloc (sizeof (struct stv0297_state ),GFP_KERNEL );if (state ==NULL ) goto error;/* setup the state */ state->config = config; - state->i2c = i2c; - state->last_ber =0 ; - state->base_freq =0 ; +if (state->config->stop_during_read) { + state->i2c_algo_virt.master_xfer = stv0297_master_xfer_virt; + state->i2c_algo_virt.functionality = i2c->algo->functionality; + + state->i2c_adap_virt.id = i2c->id; + state->i2c_adap_virt.class = i2c->class; + state->i2c_adap_virt.algo = &state->i2c_algo_virt; + state->i2c_adap_virt.algo_data = i2c; + state->i2c_adap_virt.timeout = i2c->timeout; + state->i2c_adap_virt.retries = i2c->retries; + state->i2c_adap_virt.dev.parent = i2c->dev.parent; +i2c_set_adapdata (&state->i2c_adap_virt, state); + +if (i2c_add_adapter (&state->i2c_adap_virt) <0 ) + goto error; + state->i2c = &state->i2c_adap_virt; + }else + state->i2c = i2c;/* check if the demod is there */ if ((stv0297_readreg (state,0x80 ) &0x70 ) !=0x20 )
@@ -671,6 +688,8 @@ struct dvb_frontend *stv0297_attach(consreturn &state->frontend; error: +if (state && state->config->stop_during_read && state->i2c) +i2c_del_adapter (state->i2c);kfree (state);return NULL ; }
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Hi Oliver,
the patch fixed the problem - here the relevant part of the log:
Aug 24 09:40:07 vdrdev user.info kernel: [ 13.943338] DVB: registering new adapter (TT-Budget/WinTV-NOVA-S PCI) Aug 24 09:40:07 vdrdev user.warn kernel: [ 13.966605] adapter has MAC addr = 00:d0:5c:23:72:54 Aug 24 09:40:07 vdrdev user.warn kernel: [ 14.064407] DVB: registering frontend 1 (Samsung S5H1420/PnpNetwork PN1010 DVB-S)...
Thanx to all - also to Dr.Seltsam for compiling.
Eberhard
Quoted 46 lines · Oliver Endriss
Quoted 14 lines · e9hack wrote:
Quoted 3 lines · Eberhard Kaltenhaeuser
Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card anymore:
I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions. The i2c-read code was changed from:
if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1) return ret; if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1) return ret;to:
Quoted 10 lines
if (state->config->repeated_start_workaround) { ret = i2c_transfer(state->i2c, msg, 3); if (ret != 3) return ret; } else { ret = i2c_transfer(state->i2c, &msg[1], 2); if (ret != 2) return ret; }I think you are right.
Btw, I don't understand Patrick's workaround.
As the tuner does not support repeated start conditions, the solution is to send two separate messages, as it was before.
Does the attached patch fix the problem?
CU
Oliver------------------------------------------------------------------------
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Signature · 12 lines
___________________________________
| |
| Eberhard Kaltenhaeuser |
_ | (+49/0)9135 Tel:799955 Fax:725517 | _
/ )| |( \
/ / | mailto:[email protected] | \ \
_( (_ | _ _ | _) )_
(((\ \>|_/ )___________________________( \_|</ /)))
(\ \ \_/ / \ \_/ / /)
\ / \ /
\ _/ \_ /
/ / \ \_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Hello,
against my expectation, the Nova-S SE card does not work, although the card is recognized by the kernel. Frontend modul is loaded, but no signal can be received. So VDR exists (Emergency exit) when switching to this device (i.e. to record something)
Any suggestions?
Eberhard
Quoted 68 lines · Oliver Endriss
Quoted 16 lines · e9hack wrote:
Quoted 4 lines · Eberhard Kaltenhaeuser
Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card anymore:
I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions. The i2c-read code was changed from:
if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1) return ret; if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1) return ret;to:
Quoted 11 lines
if (state->config->repeated_start_workaround) { ret = i2c_transfer(state->i2c, msg, 3); if (ret != 3) return ret; } else { ret = i2c_transfer(state->i2c, &msg[1], 2); if (ret != 2) return ret; }I think you are right.
Btw, I don't understand Patrick's workaround.
As the tuner does not support repeated start conditions, the solution is to send two separate messages, as it was before.
Does the attached patch fix the problem?
CU
Oliver------------------------------------------------------------------------
diff -r
1760a612cc98linux/drivers/media/dvb/frontends/s5h1420.clinux/drivers/media/dvb/frontends/s5h1420.c +5
-3@@ -94,8 +94,11 @@ static u8 s5h1420_readreg(struct s5h1420if (ret !=3 )return ret; }else { - ret =i2c_transfer (state->i2c, &msg[1 ],2 ); -if (ret !=2 ) + ret =i2c_transfer (state->i2c, &msg[1 ],1 ); +if (ret !=1 ) +return ret; + ret =i2c_transfer (state->i2c, &msg[2 ],1 ); +if (ret !=1 )return ret; } ------------------------------------------------------------------------
Quoted 5 lines
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
begin:vcard
fn:Eberhard Kaltenhaeuser
n:Kaltenhaeuser;Eberhard
adr;dom:;;Obermembach 6;Hessdorf;;91093
email;internet:[email protected]
tel;fax:+49 9135 725517
tel;home:+49 9135 799955
tel;cell:+49 173 3760676
version:2.1
end:vcard
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb