From patchwork Mon Apr 9 09:19:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akshu Agrawal X-Patchwork-Id: 10330867 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 1CFD36053B for ; Mon, 9 Apr 2018 09:26:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16A6B28AA8 for ; Mon, 9 Apr 2018 09:26:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B27728AD2; Mon, 9 Apr 2018 09:26:54 +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=-2.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham 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 C281128AA8 for ; Mon, 9 Apr 2018 09:26:52 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id EDE272673F6; Mon, 9 Apr 2018 11:20:39 +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 785252673F6; Mon, 9 Apr 2018 11:20:37 +0200 (CEST) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0075.outbound.protection.outlook.com [104.47.38.75]) by alsa0.perex.cz (Postfix) with ESMTP id B9B53266C1C for ; Mon, 9 Apr 2018 11:20:33 +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=dHuqf+gGRZr0bmmCrqVmr4a5y0cR/9YcqTtoP2+hIco=; b=xnu32nNZ5+ZJdHig6HHvhGeNkMfRHIsm1ITJoR6Sb2P/I3eDUFk1l16UzZ+hRYeEsJXJJkfHNg/ZutOx4ZM5PZ0tyEhugmJGEgDcDLOK8BRRrwne7TCpSyOKJvmufDlDLu8KwUWLVZyGCJ0yWx7uTEYRYMFWBFFJxY6nDanfF9g= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Akshu.Agrawal@amd.com; Received: from akshu-HP-EliteBook-745-G2.mshome.net (202.56.249.162) by DM5PR1201MB0187.namprd12.prod.outlook.com (2603:10b6:4:56::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Mon, 9 Apr 2018 09:20:28 +0000 From: Akshu Agrawal To: broonie@kernel.org, alsa-devel@alsa-project.org Date: Mon, 9 Apr 2018 17:19:55 +0800 Message-Id: <1523265596-8837-1-git-send-email-akshu.agrawal@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [202.56.249.162] X-ClientProxiedBy: PN1PR0101CA0017.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:e::27) To DM5PR1201MB0187.namprd12.prod.outlook.com (2603:10b6:4:56::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 925a63df-7077-4a2b-b47d-08d59dfb243b X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DM5PR1201MB0187; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0187; 3:zh6hAb1QWb7IFDPxLwjl866LmV2zPrP1mspxaZd52jlO5MVoc3ZYJdIEMiFSifFtCyz76IDpLtUPoVkG4KySzw3yhwK0zhikTIF56WodIuxus/UhDu9eYS//2iF+20tofhQ89tnho+U38uMD5L6VKr1AU9twY3h/dEJLHJjb5N+GTXCDnytE93wCxiffqwDSIWk44Z1NXVC/i28qqw4gQaELddndq9IuYnS4AewpF4DCgvUiU2h16oALVPP3PtKo; 25:fYxOVt8xUP84eThqnwtqqmIbCuVvPSZeM1ylq3Os+haCjepMXft1J/df2uUCxMBEePGJJ5Iz40t5lSeT0UEJIVkKlPuRipidBfphqIrtrZa95i0ncrEwufEaii2tFoM06iV238DpCML4htQ3f0Mzact5F/y+AealcnW2/bkxi3/kzDyqk8MAC7vS2vR2Pk/UoOLihjfE/A9PrCr2JQT1ZB64943pOIcKQ6RSiXHyvmBouYtQtjcxLgYwmekvqY+LfEK8bX357r8hZ4/f/H4dnzYEZd5GHcSBv91OFBWFOwgareQC8i82owSus0S6aoF08szkTBBofl8LwfymvQT2AQ==; 31:LXdxFhQAxOGCchRE1fZYSPKfnkHHJEkym1OmHx3WygbQ58KhUOvRqJ+Div3VpIvY7QE/kWxqzJpGdeG9H9B3LnDlrJj9lBojlnrcAfcPeXnKIYfEc4z07sfQPsWfUU41PSiJ6oEekO7Fgfum/MIiC2gUrA4+J57hpx8WbOeWz5NeLsdLJj70HamR/IvicR5NQ91FA+HZdMIZa6PncwZfuzp60mQdWC77X3UtYiCLntg= X-MS-TrafficTypeDiagnostic: DM5PR1201MB0187: X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0187; 20:o+B9Q/UxLYCMXqmptiuBNXa8uoY5OFrsoaJ1A4eAqNFBIMiLdhQXHgOHCd+/592pVPqAYJnJqlbUwlJ1RKLLgJYnsXzmQ+yzdWkA4k8EVS8/Z91yFgu86F1mF+K343OG+9aDsvobypkWlHH65YvgInrgU7a/BhPZk1zoSqMsPAoX/kaOloi21FWKqWicigynNMETSaaXzfBjI8MY8arsCkTfJwm2kqj6QzKNsP0A9Cv5JxMBsEf10JCDVxGMc7/6oOhGjWTJYLqQW+NfO8Pddl0vsgDSvttoIgabkSinl1KsK1e77yZw1yItVZtaTacFBIZR9JciCeyKOKsEIn9FScg+eodh8kDiqNuryoEDkgJr/NFNcOS683GYjduXSmefevamkO5rzekkhZvwu731fQlNRRMdHsnU4dHm+FEl4e49LQYxuuP3b83p7Bqfu/w6kUyIEXO1pkCsezMcLfbcGhxF/WDUs1exHw3rlAFbpQ2BKiimTZQYj9GWScnfxa/W; 4:ZPK3zvEtmWijL1Ia36Wiu7kBYczWkS1yv/67+/GeXHYrAy/eYUmLCtBgXIbcejbBdn1YK8T94iEGMQE0lNh8BZwd4D7Vv6cGHMoURfh+RXac37mrEG6FH7crKxqxDRiw5YLWtctgKJeLjZtTI2DTYaBy+qIOXjby/37NpjDhZ/kTPjI+onz86CakPVCsPJ/8sUTnS6JnIgHY3m3AR8a669vls1RC+B0RZGZglGphnBUrMqVR+eE7+Vkw+bLZLs0zAiv+iW4z55EBCUEH4chTuOjM6UBmDcAleWDR4g24a39GK1+litTDye79NlH1dyiR 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)(93006095)(93001095)(10201501046)(3231221)(944501327)(52105095)(3002001)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR1201MB0187; BCL:0; PCL:0; RULEID:; SRVR:DM5PR1201MB0187; X-Forefront-PRVS: 0637FCE711 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(366004)(39380400002)(376002)(396003)(199004)(189003)(48376002)(2906002)(50466002)(6486002)(5660300001)(7736002)(305945005)(47776003)(66066001)(6666003)(97736004)(69596002)(36756003)(86362001)(68736007)(105586002)(476003)(106356001)(2616005)(956004)(53936002)(6512007)(8676002)(81166006)(81156014)(3846002)(6116002)(26005)(51416003)(52116002)(16526019)(186003)(6506007)(386003)(486006)(53416004)(8936002)(72206003)(16586007)(478600001)(50226002)(4326008)(39060400002)(316002)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR1201MB0187; H:akshu-HP-EliteBook-745-G2.mshome.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR1201MB0187; 23:p6b+B9yP1RZjlDaKlFzZ/buZIYsfkww//9NwsIe?= =?us-ascii?Q?tL3lrIqENtSQag/tRqvXPsxk6RFqOgYUo8CyIlJ2NpIyUujTcOq/vuNjCI+y?= =?us-ascii?Q?up/tbzonuO36oCSMFO1rxNENyOM9X4/U2zEHb/TY3qNHTXY6PIbt8C1a2lk1?= =?us-ascii?Q?zKixQdjzaWEFwZeX5Ydg6DVilwvHkgvYI63ZHALwvEQrwzLg02gMZ48TLaVj?= =?us-ascii?Q?TI7ALulA5CIOxBi3M79n4oXb3i4hQWZSyuW0K2fRdksxZs3ALSJrbf+JUJ+3?= =?us-ascii?Q?S/aN19qypONGzNuUY+J9Z7mcibiayV2umi/TFw5yKl/VMZSTsiBDKeMtzo5Y?= =?us-ascii?Q?lzP6FrkC3fFE0P8lhK2LwiM28qLBe+JkgGgk1x7gp3D+SJc+3FNWxwZLe/sE?= =?us-ascii?Q?3F31wSgY1HgzT6snzQXIuRc7k8FjEDpRFjImzA4dl/lmGPn9BSxw3RYzL0uj?= =?us-ascii?Q?4FeStGeuueKuCbadS8+7itxKwt3zXiZ3reKwntM+GKxGhpiKxRsaPDB8OwKu?= =?us-ascii?Q?nwU80tOA1ESTSdWAP56xUo0v62nQBHEyUHmxFueP+nxJoqFjvVgGFU6tBsEH?= =?us-ascii?Q?mUTcKan0E/g79h3wbh3tVUeUI74ScSE/5MDrMEr90jSLHyzZ0Of6NmIg0IkG?= =?us-ascii?Q?SBa5pt3jzAJaXZSxSsfZMPhZv4Ghc4Ei8QsG+qHBGo2Bp4wZPYQ+WJbu81aa?= =?us-ascii?Q?2C4MWNEW7q5ajkzno0dfCi7bomCBgWHfv74HTRuhpgOjla8oo6br6DI4PHfn?= =?us-ascii?Q?NUdOLsNgxGGwLyKnL/Snk9ILdYhWuerH/gb37PZPskR5SkfLHkTticjJyHWU?= =?us-ascii?Q?l3nsKe1CfOES77xDk7BxzoV2NNK4V/6WT6xVi9Ang9jEzNzlVAduvLIQNlWm?= =?us-ascii?Q?28d5C4gTjFKsPoX0w4xIstyjzZIaTFjVPORuXNJslqoJrkIALyKaUFZB35de?= =?us-ascii?Q?IiaWfMj6PuwOlahtu2P3hM6E60ms+jnEA/biC+3D22fVnwq+CJFXXDr6deR0?= =?us-ascii?Q?3VFHED+00ujB/vF5S1vHpDRdnLi/4R+HHYuA1HEbsRv6UnyupWq+At7d0dp2?= =?us-ascii?Q?zwsMPQ4YBx2GzkRkJP4QgZeVNeqjGLZhSdDAH1XN/BVk95uDgXhKOTPcWzBm?= =?us-ascii?Q?ifYGg/x3kaLpHXmdc36ap6/AiG6BTPeZlKnXfTyAki3t5IdkyS+RiDFmWdaz?= =?us-ascii?Q?BGjcRVCwdKoQoKzQ=3D?= X-Microsoft-Antispam-Message-Info: 13IJL0J9Yu0nchWX0w+/8xdUFTOD4ardzwPs3Njk8QBOjMZXw1Wfy6k76/n8B46eQRHVRbQkdDx579rtXQDvXOKSqV7hlAa/i38/jh1sG8DvlNoSIkAbsurNwrIFs6jc25VBCb4BuXGXFBqA5Yu6GWgTUyYNl1nftLVwkpgvaJvj1ZG+eSP8ZX4oO8l3wWe3 X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0187; 6:xLE99zW8ESoJ1olenilKnLgp4HMPKC6FOd0ETTbEcdOYQQeocyOr31D8lA2f5M92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n52Ed5yHl/ilq1GcP72SpEd+6NJBb6sOWNDWt7gzxI5kKOnpVo8xRaJNbhwaAT6rxrh1RnllWo57s/jM1fRCvJpSeRUmzHHThyDBrpY2AqKLpbUcAPEroTFjLdtOAsPpVrwkxG8LpCWdCZRX3ByshVVbP9LHHUaYXoLCXcKmTVzVUwELmTqrSkndtPsv6aReRTOleJQkqiKW+L1zGg X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2018 09:20:28.8506 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 925a63df-7077-4a2b-b47d-08d59dfb243b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0187 Cc: tiwai@suse.de, Alexander.Deucher@amd.com, lgirdwood@gmail.com, djkurtz@chromium.org, akshu.agrawal@amd.com Subject: [alsa-devel] [PATCH v2, 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, Play/Pause functionality Signed-off-by: Akshu Agrawal --- v2: Changed KEY_MEDIA to KEY_PLAYPAUSE 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..1012a80 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_PLAYPAUSE); + 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;