All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: rtl28xxu: add missing sleep before probing slave demod
@ 2020-02-19 21:14 Mario Hros
  0 siblings, 0 replies; only message in thread
From: Mario Hros @ 2020-02-19 21:14 UTC (permalink / raw)
  To: linux-media; +Cc: Mario Hros

Slave demod needs some time to wake up otherwise it may not respond to the following probe commands. This problem manifested randomly on my Astrometa DVB-T2 dongle.

Signed-off-by: Mario Hros <git@reversity.org>
---
 drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
index c6881a1b3232..2080f6ef4be1 100644
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -552,6 +552,9 @@ static int rtl2832u_read_config(struct dvb_usb_device *d)
 		if (ret)
 			goto err;
 
+		/* slave demod needs some time to wake up */
+		msleep(20);
+
 		/* check slave answers */
 		ret = rtl28xxu_ctrl_msg(d, &req_mn88472);
 		if (ret == 0 && buf[0] == 0x02) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-19 21:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 21:14 [PATCH] media: rtl28xxu: add missing sleep before probing slave demod Mario Hros

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.