Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1017978pxb; Wed, 6 Apr 2022 06:50:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9CTSZYWzrp/HGpTUqfdZPIMn2QessgOBuZvn2SDwvwyZ9TAB3NgKh+RUPyRXWB1keWh4J X-Received: by 2002:a17:90a:6402:b0:1c9:9377:dd0e with SMTP id g2-20020a17090a640200b001c99377dd0emr9776668pjj.211.1649253054297; Wed, 06 Apr 2022 06:50:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649253054; cv=none; d=google.com; s=arc-20160816; b=oBcK4fktArPO9Pw1C3ffKSVL57tTdCAVStU/NA52EQAXfHE/a2Pwjd1aZtm/r0Hm7j 161KjG5owwpGcXGYQcHryBK50KCqWBTioxuF/cefft6unghU18/WdXwB4uL5647KGdv1 WSHslgYNQIi6slO9t2npozeuQh2fPT0foaSOkgU0Ols32LfD0DYJoovs16Kli+eCXOze /v3OinEj8E9+elzqMz2OaQZnhj1QpayWc4g5DZeE8AHObOy2TzoEnWuxGDLBNtCZ2ZdU /WyNm4Fb2K75QUpIaQRWU/JeWJO1l7g4l4QM1hVmJP/4f1mTtbRkmonHa2RsNsS4QgA4 8s+Q== 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=RxXRzMzdirNoP5KFC5vcFyTKtRCsKOVVvsg6CKHRAYM=; b=FVgNGjIoXD/yZJWAHDV7U9IkgAWTCYH7B/DihtgxMuN5xFGJZVyaGwqrAe4iADC2OB eWkJMB98G8FoO8sUEXkCqYT3sJX2s4XCIWXMuR/Z9N35ne5T5ZM35o9r/ulA2J+pby1V Tj6AY/lz/X2xUOQ58xCt2G33RAJ4AX/5LWpZyPCcIDlIgcH2NQYPEdA/qK5KgdiXmyfu NEeDutn5hZLc1XiST6Eb4F72cuqzr2P0qnGkCusFZucqXkh/VgH5g33TeD6Pg3Kq87FK 9HVHdH4F4BfyoayZpRbNMk4EcYUpIi0kic+WH1n0ParMaTZD35Dnj0S11qunOnpvumgo JYZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PtaE5dRT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u4-20020a17090a6a8400b001c7cd11486bsi4621618pjj.175.2022.04.06.06.50.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 06:50:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PtaE5dRT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 62C515A1176; Wed, 6 Apr 2022 05:36:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351760AbiDEUfI (ORCPT + 99 others); Tue, 5 Apr 2022 16:35:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442795AbiDEPiR (ORCPT ); Tue, 5 Apr 2022 11:38:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BF0017A2FF for ; Tue, 5 Apr 2022 06:53:22 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 3903761917 for ; Tue, 5 Apr 2022 13:53:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 839D0C385A4; Tue, 5 Apr 2022 13:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649166801; bh=xMWIMU6YpsG88G1LO4JJfGNWJqQMJm4kZ4LwZ/ipgw0=; h=From:To:Cc:Subject:Date:From; b=PtaE5dRTtJ1vqeyYdHFcjhXTUaKrpbuLjzwIiYPuC/e0gTXo7jwB19jTT9dcAseQd pAwk2bF309VFcN8JyappoqcBz0zZvt+YVMcQPedn7zQnJPeEh7ffoxaT9Uo5ZfeBvW pX1GH4ddKvPG6E418FpKzULf/PoLN/jy33E/lW6oFRgA97sBzdjH5ro0UWw3mFBXis qepodz/QRlSjGdXvCeWViRVOjJa37hCJe7HtM4hTGdewx656k5GnFKnnXx2syxRRSV hMdzYeFxqg8WBoPUt4vVIooMzmRjJI3Uy5AfNpf5jNT6dfPPkGUDTt+0rTobvALE5P cD7tQw1ojHgiQ== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1nbjcV-001lTU-3f; Tue, 05 Apr 2022 15:53:19 +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 v2 RESEND 0/2] Make headphone work on Huawei Matebook D15 Date: Tue, 5 Apr 2022 15:53:15 +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 (resent, as the From/SoB at the patches were using my past e-mail. No changes here, except by having Hans ack and have the From/SoB fixed) At Huawei Matebook D15 two different GPIOs are used to control the output: - gpio0 controls the speaker output; - gpio1 controls the headphone output. Changing both at the same time cause spurious events that are mis-interpreted as input events, causing troubles on apps. So, a delay is needed before turning on such gpios. With this patch, plugging a headphone causes a jack event to trigger the speaker supply, powering down the speaker and powering up the headphone output. Removing the headphone also triggers the power supply, powering up the speaker and powering down the headphone. 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 | 68 ++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 10 deletions(-) -- 2.35.1