Received: by 10.223.164.202 with SMTP id h10csp644818wrb; Wed, 22 Nov 2017 12:58:37 -0800 (PST) X-Google-Smtp-Source: AGs4zMaAYB/8O0pD3BNxgr8FXHQOf5eCLZ227BUEY7Zw8MylEtEzsLIWHaimfmuN5HPMszIYwWnc X-Received: by 10.159.208.71 with SMTP id w7mr22626948plz.228.1511384317035; Wed, 22 Nov 2017 12:58:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511384317; cv=none; d=google.com; s=arc-20160816; b=U+XKXiSYkxl8NDin+GE5v16VkNtVe3DpPQiBoi4iTa91DwKuLt01I5hu1THpGUQZ8b 9ILlK+U1n53WAgF30BQ4Ej61D8YgXvCAQ0m2OtxvdubAIBOMdBxB0zjLiv8rUJb1Yh1H Oj6XmKZyslVa6lLffCYuvGz7UOxRwi9qdDCTkN6pbBAmqySOMngBfSN3mCBwVKWmj7t+ Fc4b0CWsbiGI4g8NuFrHGhQR/rIF5KwHynzrtA1VG95RmUpm6gjxaaNsNakYdcL8LLLe CUnX2/g2A0qMNmu5rUXHv4dEII6iKU04uRIIEH0zp8p+mZ3uqsrptnvzLwRkSCpWZDgf ddIA== 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=MBxyLze1dguPwv2fTcv0c0pU/pb8GDrH+mJAn0LBm7U=; b=C864br4QCYWQidpqJS4EksCkLNHcWmYo3FYBFi6TupF61QJTIFCm0xDaH2Vls9Jmgj R8nnywiQBzjpoNWs5cKGIcQWErAlUWFdmc4r9t19dSgeNTLc9XCvKaAYTK9A2Sun1V1E D4rajADNH4YdMb4aY3sS5nLmXuGSDpIGWF0QSJicAETDoM/Wb3+wwWmSXgg7fOrSjPwm w9xDhBiOGhyeuXYfbGFY/j/C1EPOSEgSaxCfP+UnOzKq+4fOdqNrrc+LkFihLKJu1VlW L9DfcwUB9aPu/OIzNCyPF0X61oQhO0xq4g5WkOemEyM6Cx4m3BvorXZvmWoaTHk/ycFo ep3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Dx3xH0tW; 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 v13si14216663plo.273.2017.11.22.12.58.25; Wed, 22 Nov 2017 12:58:36 -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=Dx3xH0tW; 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 S1751761AbdKVU51 (ORCPT + 77 others); Wed, 22 Nov 2017 15:57:27 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:44338 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751600AbdKVU47 (ORCPT ); Wed, 22 Nov 2017 15:56:59 -0500 Received: by mail-io0-f193.google.com with SMTP id w127so24553732iow.11 for ; Wed, 22 Nov 2017 12:56:58 -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=MBxyLze1dguPwv2fTcv0c0pU/pb8GDrH+mJAn0LBm7U=; b=Dx3xH0tWEqasfGJuZo918gg6X2hgPbzD7ucFnsFibN/Vc7OTViZ3p5QqYv33YeOtWI KO/2vXiBcWWhviDd/bO3fvWY6yfGEtuiTmVa9r7HO0qUxxW5t937LsLEw1GNZDi0mUM3 UD5GD9sVxQaje5/Ygg9ihd0J6jq60lbXKSOZQ= 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=MBxyLze1dguPwv2fTcv0c0pU/pb8GDrH+mJAn0LBm7U=; b=WNML3mqQkCRP4USNJUwySDof18iOC7g6Ca8XiOCjK4P7MK3w2JMgKnAc47OEKIFire igYs4OU9quinLNYCu656HQQ0C1R6c7CVyhM934Mq/rLxxdUpWeUSu+rViNi1aU/MyV7b IpZV9r0Rw5nWs7eUjgw9TIvkBb7DKzE6cOJ5mTy+oNq1Cj92Mdl7tkNJruxVfJaoMIda rdTeeasOJdsXFSp56qi6Z0XvNhRPWvuoprhibS/a/imkfUsTgGgQWHTkDCI9OqeMlVS+ HpF+G8dxUIDDNjnI0vCnXaztaLHFvGblkU08N2PKmEo1572qD4wDPR20/llkot5rLwGZ N5LQ== X-Gm-Message-State: AJaThX4VotkXg3KO7VUIE/dnXgXKC4LJ1ASkWs/QbbQCRRABNnOccJip LbGkIroBM2bBwjNPAnmKAqUtJQ== X-Received: by 10.107.11.226 with SMTP id 95mr21484178iol.78.1511384218468; Wed, 22 Nov 2017 12:56:58 -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.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Nov 2017 12:56:58 -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 4/5] ASoC: rk3399_gru_sound: Map BTN_0 to KEY_PLAYPAUSE Date: Wed, 22 Nov 2017 12:56:42 -0800 Message-Id: <20171122205643.99783-5-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/rockchip/rk3399_gru_sound.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c index d64fbbd50544..fa6cd1de828b 100644 --- a/sound/soc/rockchip/rk3399_gru_sound.c +++ b/sound/soc/rockchip/rk3399_gru_sound.c @@ -206,7 +206,8 @@ static int rockchip_sound_da7219_init(struct snd_soc_pcm_runtime *rtd) return ret; } - snd_jack_set_key(rockchip_sound_jack.jack, SND_JACK_BTN_0, KEY_MEDIA); + snd_jack_set_key( + rockchip_sound_jack.jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); snd_jack_set_key( rockchip_sound_jack.jack, SND_JACK_BTN_1, KEY_VOLUMEUP); snd_jack_set_key( -- 2.15.0.448.gf294e3d99a-goog From 1583962742326582360@xxx Mon Nov 13 14:49:45 +0000 2017 X-GM-THRID: 1583962742326582360 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread