Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2991365rwb; Sat, 8 Oct 2022 19:12:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5py1tqG4g6AdfO1kJ7upb/C6G2GRMF+V9G5D18s61sw7+R2cQ3QipqnopxvvfnU/1b+Bjf X-Received: by 2002:a63:a06:0:b0:458:2853:45e4 with SMTP id 6-20020a630a06000000b00458285345e4mr10727679pgk.20.1665281532661; Sat, 08 Oct 2022 19:12:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665281532; cv=none; d=google.com; s=arc-20160816; b=FVzFCjEipuJhMpE4YOEI0CIAYIU59XA0NAEJCLtA9pscElM7LOnRrbJM9a2doQZMk9 IoNowVmk8RDRv0Wi7gGFklNmSaWefyP5bmcEFBZ4DNmSYz18D5AlJc6y/3SCSxFrVbyk 9JPBQDV7FT+WmG9CNYdzvTF8kEhPAY6X67v//KZg/i3WFoG7KfYcBsfl0HBcG5oVt1N9 15/3Q4SE6ZL+sHg4a3d8QhznWubcu/FPL+KRuNQquqHdUNhXIFZPj0JmIbqy5Qgp6utm NGVcqoceFJWB05Prqvhz3oqNFKsGS/e+YLwC/2AOZrY/xBF0iuVnNP/LI4lqz2Qkjelc YmUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :dkim-signature:date; bh=bOWJkhZwbLAJZMmQNK1Ow6lvYBOieY03TLORKHEfn/g=; b=DL82hT13BCMQ1U4hWiw1/sqHygrDL8gWggSBZufFvJ/bUbL03wfukHRvRLGZqF7jdZ S1rCD/qdJZosiib9R2qwFJZJKDID5sXkRmZSkMQ+aTrZPpwyfg6VRVQxw/7HM0r2DfZE 4jwLEsQEIwXDYfPATf3YVcvfszMAQYf+co6l29K5/6XcMC7Jsr0wi1Qh4b12it6nLToW p5KkIRDNsincU3we7SPQsaNwgZbxdnFEDGtlZ4oU4DHKxgi17al4YzMbayhq5YXM419E V+sYaKWfZCvZXUXQW2SFk9KPqK+zLJ0eXe9vms/9hQAUrsNIVmjYzZl5+VF+99vUFOvq boEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@connolly.tech header.s=protonmail header.b=FhTwH0n7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=connolly.tech Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y186-20020a638ac3000000b0044cedfa9dd5si7632161pgd.756.2022.10.08.19.12.00; Sat, 08 Oct 2022 19:12:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@connolly.tech header.s=protonmail header.b=FhTwH0n7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=connolly.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229811AbiJICBs (ORCPT + 99 others); Sat, 8 Oct 2022 22:01:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbiJICBq (ORCPT ); Sat, 8 Oct 2022 22:01:46 -0400 Received: from mail-4022.proton.ch (mail-4022.proton.ch [185.70.40.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A4D933E2B for ; Sat, 8 Oct 2022 19:01:42 -0700 (PDT) Date: Sun, 09 Oct 2022 02:01:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1665280901; x=1665540101; bh=bOWJkhZwbLAJZMmQNK1Ow6lvYBOieY03TLORKHEfn/g=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=FhTwH0n7qn2+H2uKLzIQPteezEzwymqG+rxxbJ4phr0L3Hoy3451eo7+5tWdPmtic Y4fgo2XG+BNuwQ9dhmtqkmDVN13/xwdLmJBGh+X1LwBkRE/bAl+ey1ZDplIoJYnoQQ 7h9WlHaWIHryVugSsw5lBBLfjwTTjYOEyg7jE22k= To: Dylan Van Assche , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org From: Caleb Connolly Cc: ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org Subject: Re: [PATCH v2] sound: soc: codecs: wcd-mbhc-v2: expose ALSA control for jack Message-ID: In-Reply-To: <20221007155716.10594-1-me@dylanvanassche.be> References: <20221007155716.10594-1-me@dylanvanassche.be> Feedback-ID: 10753939:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tested on a OnePlus 6 running postmarketOS! On 07/10/2022 16:57, Dylan Van Assche wrote: > Jack detection is currently fully functional via the input > interface together with multimedia buttons, but is not exposed > as an ALSA control. 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. > > Signed-off-by: Dylan Van Assche Tested-by: Caleb Connolly > --- > sound/soc/codecs/wcd-mbhc-v2.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/sound/soc/codecs/wcd-mbhc-v2.c b/sound/soc/codecs/wcd-mbhc-v= 2.c > index 1911750f7445..1b75f49b2858 100644 > --- a/sound/soc/codecs/wcd-mbhc-v2.c > +++ b/sound/soc/codecs/wcd-mbhc-v2.c > @@ -725,6 +725,10 @@ static int wcd_mbhc_initialise(struct wcd_mbhc *mbhc= ) > > =09mutex_lock(&mbhc->lock); > > +=09ret =3D snd_jack_add_new_kctl(mbhc->jack->jack, "Headset Jack", WCD_M= BHC_JACK_MASK); > +=09if (ret) > +=09=09dev_warn(component->dev, "failed creating Headset Jack kctl with e= rr: %d\n", ret); > + > =09/* enable HS detection */ > =09if (mbhc->mbhc_cb->hph_pull_up_control_v2) > =09=09mbhc->mbhc_cb->hph_pull_up_control_v2(component, > -- > 2.37.3 > -- Kind Regards, Caleb