LinuxTV Patchwork [1/3] rtl28xxu: lower the rc poll time to mitigate i2c transfer errors

login
register
mail settings
Submitter Benjamin Larsson
Date Dec. 6, 2014, 12:25 a.m.
Message ID <1417825533-13081-1-git-send-email-benjamin@southpole.se>
Download mbox | patch
Permalink /patch/27348/
State Accepted
Headers show

Comments

Benjamin Larsson - Dec. 6, 2014, 12:25 a.m.
The Astrometa device has issues with i2c transfers. Lowering the
poll time somehow makes these errors disappear.

Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
---
 drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Antti Palosaari - Dec. 6, 2014, 12:46 p.m.
Moikka!
I am very surprised about that patch, especially because it *increases* 
polling interval from 400ms to 200ms. For me it has been always worked 
rather well, but now I suspect it could be due to I disable always 
remote controller... I have to test that.

regards
Antti

On 12/06/2014 02:25 AM, Benjamin Larsson wrote:
> The Astrometa device has issues with i2c transfers. Lowering the
> poll time somehow makes these errors disappear.
>
> Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
> ---
>   drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
> index 705c6c3..9ec4223 100644
> --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
> +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
> @@ -1567,7 +1567,7 @@ static int rtl2832u_get_rc_config(struct dvb_usb_device *d,
>   	rc->allowed_protos = RC_BIT_ALL;
>   	rc->driver_type = RC_DRIVER_IR_RAW;
>   	rc->query = rtl2832u_rc_query;
> -	rc->interval = 400;
> +	rc->interval = 200;
>
>   	return 0;
>   }
>
Benjamin Larsson - Dec. 6, 2014, 2:27 p.m.
On 12/06/2014 01:46 PM, Antti Palosaari wrote:
> Moikka!
> I am very surprised about that patch, especially because it 
> *increases* polling interval from 400ms to 200ms. For me it has been 
> always worked rather well, but now I suspect it could be due to I 
> disable always remote controller... I have to test that.
>
> regards
> Antti

I noticed that I got more retry errors when I removed the poll. So when 
I tried lowering the interval time the errors totally disappeared for 
me. Exactly how it works is unclear to me but I guess that the rc poll 
triggers something in the chip to mitigate some overflow in the i2c 
transmit buffer. This workaround also suggest that the i2c bus actually 
is ok and not the cause for the errors. Anyway please test and if this 
is an acceptable solution then there might also be some check that this 
poll is active and set to 200 at all times for this card. At least when 
the card is set in dvb mode, for sdr mode this might not be an issue.

MvH
Benjamin Larsson
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Benjamin Larsson - Feb. 19, 2015, 9:44 a.m.
On 2014-12-06 01:25, Benjamin Larsson wrote:
> The Astrometa device has issues with i2c transfers. Lowering the
> poll time somehow makes these errors disappear.
>
> Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
> ---
>   drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
> index 705c6c3..9ec4223 100644
> --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
> +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
> @@ -1567,7 +1567,7 @@ static int rtl2832u_get_rc_config(struct dvb_usb_device *d,
>   	rc->allowed_protos = RC_BIT_ALL;
>   	rc->driver_type = RC_DRIVER_IR_RAW;
>   	rc->query = rtl2832u_rc_query;
> -	rc->interval = 400;
> +	rc->interval = 200;
>
>   	return 0;
>   }
>

Ping, can I get an ack or nack on this ?

MvH
Benjamin Larsson
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
index 705c6c3..9ec4223 100644
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -1567,7 +1567,7 @@  static int rtl2832u_get_rc_config(struct dvb_usb_device *d,
 	rc->allowed_protos = RC_BIT_ALL;
 	rc->driver_type = RC_DRIVER_IR_RAW;
 	rc->query = rtl2832u_rc_query;
-	rc->interval = 400;
+	rc->interval = 200;
 
 	return 0;
 }

Privacy Policy