Received: by 2002:a05:7208:c250:b0:86:f851:443 with SMTP id w16csp939458rbd; Thu, 13 Jun 2024 01:48:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWmJmbJ96byqCq3OA7/zVlp543K0Y1rwvlYcE5LB5Pc7gxx8JnOECRRfIyiCZ/AswcmK+Gujb9lpl7VJ0gkZf3jCdegrbJALguuC46Frg== X-Google-Smtp-Source: AGHT+IErdxiWTHGhxl4D9AdCqpniTY5AD42dDX3d7eJnBtIF82dHIpEWFqER/2nkHxS/kNSTymP8 X-Received: by 2002:a05:620a:254e:b0:795:5ce7:dc21 with SMTP id af79cd13be357-797f60e0a3fmr421390585a.56.1718268525119; Thu, 13 Jun 2024 01:48:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718268525; cv=pass; d=google.com; s=arc-20160816; b=K4K98QiWVMbEbxnklnyAsMfq2NTkUTsyrw8RKrF/4PZbkA8QAE1f5gGSfTDHxX7++5 u6OJ4+nPMaTvqmOMhuWf1UA4B/tfMwe2ZAtOw5kpd2TizYLhv4nYY0EwdXFDz2hqLB0E l8BYwN+7CBOJOzvoEy9e3PqPku/GgsgYBPgUQvDd2EEbQSfkl0YHOw/3O68YMcdRVkRi yds+Ci/Ejg6BmJnur7XwscAxSw3XUopp1D1AMzsgHPqeuOXfqwzkOKHJQb61HDbix9VP vhFcVfX9zywWMZX5RR2w//McYRl8V704g1puB39o7KJ+FX7ziCScjyfRnzgerPyOVyMc VSUg== 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=qrljha2mkLWZllZM4qPDb9u5Vppz4LLT+JoE5p6lano=; fh=PmFweAU+ELjG0x3ZLGp3C2S1s7tCrOTEMsqGI4ztDnM=; b=JyzIslwW3ZwGlWVycRKZrNAAtc22V4CJ0qLxspKfBGylnQT8OiOiO+IW8ouvYIZg/2 N5Kv/azM3bHAeq2HPLHfQlGkLKzR4U53lClLkseTDaULlxWvaTabj5Ze/rQ2BtBIzDww 2Y3OvRVREf2KVpyKBvBX7PrsNdyTUSvhTahu7msDpeTuabT1fcIqwcmEtStTib2lhB75 mfdi/+rGTrwpJexIvO85T8ggOk6Oin9t10uSfYx2gRdG744acFSZ5PZUvZzegFKBEYgk CeSr0AOPI/Rp2i+AOzqfr5WS3FkAZolsG6xOnQnLyiMxUtKpWXNm9cOKUWSP7wOTkvNW dsVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=I5NKCP+l; 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-212870-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212870-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-441f2eaa2b0si9792771cf.278.2024.06.13.01.48.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 01:48:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212870-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=I5NKCP+l; 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-212870-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212870-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D730E1C21993 for ; Thu, 13 Jun 2024 08:48:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3C9413E03A; Thu, 13 Jun 2024 08:47:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="I5NKCP+l" Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (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 488A013D8A6; Thu, 13 Jun 2024 08:47:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718268423; cv=none; b=W5K7eyepCLhw9X4NRBP7ZYR4nzSxUFXHvOHjRVYeV02vq5Aj7ILEeYQqvbt82wKSL5IoVzXJc5nm7M18T6WCsAkthRZzr5Y95k+7KZ1dEBVe6Qz6/zwKFMlQD+0BDlFWVgkF/w0EIl6bFONSFKb4atrEY2mfla5OO2ZEjeTD3nc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718268423; c=relaxed/simple; bh=9PtQ8zM9C8kWoJ/j3aD7oi8Q4SAOvIat/GQcZAYBzWg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LEgDpWP8p9kSwk/o/LiejdLk8kKRBI5WF2SaLzQpSFVANFvg+q22zlEosxc9cCzuEGU/7zm97NUpcdfHO3/nTSRctHhz77qvb+0o/UfVzadmL0Jw8Up2upUmeAM8kTFOTITFucB0yCUdM7+EUvvNlS6E9NNP2rNRdGidPr09/Ho= 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=I5NKCP+l; arc=none smtp.client-ip=209.85.208.42 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-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-57c61165af6so672007a12.2; Thu, 13 Jun 2024 01:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718268420; x=1718873220; 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=qrljha2mkLWZllZM4qPDb9u5Vppz4LLT+JoE5p6lano=; b=I5NKCP+l5hW9yj7mOb0Ya0WSeQ0GPA8hHpEw2stanBt84ldmmOT38joeFn6WEA7JTW 7xiODu7YccOZghKo7oeJtYwgYy6pu7GSMyKpArFybcMlqT6Rn+mAe61q3qJ3P3DAL6yJ 68atTbnL3k7mCmyf+1wJyr6wdEe/oajsrbsSQ/ZYBpWgR0f51GsuiW1SinPV1xDuzaKf nKEPmZ8hYQpWCuFjzKLgayA+I+vBixQ+Vy5tCAB0EbhjZGq0KPf/ulfhLs/yTtQqCNci ssHYZKrMltBuC6/7GDU+KfY3Dzp0yOIYevex5uX+HV7x9QEWlkfrAl4jdUr8dP82weG7 NnSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718268420; x=1718873220; 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=qrljha2mkLWZllZM4qPDb9u5Vppz4LLT+JoE5p6lano=; b=eJgIcz2L2sE3Lz//g4tObMXMGos3tcXQRDik/1Yv4qphrMeQc3XbV17xs+AyLVqJSd eB2+FX+FqeSBkonaLdmY+JK7drApVLe2drLSNV8BXPjbQhm7W6YScdr5qjZsQMQkRqIw g7ZO7mhYU0rSZXzUeY9Akr0Jw/73WRb46EVLJC8J+u6aosCGImcxjkXrn6xNAoJL+5q2 Xlbb49UwLlafIaNnzLgk1BDkSQvYXxE+jTd+atWiARDP/dE8bIyYC7hyWheQiOwxIdvh h4azDHNYexAAeTyu7uQjMQpL9uikQW3S6/cdc5hjNZlaVepJMCHIFhFR4vq+ggtfiSrs +eOw== X-Forwarded-Encrypted: i=1; AJvYcCUNlx08u/iYPdDGd5LdKCVZ7m966ZoWG3lXCEV+DgGzxRMi2YhNG95nnUJHflatAZcTlaryj+f1ORFCbinhLjm+Eb7RrAYcWIFAMg3/ X-Gm-Message-State: AOJu0YwZm2iNxxryslbDjH9f4wRESH2pMjXfavwgw3SMhcCjSb8CqM/6 cukS+/KEkh/HpPc983c9ZA/Qjdyt6NXI2Bnjnx7U4GEBt0a3Jpz9 X-Received: by 2002:a17:906:d7a6:b0:a6f:5b5f:89a9 with SMTP id a640c23a62f3a-a6f5b5f8ba3mr36412766b.55.1718268420204; Thu, 13 Jun 2024 01:47:00 -0700 (PDT) Received: from andrejs-nb.. (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56dd2daasm48364266b.97.2024.06.13.01.46.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 01:46:58 -0700 (PDT) From: Andrejs Cainikovs To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Andrejs Cainikovs Subject: [PATCH v2 1/3] ASoC: nau8822: move nau8822_set_dai_sysclk() Date: Thu, 13 Jun 2024 10:46:50 +0200 Message-Id: <20240613084652.13113-2-andrejs.cainikovs@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240613084652.13113-1-andrejs.cainikovs@gmail.com> References: <20240613084652.13113-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 e6909e64dfa3..a6741bda6a9e 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