From patchwork Fri Mar 30 10:04:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akshu Agrawal X-Patchwork-Id: 10317559 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A652B60467 for ; Fri, 30 Mar 2018 10:05:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 956282A572 for ; Fri, 30 Mar 2018 10:05:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 88B3E2A584; Fri, 30 Mar 2018 10:05:28 +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=-1.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38E9A2A572 for ; Fri, 30 Mar 2018 10:05:27 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 761782671F9; Fri, 30 Mar 2018 12:05:25 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6320126720C; Fri, 30 Mar 2018 12:05:22 +0200 (CEST) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0044.outbound.protection.outlook.com [104.47.34.44]) by alsa0.perex.cz (Postfix) with ESMTP id B273B2671E9 for ; Fri, 30 Mar 2018 12:05:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2EnhoB+LCNA+pYGqdqE9hXqMzSW49isyd3QJbX0TLvw=; b=DpCSg9uMJynd08AvM6IsFxlg1x5AVyL4Pzz4KehSiNLUs640n0+HXjZftepggJdU8iWQhLPxsMaY9Z5Ajg0/kjdxrAeBeyUzHt0mAF6BitNh/uVCZJoLNcD7cDtax+BBHJArS2hPeQkO+beG5oYeX9ET/xlbXv1xPi0srcblqNk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Akshu.Agrawal@amd.com; Received: from akshu-HP-EliteBook-745-G2.mshome.net (203.93.97.130) by CY4PR1201MB0182.namprd12.prod.outlook.com (2603:10b6:910:1d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.631.10; Fri, 30 Mar 2018 10:05:13 +0000 From: Akshu Agrawal To: broonie@kernel.org, alsa-devel@alsa-project.org Date: Fri, 30 Mar 2018 15:34:56 +0530 Message-Id: <1522404297-7555-1-git-send-email-akshu.agrawal@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [203.93.97.130] X-ClientProxiedBy: HK2PR02CA0164.apcprd02.prod.outlook.com (2603:1096:201:1f::24) To CY4PR1201MB0182.namprd12.prod.outlook.com (2603:10b6:910:1d::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 48f29c95-cb92-4c2b-4b38-08d59625bbfb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:CY4PR1201MB0182; X-Microsoft-Exchange-Diagnostics: 1; CY4PR1201MB0182; 3:yJ30ZCzASKfsX2hncuSkZZrQhrOsWKuaW8a+F2meUzLid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tmwAY7cwE9mobdWY4qmh88K69aM4lY1YJ9kjopkQvmEP7LFvB95U5RlU4HUx7dTn3OrtIHgLm0jMXdnN+V/OqEvX+dTUfCyp9LtV6GCWvet34hCdwQGNhYvYPpcs669YGdqShvux7Dt7wGRpNIFL79ie7sDUErT6Yyvr+1K7LKHhWxzupbuDy/vBYEJaDtOWz/8+JwUfUapsdE01TYHGcl5++REEwg3Y69v6IUQUgVojh4YJK858xO6LMv8TtkEh2wG5so2Sn3lwgoNsKXGeNlehNfNfvEpkj+1L+2qlc; 4:gQBK5zCa74aPneabjDwC26pP83i1l0SNh0RPCu72b2xsVBLmDfNxDfLWi0LfaEdo/x3u5x+oVXfJn+yffI+bQ13VpNr8TtHS5dlKvVgYx/d75uxDnA4LRWY/4KXoZVDqGSYJrCvJUclsU/sIuDNkY0EQe33WK6a46JzJgx4tczVPYMhdXgjbY6P4AJXBgjYJPlLlFYTwwN4V6tNyXyRHyPyz8ZwAywk3jxPyQxyQEJ6qCHZPbUOy2hANBbAPPLUhCBA44LSvi/qIUlPeh8KRkkLHIyNum9FAWh25rsV1af9Cl5tT2VdEfxZxnHDPUc5m X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501327)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY4PR1201MB0182; BCL:0; PCL:0; RULEID:; SRVR:CY4PR1201MB0182; X-Forefront-PRVS: 06274D1C43 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(366004)(376002)(346002)(396003)(189003)(199004)(66066001)(105586002)(4326008)(25786009)(478600001)(48376002)(53416004)(72206003)(50466002)(7736002)(305945005)(39060400002)(8936002)(2616005)(8676002)(50226002)(69596002)(3846002)(81156014)(956004)(6116002)(52116002)(47776003)(51416003)(81166006)(16526019)(6512007)(186003)(53936002)(5660300001)(2906002)(6506007)(386003)(26005)(106356001)(6666003)(316002)(86362001)(6486002)(486005)(486005)(68736007)(97736004)(16586007)(476003)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1201MB0182; H:akshu-HP-EliteBook-745-G2.mshome.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR1201MB0182; 23:qzT+f38v4BpsSSEkBBonhnPHkNoAeFYbWfhb2lj?= =?us-ascii?Q?6gh+IXf5NoxPt63RlsSyRjASG24KRRYQadXqE6yMuK41dtDZIUgDz1JOyg95?= =?us-ascii?Q?tj1sTQgw3KKpfbgxFJj71ovjA5kbt/OCfofIvWPLek7cuQyXKlbm95EfERHG?= =?us-ascii?Q?orhqotVPcQnYJliPB04LnTQfoSl0jZCb908j1eRKyn79zrFeZg+GTf8AP1o2?= =?us-ascii?Q?IQD1xnZVUoBHA/UAMjicTKHkIPYO+tMAtTHTbe15qejtx4v+genvW1Fyasfc?= =?us-ascii?Q?lYF3pB+t5FK5pYug5quqLX87M/FuOgBz5iDWVIdM5thb26qj6skFXXhdQBL9?= =?us-ascii?Q?xoQRXvtsbyPOcFvpORsa7XeGSF5/TNsrhUu2+jTzbNXdZDjVSOjOCI5UbX4N?= =?us-ascii?Q?pN//CU5KpXhvluFOLAB84dLQy+F+Rh6bTPIJ3eUG0vUA6lBB9C3yu0hqQCpE?= =?us-ascii?Q?7jdMGHmWRQaPxzV5p50kYDIvAR/9SpRCp7lBzfqg66k+zTkp3G4z8n3fcPAg?= =?us-ascii?Q?+bA7+It84TfMbdm6elS+eMt6xS50bUcthRPwHkxtrq6pPRnRT5eISpiuRQT0?= =?us-ascii?Q?OZXBiHr8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ULz6J1bF+Vhr1xef6k8IWSQuy3hxueAcOqyrSsjJtxZKSlm0/+WJT/Y9fF1KJEpd0GzMJwNnObHRSM1yKOzgSay52cUEqn+8RrnqkwV0hNojf0xZFLIejCV4c5N1pQ54b38Zj7Qygv+CdkI+3pMh+j/xcgiQ4S1ro8Nb6CNHyNQ0LL5ia5CmK8VkmQwxMscZyyHaWQwH+iC7jJlwVYFvxXgOvmCyEpRUKNnNuk63ZXRSIJpGjeHa X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2018 10:05:13.5338 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 48f29c95-cb92-4c2b-4b38-08d59625bbfb X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0182 Cc: tiwai@suse.de, Alexander.Deucher@amd.com, lgirdwood@gmail.com, djkurtz@chromium.org, akshu.agrawal@amd.com Subject: [alsa-devel] [PATCH 1/2] ASoC: AMD: Support headset button on Stoney DA7219 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Adds headset button support. TEST=Tested Volume UP/Down functionality Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-da7219-max98357a.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c index b205c78..d9491e1 100644 --- a/sound/soc/amd/acp-da7219-max98357a.c +++ b/sound/soc/amd/acp-da7219-max98357a.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include "../codecs/da7219.h" @@ -51,6 +52,7 @@ static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd) struct snd_soc_card *card = rtd->card; struct snd_soc_dai *codec_dai = rtd->codec_dai; struct snd_soc_component *component = codec_dai->component; + struct snd_soc_jack *jack; dev_info(rtd->dev, "codec dai name = %s\n", codec_dai->name); @@ -80,6 +82,12 @@ static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd) return ret; } + jack = &cz_jack; + snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA); + snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP); + snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN); + snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND); + da7219_aad_jack_det(component, &cz_jack); return 0;