Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-04-03 Thread adq
2011/4/2 Antti Palosaari : > On 04/02/2011 04:45 PM, adq wrote: >> >> 2011/4/2 Antti Palosaari: >>> >>> On 04/02/2011 02:06 PM, adq wrote: 2011/4/2 Antti Palosaari: > > On 04/02/2011 04:24 AM, adq wrote: >> >> Hi, just been trying it out, with no success. On my test machin

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-04-02 Thread Antti Palosaari
On 04/02/2011 04:45 PM, adq wrote: 2011/4/2 Antti Palosaari: On 04/02/2011 02:06 PM, adq wrote: 2011/4/2 Antti Palosaari: On 04/02/2011 04:24 AM, adq wrote: Hi, just been trying it out, with no success. On my test machine, FE0 no longer tunes, but FE1 is still fine, so I've just been testi

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-04-02 Thread adq
2011/4/2 Antti Palosaari : > On 04/02/2011 02:06 PM, adq wrote: >> >> 2011/4/2 Antti Palosaari: >>> >>> On 04/02/2011 04:24 AM, adq wrote: Hi, just been trying it out, with no success. On my test machine, FE0 no longer tunes, but FE1 is still fine, so I've just been testing FE0. >>>

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-04-02 Thread Antti Palosaari
On 04/02/2011 02:06 PM, adq wrote: 2011/4/2 Antti Palosaari: On 04/02/2011 04:24 AM, adq wrote: Hi, just been trying it out, with no success. On my test machine, FE0 no longer tunes, but FE1 is still fine, so I've just been testing FE0. You try to say other frontend / tuner is physically dea

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-04-02 Thread adq
2011/4/2 adq : > 2011/4/2 Antti Palosaari : >> On 04/02/2011 04:24 AM, adq wrote: >>> >>> Hi, just been trying it out, with no success. On my test machine, FE0 >>> no longer tunes, but FE1 is still fine, so I've just been testing FE0. >> >> You try to say other frontend / tuner is physically dead?

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-04-02 Thread adq
2011/4/2 Antti Palosaari : > On 04/02/2011 04:24 AM, adq wrote: >> >> Hi, just been trying it out, with no success. On my test machine, FE0 >> no longer tunes, but FE1 is still fine, so I've just been testing FE0. > > You try to say other frontend / tuner is physically dead? Which one? No no - I c

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-04-02 Thread Antti Palosaari
On 04/02/2011 04:24 AM, adq wrote: Hi, just been trying it out, with no success. On my test machine, FE0 no longer tunes, but FE1 is still fine, so I've just been testing FE0. You try to say other frontend / tuner is physically dead? Which one? I've tried your suggestions, mainly concentratin

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-04-01 Thread adq
2011/3/18 Antti Palosaari : > On 03/08/2011 12:12 AM, adq wrote: >> >> Ah well, so its definitely /not/ conflicting i2c writes that cause the >> tuner problem as it has finally just died. The festats for a "crashed" >> tuner are: >>   Sig: 50933  SNR: 50  BER: 0  UBLK: 5370554  Stat: 0x01 [SIG ] >>

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-22 Thread Mauro Carvalho Chehab
Em 22-03-2011 15:26, adq escreveu: > On 22 March 2011 09:00, Mauro Carvalho Chehab wrote: >> Em 04-03-2011 20:11, Andrew de Quincey escreveu: >>> On 4 March 2011 22:59, Antti Palosaari wrote: On 03/05/2011 12:44 AM, Andrew de Quincey wrote: >>> >>> Adding a "bus lock" to af9015_i2c_x

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-22 Thread adq
On 22 March 2011 09:00, Mauro Carvalho Chehab wrote: > Em 04-03-2011 20:11, Andrew de Quincey escreveu: >> On 4 March 2011 22:59, Antti Palosaari wrote: >>> On 03/05/2011 12:44 AM, Andrew de Quincey wrote: >> >> Adding a "bus lock" to af9015_i2c_xfer() will not work as demod/tuner >>

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-22 Thread Mauro Carvalho Chehab
Em 04-03-2011 20:11, Andrew de Quincey escreveu: > On 4 March 2011 22:59, Antti Palosaari wrote: >> On 03/05/2011 12:44 AM, Andrew de Quincey wrote: > > Adding a "bus lock" to af9015_i2c_xfer() will not work as demod/tuner > accesses will take multiple i2c transactions. > > The

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-21 Thread adq
2011/3/18 Antti Palosaari : > On 03/08/2011 12:12 AM, adq wrote: >> >> Ah well, so its definitely /not/ conflicting i2c writes that cause the >> tuner problem as it has finally just died. The festats for a "crashed" >> tuner are: >>   Sig: 50933  SNR: 50  BER: 0  UBLK: 5370554  Stat: 0x01 [SIG ] >>

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-18 Thread Antti Palosaari
On 03/08/2011 12:12 AM, adq wrote: Ah well, so its definitely /not/ conflicting i2c writes that cause the tuner problem as it has finally just died. The festats for a "crashed" tuner are: Sig: 50933 SNR: 50 BER: 0 UBLK: 5370554 Stat: 0x01 [SIG ] (no other error messages) For the other tun

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-07 Thread adq
2011/3/7 adq : > 2011/3/6 adq : >> 2011/3/5 adq : >>> 2011/3/5 Juan Jesús García de Soria Lucena : Hi, Andrew. This is what happens to me with both the KWorld dual tuner (when using only one tuner) and the Avermedia Volar Black (single tuner), both based on AF9015. >>>

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-07 Thread adq
2011/3/6 adq : > 2011/3/5 adq : >> 2011/3/5 Juan Jesús García de Soria Lucena : >>> Hi, Andrew. >>> >>> This is what happens to me with both the KWorld dual tuner (when using only >>> one tuner) and the Avermedia Volar Black (single tuner), both based on >>> AF9015. >>> >>> I also got corrupted str

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-06 Thread adq
2011/3/6 adq : > 2011/3/6 Antti Palosaari : >> On 03/06/2011 02:24 PM, adq wrote: >>> >>> Another issue I've noticed just now: The UCBLOCKS measure isn't reset: >>> it seems to be an accumulative counter, which isn't correct from the >>> DVB API (if I remember correctly). >>> >>> This explains why

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-06 Thread adq
2011/3/6 Antti Palosaari : > On 03/06/2011 02:24 PM, adq wrote: >> >> Another issue I've noticed just now: The UCBLOCKS measure isn't reset: >> it seems to be an accumulative counter, which isn't correct from the >> DVB API (if I remember correctly). >> >> This explains why tvheadend's "quallity" m

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-06 Thread Antti Palosaari
On 03/06/2011 02:24 PM, adq wrote: Another issue I've noticed just now: The UCBLOCKS measure isn't reset: it seems to be an accumulative counter, which isn't correct from the DVB API (if I remember correctly). This explains why tvheadend's "quallity" measure gradually tends to 0, since it is ass

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-06 Thread adq
2011/3/6 adq : > 2011/3/5 adq : >> 2011/3/5 Juan Jesús García de Soria Lucena : >>> Hi, Andrew. >>> >>> This is what happens to me with both the KWorld dual tuner (when using only >>> one tuner) and the Avermedia Volar Black (single tuner), both based on >>> AF9015. >>> >>> I also got corrupted str

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-06 Thread adq
2011/3/5 adq : > 2011/3/5 Juan Jesús García de Soria Lucena : >> Hi, Andrew. >> >> This is what happens to me with both the KWorld dual tuner (when using only >> one tuner) and the Avermedia Volar Black (single tuner), both based on >> AF9015. >> >> I also got corrupted streams with the KWorld when

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-05 Thread Andrew de Quincey
Perhaps it depends on the characteristics of the transmissions being received? I'm in the UK. 2011/3/5 Antti Palosaari : > Switching channels for long time seems to hang device (no errors seen but it > does not lock anymore), I don't know why. It is not very easy to reproduce. > For me it will tak

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-05 Thread adq
2011/3/5 Juan Jesús García de Soria Lucena : > Hi, Andrew. > > This is what happens to me with both the KWorld dual tuner (when using only > one tuner) and the Avermedia Volar Black (single tuner), both based on > AF9015. > > I also got corrupted streams with the KWorld when capturing via both tune

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-05 Thread Antti Palosaari
On 03/05/2011 03:43 AM, adq wrote: +static int af9015_lock_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) +{ + int result; + struct dvb_usb_adapter *adap = fe->dvb->priv; + struct af9015_state *state = adap->dev->priv; + + if (enable) + if (mutex_lock_int

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-05 Thread Antti Palosaari
On 03/05/2011 03:51 AM, adq wrote: As you say though. its just the tuners, so adding the locking into the gate ctrl as you suggested makes perfect sense. Attached is v3 implementing this; it seems to be working fine here. Unfortunately even with this fix, I'm still seeing the problem I was try

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-05 Thread Antti Palosaari
Switching channels for long time seems to hang device (no errors seen but it does not lock anymore), I don't know why. It is not very easy to reproduce. For me it will take generally few days just tune from channel to channel in loop. Antti On 03/05/2011 10:56 AM, Juan Jesús García de Soria L

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-04 Thread adq
On 5 March 2011 01:43, adq wrote: > On 4 March 2011 23:11, Andrew de Quincey wrote: >> On 4 March 2011 22:59, Antti Palosaari wrote: >>> On 03/05/2011 12:44 AM, Andrew de Quincey wrote: >> >> Adding a "bus lock" to af9015_i2c_xfer() will not work as demod/tuner >> accesses will take

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-04 Thread adq
On 4 March 2011 23:11, Andrew de Quincey wrote: > On 4 March 2011 22:59, Antti Palosaari wrote: >> On 03/05/2011 12:44 AM, Andrew de Quincey wrote: > > Adding a "bus lock" to af9015_i2c_xfer() will not work as demod/tuner > accesses will take multiple i2c transactions. > > The

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-04 Thread Andrew de Quincey
On 4 March 2011 22:59, Antti Palosaari wrote: > On 03/05/2011 12:44 AM, Andrew de Quincey wrote: Adding a "bus lock" to af9015_i2c_xfer() will not work as demod/tuner accesses will take multiple i2c transactions. Therefore, the following patch overrides the dvb_frontend_op

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-04 Thread Antti Palosaari
On 03/05/2011 12:44 AM, Andrew de Quincey wrote: Adding a "bus lock" to af9015_i2c_xfer() will not work as demod/tuner accesses will take multiple i2c transactions. Therefore, the following patch overrides the dvb_frontend_ops functions to add a per-device lock around them: only one frontend can

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-04 Thread Andrew de Quincey
>> Adding a "bus lock" to af9015_i2c_xfer() will not work as demod/tuner >> accesses will take multiple i2c transactions. >> >> Therefore, the following patch overrides the dvb_frontend_ops >> functions to add a per-device lock around them: only one frontend can >> now use the i2c bus at a time. Te

Re: [patch] Fix AF9015 Dual tuner i2c write failures

2011-03-04 Thread Antti Palosaari
Wow, thanks! On 03/04/2011 11:37 PM, Andrew de Quincey wrote: Hi, this has been annoying me for some time, so this evening I fixed it. If you use one of the above dual tuner devices (e.g. KWorld 399U), you get random tuning failures and i2c errors reported in dmesg such as: [...] Adding a "bus

[patch] Fix AF9015 Dual tuner i2c write failures

2011-03-04 Thread Andrew de Quincey
Hi, this has been annoying me for some time, so this evening I fixed it. If you use one of the above dual tuner devices (e.g. KWorld 399U), you get random tuning failures and i2c errors reported in dmesg such as: af9013: I2C read failed reg:d607 af9015: command failed:1 mxl5005s I2C write failed a