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 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 1D7BFC433F5 for ; Tue, 5 Apr 2022 13:54:20 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5BF7517DE; Tue, 5 Apr 2022 15:53:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5BF7517DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1649166858; bh=xMWIMU6YpsG88G1LO4JJfGNWJqQMJm4kZ4LwZ/ipgw0=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Gn7bqM6CsL0h7v/tu8HP1kaKlA2ghNHiSPmbxLuErfMveGZaTh12dVGbnAuAcqGf/ wlks/LxNlgzQjCggyZuoVOEFZx0TQG/RvrztMr2hXAyVJ0VyG2Cci0XLTkNL8LUFku lB4RnVt493U/zHd6juz0CwvPWIjcqOlHAFYgsXN8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0841BF8014B; Tue, 5 Apr 2022 15:53:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AC8B7F8016B; Tue, 5 Apr 2022 15:53:26 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CF29AF800D2 for ; Tue, 5 Apr 2022 15:53:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CF29AF800D2 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PtaE5dRT" 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 ams.source.kernel.org (Postfix) with ESMTPS id C9D37B81D2F; 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 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 Cc: Cezary Rojewski , alsa-devel@alsa-project.org, Bard Liao , Jie Yang , Takashi Iwai , Liam Girdwood , Hans de Goede , Mark Brown , Mauro Carvalho Chehab , =?UTF-8?q?P=C3=A9ter=20Ujfalusi?= , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" (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 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 9E1E7C4332F for ; Tue, 5 Apr 2022 20:35:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351835AbiDEUfK (ORCPT ); Tue, 5 Apr 2022 16:35:10 -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 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