Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Getting IR-codes directly from DVB-S?



On Mon, Oct 13, 2003 at 10:29:53PM +0200, Holger Waechtler wrote:
> Gerd Knorr wrote:
> >
> >There are a number of buttons where are no good KEY_* defines for yet
> >(color/contrast/hue, bass/trable/balance, ...) btw.
> 
> Can you please prepare a list of required keys for Vojtech, I'm sure he 
> will add them then to the API include files?

Right now my rc5 (Hauppauge uses rc5 for the remotes shipped with the
WinTV cards) key table looks like this:

<cut here>

/* see http://users.pandora.be/nenya/electronics/rc5/codes00.htm */
IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE] = {
	[ 0x00 ] = KEY_KP0,             // 0
	[ 0x01 ] = KEY_KP1,             // 1
	[ 0x02 ] = KEY_KP2,             // 2
	[ 0x03 ] = KEY_KP3,             // 3
	[ 0x04 ] = KEY_KP4,             // 4
	[ 0x05 ] = KEY_KP5,             // 5
	[ 0x06 ] = KEY_KP6,             // 6
	[ 0x07 ] = KEY_KP7,             // 7
	[ 0x08 ] = KEY_KP8,             // 8
	[ 0x09 ] = KEY_KP9,             // 9

	[ 0x0b ] = KEY_CHANNEL,         // channel / program (japan: 11)
	[ 0x0c ] = KEY_POWER,           // standby
	[ 0x0d ] = KEY_MUTE,            // mute / demute
	[ 0x10 ] = KEY_VOLUMEUP,        // volume +
	[ 0x11 ] = KEY_VOLUMEDOWN,      // volume -
	[ 0x12 ] = KEY_BRIGHTNESSUP,    // brightness +
	[ 0x13 ] = KEY_BRIGHTNESSDOWN,  // brightness -
	[ 0x1e ] = KEY_SEARCH,          // search +
	[ 0x20 ] = KEY_CHANNELUP,       // channel / program +
	[ 0x21 ] = KEY_CHANNELDOWN,     // channel / program -
	[ 0x23 ] = KEY_LANGUAGE,        // 1st / 2nd language
	[ 0x26 ] = KEY_SLEEP,           // sleeptimer
	[ 0x2e ] = KEY_MENU,            // 2nd controls (USA: menu)
	[ 0x30 ] = KEY_PAUSE,           // pause
	[ 0x32 ] = KEY_REWIND,          // rewind
	[ 0x33 ] = KEY_GOTO,            // go to
	[ 0x35 ] = KEY_PLAY,            // play
	[ 0x36 ] = KEY_STOP,            // stop
	[ 0x37 ] = KEY_RECORD,          // recording

#if 0 /* FIXME */
	[ 0x0a ] = KEY_RESERVED,        // 1/2/3 digits (japan: 10)
	[ 0x0e ] = KEY_RESERVED,        // P.P. (personal preference)
	[ 0x0f ] = KEY_RESERVED,        // display
	[ 0x14 ] = KEY_RESERVED,        // colour saturation +
	[ 0x15 ] = KEY_RESERVED,        // colour saturation -
	[ 0x16 ] = KEY_RESERVED,        // bass +
	[ 0x17 ] = KEY_RESERVED,        // bass -
	[ 0x18 ] = KEY_RESERVED,        // treble +
	[ 0x19 ] = KEY_RESERVED,        // treble -
	[ 0x1a ] = KEY_RESERVED,        // balance right
	[ 0x1b ] = KEY_RESERVED,        // balance left
	[ 0x1c ] = KEY_RESERVED,        // contrast +
	[ 0x1d ] = KEY_RESERVED,        // contrast -
	[ 0x1f ] = KEY_RESERVED,        // tint/hue +
	[ 0x22 ] = KEY_RESERVED,        // alt / channel
	[ 0x24 ] = KEY_RESERVED,        // spacial stereo on/off
	[ 0x25 ] = KEY_RESERVED,        // mono / stereo (USA)
	[ 0x27 ] = KEY_RESERVED,        // tint / hue -
	[ 0x28 ] = KEY_RESERVED,        // RF switch/PIP select
	[ 0x29 ] = KEY_RESERVED,        // vote
	[ 0x2a ] = KEY_RESERVED,        // timed page/channel clck
	[ 0x2b ] = KEY_RESERVED,        // increment (USA)
	[ 0x2c ] = KEY_RESERVED,        // decrement (USA)
	[ 0x2d ] = KEY_RESERVED,        // 
	[ 0x2f ] = KEY_RESERVED,        // PIP shift
	[ 0x31 ] = KEY_RESERVED,        // erase
	[ 0x34 ] = KEY_RESERVED,        // wind
	[ 0x38 ] = KEY_RESERVED,        // external 1
	[ 0x39 ] = KEY_RESERVED,        // external 2
	[ 0x3a ] = KEY_RESERVED,        // PIP display mode
	[ 0x3b ] = KEY_RESERVED,        // view data mode / advance
	[ 0x3c ] = KEY_RESERVED,        // teletext submode (Japan: 12)
	[ 0x3d ] = KEY_RESERVED,        // system standby
	[ 0x3e ] = KEY_RESERVED,        // crispener on/off
	[ 0x3f ] = KEY_RESERVED,        // system select
#endif
};
EXPORT_SYMBOL_GPL(ir_codes_rc5_tv);

</cut here>

See http://bytesex.org/patches/2.6.0-test7-2/25_ir_input-2.6.0-test7.diff.gz
for the complete source file.

> >>>The device type may be identified using existing ioctls:
> >>>EVIOCGNAME, EVIOCGPHYS. Is this sufficient?
> >
> >Should be IMHO, I've named them sprintf("pci-%s/input0",pci_name(dev)),
> >that should be unique.
> 
> unique, but these names don't reflect the actually used decoder hardware 
> which might be a good hint for the userspace application to determine 
> the supported IR protocols or limitations to hook in specialized keymaps 
> (one example: the AV711x firmware cuts down RC5 and RCMM keycodes to 8 
> or 12 bits even if the original code had more bits, this is a hardware 
> limitation).
> 
> ugly, but maybe a device name clarifying the decoder hardware type would 
> help to solve issues like this.

That isn't the intention of the name ...

To switch IR protocols we'll need some ioctls anyway, so these can also
be used to figure the hardware capabilities.  I don't think it is useful
to encode the hardware capabilities in the device name ...

  Gerd

-- 
You have a new virus in /var/mail/kraxel


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index