Bug#276082: marked as done ([PATCH] keymap-loading interface for budget-ci)

Debian Bug Tracking System pkg-vdr-dvb-devel@lists.alioth.debian.org
Mon, 25 Oct 2004 02:03:18 -0700


Your message dated Mon, 25 Oct 2004 04:47:18 -0400
with message-id <E1CM0Va-0000GP-00@newraff.debian.org>
and subject line Bug#276082: fixed in linuxtv-dvb-apps 1.1.0-4
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 11 Oct 2004 22:38:56 +0000
>From linux@youmustbejoking.demon.co.uk Mon Oct 11 15:38:56 2004
Return-path: <linux@youmustbejoking.demon.co.uk>
Received: from anchor-post-31.mail.demon.net [194.217.242.89] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CH8oh-0001Xq-00; Mon, 11 Oct 2004 15:38:55 -0700
Received: from youmustbejoking.demon.co.uk ([212.228.127.8] helo=pentagram.youmustbejoking.demon.co.uk)
	by anchor-post-31.mail.demon.net with esmtp (Exim 4.42)
	id 1CH8pR-0007yr-5f
	for submit@bugs.debian.org; Mon, 11 Oct 2004 22:39:49 +0000
Received: from riscpc ([192.168.0.2])
	by pentagram.youmustbejoking.demon.co.uk with esmtp (Exim 3.36 #1 (Debian))
	id 1CH8Ta-0003gs-00
	for <submit@bugs.debian.org>; Mon, 11 Oct 2004 23:17:06 +0100
Date: Mon, 11 Oct 2004 22:22:35 +0100
From: Darren Salt <linux@youmustbejoking.demon.co.uk>
Message-ID: <4CFC62EAD2%linux@youmustbejoking.demon.co.uk>
User-Agent: Messenger-Pro/2.72b9 (MsgServe/2.13) (RISC-OS/4.02) POPstar/2.06-ds.2
To: submit@bugs.debian.org
Subject: [PATCH] keymap-loading interface for budget-ci
X-Editor: Zap 1.46 (24 Sep 2004) ds, ZapEmail 0.28.1 (09 Aug 2004) (32)
X-SDate: Mon, 4059 Sep 1993 22:22:35 +0100
X-Message-Flag: Outlook Express is broken. Upgrade to mail(1).
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="1458367870--1972188164--1285565509"
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

This message is in MIME format which your mailer apparently does not support.
You either require a newer version of your software which supports MIME, or
a separate MIME decoding utility.  Alternatively, ask the sender of this
message to resend it in a different format.

--1458367870--1972188164--1285565509
Content-Type: text/plain; charset=us-ascii

Package: dvb-utils
Version: 1.1.0-3
Severity: wishlist
Tags: patch

The attached patch adds a utility "budget_ci_loadkeys" (basically, a patched
av7110_loadkeys) which should be used to write to /proc/budget_ci_ir in order
to program the keymap for some DVB receiver cards.

It requires a corresponding kernel DVB patch (sent separately).

Suitable keymaps already exist in the package, although I'd do
s/KEY_([[:digit:]])/BTN_\1/.

-- 
| Darren Salt   | nr. Ashington, | linux (or ds) at
| woody, sarge, | Northumberland | youmustbejoking
| RISC OS       | Toon Army      | demon co uk
|   Oh, sarge too...

I can't reach the brakes on this piano!

--1458367870--1972188164--1285565509
Content-Type: text/plain; charset=iso-8859-1; name="dvb-utils.budget_ci_loadkeys.patch"
Content-Disposition: attachment; filename="dvb-utils.budget_ci_loadkeys.patch"
Content-Transfer-Encoding: quoted-printable

diff -urNad linuxtv-dvb-apps-1.1.0/util/av7110_loadkeys/Makefile linuxtv-=
dvb-apps-1.1.0/util/av7110_loadkeys/Makefile
--- linuxtv-dvb-apps-1.1.0/util/av7110_loadkeys/Makefile	2004-09-27 20:48=
:23.000000000 +0100
+++ linuxtv-dvb-apps-1.1.0/util/av7110_loadkeys/Makefile	2004-09-27 20:48=
:39.000000000 +0100
@@ -1,14 +1,23 @@
 CC =3D gcc
-CFLAGS =3D -g -Wall -O2
+CFLAGS =3D -g -Wall -O2 -D_GNU_SOURCE
=20
-all: av7110_loadkeys evtest
+all: av7110_loadkeys budget_ci_loadkeys evtest
=20
 av7110_loadkeys: av7110_loadkeys.o
=20
+budget_ci_loadkeys: budget_ci_loadkeys.o
+
 evtest: evtest.o
=20
+av7110_loadkeys.o: CFLAGS +=3D -UHW_MSP430
 av7110_loadkeys.o: av7110_loadkeys.c input_keynames.h
=20
+budget_ci_loadkeys.c: av7110_loadkeys.c
+	ln av7110_loadkeys.c budget_ci_loadkeys.c
+
+budget_ci_loadkeys.o: CFLAGS +=3D -DHW_MSP430
+budget_ci_loadkeys.o: budget_ci_loadkeys.c input_keynames.h
+
 evtest.o: evtest.c input_keynames.h
=20
=20
@@ -53,5 +62,6 @@
=20
=20
 clean:
-	$(RM) core* *.o input_keynames.h av7110_loadkeys evtest
+	$(RM) core* *.o input_keynames.h av7110_loadkeys budget_ci_loadkeys \
+		 budget_ci_loadkeys.c evtest
=20
diff -urNad linuxtv-dvb-apps-1.1.0/util/av7110_loadkeys/av7110_loadkeys.c=
 linuxtv-dvb-apps-1.1.0/util/av7110_loadkeys/av7110_loadkeys.c
--- linuxtv-dvb-apps-1.1.0/util/av7110_loadkeys/av7110_loadkeys.c	2004-09=
-27 20:48:23.000000000 +0100
+++ linuxtv-dvb-apps-1.1.0/util/av7110_loadkeys/av7110_loadkeys.c	2004-09=
-27 20:48:23.000000000 +0100
@@ -1,5 +1,6 @@
 #include <asm/types.h>
 #include <stdlib.h>
+#include <stdio.h>
 #include <unistd.h>
 #include <sys/mman.h>
 #include <sys/types.h>
@@ -111,12 +112,20 @@
=20
=20
=20
+#ifdef HW_MSP430
+const char usage [] =3D "\n\tusage: budget_ci_loadkeys keymap_filename.r=
c5\n\n";
+#else
 const char usage [] =3D "\n\tusage: av7110_loadkeys [-i|--invert] [-a|--=
address <num>] keymap_filename.(rc5|rcmm)\n\n";
-
+#endif
=20
 struct ir_setup {
+#ifdef HW_MSP430
+#define KEYTAB_SIZE 64
+#else
+#define KEYTAB_SIZE 256
 	__u32 ir_config;
-	__u16 keytab [256];
+#endif
+	__u16 keytab [KEYTAB_SIZE];
 } __attribute__ ((packed));
