Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp952593pxb; Wed, 6 Apr 2022 05:11:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkUMLLlxI4KFyFOLwtdbLN9H4sv16smk5vcoZOqWbsdBdqR9JHwvUKZgUHF5JGmNhSS4RG X-Received: by 2002:a17:902:f605:b0:14d:bd53:e2cd with SMTP id n5-20020a170902f60500b0014dbd53e2cdmr8107008plg.164.1649247080774; Wed, 06 Apr 2022 05:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649247080; cv=none; d=google.com; s=arc-20160816; b=tDwn+lvgUNtQxMH+aMJPMbUvUNx7X4MuitO6COebhWn/ajon3o3UPIDeieIK1EzPJC LLrucG+ACnM6GJ0iHAQUKRbKqrIs4ponF9S7QdCLeJC5w6KNuKrGStUogWa8qPPwIgVa iqXLdqwnoOFKDrMR0FAr9jLhHrDVkTTtpHDJK1gg8yNOWeDXRcTEx8pVCuQHpeuJMKZP nXfI4UY6W+eZnENPN95hwmCvxhOq9vmvAs6WbXcohYO2zz3DWHi5nyVseinJM4lO6FGt aCFFPDjzbZU13XBkGpZCPIWZrN6Q3Fh2GnPKuB7SXzRG3Alpn3XmT5Mg8KP9m5S9/ZPx W2ig== 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=fRRZ6yfClYyJde1ScW5zoCATVPtVVqrMGLEaNTcM5tA=; b=hycS1FqNAUdchhW+QFcSk6PFd6gRElw0bVpuea2tyP4QkDl8Xuk1/zh+1j+8e6qSmI uaJ8nLPDyomWMpSJgDVOWd0phpHsAahKXbenjzmiTrABClzZMCkBYybpR23DDdF1Dn8g 0iruMA7j73qkItz/6Bvt+lLRukBHNFfnqf2Qj0oQcSxcIpXYU/51Zo2Jg23iytstZ8Xi +YwyZtiquzuSWb+95w+9kJKxBDyDHt0mbqm/Rrm5GxG6OI2Y49LwWEZxGKusvQHD4B2J S7hb7DVKsJDQPuklHUUPX8TTeRK8z1arB1HPKWotJTvlTO2DmEXv+yhHUzs3UoEnRi3t JQnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DID+z+a3; 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 c128-20020a624e86000000b004fa3a8dfffesi13855368pfb.181.2022.04.06.05.11.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:11:20 -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=DID+z+a3; 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 E505A504BF6; Wed, 6 Apr 2022 03:48:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1846279AbiDFCDk (ORCPT + 99 others); Tue, 5 Apr 2022 22:03:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1457919AbiDEQ7s (ORCPT ); Tue, 5 Apr 2022 12:59:48 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB61D5DA4B for ; Tue, 5 Apr 2022 09:57:48 -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 ams.source.kernel.org (Postfix) with ESMTPS id 78B30B81E91 for ; Tue, 5 Apr 2022 16:57:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 008D4C385A7; Tue, 5 Apr 2022 16:57:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649177866; bh=ms+BtckZ9MEqSCkK6doSJsbJF0vV+8oKpXtP6XAZwOU=; h=From:To:Cc:Subject:Date:From; b=DID+z+a35JPU0wg3v8o+heAYAG3WEdKWMnjWMd5Ia/miFQsCgEW4juZf/3sDflrfk dKB3nrAMPQvQSJcb06MYXeA9ftNwL+KfSFpPgQEYU14IAkiFdEBWoq1FQkKz9YIvXF 8YplWZ3k0ELG3Ggv1TfMAnX4qJRiWJ0gSGbkmpKJIdSoQKwZsljWvaO5fimjZK4Ksr B319re//ltbAenKSFo4oF02i3i85Ca1OJsmMPpW2/RIYVkSvKodqG7xl+YqTPYpZoE hrvQqSSOD5yL63ah7DH83U+Za/QvH3RAGFcBih3xcPrR79uAyFF5TjRdfxUNDSYS1V WZV29PSlQwIhQ== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1nbmUx-002uYM-BB; Tue, 05 Apr 2022 18:57:43 +0200 From: Mauro Carvalho Chehab To: alsa-devel@alsa-project.org Cc: Mauro Carvalho Chehab , Pierre-Louis Bossart , Hans de Goede , =?UTF-8?q?P=C3=A9ter=20Ujfalusi?= , Bard Liao , Cezary Rojewski , Jaroslav Kysela , Jie Yang , Liam Girdwood , Mark Brown , Takashi Iwai , linux-kernel@vger.kernel.org Subject: [PATCH v3 0/3] Make headphone work on Huawei Matebook D15 Date: Tue, 5 Apr 2022 18:57:31 +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 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. --- v3: - add a patch changing GPIO quirk speaker naming. Patch 2 got rebased on the top of it. 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 Pierre-Louis Bossart (1): ASoC: Intel: sof_es8336: simplify speaker gpio naming sound/soc/intel/boards/sof_es8336.c | 97 +++++++++++++++++++++-------- 1 file changed, 72 insertions(+), 25 deletions(-) -- 2.35.1