From patchwork Sun Jun 23 10:46:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nils Rothaug X-Patchwork-Id: 13708555 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6178779CC; Sun, 23 Jun 2024 10:47:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719139633; cv=none; b=PZUO3DFVwTkVf6nCF+NCos/MksQX2K+bDfCtyQyPPy9C6WgS0re0x/xfiFRuFohq6HXKfYEaXZqXzrf6pdsaIxmdkik2E5vx0VfRf/L1YT5hbxJPAcP5xb2xfM/sjMHPqroLdKed89NYNPuEFr/iUddbLgd3QrJ8IUX1/RnwshA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719139633; c=relaxed/simple; bh=I8SOFeUye/6FEwdpaA0q9VBk85kBDF2IvQvq3XgG0b8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eiGQu5EHnpfKkbCTTZD+tu0SVe2elu/FtFL6gFTpagSLUayRVzaXpLPmhGg8gw6BQz88CEwGvlxfdLjVKdYlqoCLaMibu5LMJkt7Ao+faY0sWmNAduLSgCB6umxrb6pot4TWGqUCVLHE7Y7bXe72lCH3e3+4itJDx3dTbKSZDhQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=nils.rothaug@gmx.de header.b=X6Ab9zNn; arc=none smtp.client-ip=212.227.15.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=nils.rothaug@gmx.de header.b="X6Ab9zNn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1719139624; x=1719744424; i=nils.rothaug@gmx.de; bh=6sQjqM3punhnh9bJgwAVcpfrnZJ+xPumDwa1LIvJ7Vw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=X6Ab9zNno3oUefpvyLNYZRTbXaJa6vVX1zY5kRCkl+1cvB5xndLXXylX5nXNFWF7 8vp3eZr3miYVBnX1t41+1kElyfHXZBs+XpyTCof/rqn0lcTRBtIiRWNIHCqDyd9YT GxfOARaLuIKsqV3lJa/7PfiYNpHmUVjk5plTQV6WvQReRDtPOt79Aw/KtmgmioBJQ ltza+KFhVwcLJgZgKbl4IkEDmtguBEOONchlMPU3Ic7BteDAZwitCUnnNwzYLG52K 33eT9Df+ndIwAT5cOF9v9P1RjlJKPg+VGkTUvcJYFlInbN0pADUUnKHBZRqS4nKEP YiMvMfWMXOzdBMvKrA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from nilsr-VirtualBox ([83.78.44.59]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1M3UZ6-1sKmmg1ahG-00FR0r; Sun, 23 Jun 2024 12:47:04 +0200 From: Nils Rothaug To: hverkuil@xs4all.nl Cc: sean@mess.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, mchehab@kernel.org, nils.rothaug@gmx.de Subject: [PATCH v2 1/5] media: tuner-simple: Add support for Tena TNF931D-DFDR1 Date: Sun, 23 Jun 2024 12:46:43 +0200 Message-Id: <20240623104647.7697-2-nils.rothaug@gmx.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623104647.7697-1-nils.rothaug@gmx.de> References: <20240623104647.7697-1-nils.rothaug@gmx.de> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:xhnBAwT3X4BITHf1eNIrdUfJzk0qZxJSIjfDaQ1x5VQcpanclEB /XyzHg2YYOrSrz+Uf3zzfTXY50h0tusnPOLnt+chJjqmF/RKJpCM0sYDZ+73hM3KSdAsUBF D2xoq5XEZI1jdq0ughKCB1b7hlMoNvVDsD3gY0/iwW/DUWaEfMgR/WTBxz6iRLWEOVxobH1 nuBBzNFHRnuqm+VC5LjdA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:8glhFzjSx5E=;WPOOGGnhXzoEKBkIQEag5fmdxjx txPHFiBiDJSf/nPMXrhvfojuj0ZgmuaUBu8GnS0BtJrrS/2ZQ2PBWclO7pm9A1HB5A5Y0RC4k seLhNc5zN19SmD82fVN/bYHpRrWn3xQjQxfj43Sqjq9xBlvry111K7i87KV6c+4aqEURCpL5O ROAOW/gWdFlxMoER8kyEQLEfk04TFD1m+sgVNclTerauWm7SPJzTcFHVDrUKuPRD9E84yxnov 194USMG4KIn48gBwsmGXcPzdaOTcI8tJKRYgcIVz8aGRcmqWLJMPQnWIvDYU7Gu5nOfvlcnuu 4rw8ifc0nMQ+/XwLSD3lVbTYussT0Ov525rGJ3+IKE+YikW0KL2+Ll+jA5fFTIznspuKbnskt gO/ezNJtpa4a+rVghH907d0BFo4TqTNeQWZF3Kx2FvZuvqAdQyF8VF5JB+p9E23q8XrDpWvoQ U7Z7F+8okvX9+mIKRmhfKKmUPVJsm3F3/UIZiJkZup5XwXGpl4/4tfn7c0di6/RuQarBPG4Kl y736LUKdTIutTo/aN6V6lua7zbU8lyH/55tj2p3eijmwFabJdHiQm60diRzIQOW+eFECaDJAF PI2Dyzlr4bESlp8T6cQGZmAM+tofeKhjkoOVGqvtv+G4Ezx/sgqXFR668qTtkzfS4MD6mKNCV NbxAObsOzM/fiHpJUPop+TQRUoN8Q3pavtZtFHxRsupmHa0qclYJF39jPPW949tXOznGqc6kN FjXnDwZCsZ0GczmZGzdMY7d2xTTbjdemCsut3gl6CP5r3NVpyflGAq+8aj68yW5G1NfqfTw/T xDg59Mbvhdui/omf4jA6goFBpu5w7ooS30QUWjIsB/V40= Tuner ranges were determined by USB capturing the vendor driver of a MyGica UTV3 video capture card. Signed-off-by: Nils Rothaug --- .../admin-guide/media/tuner-cardlist.rst | 2 ++ drivers/media/tuners/tuner-types.c | 21 +++++++++++++++++++ include/media/tuner.h | 1 + 3 files changed, 24 insertions(+) -- 2.34.1 diff --git a/Documentation/admin-guide/media/tuner-cardlist.rst b/Documentation/admin-guide/media/tuner-cardlist.rst index 362617c59c5d..65ecf48ddf24 100644 --- a/Documentation/admin-guide/media/tuner-cardlist.rst +++ b/Documentation/admin-guide/media/tuner-cardlist.rst @@ -97,4 +97,6 @@ Tuner number Card name 89 Sony BTF-PG472Z PAL/SECAM 90 Sony BTF-PK467Z NTSC-M-JP 91 Sony BTF-PB463Z NTSC-M +92 Silicon Labs Si2157 tuner +93 Tena TNF931D-DFDR1 ============ ===================================================== diff --git a/drivers/media/tuners/tuner-types.c b/drivers/media/tuners/tuner-types.c index ff5a6c0acdd4..c26f1296e18f 100644 --- a/drivers/media/tuners/tuner-types.c +++ b/drivers/media/tuners/tuner-types.c @@ -1434,6 +1434,22 @@ static struct tuner_params tuner_sony_btf_pg463z_params[] = { }, }; +/* ------------- TUNER_TENA_TNF_931D_DFDR1 - NXP TDA6509A ------------- */ + +static struct tuner_range tuner_tena_tnf_931d_dfdr1_ranges[] = { + { 16 * 161.15 /*MHz*/, 0x8e, 0x01, }, + { 16 * 463.15 /*MHz*/, 0x8e, 0x02, }, + { 16 * 999.99 , 0x8e, 0x08, }, +}; + +static struct tuner_params tuner_tena_tnf_931d_dfdr1_params[] = { + { + .type = TUNER_PARAM_TYPE_PAL, + .ranges = tuner_tena_tnf_931d_dfdr1_ranges, + .count = ARRAY_SIZE(tuner_tena_tnf_931d_dfdr1_ranges), + }, +}; + /* --------------------------------------------------------------------- */ struct tunertype tuners[] = { @@ -1946,6 +1962,11 @@ struct tunertype tuners[] = { .name = "Silicon Labs Si2157 tuner", /* see si2157.c for details */ }, + [TUNER_TENA_TNF_931D_DFDR1] = { + .name = "Tena TNF931D-DFDR1", + .params = tuner_tena_tnf_931d_dfdr1_params, + .count = ARRAY_SIZE(tuner_tena_tnf_931d_dfdr1_params), + } }; EXPORT_SYMBOL(tuners); diff --git a/include/media/tuner.h b/include/media/tuner.h index a7796e0a3659..c5fd6faabfd6 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -133,6 +133,7 @@ #define TUNER_SONY_BTF_PK467Z 90 /* NTSC_JP */ #define TUNER_SONY_BTF_PB463Z 91 /* NTSC */ #define TUNER_SI2157 92 +#define TUNER_TENA_TNF_931D_DFDR1 93 /* tv card specific */ #define TDA9887_PRESENT (1<<0) From patchwork Sun Jun 23 10:46:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nils Rothaug X-Patchwork-Id: 13708556 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16FF079CC; Sun, 23 Jun 2024 10:47:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719139638; cv=none; b=UPRWw/v8HdY6DxDv8jiNZ730A3G/73o7cT2X4SU69BUZkv2+Vuz+Nw6/Ln6CaFDRoniOHKNCCH7avWh676oTq7o8cEuJZFZojYuH+n/q2gW+85zALB+bFK8L8PfvnK955JuY+SvOhu040Zemlz72woz+ujn5aw4ywGtTL3suhAU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719139638; c=relaxed/simple; bh=HGyuuV9ntz0AxV20noMkMe/DC6lHyV1SWFBowTKEcZo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OAD1c6w0Untln06vB+ckS/Krh9FrDy7+IXOS0GWdo7qCbBdwScF8yFWNdg95mC23uYifzQ7wL4C3ffktktCEnj1kiIX0EBaFL1a4d8sSsb+vBqQBwwXw1TFmFhktZdSp+WVZ3TQX4TwSCV27ZJ6tDdcst+ztoivFtNr63i5Qbj4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=nils.rothaug@gmx.de header.b=QcYFpGge; arc=none smtp.client-ip=212.227.15.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=nils.rothaug@gmx.de header.b="QcYFpGge" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1719139629; x=1719744429; i=nils.rothaug@gmx.de; bh=Zz4/6dF2PIuq2tfa4J4lNVfzxJyq7RoDwzhPr0Meri8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=QcYFpGge/rpURjbV5L1xbC5gFSJCp5jRijx4jOYOlLblJrideB3/0J2IQxxg9CK1 CGNRosYHPe2h55k0LsbtY9SRES6tGKAharSQEr9cx0eLcenYwQ4yFcW5CLuMt6G9C 63+jwomC9oyQyeMdZJGUWLVbLg4AYqvyBtOTFuMJBfITHoaEAj4Y4A8LFQoT+vSW0 Tcz9TgDSd2WoaVtDWNrexZQhZyt7sz19pyEtiJt306T0m0etEFrFfM5cnPMjBQUGo uuLvZMhCsBrLDncLKVNffWVZqlvZXZunwvx0ROU3X0BMhnbGqGN11AVbOiUo3ALZ5 txW0TX6/7gy3Dn18LA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from nilsr-VirtualBox ([83.78.44.59]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MA7Ka-1sE8wB2a6s-004PRp; Sun, 23 Jun 2024 12:47:09 +0200 From: Nils Rothaug To: hverkuil@xs4all.nl Cc: sean@mess.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, mchehab@kernel.org, nils.rothaug@gmx.de Subject: [PATCH v2 2/5] media: rc: add keymap for MyGica UTV3 remote Date: Sun, 23 Jun 2024 12:46:44 +0200 Message-Id: <20240623104647.7697-3-nils.rothaug@gmx.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623104647.7697-1-nils.rothaug@gmx.de> References: <20240623104647.7697-1-nils.rothaug@gmx.de> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:oSwQKwB1YpKGmJJaHOMRarkqZoJRbiE8/tKWoEE2O/5FBjSP3QP 6F9DaKdg7uaFnisw9ju8jvB/25QafbAQbRUWgGQf9LBtCzswtAKFUxCPTmY3L7yE6dIZSma 3UcMdMJIcCi7D/TcphV6PZ0PvvZ77igQTmcwjRCpdhtyMcsnN5Ec7CVX0mBe1cTw2/MgQrT msH5kJ5sohVVYrzO9/47A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:H0VMOIGnpn8=;9lqGjD1IpQ83pjmp8uZha/ZTeD6 RCjqA8xWabJ7Ha1C1G8dchRVgA8vSu5E9HV6cPPlCJhCrHzXr2I2L0wGOXfAzvt9mreQQ9Pfh nVEb7GPHff9warnV3TLqj7NoBH8umuCt41ELmfMSWlnTs7KHsMXBCCSjYRxhg0j9A9besQMwM OeaJ+2U5Lu2vRAEaLNyjccBFP0S0WBeVy/hGkwBSA8UPSIzpgB5w8Ho81GpzzDay0evqGVxT1 x/DcyemxhaVGA7sO01uB4cYspMX+qV8Fu4/jw8ghMfvbPb5SLuprQJ1xG3GZGvGrs0z+soipN pxGPRF8iMzLqaW+Yeu9NZ2qKxRAarn5BS6JvIuI9OoIWX5banlRigpdJ9KvokKBLIl1vQQG+L fforGIvT+becAHd+y7arlrHZqO4Ah5yTiMK9HU2iwQyb0xB96gb5TmLNW4ZDaikgOsA/uoaUy BJSpZihI4ImpvjOwTN/2R0u5M1rdmUhotPlwuC7sCtNL7XmMt2Fov4BD9/CeRjyulfwsabQgy jj0HLZHRsSdZxyOQ7/74lgcMPOEdWxzxDnQ1b21Ij/LNzg3UOUVsAbleB8nC/QmX53K0vdBXq ROrg37CnUX0Kpc7RtSv5twJFG0qoY7q57nh1xRkytv3eQUkN197yJ3Ifu9+KALJDvqhn/5vgs 1indM3nGym7T11Llsbd9Qz6yXohEDTp1CstVD0z70aWjRQWBphFCLwzl7o2gMm2TdqhPNjJcD pB5XKMDSPzO8RsIk45wtESz/ZbxXhpan+vzt/4mHmmZYdV6NCpR8OoMXaeOf58ndY6Vpw5A7I kxgn236vgDr8SarBOgqiZw8oHNt0WODHCWTkzrZ+lz7sQ= Add keymap for the simple IR (RC-5) remote that comes with the MyGica UTV3 Analog USB2.0 TV Box video capture card. Signed-off-by: Nils Rothaug --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-mygica-utv3.c | 69 +++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 71 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-mygica-utv3.c -- 2.34.1 diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index f19558fdab0c..7fdf0d9edbfd 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -84,6 +84,7 @@ obj-$(CONFIG_RC_MAP) += \ rc-msi-digivox-ii.o \ rc-msi-tvanywhere.o \ rc-msi-tvanywhere-plus.o \ + rc-mygica-utv3.o \ rc-nebula.o \ rc-nec-terratec-cinergy-xs.o \ rc-norwood.o \ diff --git a/drivers/media/rc/keymaps/rc-mygica-utv3.c b/drivers/media/rc/keymaps/rc-mygica-utv3.c new file mode 100644 index 000000000000..f32b8281459b --- /dev/null +++ b/drivers/media/rc/keymaps/rc-mygica-utv3.c @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* rc-mygica-utv3.c - Keytable for the MyGica UTV3 Analog USB2.0 TV Box + * + * Copyright (c) 2024 by Nils Rothaug + */ + +#include +#include + +static struct rc_map_table mygica_utv3[] = { + { 0x0d, KEY_MUTE }, + { 0x38, KEY_VIDEO }, /* Source */ + { 0x14, KEY_RADIO }, /* FM Radio */ + { 0x0c, KEY_POWER2 }, + + { 0x01, KEY_NUMERIC_1}, + { 0x02, KEY_NUMERIC_2}, + { 0x03, KEY_NUMERIC_3}, + { 0x04, KEY_NUMERIC_4}, + { 0x05, KEY_NUMERIC_5}, + { 0x06, KEY_NUMERIC_6}, + { 0x07, KEY_NUMERIC_7}, + { 0x08, KEY_NUMERIC_8}, + { 0x09, KEY_NUMERIC_9}, + { 0x00, KEY_NUMERIC_0}, + + { 0x0a, KEY_DIGITS }, /* Single/double/triple digit */ + { 0x0e, KEY_CAMERA }, /* Snapshot */ + { 0x0f, KEY_ZOOM }, /* Full Screen */ + { 0x29, KEY_LAST }, /* Recall (return to previous channel) */ + + { 0x17, KEY_PLAY }, + { 0x1f, KEY_RECORD }, + { 0x0b, KEY_STOP }, + { 0x16, KEY_PAUSE }, + + { 0x20, KEY_CHANNELUP }, + { 0x21, KEY_CHANNELDOWN }, + { 0x10, KEY_VOLUMEUP }, + { 0x11, KEY_VOLUMEDOWN }, + { 0x26, KEY_REWIND }, + { 0x27, KEY_FASTFORWARD }, +}; + +static struct rc_map_list mygica_utv3_map = { + .map = { + .scan = mygica_utv3, + .size = ARRAY_SIZE(mygica_utv3), + .rc_proto = RC_PROTO_RC5, + .name = RC_MAP_MYGICA_UTV3, + } +}; + +static int __init init_rc_map_mygica_utv3(void) +{ + return rc_map_register(&mygica_utv3_map); +} + +static void __exit exit_rc_map_mygica_utv3(void) +{ + rc_map_unregister(&mygica_utv3_map); +} + +module_init(init_rc_map_mygica_utv3) +module_exit(exit_rc_map_mygica_utv3) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Nils Rothaug"); +MODULE_DESCRIPTION("MyGica UTV3 Analog USB2.0 TV Box remote keytable"); diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 4676545ffd8f..4867eb2f931e 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -290,6 +290,7 @@ struct rc_map *rc_map_get(const char *name); #define RC_MAP_MSI_DIGIVOX_III "rc-msi-digivox-iii" #define RC_MAP_MSI_TVANYWHERE "rc-msi-tvanywhere" #define RC_MAP_MSI_TVANYWHERE_PLUS "rc-msi-tvanywhere-plus" +#define RC_MAP_MYGICA_UTV3 "rc-mygica-utv3" #define RC_MAP_NEBULA "rc-nebula" #define RC_MAP_NEC_TERRATEC_CINERGY_XS "rc-nec-terratec-cinergy-xs" #define RC_MAP_NORWOOD "rc-norwood" From patchwork Sun Jun 23 10:46:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nils Rothaug X-Patchwork-Id: 13708557 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9CE9B79CC; Sun, 23 Jun 2024 10:47:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719139643; cv=none; b=MY1X+ZkyRvTEH05/5pDEvEoNOKM3ex66Xr+6r6LBzk01sJWsGKMls18MnxgYbgvVCjNTY7lbRBqbDRZS1VAEF9mNs97vx3rDFTWDkuxaOeCNlDPhQelDT/1HUFygUwevRUhCqwHvvJ72Fy0hIaehrgWduoYWmYSjR7yvHc7AFa8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719139643; c=relaxed/simple; bh=T6v6HA74Dhv3NC9PBFJ50M28bQAqnRbgFYuAPxSI5ZI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FSRcWqSdR32sitH0evDCKZel0o23WE+ItWYa3UvN+qTio0AZWb/pnp9E8PJfFjcwk0m0HKRvvUwhUUtPSZWZFaqR/h6AxtBkS+5jCEOvWO2aLmOlI7hqh1LTqMSwC7vxBZXxfNy+PlF9r8GUzVeL+txXRwYdKgxMN6+to9dhehU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=nils.rothaug@gmx.de header.b=fszYuhWe; arc=none smtp.client-ip=212.227.15.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=nils.rothaug@gmx.de header.b="fszYuhWe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1719139635; x=1719744435; i=nils.rothaug@gmx.de; bh=F29eVrTChAslFTMr01K1ZnfxpwOhoAeXSVqEcekUiak=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=fszYuhWeO3IsRc7wG8KDWJDU/OnA4fdbpddIHspee28WQ3K4lJgdHIHXVmIUgKFb 4Hm0b7uVuXglR9MRNkT+R1CjTzpedKIhzZG3TBo1O1SyJ67rIBk7XUBOnW+mjoyBu f3jmpApYOQog3YcCFY9jMQG8a8eXOzMPtMaSHjFmr97EgGp8N3sneQ7jgSmwicn9a cxqxOu3FE59WynyY0k2B1vA9zrPNEgiCeLOstttOn7UgR7ksLBHiNn+fbctN1RdiK NRJDz3nl2ivMphG4KcGObdBMFiJhv2J5XCUPfBe0GgJpMO7r/r8EezQputfcAHS7d HfwngErdcgD2A8ismg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from nilsr-VirtualBox ([83.78.44.59]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1Mjj8D-1smvay2mCJ-00e1Ng; Sun, 23 Jun 2024 12:47:15 +0200 From: Nils Rothaug To: hverkuil@xs4all.nl Cc: sean@mess.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, mchehab@kernel.org, nils.rothaug@gmx.de Subject: [PATCH v2 3/5] media: dt-bindings: rc: add rc-mygica-utv3 Date: Sun, 23 Jun 2024 12:46:45 +0200 Message-Id: <20240623104647.7697-4-nils.rothaug@gmx.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623104647.7697-1-nils.rothaug@gmx.de> References: <20240623104647.7697-1-nils.rothaug@gmx.de> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:lkKGNPMd4tDtaCefWtHGER9mEmE2cucswygQqvnaMqCw6mmCeYi E5a/2NXs24i9Alvd/ZGQAzmxiJCIjeFd1fjHiws2GF4609FB4xGWCv2wb4D9L/3r0jUVdQ+ UUoXCRmEvgT+8/OPF/4GXmtydyyJqZKautgNyiWcAAWL9ytmHttT5ginYWVxAug8c9Fm4eU vrwrB5KlIzh3NixBLgEFA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:XonyLxElc8o=;EEBg6bvGW47iRvYvZPyxSEl4cQS ZEMp37vR2VvZHws8ZA2gwzYmFWimACUXtsiYZir6rUTmPSvN9vOmhS/vwlAxvf24ic6SbwF+C zNFNJv8/A0n2C6De3/ZinGRq2UOUaRkS3uBgYUdV7hFR1GxREnnVVdKlNF5CcaB25zHwB01o4 Erq+G28Etb3ynZxk2v67Aki3aoCv6FfL8oVWB5u8VgSEym5Yjp1Xf3xzZT3X0ZRVVWQVR04tA wca2pI0K3Feawof7Pc1i6IxNp6Zw03pTJ2SYcXjxNzJ+6zk7y5SfmFxKq4jBdRCnq6hBg289N xbvVZmAUIbhaQjMpvtP/4GljHhHYRUPzpgcsEjY7YmzNKdXXG/O9PNbZGFvZ8Sa7oOF3GF8UQ h49pOOXN0DgMPmneBYdDFJVpoPP3pQU3a9PveJ/Jt93Lahs/MPugOrUsObrHqJji0Zu5Ufmwe pLOhyTlagzK8Q6IS3DsUEjCn/BxGt2vNV5NpdAQpkQuClEy+wx3qjGrvchpEAw1t/wQ3S/uuz GAq0vHkhnQ3v6ktYojbASumSCTL3vdwSyk30g3obeiDe/GAVOkwxr021tU4JS6fAn2M/VU3Pn 54iZpfv/7zzcXDMRBoK92S6yG00h/KYU6yfze0jg+lRRdumCnd6ay6JnAAUGPQcCn2/G/0UzX GLhMBfwBf89JcAmZ1eCDNzsCQxG9S+fkSawk1iQa2FNcDhHaTdAm6MjqHU+UQC3OV9zJuXCKF WSfFORB7jie4oqeg1H7aIEG1X1mR5hVWoilz1LtfVNHycy/C5csPM0GwweVbXsfuTFhVC7IsE B6emVwMyOfvKIxZMddlLbtnl9j8W1O+Bd3PDAcwsir6EY= Add a binding for the rc-mygica-utv3 keymap Signed-off-by: Nils Rothaug Acked-by: Rob Herring (Arm) --- Documentation/devicetree/bindings/media/rc.yaml | 1 + 1 file changed, 1 insertion(+) -- 2.34.1 diff --git a/Documentation/devicetree/bindings/media/rc.yaml b/Documentation/devicetree/bindings/media/rc.yaml index 7bbe580c80f7..dedc5a4b81ec 100644 --- a/Documentation/devicetree/bindings/media/rc.yaml +++ b/Documentation/devicetree/bindings/media/rc.yaml @@ -103,6 +103,7 @@ properties: - rc-msi-digivox-iii - rc-msi-tvanywhere - rc-msi-tvanywhere-plus + - rc-mygica-utv3 - rc-nebula - rc-nec-terratec-cinergy-xs - rc-norwood From patchwork Sun Jun 23 10:46:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nils Rothaug X-Patchwork-Id: 13708558 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E0F679CC; Sun, 23 Jun 2024 10:47:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719139646; cv=none; b=n+wr/bQVw+EJTrZlGfkXIRzDUu/lw9FXPyBeojMtdzr3+coasE0KtVqgpNjOovDeLu6D4z91G/Y1xxWkLlN+8XdIJAUrDLWxOLafzowB1Re9ZcrHSmVWOzHpf1GZTaEcbNP0MeaHxOmLbydkc3c0Bo7nBrFOdbIY/eW0Az/Tr14= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719139646; c=relaxed/simple; bh=QWgZ/RQ7xExWv0Xi3+qB57iYNW1jTKZPj8abIl100CA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qibfktKrhuBPVy4S1Mh+ZjfBRE6z6JJwayAyvfwSPd7aomOqgXHEasOaaBlZxZVylxIrzLnNb4A4CwS6fbZSw443hRwrmmMdd4UevigyraEcMJ0dRQ3jxzrbJpxQ8005MJU1c/3p6gelnSRZOFh6Z9JQEtlhUXZV+F2gg2numM8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=nils.rothaug@gmx.de header.b=MXyvc8sK; arc=none smtp.client-ip=212.227.15.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=nils.rothaug@gmx.de header.b="MXyvc8sK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1719139638; x=1719744438; i=nils.rothaug@gmx.de; bh=6m6FX2UgZOqwaWZSWZv60M6WPkiYl4P3r6jn1znIU6Q=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=MXyvc8sKDpy3hsXtOeDBOwB5bJnSb52u21A2m5VDI9oAXMte7oMw0HIgYpHgi0TO LU5OOhD76bYSZ0AXJbTe13QvZlT11QGc0ulw45Kgq9ThMv5vvgx+wDmH7VGP3cahM KR404sZ/HWl7bGz2cguX9ZQul5/2Y4tM+atBqvzCPFlu5fRi0X2gzi4jFoxLkGUIK /uZfKBiqzFKpqBDCdijuFFvI12C2ko2Au40QsrNsGLfjrhbJVkNSf32/sMgs57FuN pb3duBZFA0H/19nTNv9ukJzHONwe4VcTfitfadEbXD8iRsOHF9pfVBtLd5uU940TS jO3wK6XKQTm10YRqGQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from nilsr-VirtualBox ([83.78.44.59]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MMXQ5-1s1jph1IT1-00YU04; Sun, 23 Jun 2024 12:47:18 +0200 From: Nils Rothaug To: hverkuil@xs4all.nl Cc: sean@mess.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, mchehab@kernel.org, nils.rothaug@gmx.de Subject: [PATCH v2 4/5] media: em28xx: Add support for MyGica UTV3 Date: Sun, 23 Jun 2024 12:46:46 +0200 Message-Id: <20240623104647.7697-5-nils.rothaug@gmx.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623104647.7697-1-nils.rothaug@gmx.de> References: <20240623104647.7697-1-nils.rothaug@gmx.de> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:8qBoP2kfUqBSaHeChPTTwnr2ahs1LmcDBrqKkcX7bXCShDi6B7W o8dXbSOuvlVjibMpzxOTEkBYT6QfIbNzz81V3t4rHEghhGbyDbb6CZeEM8YYHVRrE8uf641 evsFX5soNn2mSIxqKI01FveGwM6YnZnuT4x52Z8HVGhkc7KGuTaXQ4NdiqcYvLowBAAf1Er qSNEu1OhrwlkZ5aJPj3fA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:w+Jnl2PIiTI=;4r3aIx+aUl3JxOH39KalF1mTapa IaT6dXXSjz0SEtc6U/50o5fP2hCvOY0MzsTqZ2lhwhJdAUnHBkd4lIhGjj1jkLUkzfj9pFEE7 0UiuIA0gGd8gjANkvdlyavwA5iiBYARK3s8aEuyj6pva+YVuMmdiwVPKLGO6s0/jLrpQp3CBN QmXopu0Q14TEVMlO85iiNbjbmKEaWndEEQew0C2EpjC7eAy/NdxRTC9kdPQH4T6IBi/QxiWf8 pcaOSFOw6tnPGJeTXFuUm2jC7BjhqS53fDCn/9aGxxTbUXAThnU6elqloiVyYbsEEMyAIb2QP 2DeE/KuDE/MR5SmeLssB9VUA4P97QHa+91etXnkl4N36p1NdbabewfAYf+E8vGKHGfX5Is4cT qdIYnKN+1D1U7U08tzSMOm1LJpLZnVRSK/Dek9dfgN9h4P0GBJk5+5aXGf3BgVCAJQE6GgKjO c6PVut0lPM3v0lfxL/w51Kp9f48ZElu2K/qCaySTlbIOYcye8P8OaYObkQsSR8O+dM5LV7LZ6 wzFAG1zfgJ2ge0FLAXCniDprcWqUGPpao5lXGZGZhLdqWlvQUBgMm6VYT0oNBNMnMRsT0ARaS nkSEuCRQlXNgK186tXMdvlOxIMa+I4O2znv/HuO2B8YgFzfw0PuKDl4d2GpJx0VM9ZAvCAUue MWy8pbktyWDgb9L02tkW1zf1KPzU+l1BrVcOn/1Suwqp92BuRx9kyCOjdiaQdnjMn1+LeztPS s89JEg16IkPkRi6+gzkxLZfP7o5JA4oD4Jlm2wHkJioVlBBXdmo2mG9Y9UUlIAE4TLNqbDcDe vaT4lyFV27BfWZP4Dw+8R/SaEZM5UP2pPTtCZ2XuJwvZE= The MyGica UTV3 Analog USB2.0 TV Box is a USB video capture card that has analog TV, composite video, and FM radio inputs, an IR remote, and provides audio only as Line Out, but not over USB. Mine is prepared for an FM tuner, but not equipped with one. Support for FM radio is therefore missing. The device contains: - Empia EM2860 USB bridge - Philips SAA7113 video decoder - NXP TDA9801T demodulator - Tena TNF931D-DFDR1 tuner - ST HCF4052 demux, switches input audio to Line Out Signed-off-by: Nils Rothaug --- .../admin-guide/media/em28xx-cardlist.rst | 8 +++ drivers/media/usb/em28xx/em28xx-cards.c | 52 +++++++++++++++++++ drivers/media/usb/em28xx/em28xx.h | 1 + 3 files changed, 61 insertions(+) -- 2.34.1 diff --git a/Documentation/admin-guide/media/em28xx-cardlist.rst b/Documentation/admin-guide/media/em28xx-cardlist.rst index ace65718ea22..7dac07986d91 100644 --- a/Documentation/admin-guide/media/em28xx-cardlist.rst +++ b/Documentation/admin-guide/media/em28xx-cardlist.rst @@ -438,3 +438,11 @@ EM28xx cards list - MyGica iGrabber - em2860 - 1f4d:1abe + * - 106 + - Hauppauge USB QuadHD ATSC + - em28274 + - 2040:846d + * - 107 + - MyGica UTV3 Analog USB2.0 TV Box + - em2860 + - eb1a:2860 diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c index 4d037c92af7c..bf98e296e0cf 100644 --- a/drivers/media/usb/em28xx/em28xx-cards.c +++ b/drivers/media/usb/em28xx/em28xx-cards.c @@ -554,6 +554,30 @@ static struct em28xx_reg_seq hauppauge_usb_quadhd_atsc_reg_seq[] = { {-1, -1, -1, -1}, }; +/* + * MyGica USB TV Box + * GPIO_1,0: 00=Composite audio + * 01=Tuner audio + * 10=Mute audio + * 11=FM radio? (if equipped) + * GPIO_2-6: Unused + * GPIO_7: ?? + */ +static const struct em28xx_reg_seq mygica_utv3_composite_audio_gpio[] = { + {EM2820_R08_GPIO_CTRL, 0xfc, 0xff, 0}, + { -1, -1, -1, -1}, +}; + +static const struct em28xx_reg_seq mygica_utv3_tuner_audio_gpio[] = { + {EM2820_R08_GPIO_CTRL, 0xfd, 0xff, 0}, + { -1, -1, -1, -1}, +}; + +static const struct em28xx_reg_seq mygica_utv3_suspend_gpio[] = { + {EM2820_R08_GPIO_CTRL, 0xfe, 0xff, 0}, + { -1, -1, -1, -1}, +}; + /* * Button definitions */ @@ -2578,6 +2602,32 @@ const struct em28xx_board em28xx_boards[] = { .tuner_gpio = hauppauge_usb_quadhd_atsc_reg_seq, .leds = hauppauge_usb_quadhd_leds, }, + /* + * eb1a:2860 MyGica UTV3 Analog USB2.0 TV Box + * Empia EM2860, Philips SAA7113, NXP TDA9801T demod, + * Tena TNF931D-DFDR1 tuner (contains NXP TDA6509A), + * ST HCF4052 demux (switches audio to line out), + * no audio over USB + */ + [EM2860_BOARD_MYGICA_UTV3] = { + .name = "MyGica UTV3 Analog USB2.0 TV Box", + .xclk = EM28XX_XCLK_IR_RC5_MODE | EM28XX_XCLK_FREQUENCY_12MHZ, + .tuner_type = TUNER_TENA_TNF_931D_DFDR1, + .ir_codes = RC_MAP_MYGICA_UTV3, + .decoder = EM28XX_SAA711X, + .suspend_gpio = mygica_utv3_suspend_gpio, + .input = { { + .type = EM28XX_VMUX_COMPOSITE, + .vmux = SAA7115_COMPOSITE0, + .amux = EM28XX_AMUX_VIDEO, + .gpio = mygica_utv3_composite_audio_gpio, + }, { + .type = EM28XX_VMUX_TELEVISION, + .vmux = SAA7115_COMPOSITE2, + .amux = EM28XX_AMUX_VIDEO, + .gpio = mygica_utv3_tuner_audio_gpio, + } }, + }, }; EXPORT_SYMBOL_GPL(em28xx_boards); @@ -2819,6 +2869,7 @@ static const struct em28xx_hash_table em28xx_eeprom_hash[] = { {0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT}, {0x4e913442, EM2882_BOARD_DIKOM_DK300, TUNER_XC2028}, {0x85dd871e, EM2882_BOARD_ZOLID_HYBRID_TV_STICK, TUNER_XC2028}, + {0x8f597549, EM2860_BOARD_MYGICA_UTV3, TUNER_TENA_TNF_931D_DFDR1}, }; /* I2C devicelist hash table for devices with generic USB IDs */ @@ -2831,6 +2882,7 @@ static const struct em28xx_hash_table em28xx_i2c_hash[] = { {0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS, TUNER_TNF_5335MF}, {0x6b800080, EM2874_BOARD_LEADERSHIP_ISDBT, TUNER_ABSENT}, {0x27e10080, EM2882_BOARD_ZOLID_HYBRID_TV_STICK, TUNER_XC2028}, + {0x840d0484, EM2860_BOARD_MYGICA_UTV3, TUNER_TENA_TNF_931D_DFDR1}, }; /* NOTE: introduce a separate hash table for devices with 16 bit eeproms */ diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h index db18dd814a67..f3449c240d21 100644 --- a/drivers/media/usb/em28xx/em28xx.h +++ b/drivers/media/usb/em28xx/em28xx.h @@ -143,6 +143,7 @@ #define EM28178_BOARD_PCTV_461E_V2 104 #define EM2860_BOARD_MYGICA_IGRABBER 105 #define EM2874_BOARD_HAUPPAUGE_USB_QUADHD 106 +#define EM2860_BOARD_MYGICA_UTV3 107 /* Limits minimum and default number of buffers */ #define EM28XX_MIN_BUF 4 From patchwork Sun Jun 23 10:46:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nils Rothaug X-Patchwork-Id: 13708559 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DCAD812E1DE; Sun, 23 Jun 2024 10:47:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719139648; cv=none; b=JiUyACGOar9pc9AaToOEzbisX+n1g//S4ZJ1EdFNgSHFy9bCfgpK3v/Na2oC55ISYtbPQn85ja09VoMBHKub+87Gx2xvAwoxE+ajkp6X3wyMIvZFjPMdKWqFENvtxhq8ygfCeKBqiVPzJSnjrbBgT2V9sYBryv5tLoANe/hBk5I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719139648; c=relaxed/simple; bh=m6arXT4GDbumWRlA0AunZOdHCUdv3iERn8bZu7xUXao=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qF8TJwi722Doh2gqgLHMDLyYh+6k3iKxgESXjH31oRI33jPDz0hvrpi3cnvYlxjiLWCnYi00IE0h5br3b/jZTzjU/qStrjeeIf7XUlKzBwDoDemPCqYQvHRuc6EtRT8pCDiZHrVbc9WswdfAnJqBOK3fo74oDLXIi5Z4Yyw3R2Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=nils.rothaug@gmx.de header.b=RkqxKllT; arc=none smtp.client-ip=212.227.15.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=nils.rothaug@gmx.de header.b="RkqxKllT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1719139641; x=1719744441; i=nils.rothaug@gmx.de; bh=aIuqGElgpNfIxpmIK6owpSmAHJS5jLpXs1KY3iJsh8M=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=RkqxKllTXDb2t35HCVmx820y8wQhfzwM+mu9qILRZG0oY/Xp+n97qDBVHZY4eOx9 mJCNttJuhx8w6GSNTA0LZS0/SFps8gYZPOqfDt9gcAOarLnYQKHzK41Uw5fOIPe0Q nemNSOG2EQW9VK+V0SRRO8BnxsXOpO/l8rhzNjtoV9igMvp6dpIPCoPM4GFGJv80v xdB0qiiXzoBAauiw8SE2jm1avSlAuvJFjRrIjRqBqd7L8NmJqNtfs5QD3mdNpESCj 9e6y0BS3JCx9uoTY+1g909N9Wt/4bb5N20sSLJFDIBcJEKJEhFAr5x4pe8mkHqFIL dP+MVJk0HUVe3nUnsQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from nilsr-VirtualBox ([83.78.44.59]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1M7b2d-1sHjBF3bAr-00Amz0; Sun, 23 Jun 2024 12:47:20 +0200 From: Nils Rothaug To: hverkuil@xs4all.nl Cc: sean@mess.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, mchehab@kernel.org, nils.rothaug@gmx.de Subject: [PATCH v2 5/5] media: em28xx: Set GPIOs for non-audio boards when switching input Date: Sun, 23 Jun 2024 12:46:47 +0200 Message-Id: <20240623104647.7697-6-nils.rothaug@gmx.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623104647.7697-1-nils.rothaug@gmx.de> References: <20240623104647.7697-1-nils.rothaug@gmx.de> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:hLwCfQorBE1RdUHVn/1Yn8Q3PJiGdP7IC3A/JIy8pByzqhcjhOQ vq3NcGFNMJghyj+lUK7if/+p48mWwHukwDBT0C0tESVOaV9QEB5p3apDCFV038g8mwZut8R ZMAVEEa4hzwndjoG0bLr/Hr73kimHm9uX4U9dngmzVvlv8dT8zApVY0Tgcdoyqc2rqRwWQJ wHtaakwQLN5gK63AOjtHA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:GqxfqAqaHtg=;sY0PJVJQcP3ELeHB8o2wySzq5a4 Djq3OxrqWcmUGyGl2TCAUwEKP/dU27e1HIZJg9GjVpaQ3eHRUKHpyo72lse3+NR5OuQDnBpIt +PIg6R+Of5ZhL+n1wcP87gJU2X3ehaC1mqKNarsQj2VRfBlUjp3FkttY3bhsExlpwTBDDkY1t 7J6lqdyCNb9doso4QU6jHMOIPKQ2V/JwGdB7KK6tCkQyiKKrboHFpZ2eapl9Y5XAVBr641zsj DyQjIBCBLd1lV4alFFb4vhD7xPZRnmg8ss5FwonpdZbAhbqVbIR7qQ3ZAv51ZpNwT54bSm2/T 3MMGgQ9tbCRCamgVY/SnnzQ2AZN2FUVmaE+5UEQ8+vrR8ZQocWksM9pDO+O31dEybTsosrFKa 7p6zaBIg+FB8WcFkZBZWGxUnkvN9Zniv22vCYULmAe4/xe5G/2pn0gLxaJAFJjQzFyacG60Dz Hgs6dMBVTN/V1pxsXtIlUKLWNpMZ68cwo4Mw3iBzri6yh2I0DJ8fAiJPavmixVjFcrcljfSb5 miln8SQHqLTO+QiEarkTGmCygjYKcHyX49c7JaSkR0/e7Nm2hVY9B2RHuAmqQMA22xqxQ6OVw qJ2B1UU4HGYKzVDJiwlABo4ZabGpktmWZlsy9Lf0A6gLQcCsS83T2kFrTnPwPeZdv8HoOPngR Yt6lpZ28YIqlvqXEAJEo3e8w+Btimyv8PVpkfS1EYuT3N6orUD41vWvlIvfppsUZ53r86jkkw vlWi4snYxqjsOS1fpgowztUJFR2cfUcwji+65aLbKyZT/alx999GUGXZ7Fy+7fzSILhx+dI0b SKKIWkerKVePtS0FY7K7UYtm0zUqRp0wyiSGaAHRaGRPw= Fixes changing the Line Out audio source with the video input on MyGica UTV3 board. Previously, GPIOs were only set in em28xx_set_audio_source(), which only boards with USB audio support reach. Signed-off-by: Nils Rothaug --- drivers/media/usb/em28xx/em28xx-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.34.1 diff --git a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c index 61d7bf701d57..29a7f3f19b56 100644 --- a/drivers/media/usb/em28xx/em28xx-core.c +++ b/drivers/media/usb/em28xx/em28xx-core.c @@ -416,8 +416,9 @@ int em28xx_audio_analog_set(struct em28xx *dev) int ret, i; u8 xclk; + /* Set GPIOs here for boards without audio */ if (dev->int_audio_type == EM28XX_INT_AUDIO_NONE) - return 0; + return em28xx_gpio_set(dev, INPUT(dev->ctl_input)->gpio); /* * It is assumed that all devices use master volume for output.