=20
=20
@@ -128,7 +137,10 @@
 	char *buf, *pos, *fname =3D NULL;
=20
 	for (i=3D1; i<argc; i++) {
+#ifndef HW_MSP430
+		/* AV7110 only; not MSP430 */
 		if (!strcmp("-i", argv[i]) || !strcmp("--invert", argv[i]))
+		=09
 			setup.ir_config |=3D 0x8000;
 		else if (!strcmp("-a", argv[i]) || !strcmp("--address", argv[i])) {
 			if (++i < argc) {
@@ -136,6 +148,7 @@
 				setup.ir_config |=3D 0x4000;
 			}
 		} else
+#endif
 			fname =3D argv[i];
 	}
=20
@@ -144,6 +157,14 @@
 		exit (-1);
 	}
=20
+#ifdef HW_MSP430
+	if (strncmp(".rc5", fname + strlen(fname) - 4, 4) !=3D 0) {
+		const char msg [] =3D "\nERROR: "
+			"input filename must have suffix .rc5\n";
+		write (0, msg, strlen(msg));
+		exit (-1);
+	}
+#else
 	if (strncmp(".rcmm", fname + strlen(fname) - 5, 5) =3D=3D 0)
 		setup.ir_config |=3D 0x0001;
 	else if (strncmp(".rc5", fname + strlen(fname) - 4, 4) !=3D 0) {
@@ -152,6 +173,7 @@
 		write (0, msg, strlen(msg));
 		exit (-1);
 	}
