Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1950856lqe; Tue, 9 Apr 2024 05:45:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXMgFENZsM002pZNG4MPdPAjGiuVNkShBpVrjbXJx4QUNlw/cOPCHsrIgCo5WG9o5zO0eVJY5jrR9g9NFe6xKiQ6mOHFfUDZUn4jyshBA== X-Google-Smtp-Source: AGHT+IFbdW8h5J+BaI5wNAtBjPr9Bz2vfmvNVyEBznL0ggBjAyFHkHWk3HSJU8I1zIDT79HrDjPH X-Received: by 2002:a05:6358:d590:b0:186:7b6:f0e7 with SMTP id ms16-20020a056358d59000b0018607b6f0e7mr11821804rwb.26.1712666725939; Tue, 09 Apr 2024 05:45:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712666725; cv=pass; d=google.com; s=arc-20160816; b=UKgXYNQ+71qPnZ0AX9EDx89ipml09AGp6uGbiMF+BSadF/JREAEwQPaTxUU0RYpSjg LAOLQFBfeVHvCORO0vmPj0V56M5995WiSF19MwK6VmHi5tcVhEnt8RbBVhnksjIrK3Vz 7A96CXvm+sSBrg7SdNO3pdXxH/x09CW5ahRpcEjZAFDV+t3MUZn1CAXL35RBt/gVkzLp yOQK7wcAcYOMj3A2D3D7ABWwxbU9xrLmUjsegrNRCDEhK2N9tT6DseJvVzKHJlIVqdFP vRAZbkbFd624QVZhX3qlid/3LEo3ZBJjC++xoqiRCDycKOKj7W33FimN7H2NWpaZjKHz c5EQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=WOiTKq8lulyl+mRKopNfN2zO/PBNsFc4ID6J5RZjFZQ=; fh=L0ii8v3zvVDh5sRic6Krt3qttRJ8U3Kl5QSUYY+9UCg=; b=t8dahCpciTgDihtNyCdgfmZZ9/7YXr+hqXzEUfjGdh+2sg8oAI36k+UKPWbNp9sLMw rqTzXXmwT6iSfO4hh0ZC/CXumrlvMOQBR3ap7WKCLjxVjtJ6eIO0iJxTQy+cT/DFyYsm hu+JH9kqFG5xJuYMq8rAAsEjagOixYBiKWuFgi69W4HoheGBbjJW8oA3EmyRwsgtq4CC 7ysXzxdjCQ3MfgPsCKZusZzxa16JF9Z836NAlkjtayM/Y6Ob4vyrB9vCt3FbDEwAT5kC 0ILO5Lu1Lxoh/08+jpotYTp7cr253kSK8vv2Hw6yrGhAA+Y9nj0v2hPY45hQfeJV0bps O/Rw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HVbchTwy; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-136856-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136856-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i34-20020a635862000000b005ee3cfc0a24si8258529pgm.43.2024.04.09.05.45.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 05:45:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136856-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HVbchTwy; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-136856-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136856-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3C2BFB26C3E for ; Tue, 9 Apr 2024 12:18:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03AC312DDBA; Tue, 9 Apr 2024 12:17:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HVbchTwy" Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70BAC12A160; Tue, 9 Apr 2024 12:17:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712665062; cv=none; b=qqfLfb2Gef1S2AgElmeB+tkvhnM8y7AsQjS4AfEIT05fz/cTEXxBp25pHNjh9EprTAzWqxhu04HE66QKR4VcfBMG7PpRQ6wA2bznFUKfcIR4GaADMLAVXe0agREOcQPY23hbOEXt7zvkBdsLgaed3KmOB35nYvjB5e6jdMRYTtQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712665062; c=relaxed/simple; bh=307vDM+j52k02o1eYGDZr+F/hjbmwGjTwX/Iz6iwAmU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gyhxnBNZUk91dYPYAe5UN9vSC507krHXsd81Dy3daxmgDlJzg7MXzxV483hhrYxEab+TBINiDFPwfhIL+ZeXPzcBjGhMSp8ji6tc8Aan6qcAp31TgW6KTQMbuWjaEhUidNnPo70AklzVlWDGJp/G/80CYnFNTO45nI7PkZKlJp4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HVbchTwy; arc=none smtp.client-ip=209.85.218.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a51c37a5025so342097666b.1; Tue, 09 Apr 2024 05:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712665058; x=1713269858; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WOiTKq8lulyl+mRKopNfN2zO/PBNsFc4ID6J5RZjFZQ=; b=HVbchTwy5SFrjhez5HJbI1vOg7lmuY0Uc4aaefTCM2KvxTLcNS3ozOlpYWjQ+/uytx e3POBxDTKmBXs55DKN2GBAK7GByX+AnHAaUQwiNxnj8mp1il+sAE/CHDjakXm27uoktU gjxVGZeFHNBnsj9hqFCt71qkAWnHw9JeE/TtT0lb9/1fkhzC8hMbLczgUxh4FPKNmMQI nWE6trLexeYJ39jYMavO6nLdfXvZuisLWzrt7lE6IFE6CG4F3M2q2ZdP1N40vk2Ll0hf ZyNBX4+Ab2JbtBIZ/n2UuIcL5ImxQnzJ6IU0LZKC9OHNGb9Vm9akaw9qVR8l+A5ogIBy qQ1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712665058; x=1713269858; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WOiTKq8lulyl+mRKopNfN2zO/PBNsFc4ID6J5RZjFZQ=; b=waWcyNUpy17Ti5TJw0E791m2aTqyMxELamYQSfAC+yPPXwcI2jp+mhvFgmYSa6Wo/J 1rgTEIBEmniwuhutpgcDVa5TI3ZuYUUqV5ByQ84vjeAudfPMdwg2Ckd9Q4PFhUfNG84j DaogjXsFG7ELmdb/yOPvsg5DesgSXh/o5sNHF+JmsrkO6AG2lQCNjtZdBS2ikn2uBriG Zaef/vvnMIgjlve2cfw4wHisfIvFzOWwwv/kdfAqYx540meyZk8yXrmx5ROvQlSVgfk3 WGZjXWlHMgNXb1pbm7UuBMzHYr9OvUAE46X1hfh5v/972cogw1mLG9KcjPK9e8jhM7Vm csPA== X-Forwarded-Encrypted: i=1; AJvYcCXAfR8ILsGOiJj2PG8lkTiUBg2r+f39alAtOXoeEvnhb5zLonGHDRq4utNV43YLie63Q0XOoNCzpcAKAFEdptpqkeepaJt/pig9IwmE X-Gm-Message-State: AOJu0YzVb4nwnzBj4AKMDPm2XDlUzkS+YlITkFyXlQVvlm1V0rAcYg4K tBKcUJNMVDgxNvcLc7/cJIcA9mkXF2czED0Bdv7e8BFxaa02l75x+Xdb/dwHNjs= X-Received: by 2002:a17:906:6a10:b0:a51:ae39:d38e with SMTP id qw16-20020a1709066a1000b00a51ae39d38emr8866130ejc.53.1712665058263; Tue, 09 Apr 2024 05:17:38 -0700 (PDT) Received: from andrejs-nb.int.toradex.com (77-59-154-235.dclient.hispeed.ch. [77.59.154.235]) by smtp.gmail.com with ESMTPSA id en1-20020a17090728c100b00a51adace6ebsm5030412ejc.79.2024.04.09.05.17.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 05:17:37 -0700 (PDT) From: Andrejs Cainikovs To: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Andrejs Cainikovs Subject: [PATCH v1 1/2] ASoC: nau8822: move nau8822_set_dai_sysclk() Date: Tue, 9 Apr 2024 14:17:18 +0200 Message-Id: <20240409121719.337709-2-andrejs.cainikovs@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240409121719.337709-1-andrejs.cainikovs@gmail.com> References: <20240409121719.337709-1-andrejs.cainikovs@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Andrejs Cainikovs Next commit in series makes a change which calls nau8822_set_pll() from nau8822_set_dai_sysclk(). Moving latter after the former would avoid a forward declaration, and this is exactly what this change does. Signed-off-by: Andrejs Cainikovs --- sound/soc/codecs/nau8822.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sound/soc/codecs/nau8822.c b/sound/soc/codecs/nau8822.c index 7199d734c79f..1046801a41ef 100644 --- a/sound/soc/codecs/nau8822.c +++ b/sound/soc/codecs/nau8822.c @@ -612,20 +612,6 @@ static const struct snd_soc_dapm_route nau8822_dapm_routes[] = { {"Right DAC", NULL, "Digital Loopback"}, }; -static int nau8822_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id, - unsigned int freq, int dir) -{ - struct snd_soc_component *component = dai->component; - struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component); - - nau8822->div_id = clk_id; - nau8822->sysclk = freq; - dev_dbg(component->dev, "master sysclk %dHz, source %s\n", freq, - clk_id == NAU8822_CLK_PLL ? "PLL" : "MCLK"); - - return 0; -} - static int nau8822_calc_pll(unsigned int pll_in, unsigned int fs, struct nau8822_pll *pll_param) { @@ -782,6 +768,20 @@ static int nau8822_set_pll(struct snd_soc_dai *dai, int pll_id, int source, return 0; } +static int nau8822_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id, + unsigned int freq, int dir) +{ + struct snd_soc_component *component = dai->component; + struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component); + + nau8822->div_id = clk_id; + nau8822->sysclk = freq; + dev_dbg(component->dev, "master sysclk %dHz, source %s\n", freq, + clk_id == NAU8822_CLK_PLL ? "PLL" : "MCLK"); + + return 0; +} + static int nau8822_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) { struct snd_soc_component *component = dai->component; -- 2.34.1