// SPDX-License-Identifier: GPL-2.0-or-later
/* Keytable for the CEC remote control
*
* This keymap is unusual in that it can ' t be built as a module ,
* instead it is registered directly in rc - main . c if CONFIG_MEDIA_CEC_RC
* is set . This is because it can be called from drm_dp_cec_set_edid ( ) via
* cec_register_adapter ( ) in an asynchronous context , and it is not
* allowed to use request_module ( ) to load rc - cec . ko in that case .
*
* Since this keymap is only used if CONFIG_MEDIA_CEC_RC is set , we
* just compile this keymap into the rc - core module and never as a
* separate module .
*
* Copyright ( c ) 2015 by Kamil Debski
*/
#include <media/rc-map.h>
#include <linux/module.h>
/*
* CEC Spec " High - Definition Multimedia Interface Specification " can be obtained
* here : http : //xtreamerdev.googlecode.com/files/CEC_Specs.pdf
* The list of control codes is listed in Table 27 : User Control Codes p . 95
*/
static struct rc_map_table cec[] = {
{ 0 x00, KEY_OK },
{ 0 x01, KEY_UP },
{ 0 x02, KEY_DOWN },
{ 0 x03, KEY_LEFT },
{ 0 x04, KEY_RIGHT },
{ 0 x05, KEY_RIGHT_UP },
{ 0 x06, KEY_RIGHT_DOWN },
{ 0 x07, KEY_LEFT_UP },
{ 0 x08, KEY_LEFT_DOWN },
{ 0 x09, KEY_ROOT_MENU }, /* CEC Spec: Device Root Menu - see Note 2 */
/*
* Note 2 : This is the initial display that a device shows . It is
* device - dependent and can be , for example , a contents menu , setup
* menu , favorite menu or other menu . The actual menu displayed
* may also depend on the device ' s current state .
*/
{ 0 x0a, KEY_SETUP },
{ 0 x0b, KEY_MENU }, /* CEC Spec: Contents Menu */
{ 0 x0c, KEY_FAVORITES }, /* CEC Spec: Favorite Menu */
{ 0 x0d, KEY_EXIT },
/* 0x0e-0x0f: Reserved */
{ 0 x10, KEY_MEDIA_TOP_MENU },
{ 0 x11, KEY_CONTEXT_MENU },
/* 0x12-0x1c: Reserved */
{ 0 x1d, KEY_DIGITS }, /* CEC Spec: select/toggle a Number Entry Mode */
{ 0 x1e, KEY_NUMERIC_11 },
{ 0 x1f, KEY_NUMERIC_12 },
/* 0x20-0x29: Keys 0 to 9 */
{ 0 x20, KEY_NUMERIC_0 },
{ 0 x21, KEY_NUMERIC_1 },
{ 0 x22, KEY_NUMERIC_2 },
{ 0 x23, KEY_NUMERIC_3 },
{ 0 x24, KEY_NUMERIC_4 },
{ 0 x25, KEY_NUMERIC_5 },
{ 0 x26, KEY_NUMERIC_6 },
{ 0 x27, KEY_NUMERIC_7 },
{ 0 x28, KEY_NUMERIC_8 },
{ 0 x29, KEY_NUMERIC_9 },
{ 0 x2a, KEY_DOT },
{ 0 x2b, KEY_ENTER },
{ 0 x2c, KEY_CLEAR },
/* 0x2d-0x2e: Reserved */
{ 0 x2f, KEY_NEXT_FAVORITE }, /* CEC Spec: Next Favorite */
{ 0 x30, KEY_CHANNELUP },
{ 0 x31, KEY_CHANNELDOWN },
{ 0 x32, KEY_PREVIOUS }, /* CEC Spec: Previous Channel */
{ 0 x33, KEY_SOUND }, /* CEC Spec: Sound Select */
{ 0 x34, KEY_VIDEO }, /* 0x34: CEC Spec: Input Select */
{ 0 x35, KEY_INFO }, /* CEC Spec: Display Information */
{ 0 x36, KEY_HELP },
{ 0 x37, KEY_PAGEUP },
{ 0 x38, KEY_PAGEDOWN },
/* 0x39-0x3f: Reserved */
{ 0 x40, KEY_POWER },
{ 0 x41, KEY_VOLUMEUP },
{ 0 x42, KEY_VOLUMEDOWN },
{ 0 x43, KEY_MUTE },
{ 0 x44, KEY_PLAYCD },
{ 0 x45, KEY_STOPCD },
{ 0 x46, KEY_PAUSECD },
{ 0 x47, KEY_RECORD },
{ 0 x48, KEY_REWIND },
{ 0 x49, KEY_FASTFORWARD },
{ 0 x4a, KEY_EJECTCD }, /* CEC Spec: Eject */
{ 0 x4b, KEY_FORWARD },
{ 0 x4c, KEY_BACK },
{ 0 x4d, KEY_STOP_RECORD }, /* CEC Spec: Stop-Record */
{ 0 x4e, KEY_PAUSE_RECORD }, /* CEC Spec: Pause-Record */
/* 0x4f: Reserved */
{ 0 x50, KEY_ANGLE },
{ 0 x51, KEY_TV2 },
{ 0 x52, KEY_VOD }, /* CEC Spec: Video on Demand */
{ 0 x53, KEY_EPG },
{ 0 x54, KEY_TIME }, /* CEC Spec: Timer */
{ 0 x55, KEY_CONFIG },
/*
* The following codes are hard to implement at this moment , as they
* carry an additional additional argument . Most likely changes to RC
* framework are necessary .
* For now they are interpreted by the CEC framework as non keycodes
* and are passed as messages enabling user application to parse them .
*/
/* 0x56: CEC Spec: Select Broadcast Type */
/* 0x57: CEC Spec: Select Sound presentation */
{ 0 x58, KEY_AUDIO_DESC }, /* CEC 2.0 and up */
{ 0 x59, KEY_WWW }, /* CEC 2.0 and up */
{ 0 x5a, KEY_3D_MODE }, /* CEC 2.0 and up */
/* 0x5b-0x5f: Reserved */
{ 0 x60, KEY_PLAYCD }, /* CEC Spec: Play Function */
{ 0 x6005, KEY_FASTFORWARD },
{ 0 x6006, KEY_FASTFORWARD },
{ 0 x6007, KEY_FASTFORWARD },
{ 0 x6015, KEY_SLOW },
{ 0 x6016, KEY_SLOW },
{ 0 x6017, KEY_SLOW },
{ 0 x6009, KEY_FASTREVERSE },
{ 0 x600a, KEY_FASTREVERSE },
{ 0 x600b, KEY_FASTREVERSE },
{ 0 x6019, KEY_SLOWREVERSE },
{ 0 x601a, KEY_SLOWREVERSE },
{ 0 x601b, KEY_SLOWREVERSE },
{ 0 x6020, KEY_REWIND },
{ 0 x6024, KEY_PLAYCD },
{ 0 x6025, KEY_PAUSECD },
{ 0 x61, KEY_PLAYPAUSE }, /* CEC Spec: Pause-Play Function */
{ 0 x62, KEY_RECORD }, /* Spec: Record Function */
{ 0 x63, KEY_PAUSE_RECORD }, /* CEC Spec: Pause-Record Function */
{ 0 x64, KEY_STOPCD }, /* CEC Spec: Stop Function */
{ 0 x65, KEY_MUTE }, /* CEC Spec: Mute Function */
{ 0 x66, KEY_UNMUTE }, /* CEC Spec: Restore the volume */
/*
* The following codes are hard to implement at this moment , as they
* carry an additional additional argument . Most likely changes to RC
* framework are necessary .
* For now they are interpreted by the CEC framework as non keycodes
* and are passed as messages enabling user application to parse them .
*/
/* 0x67: CEC Spec: Tune Function */
/* 0x68: CEC Spec: Seleect Media Function */
/* 0x69: CEC Spec: Select A/V Input Function */
/* 0x6a: CEC Spec: Select Audio Input Function */
{ 0 x6b, KEY_POWER }, /* CEC Spec: Power Toggle Function */
{ 0 x6c, KEY_SLEEP }, /* CEC Spec: Power Off Function */
{ 0 x6d, KEY_WAKEUP }, /* CEC Spec: Power On Function */
/* 0x6e-0x70: Reserved */
{ 0 x71, KEY_BLUE }, /* CEC Spec: F1 (Blue) */
{ 0 x72, KEY_RED }, /* CEC Spec: F2 (Red) */
{ 0 x73, KEY_GREEN }, /* CEC Spec: F3 (Green) */
{ 0 x74, KEY_YELLOW }, /* CEC Spec: F4 (Yellow) */
{ 0 x75, KEY_F5 },
{ 0 x76, KEY_DATA }, /* CEC Spec: Data - see Note 3 */
/*
* Note 3 : This is used , for example , to enter or leave a digital TV
* data broadcast application .
*/
/* 0x77-0xff: Reserved */
};
struct rc_map_list cec_map = {
.map = {
.scan = cec,
.size = ARRAY_SIZE(cec),
.rc_proto = RC_PROTO_CEC,
.name = RC_MAP_CEC,
}
};
Messung V0.5 in Prozent C=70 H=100 G=86
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-09-29)
¤
*© Formatika GbR, Deutschland