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 AA9E6C433FE for ; Tue, 29 Nov 2022 17:22:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236537AbiK2RWQ (ORCPT ); Tue, 29 Nov 2022 12:22:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235494AbiK2RWO (ORCPT ); Tue, 29 Nov 2022 12:22:14 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E30A85E9F8 for ; Tue, 29 Nov 2022 09:22:13 -0800 (PST) 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 9EF88B816C8 for ; Tue, 29 Nov 2022 17:22:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCC4EC433D6; Tue, 29 Nov 2022 17:22:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669742531; bh=Lb4SESpHMOhPIMCGrj+WFGcavPsOts6fRzahyn7Voxg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PjTj6DhMx9pbN6mtsEBac0RpBaIgx0ceKlawxs+e723Pfw3jj6mOMdV77XaMIhWfg hMb7PgKA0m0sm0En1h6+9dw4XaBiiNvZVmKq07dAcGOWUGrcgeJ2QqpNHHoGUlrQu9 r9eDvvbD5OUdP0M940aNyZA+36L2jgE70sgKTYXzQ2sOxiFDH2SEJSG8OpWSz64NIE UipxIbRQ5UAihMlMTwBWPd4RJCIC3wrwGEikJjdG+i/cw3ILVrc0ylT6SbE9ErI9CM BrElCNX+gkrCcjvJGwSZnuiPFUkKNY+rdzX5hV72TeJw81iawEU2UyEGTM0v5ZySqv RkfuEDuUxjSpg== Date: Tue, 29 Nov 2022 17:22:04 +0000 From: Mark Brown To: Jiaxin Yu =?utf-8?B?KOS/nuWutumRqyk=?= Cc: "linux-mediatek@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Chunxu Li =?utf-8?B?KOadjuaYpeaXrSk=?= , "ajye_huang@compal.corp-partner.google.com" , Allen-KH Cheng =?utf-8?B?KOeoi+WGoOWLsyk=?= , "dri-devel@lists.freedesktop.org" , "kuninori.morimoto.gx@renesas.com" , "andrzej.hajda@intel.com" , "linux-arm-kernel@lists.infradead.org" , Project_Global_Chrome_Upstream_Group , "robert.foss@linaro.org" , "Laurent.pinchart@ideasonboard.com" , "neil.armstrong@linaro.org" , "angelogioacchino.delregno@collabora.com" , "nfraprado@collabora.com" , "alsa-devel@alsa-project.org" Subject: Re: [PATCH v2 1/3] ASoC: hdmi-codec: Add event handler for hdmi TX Message-ID: References: <20221125094413.4940-1-jiaxin.yu@mediatek.com> <20221125094413.4940-2-jiaxin.yu@mediatek.com> <18c82f6f723cd97a9d6b9a7ff16c6ed62fd005d6.camel@mediatek.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qzMUDJamuQN8FqwP" Content-Disposition: inline In-Reply-To: <18c82f6f723cd97a9d6b9a7ff16c6ed62fd005d6.camel@mediatek.com> X-Cookie: An apple a day makes 365 apples a year. Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --qzMUDJamuQN8FqwP Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 28, 2022 at 03:07:22PM +0000, Jiaxin Yu (=E4=BF=9E=E5=AE=B6=E9= =91=AB) wrote: > On Fri, 2022-11-25 at 12:18 +0000, Mark Brown wrote: > > On Fri, Nov 25, 2022 at 05:44:11PM +0800, Jiaxin Yu wrote: > > I'm a little unclear why this is being implemented as a DAPM > > operation > > rather than having the driver forward the PCM trigger op if it's > > needed? > > Or alternatively if a DAPM callback is needed why not provide one > > directly rather than hooking into the trigger function - that's going > > to > > be called out of sequence with the rest of DAPM and be potentially > > confusing given the very different environments that trigger and DAPM > > operations run in. A quick glance at the it6505 driver suggests it'd > > be > > happier with a DAPM callback. > Let me describe the hardware connection about mt8186 with it6505(hdmi) > and rt1015p(speakers). > =3D=3D>it6505=20 > =3D=20 > DL1(FE) =3D=3D>I2S3(BE) =3D > =3D > =3D=3D>rt1015p > They shared the same one i2s port, but we'd like to control them > separately. So if hdmi-codec use the PCM trigger op, whne we turn on > the speaker, hdmi-codec's PCM trigger op is also executed, resulting in > sound on both devices. > Is there another way to control them separately? Thank you. If you just need power control for one or both devices then the machine driver can add a _PIN_SWITCH() on the output of the device, that'll cause DAPM to keep the device powered down when not in use. That should work well with the suggestion to provide a DAPM callback instead of a a trigger operation. --qzMUDJamuQN8FqwP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmOGP7wACgkQJNaLcl1U h9DZ8gf+PisMggrT6FuPtNTRpRKtS7VgpBbYiJRYI4/X3DFs3Vlj30D150dJWC/g WqIhVaoDn6R5wsvhGw9YmtJKNT/A2SKeoUGksnstpvkd9KXkCeaKgfiFL877s9mK +YHxZOH6Eb/w5XFAEo+3TEr+LEDj6ooKflpE/DEXs1rfcVPr0wwVdLoXp1I7b6jw jQkRxRPfPSaszug+TYwzb6aXlXl2iAerXKo8pSkjSYI/GbLSEUb7Od/tCgoIXOmz hP2ksKt/u+NNptKSgXMv6ZMDTyRcioBZPUZgDhBrOWQ6hwxEDD9XioMA/6tSRqtE zRqubSrRrmnLXC2AeI1DJ0NKBo1gjQ== =qgcp -----END PGP SIGNATURE----- --qzMUDJamuQN8FqwP--