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 59CDFC6FD1F for ; Wed, 22 Mar 2023 21:28:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbjCVV2B (ORCPT ); Wed, 22 Mar 2023 17:28:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbjCVV16 (ORCPT ); Wed, 22 Mar 2023 17:27:58 -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 2C4EF2A16D for ; Wed, 22 Mar 2023 14:27:54 -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 8992EB81D44 for ; Wed, 22 Mar 2023 21:27:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7943C433D2; Wed, 22 Mar 2023 21:27:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679520472; bh=U7ZA4ZzajtB3yTZYIzLq7NVdSezmrWNVSZd/pwipOXw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BDZg1c8eq+qM8F9GtHtE2Y2kTFca3WB/rFf41Ha7wwWW9LML0iSBduYNCnEJk2vTa LYY14IoAvBZbPDCeXFKjIALMDsLAAnl4S8CXw2W5e3q7x+GceFIg6jO85axrHVAoBx cyq5iikM13aTNELSCBQg2JvRAokB7MDdFUcIBgbPuMeqdyP/vzlFryjh0CvRaDbpHr gqIgNcy6J5dL9Ega9tBSRZbf7uNDvJbDSdMdYZ8l9nb4zYXXQh5W7m1A4Q2Myfi2CN KbCby2aHF7/pK6HDzctw1G1VigHL9beGCVSVZH1Hvjhp5iAkGoFqs5wqLcPf57v0Yw ESKr4gNeRwzoA== Date: Wed, 22 Mar 2023 21:27:48 +0000 From: Mark Brown To: Marian Postevca Cc: =?utf-8?B?5rKI5LiA6LaF?= , yangxiaohua , Zhu Ning , Takashi Iwai , Liam Girdwood , Jaroslav Kysela , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH 3/4] ASoC: amd: acp: Add machine driver that enables sound for systems with a ES8336 codec Message-ID: References: <20230320203519.20137-1-posteuca@mutex.one> <20230320203519.20137-4-posteuca@mutex.one> <141a3320-ff65-459f-9d00-c8bed691dcfc@sirena.org.uk> <87lejpwxzf.fsf@mutex.one> <87ttycjyw3.fsf@mutex.one> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pZnMYUgZ7ZDcg5Bx" Content-Disposition: inline In-Reply-To: <87ttycjyw3.fsf@mutex.one> X-Cookie: Single tasking: Just Say No. Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pZnMYUgZ7ZDcg5Bx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 22, 2023 at 10:48:28PM +0200, Marian Postevca wrote: > Regarding playing the speaker and headphone simultaneously, is not > something I took into account. Is this even a valid usecase? The intel driver > for es8336 doesn't seem to support it. Yes, for example consider a critical notification - the system may wish to ensure it is audible even if the user has taken off their headphones for some reason. > >> This is needed because if suspending the laptop with the headphones > >> inserted, when resuming, the sound is not working anymore. Sound stops > >> working on speakers and headphones. Reinsertion and removals of the > >> headphone doesn't solve the problem. > >> This seems to be caused by the fact > >> that the GPIO IRQ stops working in es8316_irq() after resume. > > That's a bug that should be fixed. > Agreed, but I don't know how easy it is to fix, and I would like to > first offer users of these laptops a working sound driver. > Afterwards this issue can be analyzed and properly fixed. Surely if nothing else a good first step would be to have the CODEC driver do whatever disabling the jack does on suspend without needing the machine driver to bodge things? --pZnMYUgZ7ZDcg5Bx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmQbctEACgkQJNaLcl1U h9CSngf/VGQQgPsTs+Ok0ohatQmEmhxeehBDIScHFJ/0wlEFMpzy6WXr9xcN/C8P lGJtD2RikJ423HM4rEtzq0DlG2aJXYJ7A52dsrWVT9hVj+5cgnIx7c+h5WoeRwTn 0OCUzvb//tBIDkkqK9mWEMj1Vv0KO8GAFKeLwo6tU8Ag0u9s+RRlQjY4k/k/JGOj AOG4QVYsxgP3YQC8V7ldUwMLiKfFKPBkXp97/30jMEIlCY5EXkHnWra9JG5WcH9r mLFKPePvZH2jbnXu2auZj/7ksXx60vQT7fr5e8p08nxk/amtGc8jsb0szpEo7/47 wuaf5Z6OGcxilwC7OHSRd/1etcOl0A== =WEnp -----END PGP SIGNATURE----- --pZnMYUgZ7ZDcg5Bx-- 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 D06BEC6FD1F for ; Wed, 22 Mar 2023 21:29:28 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 51B3DEA1; Wed, 22 Mar 2023 22:28:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 51B3DEA1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1679520566; bh=U7ZA4ZzajtB3yTZYIzLq7NVdSezmrWNVSZd/pwipOXw=; h=Date:From:To:Subject:References:In-Reply-To:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=NXjCZnbXAgysMUfbwCevR6gSb8KLSL7xLDC8cGafYf4IGKyklnq8tT+RljehQ5DIA 6wlA6mmM+p3SfbdmQsqH0FvLtB+OwhbyVheVBG3n79pUHP4unQzkRU951f80XkImw1 EWmhtlI2R8Fe/R1cD9mkBCQ5Q0SQGKzNfj4RmY4Y= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E18B0F8024E; Wed, 22 Mar 2023 22:28:13 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0F583F8027B; Wed, 22 Mar 2023 22:28:08 +0100 (CET) Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 88811F80093 for ; Wed, 22 Mar 2023 22:27:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 88811F80093 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=BDZg1c8e 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 sin.source.kernel.org (Postfix) with ESMTPS id 195D6CE1EB8; Wed, 22 Mar 2023 21:27:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7943C433D2; Wed, 22 Mar 2023 21:27:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679520472; bh=U7ZA4ZzajtB3yTZYIzLq7NVdSezmrWNVSZd/pwipOXw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BDZg1c8eq+qM8F9GtHtE2Y2kTFca3WB/rFf41Ha7wwWW9LML0iSBduYNCnEJk2vTa LYY14IoAvBZbPDCeXFKjIALMDsLAAnl4S8CXw2W5e3q7x+GceFIg6jO85axrHVAoBx cyq5iikM13aTNELSCBQg2JvRAokB7MDdFUcIBgbPuMeqdyP/vzlFryjh0CvRaDbpHr gqIgNcy6J5dL9Ega9tBSRZbf7uNDvJbDSdMdYZ8l9nb4zYXXQh5W7m1A4Q2Myfi2CN KbCby2aHF7/pK6HDzctw1G1VigHL9beGCVSVZH1Hvjhp5iAkGoFqs5wqLcPf57v0Yw ESKr4gNeRwzoA== Date: Wed, 22 Mar 2023 21:27:48 +0000 From: Mark Brown To: Marian Postevca Subject: Re: [PATCH 3/4] ASoC: amd: acp: Add machine driver that enables sound for systems with a ES8336 codec Message-ID: References: <20230320203519.20137-1-posteuca@mutex.one> <20230320203519.20137-4-posteuca@mutex.one> <141a3320-ff65-459f-9d00-c8bed691dcfc@sirena.org.uk> <87lejpwxzf.fsf@mutex.one> <87ttycjyw3.fsf@mutex.one> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pZnMYUgZ7ZDcg5Bx" Content-Disposition: inline In-Reply-To: <87ttycjyw3.fsf@mutex.one> X-Cookie: Single tasking: Just Say No. Message-ID-Hash: 2LOMQAFXMVXJO74DRHCSVFNQNT47ZTXP X-Message-ID-Hash: 2LOMQAFXMVXJO74DRHCSVFNQNT47ZTXP X-MailFrom: broonie@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: =?utf-8?B?5rKI5LiA6LaF?= , yangxiaohua , Zhu Ning , Takashi Iwai , Liam Girdwood , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --pZnMYUgZ7ZDcg5Bx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 22, 2023 at 10:48:28PM +0200, Marian Postevca wrote: > Regarding playing the speaker and headphone simultaneously, is not > something I took into account. Is this even a valid usecase? The intel driver > for es8336 doesn't seem to support it. Yes, for example consider a critical notification - the system may wish to ensure it is audible even if the user has taken off their headphones for some reason. > >> This is needed because if suspending the laptop with the headphones > >> inserted, when resuming, the sound is not working anymore. Sound stops > >> working on speakers and headphones. Reinsertion and removals of the > >> headphone doesn't solve the problem. > >> This seems to be caused by the fact > >> that the GPIO IRQ stops working in es8316_irq() after resume. > > That's a bug that should be fixed. > Agreed, but I don't know how easy it is to fix, and I would like to > first offer users of these laptops a working sound driver. > Afterwards this issue can be analyzed and properly fixed. Surely if nothing else a good first step would be to have the CODEC driver do whatever disabling the jack does on suspend without needing the machine driver to bodge things? --pZnMYUgZ7ZDcg5Bx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmQbctEACgkQJNaLcl1U h9CSngf/VGQQgPsTs+Ok0ohatQmEmhxeehBDIScHFJ/0wlEFMpzy6WXr9xcN/C8P lGJtD2RikJ423HM4rEtzq0DlG2aJXYJ7A52dsrWVT9hVj+5cgnIx7c+h5WoeRwTn 0OCUzvb//tBIDkkqK9mWEMj1Vv0KO8GAFKeLwo6tU8Ag0u9s+RRlQjY4k/k/JGOj AOG4QVYsxgP3YQC8V7ldUwMLiKfFKPBkXp97/30jMEIlCY5EXkHnWra9JG5WcH9r mLFKPePvZH2jbnXu2auZj/7ksXx60vQT7fr5e8p08nxk/amtGc8jsb0szpEo7/47 wuaf5Z6OGcxilwC7OHSRd/1etcOl0A== =WEnp -----END PGP SIGNATURE----- --pZnMYUgZ7ZDcg5Bx--