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 290D2C433FE for ; Thu, 5 May 2022 15:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381033AbiEEPIO (ORCPT ); Thu, 5 May 2022 11:08:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380998AbiEEPIC (ORCPT ); Thu, 5 May 2022 11:08:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F5D056430; Thu, 5 May 2022 08:04: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 045ED61A69; Thu, 5 May 2022 15:04:22 +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 Cc: Linus Walleij , Robert Jarzmik , Linux ARM , Arnd Bergmann , Daniel Mack , Haojian Zhuang , Marek Vasut , Philipp Zabel , Lubomir Rintel , Paul Parsons , Tomas Cech , Sergey Lapin , Thomas Bogendoerfer , Michael Turquette , Stephen Boyd , "Rafael J. Wysocki" , Viresh Kumar , Dmitry Torokhov , Ulf Hansson , Dominik Brodowski , Helge Deller , Linux Kernel Mailing List , "open list:BROADCOM NVRAM DRIVER" , IDE-ML , linux-clk , Linux PM list , "open list:HID CORE LAYER" , patches@opensource.cirrus.com, linux-leds@vger.kernel.org, linux-mmc , linux-mtd , linux-rtc@vger.kernel.org, USB list , Linux Fbdev development list , dri-devel , ALSA Development Mailing List 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. Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --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+--