ASoC: Constify DAI ops auto_selectable_formats

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 <krzysztof.kozlowski@linaro.org>
Acked-by: Herve Codina <herve.codina@bootlin.com>
Link: https://msgid.link/r/20240617125735.582963-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Krzysztof Kozlowski 2024-06-17 14:57:35 +02:00 committed by Mark Brown
parent d4a7d067e0
commit 595265c926
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
11 changed files with 11 additions and 11 deletions

View File

@ -753,7 +753,7 @@ static int ak4613_dai_trigger(struct snd_pcm_substream *substream, int cmd,
* SND_SOC_DAIFMT_CBC_CFC * SND_SOC_DAIFMT_CBC_CFC
* SND_SOC_DAIFMT_CBP_CFP * 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_I2S |
SND_SOC_POSSIBLE_DAIFMT_LEFT_J; SND_SOC_POSSIBLE_DAIFMT_LEFT_J;

View File

@ -1720,7 +1720,7 @@ static int da7213_set_component_pll(struct snd_soc_component *component,
* SND_SOC_DAIFMT_CBC_CFC * SND_SOC_DAIFMT_CBC_CFC
* SND_SOC_DAIFMT_CBP_CFP * 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_I2S |
SND_SOC_POSSIBLE_DAIFMT_LEFT_J | SND_SOC_POSSIBLE_DAIFMT_LEFT_J |
SND_SOC_POSSIBLE_DAIFMT_RIGHT_J | SND_SOC_POSSIBLE_DAIFMT_RIGHT_J |

View File

@ -238,7 +238,7 @@ static int framer_dai_startup(struct snd_pcm_substream *substream,
return 0; return 0;
} }
static u64 framer_dai_formats[] = { static const u64 framer_dai_formats[] = {
SND_SOC_POSSIBLE_DAIFMT_DSP_B, SND_SOC_POSSIBLE_DAIFMT_DSP_B,
}; };

View File

@ -715,7 +715,7 @@ static int hdmi_codec_mute(struct snd_soc_dai *dai, int mute, int direction)
* For example, * For example,
* ${LINUX}/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c * ${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_NF |
SND_SOC_POSSIBLE_DAIFMT_NB_IF | SND_SOC_POSSIBLE_DAIFMT_NB_IF |
SND_SOC_POSSIBLE_DAIFMT_IB_NF | SND_SOC_POSSIBLE_DAIFMT_IB_NF |

View File

@ -860,7 +860,7 @@ static int idt821034_dai_startup(struct snd_pcm_substream *substream,
return 0; return 0;
} }
static u64 idt821034_dai_formats[] = { static const u64 idt821034_dai_formats[] = {
SND_SOC_POSSIBLE_DAIFMT_DSP_A | SND_SOC_POSSIBLE_DAIFMT_DSP_A |
SND_SOC_POSSIBLE_DAIFMT_DSP_B, SND_SOC_POSSIBLE_DAIFMT_DSP_B,
}; };

View File

@ -562,7 +562,7 @@ static int pcm3168a_hw_params(struct snd_pcm_substream *substream,
return 0; return 0;
} }
static u64 pcm3168a_dai_formats[] = { static const u64 pcm3168a_dai_formats[] = {
/* /*
* Select below from Sound Card, not here * Select below from Sound Card, not here
* SND_SOC_DAIFMT_CBC_CFC * SND_SOC_DAIFMT_CBC_CFC

View File

@ -814,7 +814,7 @@ static int peb2466_dai_startup(struct snd_pcm_substream *substream,
&peb2466_sample_bits_constr); &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_A |
SND_SOC_POSSIBLE_DAIFMT_DSP_B, SND_SOC_POSSIBLE_DAIFMT_DSP_B,
}; };

View File

@ -189,7 +189,7 @@ static int test_dai_bespoke_trigger(struct snd_pcm_substream *substream,
return 0; return 0;
} }
static u64 test_dai_formats = static const u64 test_dai_formats =
/* /*
* Select below from Sound Card, not auto * Select below from Sound Card, not auto
* SND_SOC_POSSIBLE_DAIFMT_BP_FP * SND_SOC_POSSIBLE_DAIFMT_BP_FP

View File

@ -1713,7 +1713,7 @@ static int fsi_dai_hw_params(struct snd_pcm_substream *substream,
* SND_SOC_DAIFMT_CBC_CFC * SND_SOC_DAIFMT_CBC_CFC
* SND_SOC_DAIFMT_CBP_CFP * 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_I2S |
SND_SOC_POSSIBLE_DAIFMT_LEFT_J | SND_SOC_POSSIBLE_DAIFMT_LEFT_J |
SND_SOC_POSSIBLE_DAIFMT_NB_NF | SND_SOC_POSSIBLE_DAIFMT_NB_NF |

View File

@ -1061,7 +1061,7 @@ static int rsnd_soc_dai_prepare(struct snd_pcm_substream *substream,
return rsnd_dai_call(prepare, io, priv); return rsnd_dai_call(prepare, io, priv);
} }
static u64 rsnd_soc_dai_formats[] = { static const u64 rsnd_soc_dai_formats[] = {
/* /*
* 1st Priority * 1st Priority
* *

View File

@ -163,7 +163,7 @@ static const struct snd_soc_component_driver dummy_codec = {
* SND_SOC_POSSIBLE_DAIFMT_CBC_CFP * SND_SOC_POSSIBLE_DAIFMT_CBC_CFP
* SND_SOC_POSSIBLE_DAIFMT_CBC_CFC * 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_I2S |
SND_SOC_POSSIBLE_DAIFMT_RIGHT_J | SND_SOC_POSSIBLE_DAIFMT_RIGHT_J |
SND_SOC_POSSIBLE_DAIFMT_LEFT_J | SND_SOC_POSSIBLE_DAIFMT_LEFT_J |