media: lgdt330x: fix lock status reporting
PATCH 1/1 media: lgdt330x: fix lock status reporting
A typo in code cleanup commit db9c1007bc07 ("media: lgdt330x: do some cleanups at status logic") broke the FE_HAS_LOCK reporting for 3303 chips by inadvertently modifying the register mask.
The broken lock status is critial as it prevents video capture cards from reporting signal strength, scanning for channels, and capturing video.
Fix regression by reverting mask change.
--- drivers/media/dvb-frontends/lgdt330x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/dvb-frontends/lgdt330x.c +1 -1
@@ -783,7 +783,7 @@ static int lgdt3303_read_status(struct dvb_frontend *fe,if ((buf[0 ] &0x02 ) ==0x00 ) *status |=FE_HAS_SYNC ; -if ((buf[0 ] &0xfd ) ==0x01 ) +if ((buf[0 ] &0x01 ) ==0x01 ) *status |=FE_HAS_VITERBI |FE_HAS_LOCK ;break ;default :
Signature · 1 line
2.19.2
Hello Nick,
Thank you for the patch.
Quoted 11 lines · Nicholas A.
A typo in code cleanup commit
db9c1007bc07("media: lgdt330x: do some cleanups at status logic") broke theFE_HAS_LOCKreporting for 3303 chips by inadvertently modifying the register mask.The broken lock status is critial as it prevents video capture cards from reporting signal strength, scanning for channels, and capturing video.
Fix regression by reverting mask change.
Signed-off-by Nick French <[email protected]>
This looks good to me. The patch should have a
line though. With that added,
The patch that broke this was committed without any review. Once again we get a proof that this isn't an acceptable policy. The review process needs to be fixed.
Quoted 18 lines
--- drivers/media/dvb-frontends/lgdt330x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/media/dvb-frontends/lgdt330x.cindex96807e134886..8abb1a510a81100644drivers/media/dvb-frontends/lgdt330x.c +1
-1@@ -783,7 +783,7 @@ static int lgdt3303_read_status(struct dvb_frontend *fe,if ((buf[0 ] &0x02 ) ==0x00 ) *status |=FE_HAS_SYNC ; -if ((buf[0 ] &0xfd ) ==0x01 ) +if ((buf[0 ] &0x01 ) ==0x01 ) *status |=FE_HAS_VITERBI |FE_HAS_LOCK ;break ;default :
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 31 lines · Nicholas A.
A typo in code cleanup commit
db9c1007bc07("media: lgdt330x: do some cleanups at status logic") broke theFE_HAS_LOCKreporting for 3303 chips by inadvertently modifying the register mask.The broken lock status is critial as it prevents video capture cards from reporting signal strength, scanning for channels, and capturing video.
Fix regression by reverting mask change.
Signed-off-by Nick French <[email protected]>--- drivers/media/dvb-frontends/lgdt330x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/dvb-frontends/lgdt330x.c +1
-1@@ -783,7 +783,7 @@ static int lgdt3303_read_status(struct dvb_frontend *fe,if ((buf[0 ] &0x02 ) ==0x00 ) *status |=FE_HAS_SYNC ; -if ((buf[0 ] &0xfd ) ==0x01 ) +if ((buf[0 ] &0x01 ) ==0x01 ) *status |=FE_HAS_VITERBI |FE_HAS_LOCK ;break ;default :Signature · 1 line
2.19.2
Patch worked for me.