From patchwork Sat Mar 25 14:21:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Van Assche X-Patchwork-Id: 13187783 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 79597C6FD1C for ; Sat, 25 Mar 2023 14:23:27 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3B330E76; Sat, 25 Mar 2023 15:22:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3B330E76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1679754204; bh=FyZ9wWxFc9DhD+TJe4C7/wsqgo6GjP49OQ6ICKaMGAI=; h=To:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From:Reply-To:Cc:From; b=fZqpz8lRQOI9QYBxHpt2WZPVKSjre6K+RK7LAgvdWc8T7FUscBWW+hWr61i9hOBvY ff5zCdkZPIR8DYsRTFSS62EDii8Q6tGexAsi65P71TXTjoXudHgaJo6p/wpX9lj9if D+dUETU8aI4/TV7ZGasPemDUu+jWgKMlRhkXFAnA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D01F1F802E8; Sat, 25 Mar 2023 15:22:11 +0100 (CET) To: Banajit Goswami , Jaroslav Kysela , Takashi Iwai Subject: [PATCH v3 0/1] Expose ALSA control for jack Date: Sat, 25 Mar 2023 15:21:41 +0100 X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <167975413007.26.9031193578498889790@mailman-core.alsa-project.org> X-Patchwork-Original-From: Dylan Van Assche via Alsa-devel From: Dylan Van Assche Reply-To: Dylan Van Assche Cc: Srinivas Kandagatla , Liam Girdwood , Mark Brown , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Dylan Van Assche Content-Disposition: inline Qualcomm SDM845 features a headphone jack via a Qualcomm WCD9340 codec which has jack detection through the wcd-mbhc-v2 driver. ALSA features 2 ways to expose jack detection from the kernel to userspace either as an input device or through an ALSA control. The wcd-mbhc-v2 driver only supports the first option which is insufficient for userspace programs e.g. PulseAudio [1]. Therefore, ALSA clients such as PulseAudio do not pick up the jack detection events as they only support one of the possible interface (ALSA control or input interface, but not both). Expose the jack events as an ALSA control and input interface to provide ALSA clients both interfaces. [1] https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1377 Changes in v3: - Improved cover letter - Added Tested-by from https://lore.kernel.org/alsa-devel/20221007155716.10594-1-me@dylanvanassche.be/ - Properly added maintainers for sending this patch Kind regards, Dylan Van Assche Dylan Van Assche (1): sound: soc: codecs: wcd-mbhc-v2: expose ALSA control for jack sound/soc/codecs/wcd-mbhc-v2.c | 4 ++++ 1 file changed, 4 insertions(+)