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

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

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

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

2011-04-02 Thread adq
2011/4/2 Antti Palosaari cr...@iki.fi: 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 -

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

2011-04-02 Thread adq
2011/4/2 adq a...@lidskialf.net: 2011/4/2 Antti Palosaari cr...@iki.fi: 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

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 Palosaaricr...@iki.fi: 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

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

2011-04-02 Thread adq
2011/4/2 Antti Palosaari cr...@iki.fi: On 04/02/2011 02:06 PM, adq wrote: 2011/4/2 Antti Palosaaricr...@iki.fi: 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-01 Thread adq
2011/3/18 Antti Palosaari cr...@iki.fi: 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 04-03-2011 20:11, Andrew de Quincey escreveu: On 4 March 2011 22:59, Antti Palosaari cr...@iki.fi 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

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

2011-03-22 Thread adq
On 22 March 2011 09:00, Mauro Carvalho Chehab mche...@redhat.com wrote: Em 04-03-2011 20:11, Andrew de Quincey escreveu: On 4 March 2011 22:59, Antti Palosaari cr...@iki.fi wrote: On 03/05/2011 12:44 AM, Andrew de Quincey wrote: Adding a bus lock to af9015_i2c_xfer() will not work as

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 mche...@redhat.com wrote: Em 04-03-2011 20:11, Andrew de Quincey escreveu: On 4 March 2011 22:59, Antti Palosaari cr...@iki.fi wrote: On 03/05/2011 12:44 AM, Andrew de Quincey wrote: Adding a bus lock to

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

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

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

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

2011-03-06 Thread adq
2011/3/5 adq a...@lidskialf.net: 2011/3/5 Juan Jesús García de Soria Lucena skanda...@gmail.com: 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

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

2011-03-06 Thread adq
2011/3/6 adq a...@lidskialf.net: 2011/3/5 adq a...@lidskialf.net: 2011/3/5 Juan Jesús García de Soria Lucena skanda...@gmail.com: 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

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

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

2011-03-06 Thread adq
2011/3/6 Antti Palosaari cr...@iki.fi: 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

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

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

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

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 skanda...@gmail.com: 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

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 cr...@iki.fi: 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

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

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. Testing with

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
On 4 March 2011 22:59, Antti Palosaari cr...@iki.fi 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_ops

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

2011-03-04 Thread adq
On 4 March 2011 23:11, Andrew de Quincey adq_...@lidskialf.net wrote: On 4 March 2011 22:59, Antti Palosaari cr...@iki.fi 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.

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

2011-03-04 Thread adq
On 5 March 2011 01:43, adq a...@lidskialf.net wrote: On 4 March 2011 23:11, Andrew de Quincey adq_...@lidskialf.net wrote: On 4 March 2011 22:59, Antti Palosaari cr...@iki.fi wrote: On 03/05/2011 12:44 AM, Andrew de Quincey wrote: Adding a bus lock to af9015_i2c_xfer() will not work as