From patchwork Thu Aug 15 14:59:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 11095827 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E941713A0 for ; Thu, 15 Aug 2019 15:00:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D87FD288E8 for ; Thu, 15 Aug 2019 15:00:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCA7C28906; Thu, 15 Aug 2019 15:00:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54E8F28906 for ; Thu, 15 Aug 2019 15:00:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733209AbfHOPAL (ORCPT ); Thu, 15 Aug 2019 11:00:11 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39376 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730788AbfHOPAK (ORCPT ); Thu, 15 Aug 2019 11:00:10 -0400 Received: by mail-wr1-f67.google.com with SMTP id t16so2485933wra.6; Thu, 15 Aug 2019 08:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=udYciyXbqm5Zne+hkQd3wevHbOZso+c2f+w2KUkviok=; b=tF/RvXrRGyZVXFhyXBViXUyPZifX4vI2qn4i/TvKWRBMAdcJCExWMgR1OaBGojbN9i wXFVr9QLa/hGagYdgKSrN2xmTctv09D6Mya/rQe4997mFhAlS/o8kvI11i+0iNCv8eOZ SUaQ+UrwzL+ORo0NANbYJpy1Tgf2w34vfhmkpyd7+fnZky2aT20ymdWLVkTH8iX+tgvl chK2ilTSznAUICxtVzo3Lx1pwI2G2yej3TZeJIpFAAAvBzzFRB4yvPvo/FehXJSWr6s5 bTttKl6xqxlKW3QbyngM2Tt72xP6/3J0iWMmniyOZ6xlHhgx/JwofCueWgjeEvAjVNHK 2q2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=udYciyXbqm5Zne+hkQd3wevHbOZso+c2f+w2KUkviok=; b=ASny+ZhAjqFBkyUkmV+md+wnFYfKOymz2ZvSfdYmQPWpnGRwS3L5hV5XGl2DpKAANW gQErzazAkcaklc5gjESnmxc3fmxhyjFk9j0HnIf2kNe554vmc7M2GAT4h0DLy8b22prj tdzAzijygZ9R+5kOk5BGI1Gtf54TYQcvNFOWJXNb9858Gy6SvfPmMDhjTUSvUHxW/318 6owfH3dfJ6394Drc0HwTJ5dgSNtRbrJxc/8yGz5CbEwYgusQVwrzndRt52rTI1rMrsmb 77iSnkCPsp0z6DOCeQQx85oSV/Q8OyrsH2G9ysoS6WsNtJzO0+fSGSpV+cXPbSvktPe8 fJVQ== X-Gm-Message-State: APjAAAVR5K4hqnVfIoqk8nfTSyTLiM0cXCr0dYFR4Q9aj2onBp971HCT 5yn9aiM0fZnfdkVl0Fo+V/Y= X-Google-Smtp-Source: APXvYqxruAOlO5/y1WGq3s4qRP6NlewaY1UXLrG2M+b7keWLT53iyPJucJS1AT3PXkyFMHMdr92sTQ== X-Received: by 2002:a5d:470c:: with SMTP id y12mr5933559wrq.136.1565881208899; Thu, 15 Aug 2019 08:00:08 -0700 (PDT) Received: from localhost.localdomain ([94.204.252.234]) by smtp.gmail.com with ESMTPSA id e4sm5041054wrh.39.2019.08.15.08.00.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Aug 2019 08:00:08 -0700 (PDT) From: Christian Hewitt To: Mauro Carvalho Chehab , Benjamin Valentin , Sean Young , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Christian Hewitt Subject: [PATCH 1/7] media: rc: add keymap for Amediatech X96-MAX remote Date: Thu, 15 Aug 2019 18:59:11 +0400 Message-Id: <1565881157-14644-2-git-send-email-christianshewitt@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> References: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The X96-Max Android STB ships with a simple NEC remote. It includes a TV section with preset buttons for controlling a TV. These are not configurable, but are noted to aid visual recognition of the device. Signed-off-by: Christian Hewitt --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-x96max.c | 85 ++++++++++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 87 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-x96max.c diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index 5b1399a..b88c4e7 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -117,4 +117,5 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-winfast-usbii-deluxe.o \ rc-su3000.o \ rc-xbox-dvd.o \ + rc-x96max.o \ rc-zx-irdec.o diff --git a/drivers/media/rc/keymaps/rc-x96max.c b/drivers/media/rc/keymaps/rc-x96max.c new file mode 100644 index 0000000..d947e46 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-x96max.c @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright (C) 2019 Christian Hewitt + +#include +#include + +// +// Keytable for the X96-max STB remote control +// + +static struct rc_map_table x96max[] = { + + { 0x140, KEY_POWER }, + + // ** TV CONTROL ** + // SET + // AV/TV + // POWER + // VOLUME UP + // VOLUME DOWN + + { 0x118, KEY_VOLUMEUP }, + { 0x110, KEY_VOLUMEDOWN }, + + { 0x143, KEY_MUTE }, // config + + { 0x100, KEY_EPG }, // mouse + { 0x119, KEY_BACK }, + + { 0x116, KEY_UP }, + { 0x151, KEY_LEFT }, + { 0x150, KEY_RIGHT }, + { 0x11a, KEY_DOWN }, + { 0x113, KEY_OK }, + + { 0x111, KEY_HOME }, + { 0x14c, KEY_CONTEXT_MENU }, + + { 0x159, KEY_PREVIOUS }, + { 0x15a, KEY_PLAYPAUSE }, + { 0x158, KEY_NEXT }, + + { 0x147, KEY_MENU }, // @ key + { 0x101, KEY_NUMERIC_0 }, + { 0x142, KEY_BACKSPACE }, + + { 0x14e, KEY_NUMERIC_1 }, + { 0x10d, KEY_NUMERIC_2 }, + { 0x10c, KEY_NUMERIC_3 }, + + { 0x14a, KEY_NUMERIC_4 }, + { 0x109, KEY_NUMERIC_5 }, + { 0x108, KEY_NUMERIC_6 }, + + { 0x146, KEY_NUMERIC_7 }, + { 0x105, KEY_NUMERIC_8 }, + { 0x104, KEY_NUMERIC_9 }, + +}; + +static struct rc_map_list x96max_map = { + .map = { + .scan = x96max, + .size = ARRAY_SIZE(x96max), + .rc_proto = RC_PROTO_NEC, + .name = RC_MAP_X96MAX, + } +}; + +static int __init init_rc_map_x96max(void) +{ + return rc_map_register(&x96max_map); +} + +static void __exit exit_rc_map_x96max(void) +{ + rc_map_unregister(&x96max_map); +} + +module_init(init_rc_map_x96max) +module_exit(exit_rc_map_x96max) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Christian Hewitt X-Patchwork-Id: 11095845 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EB95513A0 for ; Thu, 15 Aug 2019 15:00:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB1FD288F4 for ; Thu, 15 Aug 2019 15:00:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFBC128904; Thu, 15 Aug 2019 15:00:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FB86288F4 for ; Thu, 15 Aug 2019 15:00:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733225AbfHOPAP (ORCPT ); Thu, 15 Aug 2019 11:00:15 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:55831 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733212AbfHOPAN (ORCPT ); Thu, 15 Aug 2019 11:00:13 -0400 Received: by mail-wm1-f65.google.com with SMTP id f72so1526751wmf.5; Thu, 15 Aug 2019 08:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=r+jzvQvthTNKSSPEA/jk2wsfbVmv5OmhIWCFXHNfwOg=; b=Yg1IFtVuJjSG3SFA9a8c2IxE5itAd+yHgpPX75BjzB02ymAJShqbqeguQn8I5FuBs6 kegRFAWh3YSKrScpQ/X9bZ+9TH7Rqr4Q4HfTtH3/aH37Dy/vPv/7tvzOjJlZ+m1/N7/S dzl+UovjWE0kuBTZgityqz8/MtK2y4jfAH++TpOYaF3TUO3UffpniDFAh/VFvOV0ZuZ5 G825GcEsqi/2r+t2fqmDJhHizCI8iLBu+E+F6UULQ5APoj3Gb2pyVBlI0t0FTWTS6Hsu kze5hNl0D7adHf8Auj8B2bD/eocQdgqXPdWRz20RXONmmiUVMdeu8j3pbuBoUQTxXA8X RCKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=r+jzvQvthTNKSSPEA/jk2wsfbVmv5OmhIWCFXHNfwOg=; b=Si5fKFmltFlPwm5m2TKQqaEfHPo3lihQgjBLGUX01+0qFRUCdDg4sM0FUU4dYZKdqq EtDhmJMN86P65XK9RK6tyFh4yE2Rzc47/Emb7lzFkLPX+APU8y1qKXykhcHX6JzaR13u NSaEfYkJTst5zuRmIxf77B0a9n07mdRrNpHTUnDSp73K8rNSK/76PCC+bIew0abFjfmw MAHptK6wUXFKax7+hfzn7lf2eZaIpPOXHPgAKwyXXO8DvG+FVTqQ/9V0Gao3pIhasCKz z4XzXAlHzPlBJTEYFpCkCzIl4maZmYW/pWhtKG4erIr2QPZo573Y+VTW+FPwJEpNs+Ir SF1g== X-Gm-Message-State: APjAAAV526mivWlcm/7CjNcor9g8sXGKsiPIdZdLrGEvFifBJqnjMji1 5IVuT/fWslYMIZZo7Wcr7IQ= X-Google-Smtp-Source: APXvYqx+BwCsHw6G4GS9zXML3675MFAyPzQruVOtLjl23v6CWb81hpiV+mN2jcc++T//e+ayodLMaA== X-Received: by 2002:a1c:a852:: with SMTP id r79mr3072300wme.36.1565881211028; Thu, 15 Aug 2019 08:00:11 -0700 (PDT) Received: from localhost.localdomain ([94.204.252.234]) by smtp.gmail.com with ESMTPSA id e4sm5041054wrh.39.2019.08.15.08.00.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Aug 2019 08:00:10 -0700 (PDT) From: Christian Hewitt To: Mauro Carvalho Chehab , Benjamin Valentin , Sean Young , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Christian Hewitt Subject: [PATCH 2/7] media: rc: add keymap for Khadas VIM/EDGE remote Date: Thu, 15 Aug 2019 18:59:12 +0400 Message-Id: <1565881157-14644-3-git-send-email-christianshewitt@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> References: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Khadas VIM and Edge SBC devices use the same NEC remote device. The remote includes a mouse button for Android use. This has been mapped to KEY_MUTE. Signed-off-by: Christian Hewitt --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-khadas.c | 56 ++++++++++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 58 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-khadas.c diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index b88c4e7..39192b0 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -58,6 +58,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-it913x-v1.o \ rc-it913x-v2.o \ rc-kaiomy.o \ + rc-khadas.o \ rc-kworld-315u.o \ rc-kworld-pc150u.o \ rc-kworld-plus-tv-analog.o \ diff --git a/drivers/media/rc/keymaps/rc-khadas.c b/drivers/media/rc/keymaps/rc-khadas.c new file mode 100644 index 0000000..bb183ed --- /dev/null +++ b/drivers/media/rc/keymaps/rc-khadas.c @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright (C) 2019 Christian Hewitt + +/* + * Keytable for the Khadas VIM/EDGE SBC remote control + */ + +#include +#include + +static struct rc_map_table khadas[] = { + + { 0x14, KEY_POWER }, + + { 0x03, KEY_UP }, + { 0x02, KEY_DOWN }, + { 0x0e, KEY_LEFT }, + { 0x1a, KEY_RIGHT }, + { 0x07, KEY_OK }, + + { 0x01, KEY_BACK }, + { 0x5b, KEY_MUTE }, // mouse + { 0x13, KEY_MENU }, + + { 0x58, KEY_VOLUMEDOWN }, + { 0x0b, KEY_VOLUMEUP }, + + { 0x48, KEY_HOME }, + +}; + +static struct rc_map_list khadas_map = { + .map = { + .scan = khadas, + .size = ARRAY_SIZE(khadas), + .rc_proto = RC_PROTO_NEC, + .name = RC_MAP_KHADAS, + } +}; + +static int __init init_rc_map_khadas(void) +{ + return rc_map_register(&khadas_map); +} + +static void __exit exit_rc_map_khadas(void) +{ + rc_map_unregister(&khadas_map); +} + +module_init(init_rc_map_khadas) +module_exit(exit_rc_map_khadas) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Christian Hewitt "); diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 1f61cb07..37508b0 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -224,6 +224,7 @@ struct rc_map *rc_map_get(const char *name); #define RC_MAP_IT913X_V1 "rc-it913x-v1" #define RC_MAP_IT913X_V2 "rc-it913x-v2" #define RC_MAP_KAIOMY "rc-kaiomy" +#define RC_MAP_KHADAS "rc-khadas" #define RC_MAP_KWORLD_315U "rc-kworld-315u" #define RC_MAP_KWORLD_PC150U "rc-kworld-pc150u" #define RC_MAP_KWORLD_PLUS_TV_ANALOG "rc-kworld-plus-tv-analog" From patchwork Thu Aug 15 14:59:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 11095847 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E536713A0 for ; Thu, 15 Aug 2019 15:00:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4B8D288D7 for ; Thu, 15 Aug 2019 15:00:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9437288F1; Thu, 15 Aug 2019 15:00:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F1A228653 for ; Thu, 15 Aug 2019 15:00:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732190AbfHOPAt (ORCPT ); Thu, 15 Aug 2019 11:00:49 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:55835 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730788AbfHOPAP (ORCPT ); Thu, 15 Aug 2019 11:00:15 -0400 Received: by mail-wm1-f65.google.com with SMTP id f72so1526854wmf.5; Thu, 15 Aug 2019 08:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=175hmWTJX0mZg1homV3MfEoJFn7/G0Qp9jA5/mRZmFs=; b=lnGY4+drKoBUw9kXu4I/QoyWhyFUNQyWblYexphY1jQAhqWcJgqVn4Gbu7yDbNtcT/ G2k5WY8HIrhJke1yNhkd5E+zOuNk6zWjWGOob8HOLfYY51t7ZTduWgnrQLwXEeb+a9B5 7JlbAWDeQGRZEZblvA6DUV5Vzjs1jKaymdKBkQDmsP/vLrYQfjKUY8QzqE2UlDmssO5L voIPWSDrtIARFVH8eWMtbkLWWQf3UlJq0Xmo6VNVYW+blpr6oMC3BZW3BL8FlM1C9aFg 6tlnWZFuiW0mqBT04ihbpwisUxp4ygHCDiJdrhqJJY4nPtkaLjWMyThjtoCeWlz3OWK6 jhQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=175hmWTJX0mZg1homV3MfEoJFn7/G0Qp9jA5/mRZmFs=; b=T6/b0+tLzeauWa9vZ4Vt5PeVqKdJs1bnj4X0TrQgh1NAwYRyh176ZZZHvTEmp495VO eFQvUc1YX9rmdPxiyPGhuQre+xObsmnHUGS8cPje+tXrTWj/nYQOfhE3rMAKCLb2kIks PHWLV9cxyKYxuiScJXwah8eOpePYWKerukLXLH6c6mqS75bFFID+TrI4d240YsRAnz15 KAG2v98hx+Wav0e3tJ91QDMXpw0uCHQfQsw5s0EUXnXdcJX0YdPDW4oPklvLM9tWZjM+ FR3mdgi8l35l1UNbcqE3DP4Mc7Jdw3HIOg+JYWru4OdNa0T0ZjRzjY+ypopsKplXB1Cx ysSQ== X-Gm-Message-State: APjAAAWZ/PO9Q3dm7lI3Cp4hzYxDnrvifYz+dHUp3keZc+k71jS6QxnP l8djG+Rk9S3SVuCUqftY2w4= X-Google-Smtp-Source: APXvYqxtD4h22YDO0EJkRcYmHTbUrk17SD1r8OUdyf4itj+hZIvbRQalGx03WQBSGFFBrH9LVWhyDQ== X-Received: by 2002:a7b:c76d:: with SMTP id x13mr3064501wmk.110.1565881213007; Thu, 15 Aug 2019 08:00:13 -0700 (PDT) Received: from localhost.localdomain ([94.204.252.234]) by smtp.gmail.com with ESMTPSA id e4sm5041054wrh.39.2019.08.15.08.00.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Aug 2019 08:00:12 -0700 (PDT) From: Christian Hewitt To: Mauro Carvalho Chehab , Benjamin Valentin , Sean Young , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Christian Hewitt Subject: [PATCH 3/7] media: rc: add keymap for Tanix TX3 mini remote Date: Thu, 15 Aug 2019 18:59:13 +0400 Message-Id: <1565881157-14644-4-git-send-email-christianshewitt@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> References: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Tanix TX3 mini Android STB ships with a simple NEC remote. Signed-off-by: Christian Hewitt --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-tanix-tx3mini.c | 79 +++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 81 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-tanix-tx3mini.c diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index 39192b0..31720d8 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -95,6 +95,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-snapstream-firefly.o \ rc-streamzap.o \ rc-tango.o \ + rc-tanix-tx3mini.o \ rc-tbs-nec.o \ rc-technisat-ts35.o \ rc-technisat-usb2.o \ diff --git a/drivers/media/rc/keymaps/rc-tanix-tx3mini.c b/drivers/media/rc/keymaps/rc-tanix-tx3mini.c new file mode 100644 index 0000000..e501398 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-tanix-tx3mini.c @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: GPL-2.0+ +// Copyright (c) 2018 Christian Hewitt + +#include +#include + +/* + * Keymap for the Tanix TX3 mini STB remote control + */ + +static struct rc_map_table tanix_tx3mini[] = { + + { 0x8051, KEY_POWER }, + { 0x804d, KEY_MUTE }, + + { 0x8009, KEY_RED }, + { 0x8011, KEY_GREEN }, + { 0x8054, KEY_YELLOW }, + { 0x804f, KEY_BLUE }, + + { 0x8056, KEY_VOLUMEDOWN }, + { 0x80bd, KEY_PREVIOUS }, + { 0x80bb, KEY_NEXT }, + { 0x804e, KEY_VOLUMEUP }, + + { 0x8053, KEY_HOME }, + { 0x801b, KEY_BACK }, + + { 0x8026, KEY_UP }, + { 0x8028, KEY_DOWN }, + { 0x8025, KEY_LEFT }, + { 0x8027, KEY_RIGHT }, + { 0x800d, KEY_OK }, + + { 0x8049, KEY_MENU }, + { 0x8052, KEY_EPG }, // mouse + + { 0x8031, KEY_1 }, + { 0x8032, KEY_2 }, + { 0x8033, KEY_3 }, + + { 0x8034, KEY_4 }, + { 0x8035, KEY_5 }, + { 0x8036, KEY_6 }, + + { 0x8037, KEY_7 }, + { 0x8038, KEY_8 }, + { 0x8039, KEY_9 }, + + { 0x8058, KEY_SUBTITLE }, // 1/a + { 0x8030, KEY_0 }, + { 0x8044, KEY_DELETE }, +}; + +static struct rc_map_list tanix_tx3mini_map = { + .map = { + .scan = tanix_tx3mini, + .size = ARRAY_SIZE(tanix_tx3mini), + .rc_proto = RC_PROTO_NEC, + .name = RC_MAP_TANIX_TX3MINI, + } +}; + +static int __init init_rc_map_tanix_tx3mini(void) +{ + return rc_map_register(&tanix_tx3mini_map); +} + +static void __exit exit_rc_map_tanix_tx3mini(void) +{ + rc_map_unregister(&tanix_tx3mini_map); +} + +module_init(init_rc_map_tanix_tx3mini) +module_exit(exit_rc_map_tanix_tx3mini) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Christian Hewitt "); diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 37508b0..44e6458 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -262,6 +262,7 @@ struct rc_map *rc_map_get(const char *name); #define RC_MAP_SNAPSTREAM_FIREFLY "rc-snapstream-firefly" #define RC_MAP_STREAMZAP "rc-streamzap" #define RC_MAP_TANGO "rc-tango" +#define RC_MAP_TANIX_TX3MINI "rc-tanix-tx3mini" #define RC_MAP_TBS_NEC "rc-tbs-nec" #define RC_MAP_TECHNISAT_TS35 "rc-technisat-ts35" #define RC_MAP_TECHNISAT_USB2 "rc-technisat-usb2" From patchwork Thu Aug 15 14:59:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 11095843 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5154B912 for ; Thu, 15 Aug 2019 15:00:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37F01288F4 for ; Thu, 15 Aug 2019 15:00:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CA88288FD; Thu, 15 Aug 2019 15:00:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD9D3288F4 for ; Thu, 15 Aug 2019 15:00:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733237AbfHOPAR (ORCPT ); Thu, 15 Aug 2019 11:00:17 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42416 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733232AbfHOPAR (ORCPT ); Thu, 15 Aug 2019 11:00:17 -0400 Received: by mail-wr1-f66.google.com with SMTP id b16so2473231wrq.9; Thu, 15 Aug 2019 08:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yI1cybUo22+/tK9S4wCt4IsFL7qtdvsQOm2HojWPgQU=; b=jq/5Xz8v3S4/9neN4n7bvcEIVLiGOT6oIYNlLRXJ9em5IzPFy50qzxu4yQ0l6TNTGc +9vHYfHoHKCQPtQ2K/UbbxKdgY07u/nzB0DJf/JGaglY2cZ4IWqqrZ7KO3MXKdZsqigO r5o2HdHnZCnRqGYDY+4668vfbZJY/UNUwelJqtYnSw0R8BD2UaS2IzmYeCXcjweWI/x/ rwrd1iFtTeRpGgXTYvJNG+m/NPmxegl/sEkRhq2oW8H04yJYJGsbO8h4BynyH3qiF0b9 v1OoRZjaIOTkYu4mgHZCaXUG5LTTfRxn7bVIdw7Soy8awmB7Ck6v1xxVJmZGpZVyT2NV PdDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yI1cybUo22+/tK9S4wCt4IsFL7qtdvsQOm2HojWPgQU=; b=MaWLWeVtj/leUsfvD9WtNz36/UsdtVfCOA9pV3z4cLKi2WUcvD1at9aQpGpVrVnx9o 9BtbsWsiPDhg8cArnaDmeG1KU9inI/glTdJhnyba6m1ObELr8/UKas+naIpWYCv/sPVH 9UCDB+ZfFGRdFFK7n5UcODI0EbO3LiLPafjd8gkEv7XwtSfZL9A/iUrK8eecybXWc5Y3 fW6XSA3nfkl40WHca9OXCZyK4zpOguLLpKWzZ7Nk6Bsv6qz/tIR6s+7NiwbG7vgoKyWO 3RNPWRTphYxX7CE82MAVjwqdO3LSn6aj6/x7OQlwUhz3IFn2aReaN4w6QBstN7Olrq4s QNTw== X-Gm-Message-State: APjAAAUvBtfspv4Aaj++iBQrpBuPG7FHc3r6bYkvRx7/B3I2ynpnWf4R iwHd1CogHoU7cIMFjigSX2Y= X-Google-Smtp-Source: APXvYqzhHT4bBc5MMj+md/aop3aAaAttN9AZE/1VDK2Fikiny0hOy1hdg/TG2OxzcdgF6gcLnktk3A== X-Received: by 2002:adf:f481:: with SMTP id l1mr6061906wro.123.1565881215075; Thu, 15 Aug 2019 08:00:15 -0700 (PDT) Received: from localhost.localdomain ([94.204.252.234]) by smtp.gmail.com with ESMTPSA id e4sm5041054wrh.39.2019.08.15.08.00.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Aug 2019 08:00:14 -0700 (PDT) From: Christian Hewitt To: Mauro Carvalho Chehab , Benjamin Valentin , Sean Young , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Christian Hewitt Subject: [PATCH 4/7] media: rc: add keymap for Tanix TX5 max remote Date: Thu, 15 Aug 2019 18:59:14 +0400 Message-Id: <1565881157-14644-5-git-send-email-christianshewitt@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> References: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Tanix TX5 max Android STB ships with a simple NEC remote. Signed-off-by: Christian Hewitt --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-tanix-tx5max.c | 71 ++++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 73 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-tanix-tx5max.c diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index 31720d8..85423cc 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -96,6 +96,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-streamzap.o \ rc-tango.o \ rc-tanix-tx3mini.o \ + rc-tanix-tx5max.o \ rc-tbs-nec.o \ rc-technisat-ts35.o \ rc-technisat-usb2.o \ diff --git a/drivers/media/rc/keymaps/rc-tanix-tx5max.c b/drivers/media/rc/keymaps/rc-tanix-tx5max.c new file mode 100644 index 0000000..43f467f --- /dev/null +++ b/drivers/media/rc/keymaps/rc-tanix-tx5max.c @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: GPL-2.0+ +// Copyright (c) 2018 Christian Hewitt + +#include +#include + +/* + * Keymap for the Tanix TX5 max STB remote control + */ + +static struct rc_map_table tanix_tx5max[] = { + + { 0x40404d, KEY_POWER }, + { 0x404043, KEY_MUTE }, + + { 0x404017, KEY_VOLUMEDOWN }, + { 0x404018, KEY_VOLUMEUP }, + + { 0x40400b, KEY_UP }, + { 0x404010, KEY_LEFT }, + { 0x404011, KEY_RIGHT }, + { 0x40400e, KEY_DOWN }, + { 0x40400d, KEY_OK }, + + { 0x40401a, KEY_HOME }, + { 0x404045, KEY_MENU }, + { 0x404042, KEY_BACK }, + + { 0x404001, KEY_1 }, + { 0x404002, KEY_2 }, + { 0x404003, KEY_3 }, + + { 0x404004, KEY_4 }, + { 0x404005, KEY_5 }, + { 0x404006, KEY_6 }, + + { 0x404007, KEY_7 }, + { 0x404008, KEY_8 }, + { 0x404009, KEY_9 }, + + { 0x404047, KEY_SUBTITLE }, // mouse + { 0x404000, KEY_0 }, + { 0x40400c, KEY_DELETE }, + +}; + +static struct rc_map_list tanix_tx5max_map = { + .map = { + .scan = tanix_tx5max, + .size = ARRAY_SIZE(tanix_tx5max), + .rc_proto = RC_PROTO_NEC, + .name = RC_MAP_TANIX_TX5MAX, + } +}; + +static int __init init_rc_map_tanix_tx5max(void) +{ + return rc_map_register(&tanix_tx5max_map); +} + +static void __exit exit_rc_map_tanix_tx5max(void) +{ + rc_map_unregister(&tanix_tx5max_map); +} + +module_init(init_rc_map_tanix_tx5max) +module_exit(exit_rc_map_tanix_tx5max) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Christian Hewitt "); diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 44e6458..a7ed5aa 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -263,6 +263,7 @@ struct rc_map *rc_map_get(const char *name); #define RC_MAP_STREAMZAP "rc-streamzap" #define RC_MAP_TANGO "rc-tango" #define RC_MAP_TANIX_TX3MINI "rc-tanix-tx3mini" +#define RC_MAP_TANIX_TX5MAX "rc-tanix-tx5max" #define RC_MAP_TBS_NEC "rc-tbs-nec" #define RC_MAP_TECHNISAT_TS35 "rc-technisat-ts35" #define RC_MAP_TECHNISAT_USB2 "rc-technisat-usb2" From patchwork Thu Aug 15 14:59:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 11095833 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A9DB913A0 for ; Thu, 15 Aug 2019 15:00:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9972628911 for ; Thu, 15 Aug 2019 15:00:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8BE762890C; Thu, 15 Aug 2019 15:00:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26F0D28911 for ; Thu, 15 Aug 2019 15:00:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733250AbfHOPAT (ORCPT ); Thu, 15 Aug 2019 11:00:19 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:40588 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733212AbfHOPAT (ORCPT ); Thu, 15 Aug 2019 11:00:19 -0400 Received: by mail-wr1-f66.google.com with SMTP id c3so2480644wrd.7; Thu, 15 Aug 2019 08:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ClnZ/ifqhx3xp+ECOjK85PdZjR7vJXHB5OxiKa77zTo=; b=eghHCqIBiyryJx5chz0UoBCDd8FFw6vLdIvKAJE0vhxUNx7vdUXVqTAe0NeN3nBiR1 pkDc8hLMmUd17zW8wpPItL1rPiXnaZwK0DfIA9pHX/Tb/49f5BWSu1E/K4B45jFS4aNt bRvHHmzSZNhKgHx32zkSGr1E56t+dXC/WL5yJMDSMV9JYfUKzF2taJGz77AsHFrZfiJi v00OInftZeBFxdq7/NO4guccBj19gsitRaD6KOustQGAAKzUcxdPPG+UCsnM82wOQ7xY j0IAUTNpKhNpakH6wjtbR5fYw6/xHNbS3OF3g+0fQPyX4NvyEI0lPBdOHQ9x4EUxIKEB f5gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ClnZ/ifqhx3xp+ECOjK85PdZjR7vJXHB5OxiKa77zTo=; b=rVx4JZbpFGdpuZ/nP7g7fCk29XrdkPOF/KfseHuukzJLuO/fLg9d5t16QCmGAqT8Ku vuo6NzUZbaIU/wOOll3JgAJBQUVIQ+t4jzfItUoINJUNWoaFg8E8HFoJ3Rx/zRkmYUR/ 2abVrmwItEwLIZCHsqnCrGY1hLvJCSE4TUbgZjch6SqvrnK48d3I1Av8xeL3TIm0URxw NSA7zffXaMvYbw8NZ32WZrQVdzEK8abkp2E2W2SfyMWJ7QoOnAveGBdFcKScDHLkrq0w MAIgia8PUNg1kVyujmN7RJ8fOZmM6la6cwivja18dfM9t8FAG6GCFvuRmiKFYt2wtghp Uxbg== X-Gm-Message-State: APjAAAUepMxtS9M4AXvrejBHc2QnhcjVZEYnc0RhHPFAdXnpMh3D4CUP zFZAIroNthhKWorJmF+Nz0U= X-Google-Smtp-Source: APXvYqxfU2ylyuJ7Y1A3krXl7GBk8HZ2/6oP0qli4lbicIZFPhImxCvuS/CLFHKsYC7fa681QVg7fA== X-Received: by 2002:a5d:4403:: with SMTP id z3mr6098513wrq.29.1565881217136; Thu, 15 Aug 2019 08:00:17 -0700 (PDT) Received: from localhost.localdomain ([94.204.252.234]) by smtp.gmail.com with ESMTPSA id e4sm5041054wrh.39.2019.08.15.08.00.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Aug 2019 08:00:16 -0700 (PDT) From: Christian Hewitt To: Mauro Carvalho Chehab , Benjamin Valentin , Sean Young , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Christian Hewitt Subject: [PATCH 5/7] media: rc: add keymap for WeTek Hub remote Date: Thu, 15 Aug 2019 18:59:15 +0400 Message-Id: <1565881157-14644-6-git-send-email-christianshewitt@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> References: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The WeTek Hub Android STB ships with a simple NEC remote. Signed-off-by: Christian Hewitt --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-wetek-hub.c | 55 +++++++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 57 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-wetek-hub.c diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index 85423cc..6d744ac 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -116,6 +116,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-videomate-m1f.o \ rc-videomate-s350.o \ rc-videomate-tv-pvr.o \ + rc-wetek-hub.o \ rc-winfast.o \ rc-winfast-usbii-deluxe.o \ rc-su3000.o \ diff --git a/drivers/media/rc/keymaps/rc-wetek-hub.c b/drivers/media/rc/keymaps/rc-wetek-hub.c new file mode 100644 index 0000000..8d114ae --- /dev/null +++ b/drivers/media/rc/keymaps/rc-wetek-hub.c @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: GPL-2.0+ +// Copyright (c) 2018 Christian Hewitt + +#include +#include + +/* + * This keymap is used with the WeTek Hub STB. + */ + +static struct rc_map_table wetek_hub[] = { + + { 0x77f1, KEY_POWER }, + + { 0x77f2, KEY_HOME }, + { 0x77f3, KEY_MUTE }, // mouse + + { 0x77f4, KEY_UP }, + { 0x77f5, KEY_DOWN }, + { 0x77f6, KEY_LEFT }, + { 0x77f7, KEY_RIGHT }, + { 0x77f8, KEY_OK }, + + { 0x77f9, KEY_BACK }, + { 0x77fa, KEY_MENU }, + + { 0x77fb, KEY_VOLUMEUP }, + { 0x77fc, KEY_VOLUMEDOWN }, + +}; + +static struct rc_map_list wetek_hub_map = { + .map = { + .scan = wetek_hub, + .size = ARRAY_SIZE(wetek_hub), + .rc_proto = RC_PROTO_NEC, + .name = RC_MAP_WETEK_HUB, + } +}; + +static int __init init_rc_map_wetek_hub(void) +{ + return rc_map_register(&wetek_hub_map); +} + +static void __exit exit_rc_map_wetek_hub(void) +{ + rc_map_unregister(&wetek_hub_map); +} + +module_init(init_rc_map_wetek_hub) +module_exit(exit_rc_map_wetek_hub) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Christian Hewitt "); diff --git a/include/media/rc-map.h b/include/media/rc-map.h index a7ed5aa..e7fee29 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -283,6 +283,7 @@ struct rc_map *rc_map_get(const char *name); #define RC_MAP_VIDEOMATE_K100 "rc-videomate-k100" #define RC_MAP_VIDEOMATE_S350 "rc-videomate-s350" #define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr" +#define RC_MAP_WETEK_HUB "rc-wetek-hub" #define RC_MAP_WINFAST "rc-winfast" #define RC_MAP_WINFAST_USBII_DELUXE "rc-winfast-usbii-deluxe" #define RC_MAP_SU3000 "rc-su3000" From patchwork Thu Aug 15 14:59:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 11095829 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B9D71823 for ; Thu, 15 Aug 2019 15:00:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08BB128911 for ; Thu, 15 Aug 2019 15:00:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F18CB288FC; Thu, 15 Aug 2019 15:00:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5FB492891F for ; Thu, 15 Aug 2019 15:00:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733263AbfHOPAW (ORCPT ); Thu, 15 Aug 2019 11:00:22 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:35417 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733253AbfHOPAV (ORCPT ); Thu, 15 Aug 2019 11:00:21 -0400 Received: by mail-wr1-f65.google.com with SMTP id k2so2499811wrq.2; Thu, 15 Aug 2019 08:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UHkUgTVsY8cz+zOWGK7293CzmWQflIsAm9CwwafsuFM=; b=Opvs2mJyoL5Woi8Q1kUrH5crbP9W28g2uJZsnyGtcDaGtIozv96Neq39NbzV7P5mnE IZ0uLqBpK/IR/IXh27C3AJh3bPn2BUuMCCSxl+Zuxf+vnmDpLaQT4nM+sYWLJ1pN0xog ZbpEBAnDcZ4tXlwWBuQpfXDka/FpnuaIBQ3cY6G9yTU0plIhGNPo6F2F35VNxk0LO15r C8w5sNQ9IDw2kbZJmsEbsZokMSWeBCct81YyDv63A1llegxnvBTkakj8bMRoIPIJROG0 4IUXnVaecfIFXTgARDoj1qM8MwmrFBPX8xZapf5IuHKDsbSHpSGu/c0Gx6L35RSaEIed bLpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UHkUgTVsY8cz+zOWGK7293CzmWQflIsAm9CwwafsuFM=; b=lhChZ2oOi2sj5S7wyb2+Rx2FLuFz/XdFpQF8wGcZXm4eIUB+6lnbl9xsW6NcYOtgwx qM0dpPsbYeVKvrjnBOgQayiwkJKC/5x+9NPgbB/S42/AD+qfJ8pHKliXPrloKIEkis0m IilR+rGpvk3MJFUWP5dfM+VgbeYg/x8QWTse9MlR9fi2aaf5N4XUrNmSiiM218dwagI2 a+FxgpR8MYsBHifLLCW/xQGjUeUcfjg7lf10TRDa66S+422+/rxSViFQsWN1GNjDVn3c cWiiFWzuMZF8xOe5i/Fs1yYGPhNpL7lBm1rt10KjLI6JyHVn/PbFFbZ2LR/dmorPQpv9 cEHw== X-Gm-Message-State: APjAAAVKd9df+HmYevmIeEyd3QmTegLJSy599GmZxKXHM5qCMU5uEfxW DJFgoltSpmOnGYUmUlmmT8lpvvjBTdx3bg== X-Google-Smtp-Source: APXvYqzN6gSfm3zXWjnvZMJyrBJmo05tVe5qv2MsT+XK+eHaRNltiURJAJYDGKlckRSyO88q5M4TLw== X-Received: by 2002:adf:f641:: with SMTP id x1mr6105400wrp.179.1565881219095; Thu, 15 Aug 2019 08:00:19 -0700 (PDT) Received: from localhost.localdomain ([94.204.252.234]) by smtp.gmail.com with ESMTPSA id e4sm5041054wrh.39.2019.08.15.08.00.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Aug 2019 08:00:18 -0700 (PDT) From: Christian Hewitt To: Mauro Carvalho Chehab , Benjamin Valentin , Sean Young , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Christian Hewitt Subject: [PATCH 6/7] media: rc: add keymap for WeTeK Play 2 remote Date: Thu, 15 Aug 2019 18:59:16 +0400 Message-Id: <1565881157-14644-7-git-send-email-christianshewitt@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> References: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The WeTek Play 2 Android STB ships with an unusual remote where the main up/down/left/right/enter controls are surrounded with an outer ring of additional keys which are listed in clockwise order. Signed-off-by: Christian Hewitt --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-wetek-play2.c | 95 +++++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 97 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-wetek-play2.c diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index 6d744ac..d316a99 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -117,6 +117,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-videomate-s350.o \ rc-videomate-tv-pvr.o \ rc-wetek-hub.o \ + rc-wetek-play2.o \ rc-winfast.o \ rc-winfast-usbii-deluxe.o \ rc-su3000.o \ diff --git a/drivers/media/rc/keymaps/rc-wetek-play2.c b/drivers/media/rc/keymaps/rc-wetek-play2.c new file mode 100644 index 0000000..77504f2 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-wetek-play2.c @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright (C) 2019 Christian Hewitt + +#include +#include + +// +// Keytable for the WeTek Play 2 STB remote control +// + +static struct rc_map_table wetek_play2[] = { + + { 0x5e5f02, KEY_POWER }, + { 0x5e5f46, KEY_SLEEP }, // tv + { 0x5e5f10, KEY_MUTE }, + + { 0x5e5f22, KEY_1 }, + { 0x5e5f23, KEY_2 }, + { 0x5e5f24, KEY_3 }, + + { 0x5e5f25, KEY_4 }, + { 0x5e5f26, KEY_5 }, + { 0x5e5f27, KEY_6 }, + + { 0x5e5f28, KEY_7 }, + { 0x5e5f29, KEY_8 }, + { 0x5e5f30, KEY_9 }, + + { 0x5e5f71, KEY_BACK }, + { 0x5e5f21, KEY_0 }, + { 0x5e5f72, KEY_CAPSLOCK }, + + // outer ring clockwide from top + { 0x5e5f03, KEY_HOME }, + { 0x5e5f61, KEY_BACK }, + { 0x5e5f77, KEY_CONFIG }, // mouse + { 0x5e5f83, KEY_EPG }, + { 0x5e5f84, KEY_SCREEN }, // square + { 0x5e5f48, KEY_MENU }, + + // inner ring + { 0x5e5f50, KEY_UP }, + { 0x5e5f4b, KEY_DOWN }, + { 0x5e5f4c, KEY_LEFT }, + { 0x5e5f4d, KEY_RIGHT }, + { 0x5e5f47, KEY_OK }, + + { 0x5e5f44, KEY_VOLUMEUP }, + { 0x5e5f43, KEY_VOLUMEDOWN }, + { 0x5e5f4f, KEY_FAVORITES }, + { 0x5e5f82, KEY_SUBTITLE }, // txt + { 0x5e5f41, KEY_PAGEUP }, + { 0x5e5f42, KEY_PAGEDOWN }, + + { 0x5e5f73, KEY_RED }, + { 0x5e5f74, KEY_GREEN }, + { 0x5e5f75, KEY_YELLOW }, + { 0x5e5f76, KEY_BLUE }, + + { 0x5e5f67, KEY_PREVIOUSSONG }, + { 0x5e5f79, KEY_REWIND }, + { 0x5e5f80, KEY_FASTFORWARD }, + { 0x5e5f81, KEY_NEXTSONG }, + + { 0x5e5f04, KEY_RECORD }, + { 0x5e5f2c, KEY_PLAYPAUSE }, + { 0x5e5f2b, KEY_STOP }, + +}; + +static struct rc_map_list wetek_play2_map = { + .map = { + .scan = wetek_play2, + .size = ARRAY_SIZE(wetek_play2), + .rc_proto = RC_PROTO_NEC, + .name = RC_MAP_WETEK_PLAY2, + } +}; + +static int __init init_rc_map_wetek_play2(void) +{ + return rc_map_register(&wetek_play2_map); +} + +static void __exit exit_rc_map_wetek_play2(void) +{ + rc_map_unregister(&wetek_play2_map); +} + +module_init(init_rc_map_wetek_play2) +module_exit(exit_rc_map_wetek_play2) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Christian Hewitt X-Patchwork-Id: 11095831 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3300813A0 for ; Thu, 15 Aug 2019 15:00:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24C1D288FC for ; Thu, 15 Aug 2019 15:00:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18AFA28901; Thu, 15 Aug 2019 15:00:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A7B8288FD for ; Thu, 15 Aug 2019 15:00:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733267AbfHOPAX (ORCPT ); Thu, 15 Aug 2019 11:00:23 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:35754 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733212AbfHOPAW (ORCPT ); Thu, 15 Aug 2019 11:00:22 -0400 Received: by mail-wm1-f65.google.com with SMTP id l2so1516773wmg.0; Thu, 15 Aug 2019 08:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yhYg9hn/63+6B9t0MZk6qflb+4wVUlf/t544dzGkgaA=; b=PtfoiYD59tzuZbU3w4AxfNa6ImyVyhMXzzVBxk0FEpIV0WlK4/3Fy8GEcsZBVNVX57 XlCsbZriIBoDiBmWt2y/m7M0QF8A6joO1mYsxx2uRsViRo8nmdi1uhrCBE2PP0yRGxqz vR7Q8dJsbzneqNv89cCy9d/6vbmgTQO2dg0gZGmcAFp3zZVgXZn8kcHiLwB2FNifO2w7 xARrKHMHY1HrDYq704EpD9JjZ+KnM00Kz+xt02Zd4UYZvMhCu/EbojHyLDmQyIJdmhhX GsK0fbn/tFC4Kej54gDxUECyYXohdYttMMtMBi3uwazxk4/XALZPH98bu2Z4vf800vqn 7LaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yhYg9hn/63+6B9t0MZk6qflb+4wVUlf/t544dzGkgaA=; b=NIXJ/xWHrlV1qICCQ19R/JImQ/kokmtHoZF9Xy+BEIjYjoePDigUA4lACRN8WiRBs4 3aYplrr0Rx/C+VioV/9/HNfdHSAIbKMETcKdkhVnWwnns47GoA3KKB2PJWcqSrU+e18E 0m2sg2qDlnBfxV5aXOkEeSy9GITOGbJfVufZ6tyipXX+7xZbmw9UVX6eDnpiFy+dwIBN jjPdS8giusqMi/gOoSjDruictlKiiz/ngItDj3CTGS6z0808LCS07oZ3J3FAkeN0yLlF UqisUU7BL+IXhoBHnDqbdVrif4mBCpkk1LbOZ7+UpLeG4NbxCuJKVtwmsJQsMVc0rV6s V3FA== X-Gm-Message-State: APjAAAU/bD99R4S6Nf3cVAyZmd02g971iHLOS4mdhFRwPrAeWa1vpjzL Ey/cQ93l+5fj4kAxWrzZgzKg04X8FEcBOQ== X-Google-Smtp-Source: APXvYqyLJ6yceWHs66JcZt6cbgoW6wH/5jnTiFO3GO0ClapT0Cwq473NgraXZg42/+aOcbCdajNqaw== X-Received: by 2002:a7b:c954:: with SMTP id i20mr3254460wml.169.1565881221114; Thu, 15 Aug 2019 08:00:21 -0700 (PDT) Received: from localhost.localdomain ([94.204.252.234]) by smtp.gmail.com with ESMTPSA id e4sm5041054wrh.39.2019.08.15.08.00.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Aug 2019 08:00:20 -0700 (PDT) From: Christian Hewitt To: Mauro Carvalho Chehab , Benjamin Valentin , Sean Young , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Christian Hewitt Subject: [PATCH 7/7] media: rc: add keymap for HardKernel ODROID remote Date: Thu, 15 Aug 2019 18:59:17 +0400 Message-Id: <1565881157-14644-8-git-send-email-christianshewitt@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> References: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is a simple NEC remote control device shipped with the HardKernel ODROID range of SBC devices. Signed-off-by: Christian Hewitt --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-odroid.c | 51 ++++++++++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 53 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-odroid.c diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index d316a99..a56fc63 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -76,6 +76,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-nec-terratec-cinergy-xs.o \ rc-norwood.o \ rc-npgtech.o \ + rc-odroid.o \ rc-pctv-sedna.o \ rc-pinnacle-color.o \ rc-pinnacle-grey.o \ diff --git a/drivers/media/rc/keymaps/rc-odroid.c b/drivers/media/rc/keymaps/rc-odroid.c new file mode 100644 index 0000000..e95aab6 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-odroid.c @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright (C) 2019 Christian Hewitt + +#include +#include + +// +// Keytable for the HardKernel ODROID remote control +// + +static struct rc_map_table odroid[] = { + + { 0xb2dc, KEY_POWER }, + + { 0xb288, KEY_MUTE }, + { 0xb282, KEY_HOME }, + + { 0xb2ca, KEY_UP }, + { 0xb299, KEY_LEFT }, + { 0xb2ce, KEY_OK }, + { 0xb2c1, KEY_RIGHT }, + { 0xb2d2, KEY_DOWN }, + + { 0xb2c5, KEY_MENU }, + { 0xb29a, KEY_BACK }, + + { 0xb281, KEY_VOLUMEDOWN }, + { 0xb280, KEY_VOLUMEUP }, +}; + +static struct rc_map_list odroid_map = { + .map = { + .scan = odroid, + .size = ARRAY_SIZE(odroid), + .rc_proto = RC_PROTO_NEC, + .name = RC_MAP_ODROID, + } +}; + +static int __init init_rc_map_odroid(void) +{ + return rc_map_register(&odroid_map); +} + +static void __exit exit_rc_map_odroid(void) +{ + rc_map_unregister(&odroid_map); +} + +module_init(init_rc_map_odroid) +module_exit(exit_rc_map_odroid) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Christian Hewitt