From patchwork Fri May 24 20:40:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Banajit Goswami X-Patchwork-Id: 10960453 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 042D5933 for ; Fri, 24 May 2019 20:53:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E82B428942 for ; Fri, 24 May 2019 20:53:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC082289CC; Fri, 24 May 2019 20:53:34 +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 26E2A28A5A for ; Fri, 24 May 2019 20:53:33 +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 E8FC8173E; Fri, 24 May 2019 22:52:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E8FC8173E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558731212; bh=RtxLXUz9gZ7gzE3nztzhp/2NMBzlumasDABP8lXtDaQ=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=GOUogW4Dj0O/M3SWd9+S15v6XpB9qBsl5XkXEMaEVnUoKsb26Fe7lsh+kn72tKInY lw1C45elkgDRMYndNsSg9WLIMXJlC2OGNm3FbobPDM9zQVPX4vREfppyU2aiAks6Sx e2kkwPLE421nnp3USvwOQoxbUatoI33E4CZsVGzE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id EF495F89725; Fri, 24 May 2019 22:51:04 +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 ADD3BF89636; Fri, 24 May 2019 22:50:59 +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 7A6EAF806F7 for ; Fri, 24 May 2019 22:50:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7A6EAF806F7 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="PTure5WS"; dkim=pass (1024-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="PTure5WS" Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 71B2760F38; Fri, 24 May 2019 20:40:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558730426; bh=77SbtK8sBzjfifXjysYcc4EGEuOLKBVbmjBb4rvne44=; h=From:To:Cc:Subject:Date:From; b=PTure5WSTnWUF7LniGUSmjLXTgHT1mUpo+D/ACXAFcoVllZGBzAXljg4NgHFjilvp 3HXjGEQG8MrtFZyCtwsAhq4L7jkSifTGou5AWFlTh8FjS2H+yB3KJj5EKT1fHlRv11 jIucDGJnXzbL72lU/0PGdJvr5khYMXEkObAoVris= 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 EDFB460C60; Fri, 24 May 2019 20:40:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558730426; bh=77SbtK8sBzjfifXjysYcc4EGEuOLKBVbmjBb4rvne44=; h=From:To:Cc:Subject:Date:From; b=PTure5WSTnWUF7LniGUSmjLXTgHT1mUpo+D/ACXAFcoVllZGBzAXljg4NgHFjilvp 3HXjGEQG8MrtFZyCtwsAhq4L7jkSifTGou5AWFlTh8FjS2H+yB3KJj5EKT1fHlRv11 jIucDGJnXzbL72lU/0PGdJvr5khYMXEkObAoVris= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org EDFB460C60 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:23 -0700 Message-Id: <1558730423-16490-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 1/3] ALSA: jack: Remove hard coding of jack_switch_types array size 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 The size for jack_switch_types array is currently controlled by a MACRO 'SND_JACK_SWITCH_TYPES', whose value needs to be updated everytime a new jack switch type is added. Remove this MACRO and use ARRAY_SIZE instead to get size of the array. Signed-off-by: Gopikrishnaiah Anandan Signed-off-by: Banajit Goswami --- include/sound/jack.h | 3 --- sound/core/jack.c | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/sound/jack.h b/include/sound/jack.h index 1e84bfb..b0791c5 100644 --- a/include/sound/jack.h +++ b/include/sound/jack.h @@ -68,9 +68,6 @@ enum snd_jack_types { SND_JACK_BTN_5 = 0x0200, }; -/* Keep in sync with definitions above */ -#define SND_JACK_SWITCH_TYPES 6 - struct snd_jack { struct list_head kctl_list; struct snd_card *card; diff --git a/sound/core/jack.c b/sound/core/jack.c index 84c2a17..36b047b 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c @@ -33,7 +33,7 @@ struct snd_jack_kctl { }; #ifdef CONFIG_SND_JACK_INPUT_DEV -static int jack_switch_types[SND_JACK_SWITCH_TYPES] = { +static int jack_switch_types[] = { SW_HEADPHONE_INSERT, SW_MICROPHONE_INSERT, SW_LINEOUT_INSERT, @@ -250,7 +250,7 @@ int snd_jack_new(struct snd_card *card, const char *id, int type, jack->type = type; - for (i = 0; i < SND_JACK_SWITCH_TYPES; i++) + for (i = 0; i < ARRAY_SIZE(jack_switch_types); i++) if (type & (1 << i)) input_set_capability(jack->input_dev, EV_SW, jack_switch_types[i]); From patchwork Fri May 24 20:40:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Banajit Goswami X-Patchwork-Id: 10960451 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 3F5C9933 for ; Fri, 24 May 2019 20:52:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C97A288DC for ; Fri, 24 May 2019 20:52:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20F3F28A60; Fri, 24 May 2019 20:52:49 +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 6CF78288DC for ; Fri, 24 May 2019 20:52:48 +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 AE3641726; Fri, 24 May 2019 22:51:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AE3641726 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558731166; bh=fbBktxRUwpwY/60Q78OSl40iiRFEfu+4Qpp2JgdFRv8=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=WTUxfh7etkxabq7CaW/mm3pQUb1R9aZO1WFnyR5LbYBSQNeWuwVSl64PuKpSFYt2b 0PtiC8lQbF7INNBsHc7T209oeU6aTBQLuuscK08J8JnJNTHsIFjqEGczkbd7aKKVdM JPMVBkzRHPaJ6xNE5wzZ4SoX85SHYo4YcncngViY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C918CF89636; Fri, 24 May 2019 22:51:01 +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 03DB6F89636; 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 310BBF80C0F for ; Fri, 24 May 2019 22:50:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 310BBF80C0F Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="JlzWU32F"; dkim=pass (1024-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="DhF739hA" Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 1EA2660D0C; Fri, 24 May 2019 20:40:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558730443; bh=1rtby5Hx7aX1Icw+wA2MpY4vbTBzn0e374yLIU7OMpg=; h=From:To:Cc:Subject:Date:From; b=JlzWU32FveCujkR/3VpoYUX9lcRi9f+6XPd1PF10BdhJzrj/PJXvvKCxJISjru/l4 ozjDMfpcwlvRDaB6uxie3lG0ZQXlWAiPa4LPbDFzh/dCT3KHfZhdFm+tQ8Fab51+aG pWSyTrRtt+s5biYVn3zZlTbt9VkK3rBCiWnkzSs0= 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 479B960AA8; Fri, 24 May 2019 20:40:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558730442; bh=1rtby5Hx7aX1Icw+wA2MpY4vbTBzn0e374yLIU7OMpg=; h=From:To:Cc:Subject:Date:From; b=DhF739hAn6m7eSqjcXHAGXzVGIxk5XcV/1Vasucrdv0Ef+7i4r3h/hzpNThXzkkCz sVmaKvYktcJ+DDidWlA+Igw6VLyJfQhiN5D0Sb5INHsb+0yqW0X4tiw8ziBLcUq/v5 yNDUl1PJ7oTfof0BNGF+xKfd+NNcjz3Frr2Yn1k0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 479B960AA8 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: dmitry.torokhov@gmail.com Date: Fri, 24 May 2019 13:40:38 -0700 Message-Id: <1558730438-16524-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, tiwai@suse.com, broonie@kernel.org, srinivas.kandagatla@linaro.org, linux-input@vger.kernel.org, Gopikrishnaiah Anandan Subject: [alsa-devel] [PATCH 2/3] input: Add SW_UNSUPPORT_INSERT define 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 Some devices may not support specific type of input devices. For example, when a headset or extension cable with GND/MIC swap is plugged into a headset jack that does not support the headset/cable, it needs to be reported with a corresponding input event. Also, increase the max values for INPUT_DEVICE_ID_SW_MAX and SW_MAX, to accommodate future extension of the number of event. Signed-off-by: Gopikrishnaiah Anandan Signed-off-by: Banajit Goswami --- include/linux/mod_devicetable.h | 2 +- include/uapi/linux/input-event-codes.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 448621c..7586099 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -299,7 +299,7 @@ struct pcmcia_device_id { #define INPUT_DEVICE_ID_LED_MAX 0x0f #define INPUT_DEVICE_ID_SND_MAX 0x07 #define INPUT_DEVICE_ID_FF_MAX 0x7f -#define INPUT_DEVICE_ID_SW_MAX 0x0f +#define INPUT_DEVICE_ID_SW_MAX 0x1f #define INPUT_DEVICE_ID_PROP_MAX 0x1f #define INPUT_DEVICE_ID_MATCH_BUS 1 diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index 85387c7..960fa86 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -808,7 +808,8 @@ #define SW_LINEIN_INSERT 0x0d /* set = inserted */ #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ #define SW_PEN_INSERTED 0x0f /* set = pen inserted */ -#define SW_MAX 0x0f +#define SW_UNSUPPORT_INSERT 0x10 /* set = unsupported device inserted */ +#define SW_MAX 0x1f #define SW_CNT (SW_MAX+1) /* 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 */