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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 131A3C433F5 for ; Thu, 5 May 2022 15:04:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3BE0310E5A1; Thu, 5 May 2022 15:04:27 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6F4FD10E5A1 for ; Thu, 5 May 2022 15:04:25 +0000 (UTC) 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 0AE19B82DB0; Thu, 5 May 2022 15:04:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F33FC385A8; Thu, 5 May 2022 15:04:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651763061; bh=ndNt7BUf9dTGF9Boc0sHL0QvCjcViApZ2+jdoiRYFyE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qsTwJOAmbU9NAcodvY8Up4PoNuEDRZy5qxSFcdI0VmbgNmn3/5x71X8ojXxDFeNvv wY4qvOjbwdrz7Yr75u2sbhbjskoI/sZWGz4PEQP/S+I8xtRFCkH1Moav6HaNLEeEMO WD9CFgJXtdTh9DLKCtyGpxZcPAVjEnkCl68AjKWpRBt4xYlkTr26FWjmXq6vdFHjfo 1JagmTiGO1QdyMD0R232U+yffpnEC/3hGsGQpybLdnELbR+ZACe8+oOYvvWsaDz2qx oHX9cN4PzhibRt823eQYXukpGaPOEOOiwDBSuJUdGm0u9JKoMHgHhPlLEhO0XHJKCM raFIKJWwjP1BA== Date: Thu, 5 May 2022 16:04:11 +0100 From: Mark Brown To: Arnd Bergmann Subject: Re: [PATCH 18/48] ARM: pxa: hx4700: use gpio descriptors for audio Message-ID: References: <20220419163810.2118169-1-arnd@kernel.org> <20220419163810.2118169-19-arnd@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ZLP2bC8awi6xddl+" Content-Disposition: inline In-Reply-To: X-Cookie: Real programs don't eat cache. X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulf Hansson , USB list , "Rafael J. Wysocki" , Viresh Kumar , Linux Fbdev development list , Dominik Brodowski , "open list:BROADCOM NVRAM DRIVER" , IDE-ML , linux-mtd , Tomas Cech , Robert Jarzmik , linux-clk , linux-leds@vger.kernel.org, linux-rtc@vger.kernel.org, Helge Deller , Marek Vasut , Paul Parsons , Michael Turquette , Sergey Lapin , Arnd Bergmann , Linux PM list , "open list:HID CORE LAYER" , Haojian Zhuang , Lubomir Rintel , dri-devel , Linux ARM , Thomas Bogendoerfer , Stephen Boyd , patches@opensource.cirrus.com, Dmitry Torokhov , linux-mmc , Linux Kernel Mailing List , ALSA Development Mailing List , Daniel Mack Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --ZLP2bC8awi6xddl+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, May 05, 2022 at 04:59:35PM +0200, Arnd Bergmann wrote: > On Thu, May 5, 2022 at 4:39 PM Mark Brown wrote: > > On Thu, May 05, 2022 at 04:33:06PM +0200, Linus Walleij wrote: > > > On Thu, May 5, 2022 at 8:04 AM Arnd Bergmann wrote: > > > > static struct snd_soc_jack_pin hs_jack_pin[] = { > > > > { > > > > .pin = "Headphone Jack", > > > > .mask = SND_JACK_HEADPHONE, > > > > }, > > > > { > > > > .pin = "Speaker", > > > > /* disable speaker when hp jack is inserted */ > > > > .mask = SND_JACK_HEADPHONE, > > > > .invert = 1, > > > > }, > > > Hm some ASoC thingie. No idea what that is, but I suppose another > > > place where a subsystem for legacy reasons try to do the gpiolib > > > inversion on it's own accord. That one isn't flagged as active low in the > > > descriptor so it's fine I guess. > > It's saying that when the headphone is inserted the headphone output > > should be enabled and the speaker output should be disabled, and vice > > versa. > Ok, that sounds like I should remove the flag here if I declare the > GPIO line as GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH, right? If you change the sense of the GPIO you'll need to flip the invert to the headphone instead of the speaker - whichever way round the GPIO sense is each of the pins should be taking the opposite sense from the GPIO state to the other. --ZLP2bC8awi6xddl+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmJz52oACgkQJNaLcl1U h9CbVgf+IcoNpQ7Zg0fdYkNEqwa7HwKX/Qt0QGkD2AOfzxG/HwCNSJGjXbLRoDSG LZDrxzKVzeoyjgCVaof252MDqttrmcheVCIAEBBJloJwRZ09bHBdKRPPZhbkgcTz jtkkGnEzXjRjYMDG6uc2pcooFw43TvoeGlypGRIHfw7iuVsLV9p49OqDnjO4jGer JBdqJjiSsBVptiZvzaVRbk7kjilcUyKIlQWL83na306uUWq3kMe8gOEw2S5VTvqd iQ7h7SpGvhyYN6hKCklertmWbnGLlgzT0PXgO8R3thr5L4UiST7AH2vQijgqPoJx UGG0jN4gSGc0pHUx7zh4kY6kWXN/Sg== =5RUB -----END PGP SIGNATURE----- --ZLP2bC8awi6xddl+--