From patchwork Tue Aug 22 23:50:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 715791 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 AD005EE49AB for ; Tue, 22 Aug 2023 23:52:17 +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 95CA583E; Wed, 23 Aug 2023 01:51:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 95CA583E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692748335; bh=7kdspPP9/QwSk7aekaGYx5lUbb3XojVSI/hU6RbQr0k=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gi/E99ePTOyiMu2uIFKs721tdBBD2LI1NcPByZcTL5RH+ixRxaascQNpHppDpnZiq J8ggdiXhKqf2h9flHCHYhGxD/F07Ku7NJmjcJaklkXEe7w8w3HaBAFXgMgBE/U7LBb DntNACDRC90UCXH1FY+5+c1eZossHe9wIoYSJEHs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0D10DF80557; Wed, 23 Aug 2023 01:50:43 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 87618F80551; Wed, 23 Aug 2023 01:50:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CDD17F80551; Wed, 23 Aug 2023 01:50:39 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20711.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::711]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A9377F800BF for ; Wed, 23 Aug 2023 01:50:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A9377F800BF Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=Pabo9c+D ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=INB6KAp20zoKVQlUbuVMpBu7LfxOrQEr384T0cDy7H96KununmblceeKlC+q/AtFkiLFGE0sZDaKTosAxviPve1Jz4VLvtKipwzQf+1Ca/HZtjfCozGzqLoEjZvNVtMc1meBnLPn1drb6K3SHduKtO5jEeX4aVGLB7bdYLmef5McEpddf9LL3FwhOLIbE5O5YyjQWbSsbkbGcay/W6M7UY5yvzW8zAuJp09PN2ud3aICZpxP0hKLPi/H8F9Oa+mRqfiWV2Ar4w+ZOvhyXaN1sqphfCzrV9BG5RuezjBORzK3KpQ0N3WK58Oy49Zl3qrRPwmhcgNTLMf1swjOAbw+Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=T+m0o6pKo4jNPa88i70MWOKPZikB6Imb2Ux3ehty+U8=; b=JYRM1O2IGTX7A8l7G1EhtyhTHtfIpiuf2ilbVfKgl4HuxuCNFv6BtcCnbjhDItv8cud/GuUCGLmBo+t2EX9j7E0DcY0GdRarw1rBeLy80THhcMMAe7wkPIcB2kC97eVYeStdp3ytCJ4NjhYIG0Tg5XXUrmGAzAkhlonWBR2RSqpCVfzSWDSrzbxrUPSl8DRa/o5T5veztnAuasC9adGUSbCToPs5RLOEIXkurSXhKMPo9bIbEpX1szzceFu+ZLhSaOVD9D6MSV5UbLfjQfSI8L4mPRzTuLkUK95v4LTpKuhjKjFwKxGMcxYywDb8STSFV7zdL8hSn3tEgtp6D6BSAw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T+m0o6pKo4jNPa88i70MWOKPZikB6Imb2Ux3ehty+U8=; b=Pabo9c+Dzh9qpJnNbzctyoftRduhQFg+NXPquBNEwdkOqaWTEtHSYdX3/8VuM+mnj6b+9QPGPcTCJ9LLBZRBM6qwWBqN6Nq17WHP0wRdsHh8y8vmesOI3N+Ak0dId+q5WbLj/pdsnDZZV/5sseUTWAAUVxE/e1XOQSIw6QON2yU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TY3PR01MB11948.jpnprd01.prod.outlook.com (2603:1096:400:405::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.24; Tue, 22 Aug 2023 23:50:31 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::7b2c:6f3a:1aa:79d3]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::7b2c:6f3a:1aa:79d3%4]) with mapi id 15.20.6699.025; Tue, 22 Aug 2023 23:50:31 +0000 Message-ID: <87msyizlfd.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/5] ASoC: rsnd: enable clk_i approximate rate usage User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: Mark Brown Cc: Linux-ALSA , Adnan Ali , Vincenzo De Michele , Patrick Keil In-Reply-To: <87o7iyzlfy.wl-kuninori.morimoto.gx@renesas.com> References: <87o7iyzlfy.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 22 Aug 2023 23:50:31 +0000 X-ClientProxiedBy: TYCPR01CA0160.jpnprd01.prod.outlook.com (2603:1096:400:2b1::13) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TY3PR01MB11948:EE_ X-MS-Office365-Filtering-Correlation-Id: 27f3d3d8-bf38-4e42-c477-08dba36a91c3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Fgg5y/b0ZVzKOUtk+UPcwq8B8u+G3TYvpBVGK1N866FOdUc3DoAG2/1hB/boY+lqKBDQUcMQM74ovCwmStJGTbcEVhNqatVk9Ho5XJX+KrHstRwlB84JI5ZMlmUszmO7m0IOyd3mNeOfaOGIi8JK/qQVNGP0jLo9rokLFP2naGlsp3ZjTgfShdJ5XMGE5AA5Tv4i1Fx+Ruy1LK5GUmf22sCV78VzFFCfQrsCpiDUOT2mdtwovmTB5Bak0GDls/1Vpm/GfrH4dC7FMFLQU2sT3QjH7yG5d3AsiAriFKkpwoi2r1c6SBZJ0S1sdR1Tiz6t7M1icbZyWy66jJ8q6mn4SXRSlbA7gvHXHs+CLnI3dsF+DKxnvU0BRitmurv0ylOEOvvr94iW6b8UbFV38YZyuraoQlrzwPDqy/w4EmxYpVt9wyD1mQ8L+oCmEU8hRasYcHW5HUFA2YPwRU1tiTGfvMXUZLjNZwBlLIJnmjgIoWF/qHAQiA0f78yNLfp8ARglHcGiaYyg4tBr+YIpdctj3TzruyYu3JuQMngfgBcp84xwln/K/fjC9okLQfi9NdJan97zsdFTbEzDlUpwIp2RS5QqbEXAnuKiYGR+tPm32CDBu3l9zoBxG1LzkSsrtwd2 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(136003)(346002)(366004)(396003)(376002)(1800799009)(451199024)(186009)(41300700001)(66946007)(52116002)(54906003)(6506007)(66476007)(6916009)(316002)(66556008)(6486002)(4326008)(38350700002)(38100700002)(2906002)(26005)(8936002)(8676002)(2616005)(6512007)(5660300002)(83380400001)(86362001)(36756003)(478600001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hmZuiJ4CZR4DdDI5DnkOt46CfqpAkExQbEc/KetbPABvCcgbRob2P4k8c3Vig1fTj0ixoo9pntXk4ICsd0hsOPxa9HXr0m5d1j7Zz/uxppyX09FyXp8w+j6BA5EiG0+vvaU7noFxrr/oetN1tKCovjnMBB0GBWNZwSRjzQH0ELmR2jhGN09rTdx9P52syHJ/bV15OUa4npMp/YHmE+x/1IXK0KlKjM3BpB+89neZj9Hs5nl/drDCPN5e0r/AJSQqu/q37ujGz/4lr9rBA7aqdtYbf6GVb7Cj3qI/VVcne7Vfhb04bms00vVR8kPPk63jpKuFo5LjKrAdMJ9it2sNrWFkk6MSVnRilmRa9KgN4eHhhcUmjGrqIXuE6N86j4KLuMhGgSjSGED1svZRfJLPU20TNlOvoW9K3AEptGF/sYF8LgYwrR/DgQWUfB2YaZaFMVlyslMNUSzuhgGH4zYvABcM4mH74N1Jz4oKhYtlfs39bFzw7YcLn19CXEtMDjfqtUWERd5jbQsMqMDzto9Y7akDhqaC6oVlX2NPaN+OkUuZDqYXx84rm1QVFuXBuet4IRWzAxiq0dhLN/mOgl8aWQ/Fo6tXP0S3eVoDqxx9Q9V1KKQASg5xLXVNdMr/opK0y7F6rHveg6nqz/EcZNXZHSOMVg231Kan7nJhns+BoGApLo3iNrsSDYOeFIQ3SkT6NXwg8vbfPzOp8Fl8V4pCvfktVtqG2RO0spWSqiNLHMStUIpx1PN3x3+SK+utka//5ZdDQnaAyz4mkRe7qjUOh7G3QJn6FhnPnAm73+Da2sJMOxhyZbV7clpZRrp91Rh9zRxaI4UhP/XPxU/TL+VtShg8vSK8GtKQS0PV7Y/sFfNVKlasQGLjbvD7BVvyGWmAwkfjju4J2g3bVJFLpouSElF5J8gCrChP/2XwEtgh1O6XLspBft5u7lyNufm1VtU6+xgJUY0UOog9gWRIkOmZ/87b1QhbSJiy/YrqBlDzMOUXQIVzNM7Y7rnxdfFqs1sCDCC7zjHAGY7Bzz2I87sP7VeDp/7dKbMQdp0DHDwpkDRb1C3QtW8uKK7+ss9ouh2xEgT9M86WnWq0zcxWHgwqHVZ9252XMoI7xJHbwpUWFN3W92X8V4YqVL1aNVJXz913ffUAxb2byKCh5q2XmiEuupM8sHtPqYO0LtCgxb2BDsBOG5QL6zcATWVtZml9EZF+NrOtlMh2yWuc3o3gKPi7jPSpRw9La4DPkhcO6tQsTj8CuBxPCXcBv9zVgw5hGzAQW7qy/03vjSfFLVPcrluscu1TYQkqwGg6Ry7PXWPettIbFBNOYWTJngYD3B2f1ILsG4M/ewu165+6yyjv5rbud7ypRG6MrAVMKIYUIGhU+W7uEvFVEihQoGQ+SBSMODBJquYmHWCi4j+XvjMpCFrKpPQ8liYu+gcBV4mOk8bOIvFitSdoP+HVsOgDSHQaJT6fq2czRxKaemwlxp/BMZjNfC6M/ZBkXxrA3lhtgzkzR+tfzv+5x3AYkncysVoszpX20Z+VWNtImNP/Zh9PkKg2R0NdETgOjapqEP3LB4PZ3+3HnrngNd4sylGMWZjYD67UyaW1bpdfylqO3c6FiBArH+IDm0fNh0YbWBBY9iGEAO8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27f3d3d8-bf38-4e42-c477-08dba36a91c3 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2023 23:50:31.1506 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aSG/hyKXLC0EHYt8LtCiqhHjF5K5vS6R7ZX4A/D83tcVpmOmTtO1Cv/TjN8p6cKtgZZjSGBhlff0ZnpZnzGpiFoaKPSKWzDl+2NiBiy3+q3tjz1ry06ooJXPloZ3AuSg X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB11948 Message-ID-Hash: 5E2UJVV6ND4U6IKUAV7YVYSJQVY2MSS5 X-Message-ID-Hash: 5E2UJVV6ND4U6IKUAV7YVYSJQVY2MSS5 X-MailFrom: kuninori.morimoto.gx@renesas.com 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 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: Basically Renesas sound ADG is assuming that it has accurately divisible input clock. But sometimes / some board might not have it. The clk_i from CPG is used for such case. It can't calculate accurate division, but can be used as approximate rate. This patch enable clk_i for such case. Signed-off-by: Kuninori Morimoto Acked-by: Adnan Ali Tested-by: Vincenzo De Michele Tested-by: Patrick Keil --- sound/soc/sh/rcar/adg.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c index 1479d8d77dc7..55a51ea12144 100644 --- a/sound/soc/sh/rcar/adg.c +++ b/sound/soc/sh/rcar/adg.c @@ -492,6 +492,7 @@ static int rsnd_adg_get_clkout(struct rsnd_priv *priv) unsigned long req_Hz[ADG_HZ_SIZE]; int clkout_size; int i, req_size; + int approximate = 0; const char *parent_clk_name = NULL; const char * const *clkout_name; int brg_table[] = { @@ -538,6 +539,26 @@ static int rsnd_adg_get_clkout(struct rsnd_priv *priv) * rsnd_adg_ssi_clk_try_start() * rsnd_ssi_master_clk_start() */ + + /* + * [APPROXIMATE] + * + * clk_i (internal clock) can't create accurate rate, it will be approximate rate. + * + * + * + * clk_i needs x2 of required maximum rate. + * see + * - Minimum division of BRRA/BRRB + * - rsnd_ssi_clk_query() + * + * Sample Settings for TDM 8ch, 32bit width + * + * 8(ch) x 32(bit) x 44100(Hz) x 2 = 22579200 + * 8(ch) x 32(bit) x 48000(Hz) x 2 = 24576000 + * + * clock-frequency = <22579200 24576000>; + */ for_each_rsnd_clkin(clk, adg, i) { rate = clk_get_rate(clk); @@ -545,6 +566,10 @@ static int rsnd_adg_get_clkout(struct rsnd_priv *priv) continue; /* BRGA */ + + if (i == CLKI) + /* see [APPROXIMATE] */ + rate = (clk_get_rate(clk) / req_Hz[ADG_HZ_441]) * req_Hz[ADG_HZ_441]; if (!adg->brg_rate[ADG_HZ_441] && (0 == rate % 44100)) { div = 6; if (req_Hz[ADG_HZ_441]) @@ -556,10 +581,16 @@ static int rsnd_adg_get_clkout(struct rsnd_priv *priv) ckr |= brg_table[i] << 20; if (req_Hz[ADG_HZ_441]) parent_clk_name = __clk_get_name(clk); + if (i == CLKI) + approximate = 1; } } /* BRGB */ + + if (i == CLKI) + /* see [APPROXIMATE] */ + rate = (clk_get_rate(clk) / req_Hz[ADG_HZ_48]) * req_Hz[ADG_HZ_48]; if (!adg->brg_rate[ADG_HZ_48] && (0 == rate % 48000)) { div = 6; if (req_Hz[ADG_HZ_48]) @@ -571,10 +602,15 @@ static int rsnd_adg_get_clkout(struct rsnd_priv *priv) ckr |= brg_table[i] << 16; if (req_Hz[ADG_HZ_48]) parent_clk_name = __clk_get_name(clk); + if (i == CLKI) + approximate = 1; } } } + if (approximate) + dev_info(dev, "It uses CLK_I as approximate rate"); + clkout_name = clkout_name_gen2; clkout_size = ARRAY_SIZE(clkout_name_gen2); if (rsnd_is_gen4(priv)) From patchwork Tue Aug 22 23:50:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 715790 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 6A916EE49AB for ; Tue, 22 Aug 2023 23:52:40 +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 9A656886; Wed, 23 Aug 2023 01:51:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9A656886 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692748357; bh=YbkUo0UcVR1rfjDxS15FBe2KhW1QgQXwWLLX09URLnY=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=GVlNpuDblc0cZe5Y9ZhK0gADRpY8zuVO4cheZrpnFoDnH70KCRcY1n3Pko3TpEC+8 4ezUCUUpVCEU+crZC1UKWuou2QbX+emux2FLrbr0sH7EIlZW7E/btRsndd0/Ut9HxF lqafEYZALk5rU2kNtYTOXPrdBGbTjBhX/c9lZZhQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4FF65F8057C; Wed, 23 Aug 2023 01:51:02 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id F3DF1F8057E; Wed, 23 Aug 2023 01:51:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 01DFBF8057F; Wed, 23 Aug 2023 01:50:59 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20704.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::704]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A6655F8057D for ; Wed, 23 Aug 2023 01:50:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A6655F8057D Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=ErH7xfG2 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y3/LuOyIATd9QuP8neEiSEEgQ+ClJaoXf+lGYPhRLlCT0/tZGP3y9ApfnK/jO2MPCcQ1i5w2lhcV4/qMXqFN+TA4YdwvD218u1otvb4gzJBJMhTeH3EDKE1onNBWupVxpbPzpC8uh/oFv/qIMhCMHFqc5PRvXMpYhmVw1LNQqcwe0B1BHP+NuAEsF3maNgQYf84uXIu9A7dK/hU2hoPb7WL7/XKpGH2apUNG8fNA+lNcbPN1CW42A0+EJZdtn6PhJfaR+I3/JOokVoS8tAeqwWzb2id06K61Y1xY4lpQ1HUZL0JlI6S5j0ygtL6Wnl2tXJ2NLyoEbrgR0Wq/QHEwEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bjabgIsF7ghw4vXCXK4DRXFKfcHr8+ZyT2rSxj8IBu8=; b=dhgUfNPQ4bwgaRvBK05PhEl4xEZWfLhUq3Witrj0vV+E0AJLI6ieKAU59JJXhwfNBe02nzZRZtl0ZW3IB+e85M2i4YMxxOwfFx9OC/2KSd7Ek7oyr1AB9L4f6bwNty1jBsNq6hsjnXQr8e888pwuLr5BOFcouo33FnXtVUVFv+NKBXbHc07VtchG6ewqmQGUQxHsrmKFHDIDSxu5dC1dgTxBIkNyk7IIWuGkbIOpKRPA6ywlFviP0qx4VBzHV5kdNMtcgLkSgfp0VVKJbIdbQ3UivfI9st4Jf9820MTrMhxh28Pf8YlG2xg3dVsVIKge3sFSrDtCK0N84xXX6UFaqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bjabgIsF7ghw4vXCXK4DRXFKfcHr8+ZyT2rSxj8IBu8=; b=ErH7xfG2aaepwyOWZFguXh4IcWZ3upazd/NcapwTCt2NLWHO/hl8HdadPuQxA3Nu8OsTSxL8ZU6wmDAFHtJggMrCJNSVSgqzxZLK+rcVkeJ1yJ213MSCxt1biB7ZLi9nFScOhB0lpvC7GmDm4ltideFZiRRKotFXrAli0mBX+qY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TY3PR01MB11948.jpnprd01.prod.outlook.com (2603:1096:400:405::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.24; Tue, 22 Aug 2023 23:50:48 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::7b2c:6f3a:1aa:79d3]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::7b2c:6f3a:1aa:79d3%4]) with mapi id 15.20.6699.025; Tue, 22 Aug 2023 23:50:48 +0000 Message-ID: <87jztmzlew.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 3/5] ASoC: rsnd: tidyup brga/brgb default value User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: Mark Brown Cc: Linux-ALSA , Adnan Ali , Vincenzo De Michele , Patrick Keil In-Reply-To: <87o7iyzlfy.wl-kuninori.morimoto.gx@renesas.com> References: <87o7iyzlfy.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 22 Aug 2023 23:50:48 +0000 X-ClientProxiedBy: TYWP286CA0031.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:262::19) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TY3PR01MB11948:EE_ X-MS-Office365-Filtering-Correlation-Id: 8f83fef0-075e-49c3-6c3b-08dba36a9c0b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uhveJtbMybfxL64IAJ6+JWu81lJr2LTE1/Fk7L3tufJor5sIilWeMUzX7Myu3AtlelCPRqNvkhshfN63cOD+1PD4qdUraoUHd0aF0UN4MqGPI2sAMgNlfUnPCErTjE4vJUJ2XR3gYZMQsA31VY5rkfUTirFU4fEEwmPesFS3MZDIRl+gMKJp530wNCJR1v9udAkHp41CK3hs9Nx8Y/3NYVr+If5E0bONW4tkT3uOuynyHpayKPxnOSlFkbKUf1u4kdDC08F6HTKlIUWaJ30rFQ8NffuvsAeOxqxOJVJ64Vwd02tjH9zOCx6/l49dv/+Zib668kdv8pouZC5zWgs17GyzxhxGkVVGqiE1+DnjhJyI/+v/wxDewhTTKXKOWxd97Y9AXaSP2MLd/Zckx3HCE4zoXfiS+gR2UwtjOnNA+IVjCUe/Pt22HMj1BIpOc1O+xuUii41GRKnOsr3yOHqUviYf57G+HBaSUBQIUkhb1BTHt+DcAWPkGpSqwvQsLnc2AlRxMwvt5/1pzP3P+2iE+iXoUKcti0mRiveZv0lZRf0Uo3XG/UCeescA1DXbMj5gbUWY5Bje+EQKnlFhrU5LuKulzOSystmlUTpq4qen8IrgpotMdzFAs2fhBynug8xa X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(136003)(346002)(366004)(396003)(376002)(1800799009)(451199024)(186009)(41300700001)(66946007)(52116002)(54906003)(6506007)(66476007)(6916009)(316002)(66556008)(6486002)(4326008)(38350700002)(38100700002)(2906002)(26005)(8936002)(8676002)(2616005)(6512007)(5660300002)(83380400001)(4744005)(86362001)(36756003)(478600001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: c7NTk2StzIt+tFtAaLAKJHV4kvHgJ7S1uiKLjxuu2UR/ADiiQAKcj1PR6RLTaqdiO8JBpjz4st/ON48Pdz13LHXZwGDDjty54qzFCqxrIKeVPdWav66TwhKbxkhA4YRLjSwDLKrkSLm/6L1DMP6uSIZNOS/0u8k5Kh4Y5BNswH1Neq5h4mWer1BXwaaQ/kBi3GICfFv+2ooedE1dheZz4MfDV6MMPkIW7HBbeeWRjwBF087OAWqQSFqKIcVG2tRiUPS+EFbYVInEzZoO+FZcu2R6MD+pzr0zBkGa3U0Ynb/d+l9Lz0Iga1TGjdDRQXeWxwh3Pik3L/sFDmEQnRKpwD4tIOZKyZiWWzJzY6NoDVBqgShUq8mH0Zubo0zbBvfyXRoHHMCqx+HcdLGLhjYOEYZG3OIahqIfPKLaQXCs7Vu4vmuxIWCZU7KpwhaT/8czZ8aT4j4v+7BGPbh5uIJk3e6lSNsgYVQE2y4VKLpFB9kG/YIjLmEVqm+k33kSAnpl628qvpR/Hi6Out0M8AS3kk0kTquvTsSFLUuncJEK3Q1+xLY6AAgVVFdG6mLwZnrRTDCLNWsFoPkaYzjHGE1MM9mdyIZhvkMH+KEvXRAkhAEiBGBtMF9sRndYJaaD8APiyiBob60aPLE5cqnAj5amB9cg3Cx4qQowaBbBREBgHGruZNifckniP+jfxl/lpMNNx5rN4ZTkLKgFMI9Afx9h09xgriiXe3ej+/nNiHVL375OF1aU+5H7MUuNJkmN7TXX6z1/LPiqNIcLbUZuZt0S6KJY+t1PImxt27kiH1WDQytdGJFsBNPYoKi1FWanppcZYIC2j/ng5oMnv0M/2ieUxbF/qII5py8KdcMijGMmnB9fESJzpwWvnfggTutBUl2d6wjuUrZ8bDszW8d0TSkOx5Nh0m270WF8uv7JZUTeN7inhetBCrtFdG84dhKxZPXUqXQ+N43VXyJjQshevd3W+rzRtPoxB9BTvLq5+s+9IeQcxFEu1vCXPHQsD4kSMCdoGpYchrjw9WgCiWaakslmU0KI4epkoqWYuDco+MiaiPYREswpAJFIQjkRU0jKZ3cTMhfZYXAzcHQ1X3FYvTypzmcESRewL2/xaQiGAE0H7ZNVd6hvHagjYtYHFj90hWC8pefIvY3l5taNVsTi73PIavLOEIxZ5hVn+4xciELOwuxLxbL2N9fwRyY/5DJ39sPkHqloHQYHvpxxecZ4oz0Txbvxx2F6QbbS+YNSiMr2KrBucKsuioFat55ooShhXZ7nnpyf4tVTMIb/01VtCSgGtVwcB3VrLgZjgwv8ay3bchR72CgDQp4/lc6vWt/xqXzztE6MDbK/uTbITvgAKcsh0FNQb6xRQEUYqsJcAogY+LeY0M9Baaq+CBkhgzm5WyvrYOB8N4C+4GUA6n+EIqKTTY3UyfJipV05Y53bvku8a+9JPh93LyIuAcHUzhwzcdn6p+0EAVC/dt8GsxkM9tUQ0IMuYS1FXLfwL+K+8KeKYnQ2d53bIU80jGB12Y5502F6yxXzlZeZ8/lykj9ji9LNOTx0KTt2DGGX0r3pVXbiejw6NpuvFYiBrA99Eou4rBjcmyW8F2ATON0ecBJ4GfW23zfm7IfJY01hGomQCeS1sfk= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8f83fef0-075e-49c3-6c3b-08dba36a9c0b X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2023 23:50:48.3605 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LAu9p6rgDPS5vTWLqwzgwUBxmfeZjiWXqJL3HOFrXRitZcST+oRIcHR4cf0glML+92h1HdB5ObTVHU/p1CkbpuNno/CxT5vD9JN+23J7wup/45w46Cjj8HhEXwMNnpkO X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB11948 Message-ID-Hash: FFGIEENP2TUW4QPISNWF36UQZK7MXXKS X-Message-ID-Hash: FFGIEENP2TUW4QPISNWF36UQZK7MXXKS X-MailFrom: kuninori.morimoto.gx@renesas.com 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 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: default value for brga/brgb should be 0xff instead of 0x2. This patch tidyup it. Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/adg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c index 5528351c7535..fbe209b2430d 100644 --- a/sound/soc/sh/rcar/adg.c +++ b/sound/soc/sh/rcar/adg.c @@ -503,8 +503,8 @@ static int rsnd_adg_get_clkout(struct rsnd_priv *priv) }; ckr = 0; - brga = 2; /* default 1/6 */ - brgb = 2; /* default 1/6 */ + brga = 0xff; /* default */ + brgb = 0xff; /* default */ /* * ADG supports BRRA/BRRB output only From patchwork Tue Aug 22 23:51:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 715789 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 2C875EE49B1 for ; Tue, 22 Aug 2023 23:53:17 +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 E79FF852; Wed, 23 Aug 2023 01:52:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E79FF852 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692748395; bh=ktKDgJrmb3vdkyIschEDKS4OKv0w102ZSExjB9pbuwo=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=HYbDGqKcAOfXsfahvoEsi1NWm0LOfh+VtiTOevWur6AUsxUFViXKmPVXGL618u5eW hGjJ5Nxak3RAdmPufQqQeiL6MPdfM/7BPSmrUBagIZlfUuecXwVHViyDKD2PfXcpcb j0rMAVnXvOyzDUzxOMYKZR3k3CYZIkWJLtIYJ5fI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id ACA8AF805B5; Wed, 23 Aug 2023 01:51:15 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id ED956F80022; Wed, 23 Aug 2023 01:51:14 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D97A8F805AE; Wed, 23 Aug 2023 01:51:11 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20715.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::715]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8C7D4F80022 for ; Wed, 23 Aug 2023 01:51:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8C7D4F80022 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=XbKGEKge ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=esw/UrAKpAhjQXHD6utA3aqA3583rewbcZd7CKPkQOrytB6LV1qaNTUHV03s1GJjWeEj9f8GGhJnWBxaBmgPPpqi672P0Hn/HfwtR/v3zEWjZPd0Kromi93ZFw95jJQEIK6750z5EkmLqXdZodFENvL/nJSA8cu4/00QUGcldcehA7tdwtX9QHMw8Eu3xfPjHe6XsZtdhL48sCifT9O6YHIvhWQpZ/BNbSZi/SynZhtPB+NlrmLtQnQejtQJBW1/p19WcZ69Jw6UrepGQHv1yawi0yI7z4YEjno4yKorZnO9ibRk6OJlt1T9LCsDlheuWFBGGyrTRSW6k8+aSujfrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1j8KguPYQvHgZKDiVW0d86MHnDNteytQeu7qIxhsuNY=; b=XW63VG3Qf23uEEiPF6Yf6U83ErMIEH2cnRD58rsOqz54ZyLGNYkizDpdONhm1pDCz6nneZgPdgn8bnpvjyFXdM+e0K3sTJFj2pV+ZcVxcxFVv9YH1eEdQnWyzz5xKcTdRy4c3DxfEPdoENIb0C/mHNHczUIkFsRn/ipU/o/ki1weNHac+9gNmGuAIbeCDgePGJZRZISYEV9DkIOeUjy2jVQRcU8jirD/dGXxfK/pJnJlTuzDf9CmE1XIzYaInVIlXayFJFZGOMCb1QH3J5tBu2KK/v7q7Di55daWP3YbQpje135GMIqNASjJFQ2wPJupWYMZ2YFohZUfZmIVtYqxcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1j8KguPYQvHgZKDiVW0d86MHnDNteytQeu7qIxhsuNY=; b=XbKGEKgeSe/Iw22vdfivaDv6BLxadphLl4TqCpayEbruwlWFtdxi9OQkD3F6w6yhanyPlofX4gk4sGGKOrckkTybPPFAkKAjJm/mhMnuIh7NdCa75ZiWPCs+zQQBLR3+aSZ6UUS8b7xpKAByG2Pp3BCI1oEMtObnp7/8Bqj1Vuw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TY3PR01MB11948.jpnprd01.prod.outlook.com (2603:1096:400:405::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.24; Tue, 22 Aug 2023 23:51:02 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::7b2c:6f3a:1aa:79d3]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::7b2c:6f3a:1aa:79d3%4]) with mapi id 15.20.6699.025; Tue, 22 Aug 2023 23:51:02 +0000 Message-ID: <87h6oqzlei.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 5/5] ASoC: rsnd: setup BRGCKR/BRRA/BRRB on rsnd_adg_clk_control() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: Mark Brown Cc: Linux-ALSA , Adnan Ali , Vincenzo De Michele , Patrick Keil In-Reply-To: <87o7iyzlfy.wl-kuninori.morimoto.gx@renesas.com> References: <87o7iyzlfy.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 22 Aug 2023 23:51:02 +0000 X-ClientProxiedBy: TY2PR0101CA0006.apcprd01.prod.exchangelabs.com (2603:1096:404:92::18) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TY3PR01MB11948:EE_ X-MS-Office365-Filtering-Correlation-Id: 9d408917-1a03-4f1a-6bbc-08dba36aa44b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ms/2+1jgBK9/+SSdSvPIHJL+pGLagBh3rfV4NnolQuqqdIl6JduRzmUatOCGIZmQebXzfnnvvvDSsN78kGsUy1UQW5eIXZLW8aVUhw9691i03F4EYUZaBOsN+qrI4KwxfRyECpg2Hk3Xq2cq+rQqEGK23RE5R62uW2IYx5yl/FqSKFzeFDmCwKoqS2OvqncdGzhsRf0BlDwcxsyLtvoHpJ66nI9YbB1KnQMMk6MTYpD7Fi2vmQ6hmI11dmmSY8v4vrclJiyj8ihosnKOZIYp9JMVKlZyw1eZCls+q8BNzPOSjtsxpoBDzo2Z2g2/CvXykklBCfPVkF18/SxHCeTeFEnVhKYSNOr2Mth/oZvKo81IuLPbvJquBIWz/rNWpRb3UVauMzjGqu/IWeMwbZMrRYrohkxlOZdNUpZY26Jv+fXWon+hod9U5EGZYiLWP7nOO4H/+WSa/UyuChadnPuaSzuaaa8hhYS4/xqepF1mgKC04IjGaN30KFdEmUCGDyji2nWOh0jnR2TkXfbF49QYeeHe2GHLDgc+LR/sq/0p5IS6xDULbwN3PchtW1PO2V6wrhmY5W6YFYhVTC3QI5KWmfN6j+YtAm2305UFOWtyeuvvwug9xMUzms8P9QytHak/ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(136003)(346002)(366004)(396003)(376002)(1800799009)(451199024)(186009)(41300700001)(66946007)(52116002)(54906003)(6506007)(66476007)(6916009)(316002)(66556008)(6486002)(4326008)(38350700002)(38100700002)(2906002)(26005)(8936002)(8676002)(2616005)(6512007)(5660300002)(83380400001)(86362001)(36756003)(478600001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LG7+L31iqKm9+z1LdFnINuYi2FmwvThM++lJvCQguHTxZaiu2M8vRUsJVrlY7tHWgMYEXgBulicCkw+TkUoIhbZmCVktQL1/NJpTdbAHmRdHBogIqH+lhgRA9hwgm8TPwml+WBqtpIwCbj7cM6H7Bu6t4tn5FIf2zZEqyE5dVUQA5TywoC+9oru+2LqKOehqwnqIKECro5Xj78gvtlNMw0fYNTO9X6FaIuDcqw4SY4auCQMPApYroTbJ69Jb6ZvW+NidK/yEDZnNQA2VXu2T3p3cCMG1xL2wmACK+3RDhAgQbrNpYaonh3IK7Zu82aJI1Ys1hVpvYi0w5HOmCo5rEknO4AKwHgM682TuBUBDzqL2ci/C7PJjSqOklshUyncdSljekM7Qgs6lZxIoPPy2kLirj6rw3AmmbjRlCz8dKiXwsXxVuMxgSCWUolzqZ6Ytnsbm3Qzksy7iuBrccDQyasZih84Z3uiEHAjt9zZi3FWOekObv6LVFX8feS9BxCRo3b9bHa7R7HZbKLSsSwQvqD8L+9JSyvSoaukAXYQU/3bu+4/8PSLCLQmviL/BbT6PyTv4zi59X9HehwZeE9caS8qm36kZudsXkOnqHMmvDhBdUcnc6eLGKTI5lDuZDNN8izQQxCa3WO861t3P0VGWna1jDDKYCN6auRm80kkh2RCPATHhDHvlUIYKfDgURV15+ywD4kOumFSuzycyzw0U3lS+v0Jxpz40IYe/dVITXgTD9qxGVqmVUIiLySxkkU135p6yy2C1GjlAvTHVYYJohdWbjvqS9cTBrFmFDM69VV/l+rvpDZXoYNuPrbaeUZZrNt+fUIaL/+wJukBJlYAsAIhAu9koioHgR4uLIovTKF8OHv7BKojqIGk668QcX4yfvc9xJuEXUj9NOa6CtNW+rvaNW3g6OPlZAQvN3UJVkbOHmHmdyUbeUa0D0DySdN2K9dau4TDFTz6IMM8eKNaA0hHUyHOixReRUn+hCoct2XD+4KBRf7JY2NT0M4UxmlyyKDhRRrenfWTo1NMw5uP4UmSUAAzV0v09t6MEtjKKO/e2VyCNLx16V14OiMITK2Frd/+CjEfG1s6rQBMfbn0O1bLV88O1tZKwN1X9l98aw3jaBbmsKKAXUVkZCvDdMz4UkUjh1Xt99lg3eKuP10FB+ZEtN1PUR5KbpgBwBaODCRgIufir89zH04by8lADwcXez4CVsUdW1ux2nWl4vykCsxF+IB/xPEh+wV0Hv6WAsmN9GH2ENsXLrTTAU9eSTHzgl2MheDD5B76ftExZEfJGPOVE6OBwN6tYFqT0FiZhg205+Z8nRtPqSvG+s7WCkW3LFFfGMh4Cuu6mgNbW0uGP5XKU9JY0RIpz84vcojsDtwgiOIleOvVw+rqVqobE86nFRZnuAuIp2VS0xbQJoVFsDN21m3am+5e2/z/ex39nxLqj3NsMiEAEbn2e9aDTuqttiSrVX9Mf+4wn8rYId9PK/pW0GrJbr1FjgDqvpMbkB+2o7noR+4QM150kkVDE6TaRbWTtJkVhEjvPj2ZP+QZsXD0VTyjhobZOSCtt0z5XNjrE1Lqdk4GYHBya27XO5Pf1SvTQakk2sfQ/S53y1tc/8XITRlSIFLoj1rC7bAd4aiI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d408917-1a03-4f1a-6bbc-08dba36aa44b X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2023 23:51:02.2343 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /0libedTd377di8GwMDBXIj56whLPhc71W3huyGoPDpgt23sBg069vzO5gvZOjiRj1GTmd4D29lLSWfl1ZHVEScMYaHSnokCDbn3pWOxu+dGHrh/Q1LfcnQYkiADhSIZ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB11948 Message-ID-Hash: FK4GMNWFBU5XSK63IHTRNBLM3JH4ZKCY X-Message-ID-Hash: FK4GMNWFBU5XSK63IHTRNBLM3JH4ZKCY X-MailFrom: kuninori.morimoto.gx@renesas.com 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 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: Current adg.c will configure BRGCKR/BRRA/BRRB to output clock when it start sound. OTAH, rsnd_adg_clk_enable() will enables clk_a/b/c when driver was probed. But it is strange, these should be set in the same time. This patch fixup it. Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/adg.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c index 94e048614c81..f0888cf31208 100644 --- a/sound/soc/sh/rcar/adg.c +++ b/sound/soc/sh/rcar/adg.c @@ -359,8 +359,6 @@ int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *ssi_mod, unsigned int rate) ckr = 0x80000000; /* BRGB output = 48kHz */ rsnd_mod_bset(adg_mod, BRGCKR, 0x80770000, adg->ckr | ckr); - rsnd_mod_write(adg_mod, BRRA, adg->brga); - rsnd_mod_write(adg_mod, BRRB, adg->brgb); dev_dbg(dev, "CLKOUT is based on BRG%c (= %dHz)\n", (ckr) ? 'B' : 'A', @@ -373,9 +371,16 @@ int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *ssi_mod, unsigned int rate) void rsnd_adg_clk_control(struct rsnd_priv *priv, int enable) { struct rsnd_adg *adg = rsnd_priv_to_adg(priv); + struct rsnd_mod *adg_mod = rsnd_mod_get(adg); struct clk *clk; int i; + if (enable) { + rsnd_mod_bset(adg_mod, BRGCKR, 0x80770000, adg->ckr); + rsnd_mod_write(adg_mod, BRRA, adg->brga); + rsnd_mod_write(adg_mod, BRRB, adg->brgb); + } + for_each_rsnd_clkin(clk, adg, i) { if (enable) { clk_prepare_enable(clk);