+#endif
=20
 	if ((fd =3D open (fname, O_RDONLY)) < 0)
 		print_error ("open", fname);
@@ -173,9 +195,11 @@
 		key =3D strtol (pos, &pos, 0);
 		keycode =3D parse_keyname (pos, &pos, buf + len - pos);
=20
-		if (key < 0 || key > 0xff) {
-			const char msg [] =3D=20
-				"\nERROR: key must be in range 0 ... 0xff!\n\n";
+		if (key < 0 || key >=3D KEYTAB_SIZE) {
+			char *msg;
+			asprintf (&msg,
+				"\nERROR: key must be in range 0 ... 0x%02x!\n\n",
+				KEYTAB_SIZE);
=20
 			write (0, msg, strlen(msg));
 			exit (-1);
@@ -190,7 +214,7 @@
 	munmap (buf, len);
 	close (fd);
=20
-	write (1, &setup, 4 + 256 * sizeof(__u16));
+	write (1, &setup, sizeof (setup));
=20
 	return 0;
 }

--1458367870--1972188164--1285565509--

---------------------------------------
Received: (at 276082-close) by bugs.debian.org; 25 Oct 2004 08:54:29 +0000
>From katie@ftp-master.debian.org Mon Oct 25 01:54:29 2004
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CM0cX-0007Ee-00; Mon, 25 Oct 2004 01:54:29 -0700
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1CM0Va-0000GP-00; Mon, 25 Oct 2004 04:47:18 -0400
From: Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org>
To: 276082-close@bugs.debian.org
X-Katie: $Revision: 1.51 $
Subject: Bug#276082: fixed in linuxtv-dvb-apps 1.1.0-4
Message-Id: <E1CM0Va-0000GP-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Mon, 25 Oct 2004 04:47:18 -0400
Delivered-To: 276082-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Source: linuxtv-dvb-apps
Source-Version: 1.1.0-4

We believe that the bug you reported is fixed in the latest version of
linuxtv-dvb-apps, which is due to be installed in the Debian FTP archive:

dvb-utils_1.1.0-4_i386.deb
  to pool/main/l/linuxtv-dvb-apps/dvb-utils_1.1.0-4_i386.deb
linuxtv-dvb-apps_1.1.0-4.diff.gz
  to pool/main/l/linuxtv-dvb-apps/linuxtv-dvb-apps_1.1.0-4.diff.gz
linuxtv-dvb-apps_1.1.0-4.dsc
  to pool/main/l/linuxtv-dvb-apps/linuxtv-dvb-apps_1.1.0-4.dsc



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 276082@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org> (supplier of updated linuxtv-dvb-apps package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 16 Oct 2004 10:01:14 +0200
Source: linuxtv-dvb-apps
Binary: dvb-utils
Architecture: source i386
Version: 1.1.0-4
Distribution: unstable
Urgency: low
Maintainer: Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org>
Changed-By: Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org>
Description: 
 dvb-utils  - Viewer programs for DVB cards
Closes: 276082
Changes: 
 linuxtv-dvb-apps (1.1.0-4) unstable; urgency=low
 .
   * Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
     - Build-depend on dpatch (>= 2.0.9) to fix FTBFS on sparc,
       caused by the new dpatch-file-format
     - Applied patch from Darren Salt <linux@youmustbejoking.demon.co.uk>
       to add budget_ci_loadkeys-utility (closes: #276082)
Files: 
 c0ae285fd121b420c87729b7213c1607 736 misc extra linuxtv-dvb-apps_1.1.0-4.dsc
 d811077d2428e81fbe21884e62fedf39 9056 misc extra linuxtv-dvb-apps_1.1.0-4.diff.gz
 4ab7911310453eb52c9020ab12728105 67016 misc extra dvb-utils_1.1.0-4_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBfLibgeVih7XOVJcRAri+AJ9riB5zw7s6GTYRxN23WX/1Cx+l5wCdFIxq
6N+ML7Ybw6ZLr40nQG3iNNc=
=T1Lz
-----END PGP SIGNATURE-----