From patchwork Fri May 24 20:40:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Banajit Goswami X-Patchwork-Id: 10960449 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 14D1E13AD for ; Fri, 24 May 2019 20:51:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0312E289CC for ; Fri, 24 May 2019 20:51:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB9AE28A47; Fri, 24 May 2019 20:51: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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4F00E289CC for ; Fri, 24 May 2019 20:51:52 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B5E31171F; Fri, 24 May 2019 22:51:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B5E31171F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558731110; bh=mfmZ7c/j121HlWdlNYAJbdfqkwbRBhyGiBQeYqtMNvs=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=pmIHt+3d1pEjv9srObIbzZXPHeDolPpmm/PPE8GIbGtts0lBUd7Twq7lHnUO+lI60 39tQ/ovUJNejUwjDSXxLaLV44iAEMCjuIheUieMfNR1cNYyfX4WXIRJD/prnIGUrlD rxizIBI6fTClbi+2u5eI2x7TVrlyg/gsoWleZkNI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B7DC8F89630; Fri, 24 May 2019 22:50:59 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id C99CDF8963E; Fri, 24 May 2019 22:50:57 +0200 (CEST) Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 35000F8962F for ; Fri, 24 May 2019 22:50:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 35000F8962F Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="NM+AmP1b"; dkim=pass (1024-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="Q5MPMp42" Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 935D060256; Fri, 24 May 2019 20:40:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558730454; bh=gne908NtTubk5TiL/aykKkAesdYmaRXs+4vJQcGFdSQ=; h=From:To:Cc:Subject:Date:From; b=NM+AmP1b0A8P3Fmdtfc2On/2/yI2Zvsf2AujwNmWQSk5S+koC2y435XhTdszEgyml urvh+y95XVXYZtlrDbba2ubB/kN5XS9q6EkJajU1Lpi4cCGE/Gy/QxvjckpCRB/X2x uGOnn6PG8pQD+NgmUCHZ3U0dPfMLgAjZ0WQK7ATE= Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: bgoswami@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1751060907; Fri, 24 May 2019 20:40:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558730453; bh=gne908NtTubk5TiL/aykKkAesdYmaRXs+4vJQcGFdSQ=; h=From:To:Cc:Subject:Date:From; b=Q5MPMp42IqtC8SZ10B1PNcllcRGOwUWDMBcXjAiAdijIkXQHsumEybiHuoIucyhSm f8IF94IBgofgXBr/xPD/n7zuKcMoi4CAVPVwlDX++xR9IxgxG2iWYUrlkk9X9MsBn0 +NY68XFJCnk3jb8LJwJ+7V/VWYJyoWpYDfn2/5s4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1751060907 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=bgoswami@codeaurora.org From: bgoswami@codeaurora.org To: perex@perex.cz, tiwai@suse.com Date: Fri, 24 May 2019 13:40:50 -0700 Message-Id: <1558730450-16580-1-git-send-email-bgoswami@codeaurora.org> X-Mailer: git-send-email 1.9.1 Cc: alsa-devel@alsa-project.org, Banajit Goswami , plai@codeaurora.org, Gopikrishnaiah Anandan , broonie@kernel.org, srinivas.kandagatla@linaro.org Subject: [alsa-devel] [PATCH 3/3] ALSA: jack: add switch event for unsupported jack types X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Banajit Goswami Add a jack switch event to report unsupported plug type. This event can be used to report a headset or an extension cable with GND/MIC swap etc., which may not be supported by the device. Signed-off-by: Gopikrishnaiah Anandan Signed-off-by: Banajit Goswami --- sound/core/jack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/core/jack.c b/sound/core/jack.c index 36b047b..4c21e48 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c @@ -40,6 +40,7 @@ struct snd_jack_kctl { SW_JACK_PHYSICAL_INSERT, SW_VIDEOOUT_INSERT, SW_LINEIN_INSERT, + SW_UNSUPPORT_INSERT, }; #endif /* CONFIG_SND_JACK_INPUT_DEV */