Received: by 10.223.164.202 with SMTP id h10csp645455wrb; Wed, 22 Nov 2017 12:59:34 -0800 (PST) X-Google-Smtp-Source: AGs4zMYO/1xRlzRqzLTpe5FTlWGErzUqXPBXjFQCNvpPvNtVPefaP5aJXyQqNkZwSeKP2ArZOZPE X-Received: by 10.98.63.16 with SMTP id m16mr20675989pfa.218.1511384374630; Wed, 22 Nov 2017 12:59:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511384374; cv=none; d=google.com; s=arc-20160816; b=LxhdTOD4dnUYe2AtVOGNAYoVEEB3QRRY6V8n6oi1KSGKqa5ykUnlcYU/F2+VdKt9dq akR50ijXxbZK9Rs4/CmZCez2EOzMDfa1XaX4h0IADyrmD1nVedy98TIy4JCZ21VEo8IO Fk5HVjPtNaiNOZQ+8alHBEA6rCZbT0kofS4tOhZ1DMGW3nMPiF1tr2gxkgGYG1h9lzPb MsVSXvB5JAb/jvCvPYCwLSHxR++DjrtjFezShDH1bjUc6XDJ8sqjni8pZ0GRWRhQEtaJ A4OYe56jR9jeO5iWUql8RK2xXM85ZgYXm9mMBPbS11E6RiDCUAxJZLF6YB4hWFQrhH2u oDcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=rw6w2ZXMlDGHcyAllCy4usOw0w49JyuVDyypUvRIL0M=; b=B0KL+qjwHaM9H8fhLvOckytt9rbHdDZNONU/F1pZbEsgTA9NAg4qLSqIlXVqcv37y+ yKKRtJ8Kfu5TtMym8swYNHow5VooGmuHcxjcjx3q0FJ3L9ieOl2Tb3CCoiD20G7V0BvA qYMnB5K+YJZfqFFyblfDAwBvwNqTyuy0QdjvxpZqlH374wOeZYfvB6/ei5tYVuKDjOhN kDCsJYnnfGaRl6W6INFqh5+1wLkKftowzzLq+UYxlgBp7t6e8TxAGfOo41nLsu5OgW2B 1PEsjHfaLt42xPbGz8sZyh+nB9kzfpb07+bHTUSa18fjD1UlB3kJINFDK9n2vLmk8S6i NQQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ciS8Bz0P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p13si14515326pgn.796.2017.11.22.12.59.23; Wed, 22 Nov 2017 12:59:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ciS8Bz0P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751646AbdKVU5B (ORCPT + 77 others); Wed, 22 Nov 2017 15:57:01 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:34479 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751577AbdKVU46 (ORCPT ); Wed, 22 Nov 2017 15:56:58 -0500 Received: by mail-io0-f194.google.com with SMTP id q101so24535514ioi.1 for ; Wed, 22 Nov 2017 12:56:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rw6w2ZXMlDGHcyAllCy4usOw0w49JyuVDyypUvRIL0M=; b=ciS8Bz0P9Ktl6XMvRI8Sg97S6UtNG69sgua6kaaDAhJSfAROT/E0YdvokhPxGn1e0L MaByJGze2QdENWgUfQJb+5aI45qBcjyBDltwLsIJDkzWkgKeuwAs2krDSEqF9SQIEMck X7KiQqMWGd1wHAT0OMkDxrVZzuc3dBl3yJBz8= 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=rw6w2ZXMlDGHcyAllCy4usOw0w49JyuVDyypUvRIL0M=; b=i0Ml8Za0powIkFBcmHm2t+z5db0D06yGRRE8W6Ra0cwD1UwiWdFbhk9qbp9g86xxp/ BTEpdEd1wSFuHO2jsUn6DxKAPYGBUJxui8SRMSLcPkMyblJ5/jaJtnnFKPhlnqAilW00 Wj+HzdG8msBGQLuL9iwgK85j5Eda1tZU4XjWt4ApH9ud9juXVyOccy08NhaftwrM9LpB mp2tAYQBKUx3LgvXIu2to+51GPOl0hV0LMM95PUq1AdVB9vjJUF+MqRza3k5H7IAzwrN Nhe5/o/VRFdW1xBp/zNEjkxmwiLF7qKRRMpKjKNzj9SWwoiWgSE/epAFCEsUTAjXiIT9 joTA== X-Gm-Message-State: AJaThX7sP0VNjsIWv2gxzuixvWkhRoh3Keqw7P2HyP392a0qteSXKooe Ddqqq9CToY8tjKXUjDHcbv5/Sg== X-Received: by 10.107.192.69 with SMTP id q66mr2170084iof.125.1511384217457; Wed, 22 Nov 2017 12:56:57 -0800 (PST) Received: from decatoncale.mtv.corp.google.com ([172.22.112.13]) by smtp.gmail.com with ESMTPSA id p10sm7217546ioe.19.2017.11.22.12.56.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Nov 2017 12:56:57 -0800 (PST) From: Benson Leung To: broonie@kernel.org, linux-kernel@vger.kernel.org Cc: harshapriya.n@intel.com, naveen.m@intel.com, srinivas.kandagatla@linaro.org, cychiang@chromium.org, dgreid@chromium.org, anatol.pomozov@gmail.com, bleung@chromium.org, bleung@google.com Subject: [PATCH 3/5] ASoC: ts3a227e: Map BTN_0 to KEY_PLAYPAUSE Date: Wed, 22 Nov 2017 12:56:41 -0800 Message-Id: <20171122205643.99783-4-bleung@chromium.org> X-Mailer: git-send-email 2.15.0.448.gf294e3d99a-goog In-Reply-To: <20171122205643.99783-1-bleung@chromium.org> References: <20171122205643.99783-1-bleung@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Android 3.5mm Headset jack specification mentions that BTN_0 should be mapped to KEY_MEDIA, but this is less logical than KEY_PLAYPAUSE, which has much broader userspace support. For example, the Chrome OS userspace now supports KEY_PLAYPAUSE to toggle play/pause of videos and audio, but does not handle KEY_MEDIA. Furthermore, Android itself now supports KEY_PLAYPAUSE equivalently, as the new USB headset spec requires KEY_PLAYPAUSE for BTN_0. https://source.android.com/devices/accessories/headset/usb-headset-spec Signed-off-by: Benson Leung --- sound/soc/codecs/ts3a227e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/ts3a227e.c b/sound/soc/codecs/ts3a227e.c index 738e04b09116..1271e7e1fc78 100644 --- a/sound/soc/codecs/ts3a227e.c +++ b/sound/soc/codecs/ts3a227e.c @@ -241,7 +241,7 @@ int ts3a227e_enable_jack_detect(struct snd_soc_component *component, { struct ts3a227e *ts3a227e = snd_soc_component_get_drvdata(component); - snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA); + snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); -- 2.15.0.448.gf294e3d99a-goog From 1584713690345198995@xxx Tue Nov 21 21:45:45 +0000 2017 X-GM-THRID: 1584713690345198995 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread