From patchwork Mon Jun 17 09:21:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 806771 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 70352C27C7B for ; Mon, 17 Jun 2024 09:24:45 +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 59987847; Mon, 17 Jun 2024 11:24:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 59987847 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718616282; bh=xervD/akNAn+3bajOSvxHM3QVMxTAKhY2J5D0oWTDdw=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=qWq2URkCjcmH3GeZylnqOLNMF7omLInwZHEJakFiwyJ+rEf5hRLP7PxLyxfR9RLvU JjEe6coGv6NzVPMmNLImu7CXz14k4ploolNLPm956QIZmh5J8o+umjtLDszIaIa9XS s2qxovnQG8AlEAYZL1XP0re2ey9fVHEMhz0V5Zi4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 365DAF805A8; Mon, 17 Jun 2024 11:24:10 +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 4E814F805B4; Mon, 17 Jun 2024 11:24:09 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 73DFDF80266; Mon, 17 Jun 2024 11:22:05 +0200 (CEST) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 05357F8016E for ; Mon, 17 Jun 2024 11:21:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 05357F8016E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=vSQBdbon Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a6f1cf00b3aso638749966b.0 for ; Mon, 17 Jun 2024 02:21:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718616115; x=1719220915; darn=alsa-project.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=AL9vCWb26ggkgGLF0K/9fugVAtzgFV6EBJsc+Ci/VT0=; b=vSQBdbontboevN5m5s7ofd/aNJL9KKeMDd+E5B955u+492uQ0ziqKtEnzPpmhk0y/U V2M+y+abvSLl6LTJ5OClKtMFrLnbdkQ7UirfdU2w8K5wHLBIdIvtBMcBYT7D8DbhumZ3 BmcU6DScyDJ8Zd15zLnnS8iHFhIUCTBGarGknZ7pGeAGrKIHoZpsYLo371GfHhOaw8H7 iltB449jnX435NHCAzo3yr/a+lfM5uPUPdr5ENW26xZ9LRCqvGvueYjZucstygdxpuKV UKXLa+bE2qRhld7PoTVU4O1V0e/BIzbaYcOujInEjUliqlynN2Fadev1JJ1G6KZ2o7nZ Smlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718616115; x=1719220915; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AL9vCWb26ggkgGLF0K/9fugVAtzgFV6EBJsc+Ci/VT0=; b=owj2xqOm9w7rorU/3hn4I9bRJDxOzhYR+8MBEI6o9Lrw4oHPErar3oldbuP3mzjvn6 5pBS/8psv0tKolae/qg9wVIvb+Zp9IiS2DpPBJ3+ONb1bq4dMqULc+0g9/fOMKlJAvBN cHa35fXmLJfOY+N/B8PyCj2Hu+mmWB0zXWg2yo3L8GBCqBfEZ0lfwbqKc7RtQDDFm+HD Cw1h+CIwbh0dWCYHAnWUN5SEhG/Ooo8qJAV4jgQ0ca4LWH2/ULj00E4oumrmcoR55ZEd X1sUN8PxR9eeEFCZDn5dj+GD+DsdAfYNPZrk5buvmnkjja9yU5X6Z68t0VmMV3t3JWad 3Ibg== X-Forwarded-Encrypted: i=1; AJvYcCWv/1gRH6KhcxNX92xEOOUPWm7ZFlvEzEeVcktD54me50wytcElgz1qNC5GYmKCkTVy3nh2RmY2CHPR0/uwSwfUCKPONui+rAQLRUc= X-Gm-Message-State: AOJu0YzGuUWK2ZGzusIZFqz101DtcQmje8BHJruMhuJsUNkUdno5PWcg 52I2BClYLCFeyd79EchiN3xPuS5tPlgbq9CGlcfPMIjRIy31x92IBVgaVz27Y9Y= X-Google-Smtp-Source: AGHT+IFLPbl4cACD6B5wyibfTQu8bh5NfSr1rfSOwZYEb5WkGOlYQmmuS5S7vCodWDvRJd2pyBRJcg== X-Received: by 2002:a17:907:b9d5:b0:a68:b159:11ee with SMTP id a640c23a62f3a-a6f52403808mr813822266b.12.1718616115319; Mon, 17 Jun 2024 02:21:55 -0700 (PDT) Received: from krzk-bin.. ([78.10.207.147]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56ed359bsm497944966b.137.2024.06.17.02.21.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jun 2024 02:21:54 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Support Opensource , Herve Codina , Shenghao Ding , Kevin Lu , Baojun Xu , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/2] ASoC: soc-dai.h: Constify DAI ops auto_selectable_formats Date: Mon, 17 Jun 2024 11:21:51 +0200 Message-ID: <20240617092152.244981-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: I5RTIWPXEOHEEWZNOJPQWFALIXB3ICK4 X-Message-ID-Hash: I5RTIWPXEOHEEWZNOJPQWFALIXB3ICK4 X-MailFrom: krzysztof.kozlowski@linaro.org 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.9 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: The core ASoC code does not modify contents of the 'auto_selectable_formats' array passed in 'struct snd_soc_dai_ops', so make it const for code safety. Signed-off-by: Krzysztof Kozlowski --- include/sound/soc-dai.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 15ef268c9845..279223c4ef5e 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -361,7 +361,7 @@ struct snd_soc_dai_ops { * see * snd_soc_dai_get_fmt() */ - u64 *auto_selectable_formats; + const u64 *auto_selectable_formats; int num_auto_selectable_formats; /* probe ordering - for components with runtime dependencies */ From patchwork Mon Jun 17 09:21:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 804904 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 29B78C27C6E for ; Mon, 17 Jun 2024 09:26:08 +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 6DF14847; Mon, 17 Jun 2024 11:25:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6DF14847 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718616365; bh=eAgTCVGAV6EPOAUmy1VIh5I91Q873BoEU8+USCkssMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=AOhHdvDOPaFfQl3m8+5TyeTPvw6jH1zm9++y6BD872N/cUDuKeHXkK7olBQ9bKTUN HXFi6f+/QCSEJcrl1l6/3s59E0AU/ASU1RpLzEY0Qck9fk6Ic9Y62U4ucQ9z5KgSyB Op8QtzpTSNBXQ1EMcN5WBt7VO7qyQUra4bIOgZaE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7E145F805C5; Mon, 17 Jun 2024 11:25:33 +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 300D7F805B6; Mon, 17 Jun 2024 11:25:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 78D99F8023A; Mon, 17 Jun 2024 11:22:09 +0200 (CEST) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 03CCAF801EB for ; Mon, 17 Jun 2024 11:21:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 03CCAF801EB Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=S9+kE48L Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a63359aaacaso633859966b.1 for ; Mon, 17 Jun 2024 02:21:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718616117; x=1719220917; darn=alsa-project.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=aM9IPnP8/0YXyiArT21pvUePu652PEvGsnn6Iiq8wUk=; b=S9+kE48L5IHksvpsYZ5JuZnQ3C/RuIQCJlQxJdq+qWwKTEYXpmhLaA2F9GljBGL6hd MJVS2AYCT8JYilgZ+273S1aL9VurLz7GwP6pHh2RXzL6BfpW11NQ+RX8jpY234+eMQa4 0YKXzg8RtzFju9DRsUHpQrgpRjjXNuyekPmR781PEhTcQkj5pRkjSVxt5sUkl//uWMEu 9SXFT8Qp2f+QwGJpDmmbqpgSljK6Ys1+odOnfFnXgG5zxK4rVtRhAa/eTIeVPluEeJgI BUrdihmB6Hzpo+A9p90xtqqhPVvkUzm2FoyIrWk0bow20IZ+cl6vUvpksDwVzGlWU5m2 1hqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718616117; x=1719220917; 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=aM9IPnP8/0YXyiArT21pvUePu652PEvGsnn6Iiq8wUk=; b=rbxTi/GIbDIl+ePtzAn45i3Bl54H5feSM8MHy8RdsQ4I3XlqcQhKU7K8tp/YZ0Vrp0 AVh2goZ7vrrNMwNJxQQA/V9G3DoidudwQ5XBtKAaIVMjVB6FLdYpxCHPy9ivtVPBX603 IIGDSE5EWd+16Q0FkBx66l3ac0ttL9BzRrMHeyB104y874L4K9G+zXyU+Cr+dYQYifG7 lAe9et8LvGcQa85WzM8x+Zrou5XreY/OjIXGAale1GpUsW8OvXBV1XprdvV0oIDQcOPN 7Z2dMToIwPDTrX3X2MBN9V2H72ZKfHMAX5k85lHeSxGH3kUV/Gwr+9VmE3RVJd594Ski 1djg== X-Forwarded-Encrypted: i=1; AJvYcCX6qrI09bEcvha7hug3yJo7mE2tDt5USnQAI9Km9b4qzo18rig9cYhKcDRR7veykNWhpaqB/blsfg4Yse9MLRrg9qamxqDIf/QucIU= X-Gm-Message-State: AOJu0Ywr5gQSAfJU9eC6Wlud3P7p/CkYdXbRMva+6tR0JTSPFQ/nMPJ2 QoEqnNfFnVRxUExZ+TJU+Hg5bRYbYjnNPCkHsKpvkKlsbATeskculvUWV5iBDkU= X-Google-Smtp-Source: AGHT+IEanYWlM3d9JWU/5k+2u3LYtdAAule1YY6wqrXPIyG+saueZDyCnhT1fyYflEFvgm3euf5OSg== X-Received: by 2002:a17:906:c1cc:b0:a6f:513a:a65 with SMTP id a640c23a62f3a-a6f60d3cdf9mr594368066b.33.1718616116790; Mon, 17 Jun 2024 02:21:56 -0700 (PDT) Received: from krzk-bin.. ([78.10.207.147]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56ed359bsm497944966b.137.2024.06.17.02.21.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jun 2024 02:21:56 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Support Opensource , Herve Codina , Shenghao Ding , Kevin Lu , Baojun Xu , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/2] ASoC: Constify DAI ops auto_selectable_formats Date: Mon, 17 Jun 2024 11:21:52 +0200 Message-ID: <20240617092152.244981-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240617092152.244981-1-krzysztof.kozlowski@linaro.org> References: <20240617092152.244981-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: TPUMBRMTO5AAPHFPTXPVL5M4KZDRNRFE X-Message-ID-Hash: TPUMBRMTO5AAPHFPTXPVL5M4KZDRNRFE X-MailFrom: krzysztof.kozlowski@linaro.org 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.9 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: The static arrays passed as 'auto_selectable_formats' are not modified by the drivers nor by the core code, so make it const for code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/ak4613.c | 2 +- sound/soc/codecs/da7213.c | 2 +- sound/soc/codecs/hdmi-codec.c | 2 +- sound/soc/codecs/idt821034.c | 2 +- sound/soc/codecs/pcm3168a.c | 2 +- sound/soc/codecs/peb2466.c | 2 +- sound/soc/generic/test-component.c | 2 +- sound/soc/sh/fsi.c | 2 +- sound/soc/sh/rcar/core.c | 2 +- sound/soc/soc-utils.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c index 73fb35560e51..551738abd1a5 100644 --- a/sound/soc/codecs/ak4613.c +++ b/sound/soc/codecs/ak4613.c @@ -753,7 +753,7 @@ static int ak4613_dai_trigger(struct snd_pcm_substream *substream, int cmd, * SND_SOC_DAIFMT_CBC_CFC * SND_SOC_DAIFMT_CBP_CFP */ -static u64 ak4613_dai_formats = +static const u64 ak4613_dai_formats = SND_SOC_POSSIBLE_DAIFMT_I2S | SND_SOC_POSSIBLE_DAIFMT_LEFT_J; diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c index a2b328f3b39f..f3ef6fb55304 100644 --- a/sound/soc/codecs/da7213.c +++ b/sound/soc/codecs/da7213.c @@ -1720,7 +1720,7 @@ static int da7213_set_component_pll(struct snd_soc_component *component, * SND_SOC_DAIFMT_CBC_CFC * SND_SOC_DAIFMT_CBP_CFP */ -static u64 da7213_dai_formats = +static const u64 da7213_dai_formats = SND_SOC_POSSIBLE_DAIFMT_I2S | SND_SOC_POSSIBLE_DAIFMT_LEFT_J | SND_SOC_POSSIBLE_DAIFMT_RIGHT_J | diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index d3abb7ce2153..74caae52e127 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -715,7 +715,7 @@ static int hdmi_codec_mute(struct snd_soc_dai *dai, int mute, int direction) * For example, * ${LINUX}/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c */ -static u64 hdmi_codec_formats = +static const u64 hdmi_codec_formats = SND_SOC_POSSIBLE_DAIFMT_NB_NF | SND_SOC_POSSIBLE_DAIFMT_NB_IF | SND_SOC_POSSIBLE_DAIFMT_IB_NF | diff --git a/sound/soc/codecs/idt821034.c b/sound/soc/codecs/idt821034.c index 2cc7b9166e69..cb7a68c799f8 100644 --- a/sound/soc/codecs/idt821034.c +++ b/sound/soc/codecs/idt821034.c @@ -860,7 +860,7 @@ static int idt821034_dai_startup(struct snd_pcm_substream *substream, return 0; } -static u64 idt821034_dai_formats[] = { +static const u64 idt821034_dai_formats[] = { SND_SOC_POSSIBLE_DAIFMT_DSP_A | SND_SOC_POSSIBLE_DAIFMT_DSP_B, }; diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c index 3c0e0fdbfc5c..fac0617ab95b 100644 --- a/sound/soc/codecs/pcm3168a.c +++ b/sound/soc/codecs/pcm3168a.c @@ -562,7 +562,7 @@ static int pcm3168a_hw_params(struct snd_pcm_substream *substream, return 0; } -static u64 pcm3168a_dai_formats[] = { +static const u64 pcm3168a_dai_formats[] = { /* * Select below from Sound Card, not here * SND_SOC_DAIFMT_CBC_CFC diff --git a/sound/soc/codecs/peb2466.c b/sound/soc/codecs/peb2466.c index 5dec69be0acb..76ee7e3f4d9b 100644 --- a/sound/soc/codecs/peb2466.c +++ b/sound/soc/codecs/peb2466.c @@ -814,7 +814,7 @@ static int peb2466_dai_startup(struct snd_pcm_substream *substream, &peb2466_sample_bits_constr); } -static u64 peb2466_dai_formats[] = { +static const u64 peb2466_dai_formats[] = { SND_SOC_POSSIBLE_DAIFMT_DSP_A | SND_SOC_POSSIBLE_DAIFMT_DSP_B, }; diff --git a/sound/soc/generic/test-component.c b/sound/soc/generic/test-component.c index e4967540a2e1..e9e5e235a8a6 100644 --- a/sound/soc/generic/test-component.c +++ b/sound/soc/generic/test-component.c @@ -189,7 +189,7 @@ static int test_dai_bespoke_trigger(struct snd_pcm_substream *substream, return 0; } -static u64 test_dai_formats = +static const u64 test_dai_formats = /* * Select below from Sound Card, not auto * SND_SOC_POSSIBLE_DAIFMT_BP_FP diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 84601ba43b7d..087e379aa3bc 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1713,7 +1713,7 @@ static int fsi_dai_hw_params(struct snd_pcm_substream *substream, * SND_SOC_DAIFMT_CBC_CFC * SND_SOC_DAIFMT_CBP_CFP */ -static u64 fsi_dai_formats = +static const u64 fsi_dai_formats = SND_SOC_POSSIBLE_DAIFMT_I2S | SND_SOC_POSSIBLE_DAIFMT_LEFT_J | SND_SOC_POSSIBLE_DAIFMT_NB_NF | diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 6bc7027ed4db..63b3c8bf0fde 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -1061,7 +1061,7 @@ static int rsnd_soc_dai_prepare(struct snd_pcm_substream *substream, return rsnd_dai_call(prepare, io, priv); } -static u64 rsnd_soc_dai_formats[] = { +static const u64 rsnd_soc_dai_formats[] = { /* * 1st Priority * diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c index d05e712c9518..20135a8359bf 100644 --- a/sound/soc/soc-utils.c +++ b/sound/soc/soc-utils.c @@ -163,7 +163,7 @@ static const struct snd_soc_component_driver dummy_codec = { * SND_SOC_POSSIBLE_DAIFMT_CBC_CFP * SND_SOC_POSSIBLE_DAIFMT_CBC_CFC */ -static u64 dummy_dai_formats = +static const u64 dummy_dai_formats = SND_SOC_POSSIBLE_DAIFMT_I2S | SND_SOC_POSSIBLE_DAIFMT_RIGHT_J | SND_SOC_POSSIBLE_DAIFMT_LEFT_J |