From patchwork Sat Sep 7 00:53:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13794896 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 864B7E6FE49 for ; Sat, 7 Sep 2024 00:57:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Khu098WlXlgqdRhsT4spPojBoQ9J8F2ndSM5PtIXoRY=; b=znn5wx3NK2CQ+QeRE9JnQiN4Ux er/PtwsV9imROno4oV6xiOYLosJAnTIsnxawAcUXb71YZsr0A63fCA+V9iI5ryvFAY0i5GRrdXXlM JoJMTDsPah7IIBuH9egBVxShBLn8LVs5DcJB5vJXANEDoocsh4s2/wXADom0X2NLMRbNbEbfQM9aL PvtwW9e2QhBqSHneNKwMDoegccLNi/gGJRHDlMpF2GKab+GJ59FqoexwmhDUZdv7kQZJ6qbQj1u5b yJ0atx/p2qOs4YvoVjrwk3aFhrgRqQhat0AG4hLxrLkgMDmhpYZtH5g0XOlVk+Re5yD1Ptvxsi+ZK e0tGSU/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smjli-0000000Dylf-3L23; Sat, 07 Sep 2024 00:57:38 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smjjl-0000000DyGp-3xuq; Sat, 07 Sep 2024 00:55:39 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id C6BA75C5ACC; Sat, 7 Sep 2024 00:55:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A6C6C4CEC9; Sat, 7 Sep 2024 00:55:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725670537; bh=IyWmu4DnoFuCIPAtXWPw8SVtC2zLrvIEG26z/VzRYQ8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=hbz3QdX8P5AKEBFnJWtZZX1WapHIACqdLWrTGd+HxYRdNrpntBa1lGkacPBWd8iTe QmGiCDsvnjSccG8C9X51YWiyHaWD+CebJE27tXcx0cecUhn0NU7d2BPq/hla5838/1 oN9dJDmnp2s5crHV9g0m5SsIHsJTtjEjU/OdzhO2v68nhNjn9DE3mssSGxES/dCMvU h0zb7PvuWZby8GfjpY5Wk2tsNtZQu3C0RNMvAqKReqhLul5472D4ckflWiwxjaLybO eE5GdezE10N1xAeuT4PhPbuGKIPr5CFJWtzThyAixeq+rFQdwWA/8siJi7kKwIBRpM QcdwYlPe6H2wQ== From: Mark Brown Date: Sat, 07 Sep 2024 01:53:26 +0100 Subject: [PATCH 1/7] ASoC: mt8365: Open code BIT() to avoid spurious warnings MIME-Version: 1.0 Message-Id: <20240907-asoc-fix-mt8365-build-v1-1-7ad0bac20161@kernel.org> References: <20240907-asoc-fix-mt8365-build-v1-0-7ad0bac20161@kernel.org> In-Reply-To: <20240907-asoc-fix-mt8365-build-v1-0-7ad0bac20161@kernel.org> To: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , AngeloGioacchino Del Regno Cc: Nathan Chancellor , Alexandre Mergnat , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Mark Brown X-Mailer: b4 0.15-dev-99b12 X-Developer-Signature: v=1; a=openpgp-sha256; l=12902; i=broonie@kernel.org; h=from:subject:message-id; bh=IyWmu4DnoFuCIPAtXWPw8SVtC2zLrvIEG26z/VzRYQ8=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBm26R9/Ba36Aai3qZF7yqr0peg9E9zHo18oCWB1 cf92ZALXoaJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZtukfQAKCRAk1otyXVSH 0Ad9B/9HMX0ox4ptcHxsyooXsguJhgP3qIOpW8QY/RaZxFlabiG7Zx246FTsgu+COsBb9liQZUb z9KK9Yep4XRip7xuGgwbtX6I5yGcBsdz6H76XLt2gNvJtnjRjIaYv9JCbgwhx6B/bnmD1lCNxCo N5NP0T/5NK+RNmgiHBrmuPvajxrQ9PgSDtpxMx2o3vR8Wg2PFvz+AkiQpwzvIyOE7M4T+k+p9Vo BoTBQaqYS4OsPkskM4MckesWQYMWWLCLyW6NBqhjCV4b518BYp49J9chYqQ6EWIm7KUal1QlMx3 x+lPdIZHBzdsSsm2LhykhQfpQLHwHcJ4ER8hyTHYdRKgrovi X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_175538_116299_4BB65EF6 X-CRM114-Status: GOOD ( 10.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The mt8365 driver uses bits.h to define bitfields but BIT() uses unsigned long constants so does not play well with being bitwise negated and converted to an unsigned int, the compiler complains about width reduction on a number of architectures. Just open code the shifting to avoid the issue. Generated with s/BIT(/(1U << / Reported-by: Nathan Chancellor Signed-off-by: Mark Brown Reviewed-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-reg.h | 214 ++++++++++++++++----------------- 1 file changed, 107 insertions(+), 107 deletions(-) diff --git a/sound/soc/mediatek/mt8365/mt8365-reg.h b/sound/soc/mediatek/mt8365/mt8365-reg.h index b7334c2e64ed..b763cddc93db 100644 --- a/sound/soc/mediatek/mt8365/mt8365-reg.h +++ b/sound/soc/mediatek/mt8365/mt8365-reg.h @@ -734,57 +734,57 @@ #define AFE_IRQ_STATUS_BITS 0x3ff /* AUDIO_TOP_CON0 (0x0000) */ -#define AUD_TCON0_PDN_TML BIT(27) -#define AUD_TCON0_PDN_DAC_PREDIS BIT(26) -#define AUD_TCON0_PDN_DAC BIT(25) -#define AUD_TCON0_PDN_ADC BIT(24) -#define AUD_TCON0_PDN_TDM_IN BIT(23) -#define AUD_TCON0_PDN_TDM_OUT BIT(22) -#define AUD_TCON0_PDN_SPDIF BIT(21) -#define AUD_TCON0_PDN_APLL_TUNER BIT(19) -#define AUD_TCON0_PDN_APLL2_TUNER BIT(18) -#define AUD_TCON0_PDN_INTDIR BIT(15) -#define AUD_TCON0_PDN_24M BIT(9) -#define AUD_TCON0_PDN_22M BIT(8) -#define AUD_TCON0_PDN_I2S_IN BIT(6) -#define AUD_TCON0_PDN_AFE BIT(2) +#define AUD_TCON0_PDN_TML (1U << 27) +#define AUD_TCON0_PDN_DAC_PREDIS (1U << 26) +#define AUD_TCON0_PDN_DAC (1U << 25) +#define AUD_TCON0_PDN_ADC (1U << 24) +#define AUD_TCON0_PDN_TDM_IN (1U << 23) +#define AUD_TCON0_PDN_TDM_OUT (1U << 22) +#define AUD_TCON0_PDN_SPDIF (1U << 21) +#define AUD_TCON0_PDN_APLL_TUNER (1U << 19) +#define AUD_TCON0_PDN_APLL2_TUNER (1U << 18) +#define AUD_TCON0_PDN_INTDIR (1U << 15) +#define AUD_TCON0_PDN_24M (1U << 9) +#define AUD_TCON0_PDN_22M (1U << 8) +#define AUD_TCON0_PDN_I2S_IN (1U << 6) +#define AUD_TCON0_PDN_AFE (1U << 2) /* AUDIO_TOP_CON1 (0x0004) */ -#define AUD_TCON1_PDN_TDM_ASRC BIT(15) -#define AUD_TCON1_PDN_GENERAL2_ASRC BIT(14) -#define AUD_TCON1_PDN_GENERAL1_ASRC BIT(13) -#define AUD_TCON1_PDN_CONNSYS_I2S_ASRC BIT(12) -#define AUD_TCON1_PDN_DMIC3_ADC BIT(11) -#define AUD_TCON1_PDN_DMIC2_ADC BIT(10) -#define AUD_TCON1_PDN_DMIC1_ADC BIT(9) -#define AUD_TCON1_PDN_DMIC0_ADC BIT(8) -#define AUD_TCON1_PDN_I2S4_BCLK BIT(7) -#define AUD_TCON1_PDN_I2S3_BCLK BIT(6) -#define AUD_TCON1_PDN_I2S2_BCLK BIT(5) -#define AUD_TCON1_PDN_I2S1_BCLK BIT(4) +#define AUD_TCON1_PDN_TDM_ASRC (1U << 15) +#define AUD_TCON1_PDN_GENERAL2_ASRC (1U << 14) +#define AUD_TCON1_PDN_GENERAL1_ASRC (1U << 13) +#define AUD_TCON1_PDN_CONNSYS_I2S_ASRC (1U << 12) +#define AUD_TCON1_PDN_DMIC3_ADC (1U << 11) +#define AUD_TCON1_PDN_DMIC2_ADC (1U << 10) +#define AUD_TCON1_PDN_DMIC1_ADC (1U << 9) +#define AUD_TCON1_PDN_DMIC0_ADC (1U << 8) +#define AUD_TCON1_PDN_I2S4_BCLK (1U << 7) +#define AUD_TCON1_PDN_I2S3_BCLK (1U << 6) +#define AUD_TCON1_PDN_I2S2_BCLK (1U << 5) +#define AUD_TCON1_PDN_I2S1_BCLK (1U << 4) /* AUDIO_TOP_CON3 (0x000C) */ -#define AUD_TCON3_HDMI_BCK_INV BIT(3) +#define AUD_TCON3_HDMI_BCK_INV (1U << 3) /* AFE_I2S_CON (0x0018) */ -#define AFE_I2S_CON_PHASE_SHIFT_FIX BIT(31) -#define AFE_I2S_CON_FROM_IO_MUX BIT(28) -#define AFE_I2S_CON_LOW_JITTER_CLK BIT(12) +#define AFE_I2S_CON_PHASE_SHIFT_FIX (1U << 31) +#define AFE_I2S_CON_FROM_IO_MUX (1U << 28) +#define AFE_I2S_CON_LOW_JITTER_CLK (1U << 12) #define AFE_I2S_CON_RATE_MASK GENMASK(11, 8) -#define AFE_I2S_CON_FORMAT_I2S BIT(3) -#define AFE_I2S_CON_SRC_SLAVE BIT(2) +#define AFE_I2S_CON_FORMAT_I2S (1U << 3) +#define AFE_I2S_CON_SRC_SLAVE (1U << 2) /* AFE_ASRC_2CH_CON0 */ -#define ONE_HEART BIT(31) -#define CHSET_STR_CLR BIT(4) -#define COEFF_SRAM_CTRL BIT(1) -#define ASM_ON BIT(0) +#define ONE_HEART (1U << 31) +#define CHSET_STR_CLR (1U << 4) +#define COEFF_SRAM_CTRL (1U << 1) +#define ASM_ON (1U << 0) /* CON2 */ -#define O16BIT BIT(19) -#define CLR_IIR_HISTORY BIT(17) -#define IS_MONO BIT(16) -#define IIR_EN BIT(11) +#define O16BIT (1U << 19) +#define CLR_IIR_HISTORY (1U << 17) +#define IS_MONO (1U << 16) +#define IIR_EN (1U << 11) #define IIR_STAGE_MASK GENMASK(10, 8) /* CON5 */ @@ -793,80 +793,80 @@ #define CALI_96_CYCLE FIELD_PREP(CALI_CYCLE_MASK, 0x5F) #define CALI_441_CYCLE FIELD_PREP(CALI_CYCLE_MASK, 0x1B8) -#define CALI_AUTORST BIT(15) -#define AUTO_TUNE_FREQ5 BIT(12) -#define COMP_FREQ_RES BIT(11) +#define CALI_AUTORST (1U << 15) +#define AUTO_TUNE_FREQ5 (1U << 12) +#define COMP_FREQ_RES (1U << 11) #define CALI_SEL_MASK GENMASK(9, 8) #define CALI_SEL_00 FIELD_PREP(CALI_SEL_MASK, 0) #define CALI_SEL_01 FIELD_PREP(CALI_SEL_MASK, 1) -#define CALI_BP_DGL BIT(7) /* Bypass the deglitch circuit */ -#define AUTO_TUNE_FREQ4 BIT(3) -#define CALI_AUTO_RESTART BIT(2) -#define CALI_USE_FREQ_OUT BIT(1) -#define CALI_ON BIT(0) +#define CALI_BP_DGL (1U << 7) /* Bypass the deglitch circuit */ +#define AUTO_TUNE_FREQ4 (1U << 3) +#define CALI_AUTO_RESTART (1U << 2) +#define CALI_USE_FREQ_OUT (1U << 1) +#define CALI_ON (1U << 0) -#define AFE_I2S_CON_WLEN_32BIT BIT(1) -#define AFE_I2S_CON_EN BIT(0) +#define AFE_I2S_CON_WLEN_32BIT (1U << 1) +#define AFE_I2S_CON_EN (1U << 0) -#define AFE_CONN3_I03_O03_S BIT(3) -#define AFE_CONN4_I04_O04_S BIT(4) -#define AFE_CONN4_I03_O04_S BIT(3) +#define AFE_CONN3_I03_O03_S (1U << 3) +#define AFE_CONN4_I04_O04_S (1U << 4) +#define AFE_CONN4_I03_O04_S (1U << 3) /* AFE_I2S_CON1 (0x0034) */ -#define AFE_I2S_CON1_I2S2_TO_PAD BIT(18) +#define AFE_I2S_CON1_I2S2_TO_PAD (1U << 18) #define AFE_I2S_CON1_TDMOUT_TO_PAD (0 << 18) #define AFE_I2S_CON1_RATE GENMASK(11, 8) -#define AFE_I2S_CON1_FORMAT_I2S BIT(3) -#define AFE_I2S_CON1_WLEN_32BIT BIT(1) -#define AFE_I2S_CON1_EN BIT(0) +#define AFE_I2S_CON1_FORMAT_I2S (1U << 3) +#define AFE_I2S_CON1_WLEN_32BIT (1U << 1) +#define AFE_I2S_CON1_EN (1U << 0) /* AFE_I2S_CON2 (0x0038) */ -#define AFE_I2S_CON2_LOW_JITTER_CLK BIT(12) +#define AFE_I2S_CON2_LOW_JITTER_CLK (1U << 12) #define AFE_I2S_CON2_RATE GENMASK(11, 8) -#define AFE_I2S_CON2_FORMAT_I2S BIT(3) -#define AFE_I2S_CON2_WLEN_32BIT BIT(1) -#define AFE_I2S_CON2_EN BIT(0) +#define AFE_I2S_CON2_FORMAT_I2S (1U << 3) +#define AFE_I2S_CON2_WLEN_32BIT (1U << 1) +#define AFE_I2S_CON2_EN (1U << 0) /* AFE_I2S_CON3 (0x004C) */ -#define AFE_I2S_CON3_LOW_JITTER_CLK BIT(12) +#define AFE_I2S_CON3_LOW_JITTER_CLK (1U << 12) #define AFE_I2S_CON3_RATE GENMASK(11, 8) -#define AFE_I2S_CON3_FORMAT_I2S BIT(3) -#define AFE_I2S_CON3_WLEN_32BIT BIT(1) -#define AFE_I2S_CON3_EN BIT(0) +#define AFE_I2S_CON3_FORMAT_I2S (1U << 3) +#define AFE_I2S_CON3_WLEN_32BIT (1U << 1) +#define AFE_I2S_CON3_EN (1U << 0) /* AFE_ADDA_DL_SRC2_CON0 (0x0108) */ #define AFE_ADDA_DL_SAMPLING_RATE GENMASK(31, 28) #define AFE_ADDA_DL_8X_UPSAMPLE GENMASK(25, 24) -#define AFE_ADDA_DL_MUTE_OFF_CH1 BIT(12) -#define AFE_ADDA_DL_MUTE_OFF_CH2 BIT(11) -#define AFE_ADDA_DL_VOICE_DATA BIT(5) -#define AFE_ADDA_DL_DEGRADE_GAIN BIT(1) +#define AFE_ADDA_DL_MUTE_OFF_CH1 (1U << 12) +#define AFE_ADDA_DL_MUTE_OFF_CH2 (1U << 11) +#define AFE_ADDA_DL_VOICE_DATA (1U << 5) +#define AFE_ADDA_DL_DEGRADE_GAIN (1U << 1) /* AFE_ADDA_UL_SRC_CON0 (0x0114) */ #define AFE_ADDA_UL_SAMPLING_RATE GENMASK(19, 17) /* AFE_ADDA_UL_DL_CON0 */ -#define AFE_ADDA_UL_DL_ADDA_AFE_ON BIT(0) -#define AFE_ADDA_UL_DL_DMIC_CLKDIV_ON BIT(1) +#define AFE_ADDA_UL_DL_ADDA_AFE_ON (1U << 0) +#define AFE_ADDA_UL_DL_DMIC_CLKDIV_ON (1U << 1) /* AFE_APLL_TUNER_CFG (0x03f0) */ #define AFE_APLL_TUNER_CFG_MASK GENMASK(15, 1) -#define AFE_APLL_TUNER_CFG_EN_MASK BIT(0) +#define AFE_APLL_TUNER_CFG_EN_MASK (1U << 0) /* AFE_APLL_TUNER_CFG1 (0x03f4) */ #define AFE_APLL_TUNER_CFG1_MASK GENMASK(15, 1) -#define AFE_APLL_TUNER_CFG1_EN_MASK BIT(0) +#define AFE_APLL_TUNER_CFG1_EN_MASK (1U << 0) /* PCM_INTF_CON1 (0x0550) */ -#define PCM_INTF_CON1_EXT_MODEM BIT(17) +#define PCM_INTF_CON1_EXT_MODEM (1U << 17) #define PCM_INTF_CON1_16BIT (0 << 16) -#define PCM_INTF_CON1_24BIT BIT(16) +#define PCM_INTF_CON1_24BIT (1U << 16) #define PCM_INTF_CON1_32BCK (0 << 14) -#define PCM_INTF_CON1_64BCK BIT(14) +#define PCM_INTF_CON1_64BCK (1U << 14) #define PCM_INTF_CON1_MASTER_MODE (0 << 5) -#define PCM_INTF_CON1_SLAVE_MODE BIT(5) +#define PCM_INTF_CON1_SLAVE_MODE (1U << 5) #define PCM_INTF_CON1_FS_MASK GENMASK(4, 3) #define PCM_INTF_CON1_FS_8K FIELD_PREP(PCM_INTF_CON1_FS_MASK, 0) #define PCM_INTF_CON1_FS_16K FIELD_PREP(PCM_INTF_CON1_FS_MASK, 1) @@ -875,12 +875,12 @@ #define PCM_INTF_CON1_SYNC_LEN_MASK GENMASK(13, 9) #define PCM_INTF_CON1_SYNC_LEN(x) FIELD_PREP(PCM_INTF_CON1_SYNC_LEN_MASK, ((x) - 1)) #define PCM_INTF_CON1_FORMAT_MASK GENMASK(2, 1) -#define PCM_INTF_CON1_SYNC_OUT_INV BIT(23) -#define PCM_INTF_CON1_BCLK_OUT_INV BIT(22) -#define PCM_INTF_CON1_SYNC_IN_INV BIT(21) -#define PCM_INTF_CON1_BCLK_IN_INV BIT(20) -#define PCM_INTF_CON1_BYPASS_ASRC BIT(6) -#define PCM_INTF_CON1_EN BIT(0) +#define PCM_INTF_CON1_SYNC_OUT_INV (1U << 23) +#define PCM_INTF_CON1_BCLK_OUT_INV (1U << 22) +#define PCM_INTF_CON1_SYNC_IN_INV (1U << 21) +#define PCM_INTF_CON1_BCLK_IN_INV (1U << 20) +#define PCM_INTF_CON1_BYPASS_ASRC (1U << 6) +#define PCM_INTF_CON1_EN (1U << 0) #define PCM_INTF_CON1_CONFIG_MASK (0xf3fffe) /* AFE_DMIC0_UL_SRC_CON0 (0x05b4) @@ -890,9 +890,9 @@ */ #define DMIC_TOP_CON_CK_PHASE_SEL_CH1 GENMASK(29, 27) #define DMIC_TOP_CON_CK_PHASE_SEL_CH2 GENMASK(26, 24) -#define DMIC_TOP_CON_TWO_WIRE_MODE BIT(23) -#define DMIC_TOP_CON_CH2_ON BIT(22) -#define DMIC_TOP_CON_CH1_ON BIT(21) +#define DMIC_TOP_CON_TWO_WIRE_MODE (1U << 23) +#define DMIC_TOP_CON_CH2_ON (1U << 22) +#define DMIC_TOP_CON_CH1_ON (1U << 21) #define DMIC_TOP_CON_VOICE_MODE_MASK GENMASK(19, 17) #define DMIC_TOP_CON_VOICE_MODE_8K FIELD_PREP(DMIC_TOP_CON_VOICE_MODE_MASK, 0) #define DMIC_TOP_CON_VOICE_MODE_16K FIELD_PREP(DMIC_TOP_CON_VOICE_MODE_MASK, 1) @@ -900,28 +900,28 @@ #define DMIC_TOP_CON_VOICE_MODE_48K FIELD_PREP(DMIC_TOP_CON_VOICE_MODE_MASK, 3) #define DMIC_TOP_CON_LOW_POWER_MODE_MASK GENMASK(15, 14) #define DMIC_TOP_CON_LOW_POWER_MODE(x) FIELD_PREP(DMIC_TOP_CON_LOW_POWER_MODE_MASK, (x)) -#define DMIC_TOP_CON_IIR_ON BIT(10) +#define DMIC_TOP_CON_IIR_ON (1U << 10) #define DMIC_TOP_CON_IIR_MODE GENMASK(9, 7) -#define DMIC_TOP_CON_INPUT_MODE BIT(5) -#define DMIC_TOP_CON_SDM3_LEVEL_MODE BIT(1) -#define DMIC_TOP_CON_SRC_ON BIT(0) +#define DMIC_TOP_CON_INPUT_MODE (1U << 5) +#define DMIC_TOP_CON_SDM3_LEVEL_MODE (1U << 1) +#define DMIC_TOP_CON_SRC_ON (1U << 0) #define DMIC_TOP_CON_SDM3_DE_SELECT (0 << 1) #define DMIC_TOP_CON_CONFIG_MASK (0x3f8ed7a6) /* AFE_CONN_24BIT (0x0AA4) */ -#define AFE_CONN_24BIT_O10 BIT(10) -#define AFE_CONN_24BIT_O09 BIT(9) -#define AFE_CONN_24BIT_O06 BIT(6) -#define AFE_CONN_24BIT_O05 BIT(5) -#define AFE_CONN_24BIT_O04 BIT(4) -#define AFE_CONN_24BIT_O03 BIT(3) -#define AFE_CONN_24BIT_O02 BIT(2) -#define AFE_CONN_24BIT_O01 BIT(1) -#define AFE_CONN_24BIT_O00 BIT(0) +#define AFE_CONN_24BIT_O10 (1U << 10) +#define AFE_CONN_24BIT_O09 (1U << 9) +#define AFE_CONN_24BIT_O06 (1U << 6) +#define AFE_CONN_24BIT_O05 (1U << 5) +#define AFE_CONN_24BIT_O04 (1U << 4) +#define AFE_CONN_24BIT_O03 (1U << 3) +#define AFE_CONN_24BIT_O02 (1U << 2) +#define AFE_CONN_24BIT_O01 (1U << 1) +#define AFE_CONN_24BIT_O00 (1U << 0) /* AFE_HD_ENGEN_ENABLE */ -#define AFE_22M_PLL_EN BIT(0) -#define AFE_24M_PLL_EN BIT(1) +#define AFE_22M_PLL_EN (1U << 0) +#define AFE_24M_PLL_EN (1U << 1) /* AFE_GAIN1_CON0 (0x0410) */ #define AFE_GAIN1_CON0_EN_MASK GENMASK(0, 0) @@ -938,15 +938,15 @@ /* AFE_CM2_CON0 (0x0e60) */ #define CM_AFE_CM_CH_NUM_MASK GENMASK(3, 0) #define CM_AFE_CM_CH_NUM(x) FIELD_PREP(CM_AFE_CM_CH_NUM_MASK, ((x) - 1)) -#define CM_AFE_CM_ON BIT(4) +#define CM_AFE_CM_ON (1U << 4) #define CM_AFE_CM_START_DATA_MASK GENMASK(11, 8) -#define CM_AFE_CM1_VUL_SEL BIT(12) +#define CM_AFE_CM1_VUL_SEL (1U << 12) #define CM_AFE_CM1_IN_MODE_MASK GENMASK(19, 16) -#define CM_AFE_CM2_TDM_SEL BIT(12) -#define CM_AFE_CM2_CLK_SEL BIT(13) -#define CM_AFE_CM2_GASRC1_OUT_SEL BIT(17) -#define CM_AFE_CM2_GASRC2_OUT_SEL BIT(16) +#define CM_AFE_CM2_TDM_SEL (1U << 12) +#define CM_AFE_CM2_CLK_SEL (1U << 13) +#define CM_AFE_CM2_GASRC1_OUT_SEL (1U << 17) +#define CM_AFE_CM2_GASRC2_OUT_SEL (1U << 16) /* AFE_CM2_CONN* */ #define CM2_AFE_CM2_CONN_CFG1(x) FIELD_PREP(CM2_AFE_CM2_CONN_CFG1_MASK, (x)) From patchwork Sat Sep 7 00:53:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13794897 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DB4F8E6FE49 for ; Sat, 7 Sep 2024 00:58:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sCHSnlKs7nbNTJVYOubK3rmYPxj9MGSnBIf+5OHCecE=; b=GOPI8nWpEpQg9xp7c9awAFDr6r GN99ov5Qn+a55JcHrQP55MYPCXQBSImuE3qPUDo3iVg8PRihqS8+8jW2AjSnxCsbA7dT3a+6N1wB8 jFgVrOi9yMaSD2MgJLWnZ9PB+CAw5O1jyq+UUtlzyA1Cs9pjXho9FrlDPaXmeDsdBOXD4cRR/3Uqm GoYbgvfu22JGBz7Xnc2ndGWpH9d5QpxGyiXtLdMHnkOsToZuWuFvebvjITz+/iDH3mkGBZonDEhRF UNq6ae9C3JpOx137lwGr/DU/evt2lrFtUE3r/ob1RCzgmFc663G/bgfNXQBlaJ/b/1wkSswmWQR0X 1wYzbzmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smjmf-0000000Dyuc-2bPW; Sat, 07 Sep 2024 00:58:37 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smjjp-0000000DyHb-13dJ; Sat, 07 Sep 2024 00:55:42 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 443E45C5AD7; Sat, 7 Sep 2024 00:55:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E5AAC4CEC4; Sat, 7 Sep 2024 00:55:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725670540; bh=iSQufWGpx94L8jD/fIu7r3A06l7ki4DXdmHTvAiYL80=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=sSxPW2sFMCFSmehq8NSEkbXl3fNtzmSJ9LJxUiy6tk22JT1lWq0k/LNUUiKu/SWGl IX3IqozxmqcyuX0oEOt8pVnSMV+NH+WF9Yb83qz7NnFR0g653PywNMg0CH66N7EoO0 fjHh/pOGEPv6TFJnSl9C+I3DDQOf/D7qkxpWgY4Qg+ureyaU2baNYd9YDMUipPzWyq eVgcbLokxA1nBTxvlridk71RPJzLAStxaKyF2tM56XnfdEAmSiOoCvrlLr5QuXltUu 3V9/0yIrW4ii28dpVafBdut8suqjYmH323Igr8scJODtq4NWv9kmC90YeQC24oYqvD mW+Om5SotZQ2A== From: Mark Brown Date: Sat, 07 Sep 2024 01:53:27 +0100 Subject: [PATCH 2/7] ASoC: mt8365: Remove spurious unsigned long casts MIME-Version: 1.0 Message-Id: <20240907-asoc-fix-mt8365-build-v1-2-7ad0bac20161@kernel.org> References: <20240907-asoc-fix-mt8365-build-v1-0-7ad0bac20161@kernel.org> In-Reply-To: <20240907-asoc-fix-mt8365-build-v1-0-7ad0bac20161@kernel.org> To: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , AngeloGioacchino Del Regno Cc: Nathan Chancellor , Alexandre Mergnat , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Mark Brown X-Mailer: b4 0.15-dev-99b12 X-Developer-Signature: v=1; a=openpgp-sha256; l=1580; i=broonie@kernel.org; h=from:subject:message-id; bh=iSQufWGpx94L8jD/fIu7r3A06l7ki4DXdmHTvAiYL80=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBm26R+zknCtJq+ENLDqwu1RsLA7s39ffxBc41Hj KN25Rko+ZmJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZtukfgAKCRAk1otyXVSH 0IHSB/92x7A9qdeg88jK2oSvesXS/dYxWzhp9sqLKjt2RvrB7oYqO/C2RlYbYaf1todLCgSAQhe p+jsJEaaD5U9vMDyp6rd/+2Urx5qJcBVXU/KlVptzaNrytAcyBVqqwMqwFH8S6V3RoisfHV9VTc N67ePaaDqers+7fgRq/rkUHfM3UdXOiKm3GkegtrcvrSWHIa7zapJwgTnjinufYnCXrFn3OGpe1 d7Htr52YKD9WAH2sL6Ro3Rvdggjwi4RvTtc/ncnASTEgLdF3ZYDM+IbWtjP0tL4ZNXbXLQUzMr+ NMiVrX+ihx36pTcGzqAKpgMZgKJoi1pPPXlL7rcL9jh3bGAt X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_175541_410317_4294E694 X-CRM114-Status: GOOD ( 10.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The regmap APIs take unsigned ints not unsigned longs so casting their arguments to unsigned longs is not a good choice, the constants being cast here are all unsigned ints anyway. Signed-off-by: Mark Brown Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-dai-i2s.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c b/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c index 5003fe5e5ccf..6b4d8b7e24ca 100644 --- a/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c +++ b/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c @@ -385,7 +385,7 @@ static int mt8365_afe_set_2nd_i2s_asrc(struct mtk_base_afe *afe, /* disable IIR coeff SRAM access */ regmap_update_bits(afe->regmap, AFE_ASRC_2CH_CON0, COEFF_SRAM_CTRL, - (unsigned long)~COEFF_SRAM_CTRL); + ~COEFF_SRAM_CTRL); regmap_update_bits(afe->regmap, AFE_ASRC_2CH_CON2, CLR_IIR_HISTORY | IIR_EN | IIR_STAGE_MASK, CLR_IIR_HISTORY | IIR_EN | @@ -393,7 +393,7 @@ static int mt8365_afe_set_2nd_i2s_asrc(struct mtk_base_afe *afe, } else { /* disable IIR */ regmap_update_bits(afe->regmap, AFE_ASRC_2CH_CON2, - IIR_EN, (unsigned long)~IIR_EN); + IIR_EN, ~IIR_EN); } /* CON3 setting (RX OFS) */ @@ -456,7 +456,7 @@ static int mt8365_afe_set_2nd_i2s_asrc_enable(struct mtk_base_afe *afe, ASM_ON, ASM_ON); else regmap_update_bits(afe->regmap, AFE_ASRC_2CH_CON0, - ASM_ON, (unsigned long)~ASM_ON); + ASM_ON, ~ASM_ON); return 0; } From patchwork Sat Sep 7 00:53:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13794898 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C0274CE7B04 for ; Sat, 7 Sep 2024 00:59:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EGxLNONYUNrglpD4rMLTDj4ZY+Nt4PLarg59UF67efQ=; b=gVXoGgumJ95KehrShAJiuVk1+h ifRzXYT9BeaWrp7TAVb2emovqjeKfH7Wd7HipY4IALZorUajRQoXX0Cmlo03hqxXJ/7gWP0DkxvgM NMLIrGA7FNW4N9NdUWfk1duwRbS3tQIRmBSVFGkIcDgcdsH7zHUF/fq/4LY+tVykq/JQ0BdxYkWyo 7qstkOTIBN+XmLvca4uMyRb//ORSS6sQdkQmIriK7/ac6OCXXhJUKrHWZ0jE2IkPNl/Yle3odJBV7 ziGJ33SjygR5vazsX7XzLp2uVhotcc/Hgs0rkDXegRcLRbx+RQG2Q1ywWzNcCWM8gplira4PPhDMK RkK5Fg5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smjnl-0000000Dz5A-25nC; Sat, 07 Sep 2024 00:59:45 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smjjs-0000000DyIP-1J1V; Sat, 07 Sep 2024 00:55:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 4FEE95C5AD7; Sat, 7 Sep 2024 00:55:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EAF96C4CEC4; Sat, 7 Sep 2024 00:55:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725670543; bh=hVRqy/YIqXha3+LEl7UForQK+FCn9cErocX8XXm3AKo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=o847oYZWd7bYXkrO1HkLBhr+TlIVBzWfFXa4UWPcLjK4iCjkdMCK47gPKpQwSvn+s 8HwefoWa2/rlUG6GHo7nFI/dsEHqZIQ08+rFIZnhUutSmUFZeIEqnWh+l4X1oCzXsl RZixxkkxRscQOlj9QX8DO9RW/ZZ6ZWbc54bQaBVpFNZEb37zqlyEZuVEmkex0oUWQO XJo9AlDlLr7pbVjLMnai3Gejzu5osrGL7HuXYoh14JkR6rrKX/Mf2wlG32YvQLBJ04 tsEomX6ggOIdte8O8uKEvna8XYrw42biWB5xmZqTCyIyId3+Sg2NORZKl4YHzj/7TD 9saAWIhTgrxMA== From: Mark Brown Date: Sat, 07 Sep 2024 01:53:28 +0100 Subject: [PATCH 3/7] ASoC: mt8365: Remove unused prototype for mt8365_afe_clk_group_48k() MIME-Version: 1.0 Message-Id: <20240907-asoc-fix-mt8365-build-v1-3-7ad0bac20161@kernel.org> References: <20240907-asoc-fix-mt8365-build-v1-0-7ad0bac20161@kernel.org> In-Reply-To: <20240907-asoc-fix-mt8365-build-v1-0-7ad0bac20161@kernel.org> To: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , AngeloGioacchino Del Regno Cc: Nathan Chancellor , Alexandre Mergnat , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Mark Brown X-Mailer: b4 0.15-dev-99b12 X-Developer-Signature: v=1; a=openpgp-sha256; l=855; i=broonie@kernel.org; h=from:subject:message-id; bh=hVRqy/YIqXha3+LEl7UForQK+FCn9cErocX8XXm3AKo=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBm26R+ODYn9QHBhO3Jkdnki3jclFXaxvYiwoG+8 QyvUQtzqjKJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZtukfgAKCRAk1otyXVSH 0CmqB/9Ts6+nuGtv/dpT+wN/BSZumRSYevRraXg/+TUAeyiDK+2w1k7FPwdO3wPbLxngyt8I3fM gsxul/IKy+2d8AzfEw5V7jvbWpNMZGYYwi6NCKdJttHZpJOqA9Hyyrzurf1EI1RqCgteUhvKqln DQ+gNovUMRS3caTw+Y3SY06Pe8e9k6C5g37teJRGt1eVxZeyYOxMdhPe2LorkEJKNot9lAicimk x01FN96AC2gNPACvKzkI/NT8R/gs+OFqAEgqyWDXUi/mNDiihOlz1qwCpRxTqwBPKIWWtZ7Rvcf j48gzPDBihukvOJq59RhGjMWx6NZ8jdIwP5zvhswyP58orjg X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_175544_426599_3A8B52B8 X-CRM114-Status: GOOD ( 10.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The function is not used outside of the file it is defined and the equivalent function for 44.1kHz is not prototyped so remove the prototype for this function. Signed-off-by: Mark Brown Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-afe-common.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/mediatek/mt8365/mt8365-afe-common.h b/sound/soc/mediatek/mt8365/mt8365-afe-common.h index 1fa87e54a57f..731406e15ac7 100644 --- a/sound/soc/mediatek/mt8365/mt8365-afe-common.h +++ b/sound/soc/mediatek/mt8365/mt8365-afe-common.h @@ -421,7 +421,6 @@ static inline u32 AutoRstThLo(unsigned int fs) } } -bool mt8365_afe_clk_group_48k(int sample_rate); bool mt8365_afe_rate_supported(unsigned int rate, unsigned int id); bool mt8365_afe_channel_supported(unsigned int channel, unsigned int id); From patchwork Sat Sep 7 00:53:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13794899 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4C12FE6FE49 for ; Sat, 7 Sep 2024 01:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YM3vFrh3wrkNBXmeEnlV8XNdSyOxetn6YRE3i416RVQ=; b=G45FsWwjjybnZZKNQRakHkBIe+ gugKafaErT/I+gZGyyYcxMJq129tjBVCN5fr+icaLCiblpSEkFYOyp39WlfZkCgLx2xDhNJlhJZuF mfEI2NcMICa0RNud577mWm0gWWTWVab5laoPkJKRihhsVhT7QPX2JpuS9x+GjlEsTQRi/6e+HdSii UWQH/xOiLD8xswFlTn2CNnKYwsgaa+pcgdPJQ8b580Mqka91z5Nt4UhbCaHcdXXZqGBm0BrBlHfX9 s6Du7TqXiVT2n0fq8p2R7R/QxZqy5DCS8xkT2XMVluIS2g/oTeoXj9l/U4cfm5336X/uFPAXvQ6ZU gUE2O07A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smjoi-0000000DzCY-28Nc; Sat, 07 Sep 2024 01:00:44 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smjjv-0000000DyJh-3TEi; Sat, 07 Sep 2024 00:55:49 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 7D82DA43B42; Sat, 7 Sep 2024 00:55:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21759C4CEC6; Sat, 7 Sep 2024 00:55:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725670546; bh=BRGjOgFnTrmZqTMBAf7IoRHZkNEMl+9ApZDZZ8fAqw0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Na3WJvgp574EalKMFfJvWAydc15T9xbm9tOunwzyhZWvha5zLyrJ3sm/6xaffaTwu aHO4rPerbTkYRJcxi3f30EKdNC/sCx60r0935GoDhj9nchMh+dzVhB5JsHkiQT0OiA dOOcj9Wp3sKbA4QGmnZEL13bsx1EF9Zb7jHo8UDY4keUJYHvLq+m9Om8gmeBhW/HfU aUVYAPyXZ1vm00kvREHHnU69Vmv9w5xFo+GpwBdGeoSvmyKV6bMlkyLvF3pbCCG3WT POAPZDzYcj6yX9cOqSQffWp4AbtFuw/pSR2m9fUVlUE/hFgQm0DoHINRn1OUn6JKh9 2L4fn75LHvoVw== From: Mark Brown Date: Sat, 07 Sep 2024 01:53:29 +0100 Subject: [PATCH 4/7] ASoC: mt8365: Make non-exported functions static MIME-Version: 1.0 Message-Id: <20240907-asoc-fix-mt8365-build-v1-4-7ad0bac20161@kernel.org> References: <20240907-asoc-fix-mt8365-build-v1-0-7ad0bac20161@kernel.org> In-Reply-To: <20240907-asoc-fix-mt8365-build-v1-0-7ad0bac20161@kernel.org> To: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , AngeloGioacchino Del Regno Cc: Nathan Chancellor , Alexandre Mergnat , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Mark Brown X-Mailer: b4 0.15-dev-99b12 X-Developer-Signature: v=1; a=openpgp-sha256; l=3001; i=broonie@kernel.org; h=from:subject:message-id; bh=BRGjOgFnTrmZqTMBAf7IoRHZkNEMl+9ApZDZZ8fAqw0=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBm26R/DCjR8omgTVIF6yFLtT+coGO18yH9dw040 FDUGLMhP7CJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZtukfwAKCRAk1otyXVSH 0CoTB/4xpjJxFz84COXQNXL6pfwfhvyOgKYcVgjRa4smg63udhEstOCLD/q8C0trO206byrMWGx W+0Z8BdbmD1iZigLFQOBlhw7r2pSnCeYYKjz/p67QZwHVPkSXnTJfe01GOFeJ00x4kbYvbMAJzf d3d0AC6MsdNlPfg6wbWQ8MA93Yaq1+a9SxWPL+7v+pkEhRfWwBKi0+kBC8+OPWNcP4mbAqFFjBk 1EM8gkTPlko0trGpLKBHf4GxAens19YcyGWFJN+XCAVmUPTyDEeMKdFeu36VSDWdVC+kdG2Z0sG kCNfsh82aCjR0frpShwvdC4Ki6Atw2BrSxM1h7lyV1mx0tk2 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_175548_032916_5C9CF26F X-CRM114-Status: GOOD ( 10.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The compilers warn if functions without a prototype are not static so add appropriate static declarations. Reported-by: Nathan Chancellor Signed-off-by: Mark Brown Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-afe-clk.c | 4 ++-- sound/soc/mediatek/mt8365/mt8365-afe-pcm.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/soc/mediatek/mt8365/mt8365-afe-clk.c b/sound/soc/mediatek/mt8365/mt8365-afe-clk.c index 300d1f0ae660..8a0af2ea8546 100644 --- a/sound/soc/mediatek/mt8365/mt8365-afe-clk.c +++ b/sound/soc/mediatek/mt8365/mt8365-afe-clk.c @@ -295,7 +295,7 @@ int mt8365_afe_disable_afe_on(struct mtk_base_afe *afe) return 0; } -int mt8365_afe_hd_engen_enable(struct mtk_base_afe *afe, bool apll1) +static int mt8365_afe_hd_engen_enable(struct mtk_base_afe *afe, bool apll1) { if (apll1) regmap_update_bits(afe->regmap, AFE_HD_ENGEN_ENABLE, @@ -307,7 +307,7 @@ int mt8365_afe_hd_engen_enable(struct mtk_base_afe *afe, bool apll1) return 0; } -int mt8365_afe_hd_engen_disable(struct mtk_base_afe *afe, bool apll1) +static int mt8365_afe_hd_engen_disable(struct mtk_base_afe *afe, bool apll1) { if (apll1) regmap_update_bits(afe->regmap, AFE_HD_ENGEN_ENABLE, diff --git a/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c b/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c index df6dd8c5bbe5..54d2112d2e92 100644 --- a/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c +++ b/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c @@ -170,7 +170,7 @@ bool mt8365_afe_channel_supported(unsigned int channel, unsigned int id) return false; } -bool mt8365_afe_clk_group_44k(int sample_rate) +static bool mt8365_afe_clk_group_44k(int sample_rate) { if (sample_rate == 11025 || sample_rate == 22050 || @@ -182,7 +182,7 @@ bool mt8365_afe_clk_group_44k(int sample_rate) return false; } -bool mt8365_afe_clk_group_48k(int sample_rate) +static bool mt8365_afe_clk_group_48k(int sample_rate) { return (!mt8365_afe_clk_group_44k(sample_rate)); } @@ -496,8 +496,8 @@ static int mt8365_afe_configure_cm(struct mtk_base_afe *afe, return 0; } -int mt8365_afe_fe_startup(struct snd_pcm_substream *substream, - struct snd_soc_dai *dai) +static int mt8365_afe_fe_startup(struct snd_pcm_substream *substream, + struct snd_soc_dai *dai) { struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); @@ -714,8 +714,8 @@ static int mt8365_afe_fe_prepare(struct snd_pcm_substream *substream, return 0; } -int mt8365_afe_fe_trigger(struct snd_pcm_substream *substream, int cmd, - struct snd_soc_dai *dai) +static int mt8365_afe_fe_trigger(struct snd_pcm_substream *substream, int cmd, + struct snd_soc_dai *dai) { struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); From patchwork Sat Sep 7 00:53:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13794903 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 ED32DE6FE49 for ; Sat, 7 Sep 2024 01:01:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pORB/qmyWDO1otKgSMC3zYdW5FT4nBxjmN5ItnnDHsQ=; b=RO3XnhM4QRq7W9EFkifEG4zlyB xwR+io9AWRinGqKil7dIbm004jhTupClVZsTxnQ0SmHsU0IzobVUO6g5pA6L5MJ+8s7mSiTG6y7Dq /OecnvV+rnTV/JLU7w41Bdx34CwrencLSwP/aiMMOfGJ0nukRT/mZjYrrEmwF4Gv6UCCCofGjDTAI glKckMsd1vPJjFtBII5XeO8F4pEFn1XzcY61Iz7mrgz08sRugF1qiPzRH8bFZW48yKXSt9unhNscv OUZ9clb8CeOqavnBQLH+gPPyGucbTrDBWCk+nCDJeEgb8NRej8khsHkC8/XoKwhD+Bjox+/CNHxv7 vaq/NIyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smjpf-0000000DzJA-14j3; Sat, 07 Sep 2024 01:01:43 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smjjy-0000000DyKg-04fd; Sat, 07 Sep 2024 00:55:51 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E70555C5ACB; Sat, 7 Sep 2024 00:55:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8DFCC4CEC4; Sat, 7 Sep 2024 00:55:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725670549; bh=d29PX8Kf8MYAinMn4C2D5w94LU1+8WoEKeXakOrts3Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ddpbxwGOhlKDdTfrH0Jus/qOrB0R0C797M07biC8FYniSbThI2Y5ASgFyNrsF62wo Nu1F4fVJlOS6r3CYaaXaRfFTyEfhcqdwea8i9XIoqhnw6Vlkjc6bOqKH8A0ia+Oujz 16ypB34ISJUCTu4HWTCRxyu/uUQsI+Pe/1TLbRUvPc5sHFx/9fVZo2Yjg2/yT6Z2oV 03XcFMFmUrKqMTG9mWU30qm11QwR+ydtmVyNLtLH6urWjC1jXk8rWsKP0HFKm1xeMh qqsbGnz2kOtuvaw/0E9WatpHsu/rZCFsLcaIvFx0HQJ8Xqn3wG+/38RCmbCg/HTRnw 7Bc1bnTB92xZA== From: Mark Brown Date: Sat, 07 Sep 2024 01:53:30 +0100 Subject: [PATCH 5/7] ASoC: mt8365: Remove unused variables MIME-Version: 1.0 Message-Id: <20240907-asoc-fix-mt8365-build-v1-5-7ad0bac20161@kernel.org> References: <20240907-asoc-fix-mt8365-build-v1-0-7ad0bac20161@kernel.org> In-Reply-To: <20240907-asoc-fix-mt8365-build-v1-0-7ad0bac20161@kernel.org> To: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , AngeloGioacchino Del Regno Cc: Nathan Chancellor , Alexandre Mergnat , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Mark Brown X-Mailer: b4 0.15-dev-99b12 X-Developer-Signature: v=1; a=openpgp-sha256; l=1645; i=broonie@kernel.org; h=from:subject:message-id; bh=d29PX8Kf8MYAinMn4C2D5w94LU1+8WoEKeXakOrts3Q=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBm26SANRt5NQ04hFOb/RfJc6j4vAH/dTnmrrFv/ C9Wsx043JyJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZtukgAAKCRAk1otyXVSH 0Ei4B/95b3HQREtmOua5M38o740mYRlt2CFq/K/fN/fQmep4JdPSKRqIOKYYQoRcBBmT7gVTJHK ni/dl8zFiHNcH2r8ufA7CBh60Fx+NgqLUt5OPhdt1PVeq56O+jZ2yS1O669CGe54sbQSEX/LD+4 r91ro5TKC3Vk19vyqi5FT6qfaDQvLdfC0js13eqE1lNvnGMITM7/xMdPBDJfK1QRnkYMHnpnyu5 UAx5zyL2rxLH+Hj3L/u73wJ0yuJNmVq1ZGfKKeuGgZNnmGiR36LjiZHthXHP85Bv1a6C8JInEln c0iXwdR+JqtY8OSlzOi5D7IoMnkVaxvg10i/gC+SEpWoX2RS X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_175550_198635_7EDB0418 X-CRM114-Status: GOOD ( 10.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Silence compiler warnings by removing unused variables. Reported-by: Nathan Chancellor Signed-off-by: Mark Brown Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-afe-pcm.c | 1 - sound/soc/mediatek/mt8365/mt8365-mt6357.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c b/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c index 54d2112d2e92..21b1319a6c28 100644 --- a/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c +++ b/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c @@ -651,7 +651,6 @@ static int mt8365_afe_fe_hw_free(struct snd_pcm_substream *substream, struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); struct mt8365_afe_private *afe_priv = afe->platform_priv; int dai_id = snd_soc_rtd_to_cpu(rtd, 0)->id; - struct mtk_base_afe_memif *memif = &afe->memif[dai_id]; struct mt8365_fe_dai_data *fe_data = &afe_priv->fe_data[dai_id]; int ret = 0; diff --git a/sound/soc/mediatek/mt8365/mt8365-mt6357.c b/sound/soc/mediatek/mt8365/mt8365-mt6357.c index fef76118f801..1b8d1656101b 100644 --- a/sound/soc/mediatek/mt8365/mt8365-mt6357.c +++ b/sound/soc/mediatek/mt8365/mt8365-mt6357.c @@ -290,9 +290,8 @@ static int mt8365_mt6357_dev_probe(struct mtk_soc_card_data *soc_card_data, bool struct mtk_platform_card_data *card_data = soc_card_data->card_data; struct snd_soc_card *card = card_data->card; struct device *dev = card->dev; - struct device_node *platform_node; struct mt8365_mt6357_priv *mach_priv; - int i, ret; + int ret; card->dev = dev; ret = parse_dai_link_info(card); From patchwork Sat Sep 7 00:53:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13794904 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DDC2DCE7B04 for ; Sat, 7 Sep 2024 01:02:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iYVZQDIgdwSxvf7rK8diRq6Xuz10Yi7lZHMISne2avU=; b=nZdKgUjnxXJ6f+QA9ORn6TLz88 P2J75D4/2cVoM+mBB/1/fLHhayLUHaIhzjuVu8pk3c4Eps04ISG+bjZxzZs3sn6enjDnzW85IhoRd fQkMk5yosidwkyP5QNcu7Iic6XBdJKhppieXsYFND1nwhw9EYhPtYLkck1PEUJHjvoYBNcIDrv5n3 1mME5OWCeVZSZ8x1100n2OkOYZb78JbKA0ZI1D3HnmU/vKZD9o4RhxMtYOHRdYRlPbbgDTIoPwnq/ 16EDSliktM5VRQOntx1yK946LcFr1/jYnYD3BRRyjYp+GjA0KTRE65A2eFLK+0zxYUOhemDQ41ajQ h/9ZlTww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smjqc-0000000DzRJ-2Xz5; Sat, 07 Sep 2024 01:02:42 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smjk1-0000000DyLs-0Jpq; Sat, 07 Sep 2024 00:55:54 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 168695C5ACB; Sat, 7 Sep 2024 00:55:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A67FC4CEC6; Sat, 7 Sep 2024 00:55:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725670552; bh=4xdE0tNYCJIEybe1Mo1jGwO98BsqMRPOQv2h7DEiJUs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=sDKgyPbC7LX8yRCxRsI5mRD8vahl51omQUm8zKAJvAZWUYNmzsDeTfp9DkgpBUGli 2WVjgCZqAMpTGPPY15EcKVCzCm8WPbJtlqj+Ro29gfm0u6jDJHpz35D5zaWHyE22UK mcBl22Xi2PGmC8PHwpM5kTgh3zgglfxwGmZqw6VENMop95H2FfZRKuPID8/fsM+i18 iQNJZi5Pxxpo4HXa1yUsXDzbIuks3hynTAlFfGrZZtq76hwSwnFRzc1u2ORmpTJhPh ipB1nNsjlsOZNnxJGCP69jDZz2R5/ArGDfc2cDyqryLE1jeWmdUFwWZolvO2x42uJQ Tv9NDkslHUI8A== From: Mark Brown Date: Sat, 07 Sep 2024 01:53:31 +0100 Subject: [PATCH 6/7] ASoC: mt8365: Remove unused DMIC IIR coefficient configuration MIME-Version: 1.0 Message-Id: <20240907-asoc-fix-mt8365-build-v1-6-7ad0bac20161@kernel.org> References: <20240907-asoc-fix-mt8365-build-v1-0-7ad0bac20161@kernel.org> In-Reply-To: <20240907-asoc-fix-mt8365-build-v1-0-7ad0bac20161@kernel.org> To: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , AngeloGioacchino Del Regno Cc: Nathan Chancellor , Alexandre Mergnat , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Mark Brown X-Mailer: b4 0.15-dev-99b12 X-Developer-Signature: v=1; a=openpgp-sha256; l=2290; i=broonie@kernel.org; h=from:subject:message-id; bh=4xdE0tNYCJIEybe1Mo1jGwO98BsqMRPOQv2h7DEiJUs=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBm26SB9w0r3cXods2Io4Bj+kQAm5IN9AfzhuhON GW5vPba3h+JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZtukgQAKCRAk1otyXVSH 0CDDB/4tmZwad18Si8ZMlu0wXc5OhYlza1BQK8bqC3/6Fz3l793mBZ1inOovTbKWLbSWyAyY33g I8GG65AjwsZjcNnwC8DRggjPg1XaURSQCx6qD3Hl9vmsdLMX+D4OiCk0qSYPmiI2ZfSrLVymZyd ba01/b8Nuobubt4nRdH3IdrUt9Yl51ry3sGCCWs+lbBYS0uD8n2hF0SIH2z4RHKHKDrZp8oO/XH pmCzDVsZBT43oB23aoGsZkdE1XmuDyu0wW2+4t3wpsJUF4ey0xjAKRaGKHvnWukcn7T7lGb9SNe 81FUCKbZeZKslLzSSwsgGRW05VuGJc6m+8IfqCsB8Qkve5g2 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_175553_229903_B8BE35D0 X-CRM114-Status: GOOD ( 11.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Nothing ever calls mt8365_dai_load_dmic_iirc_coeff_table() so the compiler warns about an unused static function. While it seems likely that something should be calling the function I don't know what and this is breaking -Werror builds like allmodconfig so let's just remove it. It can be added again along with the user. Reported-by: Nathan Chancellor Signed-off-by: Mark Brown Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt8365/mt8365-dai-dmic.c | 30 ----------------------------- 1 file changed, 30 deletions(-) diff --git a/sound/soc/mediatek/mt8365/mt8365-dai-dmic.c b/sound/soc/mediatek/mt8365/mt8365-dai-dmic.c index a3bf54751420..f9945c2a2cd1 100644 --- a/sound/soc/mediatek/mt8365/mt8365-dai-dmic.c +++ b/sound/soc/mediatek/mt8365/mt8365-dai-dmic.c @@ -108,36 +108,6 @@ static void mt8365_dai_disable_dmic(struct mtk_base_afe *afe, regmap_update_bits(afe->regmap, reg, mask, 0); } -static const struct reg_sequence mt8365_dmic_iir_coeff[] = { - { AFE_DMIC0_IIR_COEF_02_01, 0x00000000 }, - { AFE_DMIC0_IIR_COEF_04_03, 0x00003FB8 }, - { AFE_DMIC0_IIR_COEF_06_05, 0x3FB80000 }, - { AFE_DMIC0_IIR_COEF_08_07, 0x3FB80000 }, - { AFE_DMIC0_IIR_COEF_10_09, 0x0000C048 }, - { AFE_DMIC1_IIR_COEF_02_01, 0x00000000 }, - { AFE_DMIC1_IIR_COEF_04_03, 0x00003FB8 }, - { AFE_DMIC1_IIR_COEF_06_05, 0x3FB80000 }, - { AFE_DMIC1_IIR_COEF_08_07, 0x3FB80000 }, - { AFE_DMIC1_IIR_COEF_10_09, 0x0000C048 }, - { AFE_DMIC2_IIR_COEF_02_01, 0x00000000 }, - { AFE_DMIC2_IIR_COEF_04_03, 0x00003FB8 }, - { AFE_DMIC2_IIR_COEF_06_05, 0x3FB80000 }, - { AFE_DMIC2_IIR_COEF_08_07, 0x3FB80000 }, - { AFE_DMIC2_IIR_COEF_10_09, 0x0000C048 }, - { AFE_DMIC3_IIR_COEF_02_01, 0x00000000 }, - { AFE_DMIC3_IIR_COEF_04_03, 0x00003FB8 }, - { AFE_DMIC3_IIR_COEF_06_05, 0x3FB80000 }, - { AFE_DMIC3_IIR_COEF_08_07, 0x3FB80000 }, - { AFE_DMIC3_IIR_COEF_10_09, 0x0000C048 }, -}; - -static int mt8365_dai_load_dmic_iir_coeff_table(struct mtk_base_afe *afe) -{ - return regmap_multi_reg_write(afe->regmap, - mt8365_dmic_iir_coeff, - ARRAY_SIZE(mt8365_dmic_iir_coeff)); -} - static int mt8365_dai_configure_dmic(struct mtk_base_afe *afe, struct snd_pcm_substream *substream, struct snd_soc_dai *dai) From patchwork Sat Sep 7 00:53:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13794905 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 89D79E6FE49 for ; Sat, 7 Sep 2024 01:03:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=T+G41Hom1ZnE+Cu8G4r9ppPTQdFLzvEFHAGH7QPZKiU=; b=SDoU/y6Hm4QVFpXWqSbWMRR4Wq cKBUEsOGw5hB2QODSs2iH2rzLrY/qp8cCPr2SByPX2baLN9+gZWPTMcbMJG1bWar957yFF1UMsVe9 oR6loElPqUOL/Xjx9f/QcfRzO1RvIPBaN7Rn2jEFaTaHylj9lDFG1g4/oMPbxemOzN+OttJr4X+sq wL/n7j8C3ZiQ90iCFenA42cA07QfqrWVf7z7vOLjBumzRRRWlotwAbyjm9HEXQ3qeszboEXrzCoyM B52OErNykt8DqnMEF8m5elFZ33THtld2wffASQM5LN3AEudtnUwSihXnXMgf2QUd3Gwp+K+DrmyVV rVWcpzZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smjrZ-0000000DzaS-34Sv; Sat, 07 Sep 2024 01:03:41 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smjk4-0000000DyMl-0XQR; Sat, 07 Sep 2024 00:55:57 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 0ACE15C5AD7; Sat, 7 Sep 2024 00:55:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B490DC4CEC8; Sat, 7 Sep 2024 00:55:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725670555; bh=nA9ahGD8KCtvlvbDt4nJtzFF7vCKqQHJVd+rW53TmJw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ayJETFy3oR0dj/YVoAdbPdMdTaPXt6OFwEabnelgP6jdlmYvD+r+YwAYAdwA3hSZt /MpGtMM01zhUI+Gj3+EzGiK9jY7sn8ZkYoLak0Ulbg/sGIwpOu2fMMNYU6A+3lnDFl nkUOiLty2yVVtpzuPzMsghsZ2qv0na0DXO4lPxk8+dEriNjEifPuY2NMkbAEBlpg3W 0bZWK0CsUAVlb9ONCFoU/AaKQhGL1jmXaKkFnzu3dnazKI0tBJy3ouW7idfxi0BKtm APvXwXL9TJ+jS/2uhjEIIt5d/MGowtuGlzfK1LDP6xSuPOrn4CF2tRHFBuQKI9KqFe IpHPqjOje0hHA== From: Mark Brown Date: Sat, 07 Sep 2024 01:53:32 +0100 Subject: [PATCH 7/7] ASoC: mt8365: Allow build coverage MIME-Version: 1.0 Message-Id: <20240907-asoc-fix-mt8365-build-v1-7-7ad0bac20161@kernel.org> References: <20240907-asoc-fix-mt8365-build-v1-0-7ad0bac20161@kernel.org> In-Reply-To: <20240907-asoc-fix-mt8365-build-v1-0-7ad0bac20161@kernel.org> To: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , AngeloGioacchino Del Regno Cc: Nathan Chancellor , Alexandre Mergnat , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Mark Brown X-Mailer: b4 0.15-dev-99b12 X-Developer-Signature: v=1; a=openpgp-sha256; l=745; i=broonie@kernel.org; h=from:subject:message-id; bh=nA9ahGD8KCtvlvbDt4nJtzFF7vCKqQHJVd+rW53TmJw=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBm26SBashc9R8SRaPNLmRiHb9uf0L6Kfilp2Crr xwJesp/DgKJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZtukgQAKCRAk1otyXVSH 0HNBCACC6/FARXYPWFGoDdvKChOmPaXipGUS4ZUgMv2zgpiLMUk3Rmjoh92TZAho+u88uJQZU0l DdMQMkr7n/GhGSDZ8nvNOsXOe6HJgCXIUrYg289RDlfTTDCd01DIjX6L8gmvQ/apVEBsYWwlSRW VXLE0ROKZgbFD+IdJL29AI5vcrDum/WYhG9AopQI2H0aIF0+t26jgOB90mm0qbpKOC2ioWRtbeT WDK8Ew8uTY1qF5AVL6HuVt7HgYEQOUzRu9w0yr/O/HA8u9tiGbxRz7UR2y7VRXDp+sskceBZctV Rm0Y0JFiCbcO4Qf8vsW6q1xRG5dEGu01CjVUPZb8nLBFTKJT X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_175556_250062_A523395A X-CRM114-Status: GOOD ( 10.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There is no build time dependency on anything specific to ARCH_MEDIATEK so enable COMPILE_TEST builds. Signed-off-by: Mark Brown Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Alexandre Mergnat --- sound/soc/mediatek/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/mediatek/Kconfig b/sound/soc/mediatek/Kconfig index e6f7a5a49794..3033e2d3fe16 100644 --- a/sound/soc/mediatek/Kconfig +++ b/sound/soc/mediatek/Kconfig @@ -301,7 +301,7 @@ config SND_SOC_MT8195_MT6359 config SND_SOC_MT8365 tristate "ASoC support for MediaTek MT8365 chip" - depends on ARCH_MEDIATEK + depends on ARCH_MEDIATEK || COMPILE_TEST select SND_SOC_MEDIATEK help This adds ASoC platform driver support for MediaTek MT8365 chip