Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1147983rwb; Tue, 29 Nov 2022 09:31:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf6M8BYJAgzd4kYDNFlbM/W/KsDIPuUZkZnujXbY0Ep3R5ER9iHDB4KItNbN96+tT4/WILJg X-Received: by 2002:a17:90a:d50a:b0:218:ebe9:894a with SMTP id t10-20020a17090ad50a00b00218ebe9894amr31445646pju.124.1669743113422; Tue, 29 Nov 2022 09:31:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669743113; cv=none; d=google.com; s=arc-20160816; b=I3XpJVRe6E5cPyOCiWNvaQtK4Rwy3+GCN8PCLkfI2CImi63hQi/KDntLU2Z08gRDP3 VSgoRZOYm6ktdjed9ikIzTBsGjiaZzoA5aSZHDAgZ8k6UZpOMAo3r2vdq+2nPzwqT76S gJlPxY42noBQc8VRUkn8m+DKz8YNXI/IGcVORjfhuSNsbStEmoan5VdylAfNif9EeWNx FCRiAc5/yaF0Bto1uIzuPuV7uiN2AB0hYaxHmNubHZPeue29h9hGwA0hqmERxLRrJYLC 1HVZeX107SQCjjrxyE7qTEMTN75jkSVh2glFMhDMd9RePGj1CoerURcx4YAO93KCQbwl FGPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2IWe64Fgbt+mPoOcx1XYaGQ7wclJ3ZWDWFYw2Rca7GE=; b=TUtBn0CuJ++Zd1mfoib9hOW/4Mm+deVQZDzqZPBzposWOv0du5KFj5RKP4f3BlbG3O PwS1U8+6WYzpB9yLB5AXhyTN83PB5rqTX/bPQkwXoMljG2g728lXK1feZr7LKEyh5fho qslg9Q9I2vgsaocc6EZqyQxw6dByP+AD9N5NYb7kBEzSNd67zC6uElYLI3BSTLiecLKk uDBVHsZE1VFPygneiJCnz1rskQO5qd27n2vClZDY1lBO+ygstLYXPsJe5Sjbx+lZufpb kujE5GMioz6BqUuGKmXtcBeS+1YwapkXah5f+5Vb4lBqvg2xXLBuS9imJYdqQRKFxzCP qUgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PjTj6DhM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c10-20020a170902d48a00b00188e045470csi16289204plg.542.2022.11.29.09.31.41; Tue, 29 Nov 2022 09:31:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PjTj6DhM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236507AbiK2RWQ (ORCPT + 85 others); 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. X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 --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--