Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3523971pxb; Mon, 4 Apr 2022 19:52:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfOpfZDLY8kTwBWLmeaRRhhRDy0fIYWGuHNluvEsbKR83jssXwH37c2epeGoNW9jtluvKy X-Received: by 2002:a17:903:20c:b0:154:b58:d424 with SMTP id r12-20020a170903020c00b001540b58d424mr1133625plh.45.1649127134833; Mon, 04 Apr 2022 19:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649127134; cv=none; d=google.com; s=arc-20160816; b=c/GvU8+exE1cGRI/hix5raO3oXjOvcZhhJkn95SstbojwEf0M1RiNrcQbpdBS6t1XY iYILFKE9EDEhhYbQKvuIxjQFGuK64288/nK9od1dcShQLZFy67IRfzQIVZfhB3ZPLMP3 GXAbejB/8IeZ18DiGrLMuL6HjUh+wJ3wWvLm+Q+PfsNlMaX/6mcx4ClwXwvzjDuqMOQs +tEiyP8u4MHf4pDbrxsE3C4+5wQySHu96SFzD0AHSKytJ0fgKxeqyeobVm2bMljM2s6q 5TY8xqAXuxOZbagzaVd06fwVSR/KC3q0hHMFKSdsFc8nVlD7NltO/PsWOceFW8nrjDG9 kutQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=AO7EkwQyq4uDg/w6bqg3sjPBuztYQMyfSPRU2leT50U=; b=02WkvaZg/4bA2mlaM5FHnd3c71jc1NCLN25G07YPX1uiPMZlPNv8059FEAUpvU8kw2 Y7IarjcU24/XFTQs+RWjgkXXQRt1a0yogxRzCdAaH5i+hgqQ4COehIYFvSfJIwOKxaHh prU6ZCjUVnR61rkG2xrT7PJnUVfoHGcAUvz5K98VxwfoaWFPp2y1kec2z6iDJ5SiP91t 4RKyZn9cxRPBSubvQi539QeXHepbRtUhXe0kHNyz+XWgP93DigKyFRZ0z7jEhGSo3hTo hbxw+GrAB3N/bBz+cWM9onzthliag2ovzXxKVomzhepBhVT5X+oJn+JrOAaF8QmSAYKJ uibA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="e/UxQhRf"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x10-20020a170902ea8a00b001567af75e5bsi8413410plb.517.2022.04.04.19.52.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 19:52:14 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="e/UxQhRf"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0B47A23EC49; Mon, 4 Apr 2022 18:16:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229807AbiDCJBf (ORCPT + 99 others); Sun, 3 Apr 2022 05:01:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355323AbiDCJB3 (ORCPT ); Sun, 3 Apr 2022 05:01:29 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B816436324 for ; Sun, 3 Apr 2022 01:59:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id EA670CE0B75 for ; Sun, 3 Apr 2022 08:59:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 227A8C340F3; Sun, 3 Apr 2022 08:59:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648976371; bh=+MRl4rjdWzvUS2WdlS62P5OnEWVQOdoGiz49cpOtwgg=; h=From:To:Cc:Subject:Date:From; b=e/UxQhRf7BDgVVBto0RfrPHS5nJwc3nj5bm9X+9H/bcsRhxwHuQIfmdfMd3B9Ap84 td9OWJ8SFL9YLEGhDfgdv9NyQe3ecY3Sz2KUplVel5FFjb1lEWIt4Efumncx8W+1bs OSLr7NmMWm7jAdVGUPfBmT7B9XbTURf5MB/grhSLmhd0iqzhwQBQpEqgsbnlkDJSgD 05P1AFDMmMCn7u+T3sq09iPWikzNVjzPtd60q0a2J0G3tY9mXtZoW3URJ+ov28yMEY r0ClxWttx+wA5uh+PkMRY0ffCVzu7ReGo+ddZES9RkI7VP+u+Mb3EPfnz+zxunVMj1 mhskVBBOEQ1qw== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1naw52-00D6f1-GH; Sun, 03 Apr 2022 10:59:28 +0200 From: Mauro Carvalho Chehab To: Pierre-Louis Bossart Cc: Mauro Carvalho Chehab , Hans de Goede , =?UTF-8?q?P=C3=A9ter=20Ujfalusi?= , Bard Liao , Cezary Rojewski , Jaroslav Kysela , Jie Yang , Liam Girdwood , Mark Brown , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH RFC 0/2] Make headphone work on Huawei Matebook D15 Date: Sun, 3 Apr 2022 10:59:23 +0200 Message-Id: X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 The headphone output at Huawei Matebook D15 is controlled by a separate GPIO than the speaker. So, the es8336 boards logic need to handle two events: one for the speaker switch and another one for the headphone. Please notice that this is my first real incursion at SOC/SOF. While this is working fine, I'm still struggling with some troubles with pipewire, which I believe are due to UCM support, as, sometimes when pavucontrol starts, the playback stucks. Also, sometimes the mixers won't change when jack plug/unplug is detected. So, more debug is needed, and probably the UCM will also need to be closer to the definitions that are used at ucm2/codecs/es8316/, as es8336 is a variant of it. Anyway, let me submit this as as RFC, in order to get some feedback if this is going at the right way to support the headphone switch event. Mauro Carvalho Chehab (2): ASoC: Intel: sof_es8336: support a separate gpio to control headphone ASoC: Intel: sof_es8336: Huawei Matebook D15 uses a headphone gpio sound/soc/intel/boards/sof_es8336.c | 84 ++++++++++++++++++++++------- 1 file changed, 65 insertions(+), 19 deletions(-) -- 2.35.1