mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: mchehab@infradead.org
To: linux-kernel@vger.kernel.org
Cc: linux-dvb-maintainer@linuxtv.org,
	"David H�rdeman" <david@hardeman.nu>,
	"Oliver Endriss" <o.endriss@gmx.de>,
	"Mauro Carvalho Chehab" <mchehab@infradead.org>
Subject: [PATCH 2/7] V4L/DVB (4785): Budget-ci: Change DEBIADDR_IR to a safer default
Date: Fri, 03 Nov 2006 01:02:13 -0300	[thread overview]
Message-ID: <20061103040213.PS7698750002@infradead.org> (raw)
In-Reply-To: <20061103035925.PS9047100000@infradead.org>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1847 bytes --]


From: David Härdeman <david@hardeman.nu>

The IR chip has no address decoding, so the IR data is always present in 
the high byte when doing a read from the saa7146 chip. This means that 
the DEBI address used is irrelevant to the IR decoding logic.
DEBI addresses 0x1XXX are mapped to the registers on the CI module 
itself, but only the lowest two bits are actually used (see EN50221, 
section A.2.2.1), meaning that 0x1234 is equivalent to 0x1000 which maps 
to register 0 (the data register). A read from the data register is 
supposed to be preceded by a read from the size register, so some CI 
modules will be confused (the AlphaCrypt CAM will hang completely).
The attached patch changes the address used when reading the IR data to 
use 0x4000 instead. This is the CI version address, which is a safer 
default, works with the AlphaCrypt CAM and matches the behaviour of the 
Windows driver (AFAIK).

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/dvb/ttpci/budget-ci.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c
index 2a2e9b4..ac0cecb 100644
--- a/drivers/media/dvb/ttpci/budget-ci.c
+++ b/drivers/media/dvb/ttpci/budget-ci.c
@@ -46,7 +46,14 @@ #include "lnbp21.h"
 #include "bsbe1.h"
 #include "bsru6.h"
 
-#define DEBIADDR_IR		0x1234
+/*
+ * Regarding DEBIADDR_IR:
+ * Some CI modules hang if random addresses are read.
+ * Using address 0x4000 for the IR read means that we
+ * use the same address as for CI version, which should
+ * be a safe default.
+ */
+#define DEBIADDR_IR		0x4000
 #define DEBIADDR_CICONTROL	0x0000
 #define DEBIADDR_CIVERSION	0x4000
 #define DEBIADDR_IO		0x1000


  parent reply	other threads:[~2006-11-03  4:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-03  3:59 [PATCH 0/7] V4L/DVB fixes mchehab
2006-11-03  4:02 ` [PATCH 1/7] V4L/DVB (4752): DVB: Add DVB_FE_CUSTOMISE support for MT2060 mchehab
2006-11-03  4:02 ` mchehab [this message]
2006-11-03  4:02 ` [PATCH 3/7] V4L/DVB (4786): Pvrusb2: use NULL instead of 0 mchehab
2006-11-03  4:02 ` [PATCH 5/7] V4L/DVB (4770): Fix mode switch of Compro Videomate T300 mchehab
2006-11-03  4:02 ` [PATCH 7/7] V4L/DVB (4751): Fix DBV_FE_CUSTOMISE for card drivers compiled into kernel mchehab
2006-11-03  4:02 ` [PATCH 6/7] V4L/DVB (4784): [saa7146_i2c] short_delay mode fixed for fast machines mchehab
2006-11-03  4:02 ` [PATCH 4/7] V4L/DVB (4787): Budget-ci: Inversion setting fixed for Technotrend 1500 T mchehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061103040213.PS7698750002@infradead.org \
    --to=mchehab@infradead.org \
    --cc=david@hardeman.nu \
    --cc=linux-dvb-maintainer@linuxtv.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=o.endriss@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®