Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp826317rwn; Thu, 8 Sep 2022 09:15:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR4NbQpl9HSWfe6xbv/DTDuAIite6qIs6BRFmBgIu//MigTZcuiHjojNxFS+qOgcwLZDbSZO X-Received: by 2002:a05:6512:3d2:b0:494:6546:dc1f with SMTP id w18-20020a05651203d200b004946546dc1fmr3018338lfp.6.1662653736505; Thu, 08 Sep 2022 09:15:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662653736; cv=none; d=google.com; s=arc-20160816; b=NIEHa0s0AqFktZdE88vBFm4w6jjC1nJY9UmLXhIEg2j/kuXZc3HCld0QRJ+OQ+3OSr /hF2UE5eNKkVd+inoQi2myJIHyYBOcc1YA65ZEYwro88mjVRSONpLL4eyJZ1W8RmyuV7 fJZWEMCb6wBl2cJDKBxoIMIr1XXrob1970arPReyzuUQK+XywoBIE64WuaXuUG5sAZRr nl7rvVgJTj9jQ0C9HPxBcdoWlpr3AoZeTeCkEKo8f2Qvrf5ZDSWXhzq05WgCCQD6IpQV GhOrg2XK1u9pogXVNGQrgD08+SzcYa5FL3OdRdjJdoU758LOdFPGMCKDRMZ/k1Keyw0M irZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uHrvh/r28bxPvENTwwV0jJghC1Cy47uky/Lb1Le6zvE=; b=rPOldY0E1t2gkzGXqXInAqHLfhZr2LixLvzUYV1A98EGNO2OZQN3WCyAYOMftWLAbT zJ1Ilh9L+4pTWjS+qLoamwvjmsn7YBuA0yDLQCf+xBWXgv5WVa+9Rld7y6zyqiMFW9nF 1FJIi4fDquNy/AA/iV747ephRo50DmGS4QcvPqz2KL1pKg7BOq/l5hRfVKlnbIqfNKnm JvGJE4QZPhhtwz/QjsSET4r9Hwf0whMLKpPHt4ix+StBuNZnmUelI6BU60KCLgr+MVQn SryoXyue3A70MRl4lcnKTqlgcYQbVakvu97ETv0ju543rcC364dXQTIbH4wvsNLc5iKp 6YWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=PDpRlUWL; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r4-20020ac25f84000000b004963db5f96asi5440701lfe.613.2022.09.08.09.15.06; Thu, 08 Sep 2022 09:15:36 -0700 (PDT) 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=@collabora.com header.s=mail header.b=PDpRlUWL; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231557AbiIHQMO (ORCPT + 99 others); Thu, 8 Sep 2022 12:12:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230177AbiIHQMF (ORCPT ); Thu, 8 Sep 2022 12:12:05 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E6EBE6206 for ; Thu, 8 Sep 2022 09:12:05 -0700 (PDT) Received: from notapiano.myfiosgateway.com (unknown [70.107.189.129]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 658A76601FAD; Thu, 8 Sep 2022 17:12:02 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662653523; bh=+qFGD7EsVOMCHijee7Bbkw5A9Fp6Xf4TG9HqiOy8lhY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PDpRlUWLVoFYCjUTw/P9R7WVugq9T61WXY9RVX4vlizt15qERlivqMLWgQsnW6NY8 pKtTFtppDYxFp2eeezxwdG03Sz3MBHeJWTMOgFTCmIHGZTlnvIEwF1bCB6L56OakUo 4dRwWXnUrnFK6Z5KlSdFo7b8ix8L6D5HphKMHk9cbvGQqmbDRuWRH+mo8+Vll87Qgw 1BdFVnNgFDixyD7dnb2UuwdNrxiHctyYUCWriOJDig5Pxtf9+T+gWKG5chPvrK+XCD wVP7b6OBlo/qbL87N1ekcjCyOW5Cdm8WVPgKmFl5IsL7+NatxY645uVf2b8IOtsKMw YkoZ91NDnau1A== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Mark Brown , Matthias Brugger Cc: kernel@collabora.com, AngeloGioacchino Del Regno , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Akihiko Odaki , Jaroslav Kysela , Jiaxin Yu , Liam Girdwood , Miaoqian Lin , Takashi Iwai , Tzung-Bi Shih , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH 02/10] ASoC: mediatek: mt8192-mt6359: Make i2s9 share the clock from i2s8 Date: Thu, 8 Sep 2022 12:11:46 -0400 Message-Id: <20220908161154.648557-3-nfraprado@collabora.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220908161154.648557-1-nfraprado@collabora.com> References: <20220908161154.648557-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Both i2s8 and i2s9 are connected to the rt5682 codec and should share the same clock to work in a full-duplex manner. Set the clock sharing during the initialization for rt5682. Signed-off-by: NĂ­colas F. R. A. Prado --- sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c index d0f9d66627b1..044d6ab71f0a 100644 --- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c @@ -311,12 +311,21 @@ static int mt8192_mt6359_init(struct snd_soc_pcm_runtime *rtd) static int mt8192_rt5682_init(struct snd_soc_pcm_runtime *rtd) { + struct snd_soc_component *cmpnt_afe = + snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); + struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe); struct snd_soc_component *cmpnt_codec = asoc_rtd_to_codec(rtd, 0)->component; struct mt8192_mt6359_priv *priv = snd_soc_card_get_drvdata(rtd->card); struct snd_soc_jack *jack = &priv->headset_jack; int ret; + ret = mt8192_dai_i2s_set_share(afe, "I2S8", "I2S9"); + if (ret) { + dev_err(rtd->dev, "Failed to set up shared clocks\n"); + return ret; + } + ret = snd_soc_card_jack_new(rtd->card, "Headset Jack", SND_JACK_HEADSET | SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2 | -- 2.37.3