From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C92F4C433FE for ; Tue, 5 Apr 2022 12:16:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382461AbiDEMPW (ORCPT ); Tue, 5 Apr 2022 08:15:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244815AbiDEIwl (ORCPT ); Tue, 5 Apr 2022 04:52:41 -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 DEFB539680 for ; Tue, 5 Apr 2022 01:44:18 -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 7E4DB614F9 for ; Tue, 5 Apr 2022 08:44:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8E67C385A5; Tue, 5 Apr 2022 08:44:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649148257; bh=nXHwI0lbM1sZwxBKRPdZsJoQ9VExflU+okzXpIRAZpQ=; h=From:To:Cc:Subject:Date:From; b=GnAGq0867/gnj3C+jk+gAeVtT7D2qggDRysgca1EWKYLBzHVCsuFYaknoCKr5dXE9 9ibkXElDFItQuppVhPUyhZWD5pXecpH/oC9iBhyKNR9A6BeMJ8lRRTIUsSf5EV5EJt y8+mYshvmCsdx9Z43JEsZXfPd2dSerJP5jdiP/Jz7QrceE9YT1cqo7M65nSKCPyJ3T BLLar7OaBIlgrZH/XW7bYBdvKdVTAYhdmHY97rcqZLZVvNXuNqiMcXloi/O10zfkeU Zkc5RqD7w8DfoXy1tWlbFBpnZa4j3VOrSL2C5WHEcjsfTxb5GoJXN/kNYumpCiIyIt HYKtajren9n2Q== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1nbenP-001IBk-Ak; Tue, 05 Apr 2022 10:44:15 +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 0/2] Make headphone work on Huawei Matebook D15 Date: Tue, 5 Apr 2022 10:44:11 +0200 Message-Id: X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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