Unverified Commit 785d64c4 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown
Browse files

ASoC: Constify DAI passed to get_channel_map



get_channel_map() is supposed to obtain map of channels without
modifying the state of the given DAI, so make the pointer to 'struct
snd_soc_dai' as pointing to const.

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240617-n-asoc-const-auto-selectable-formats-v1-4-8004f346ee38@linaro.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f3ac3da7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute,
			     int direction);


int snd_soc_dai_get_channel_map(struct snd_soc_dai *dai,
int snd_soc_dai_get_channel_map(const struct snd_soc_dai *dai,
		unsigned int *tx_num, unsigned int *tx_slot,
		unsigned int *rx_num, unsigned int *rx_slot);

@@ -307,7 +307,7 @@ struct snd_soc_dai_ops {
	int (*set_channel_map)(struct snd_soc_dai *dai,
		unsigned int tx_num, const unsigned int *tx_slot,
		unsigned int rx_num, const unsigned int *rx_slot);
	int (*get_channel_map)(struct snd_soc_dai *dai,
	int (*get_channel_map)(const struct snd_soc_dai *dai,
			unsigned int *tx_num, unsigned int *tx_slot,
			unsigned int *rx_num, unsigned int *rx_slot);
	int (*set_tristate)(struct snd_soc_dai *dai, int tristate);
+1 −1
Original line number Diff line number Diff line
@@ -1833,7 +1833,7 @@ static int rx_macro_hw_params(struct snd_pcm_substream *substream,
	return 0;
}

static int rx_macro_get_channel_map(struct snd_soc_dai *dai,
static int rx_macro_get_channel_map(const struct snd_soc_dai *dai,
				    unsigned int *tx_num, unsigned int *tx_slot,
				    unsigned int *rx_num, unsigned int *rx_slot)
{
+1 −1
Original line number Diff line number Diff line
@@ -1167,7 +1167,7 @@ static int tx_macro_hw_params(struct snd_pcm_substream *substream,
	return 0;
}

static int tx_macro_get_channel_map(struct snd_soc_dai *dai,
static int tx_macro_get_channel_map(const struct snd_soc_dai *dai,
				    unsigned int *tx_num, unsigned int *tx_slot,
				    unsigned int *rx_num, unsigned int *rx_slot)
{
+1 −1
Original line number Diff line number Diff line
@@ -892,7 +892,7 @@ static int va_macro_hw_params(struct snd_pcm_substream *substream,
	return 0;
}

static int va_macro_get_channel_map(struct snd_soc_dai *dai,
static int va_macro_get_channel_map(const struct snd_soc_dai *dai,
				    unsigned int *tx_num, unsigned int *tx_slot,
				    unsigned int *rx_num, unsigned int *rx_slot)
{
+1 −1
Original line number Diff line number Diff line
@@ -992,7 +992,7 @@ static int wsa_macro_hw_params(struct snd_pcm_substream *substream,
	return 0;
}

static int wsa_macro_get_channel_map(struct snd_soc_dai *dai,
static int wsa_macro_get_channel_map(const struct snd_soc_dai *dai,
				     unsigned int *tx_num, unsigned int *tx_slot,
				     unsigned int *rx_num, unsigned int *rx_slot)
{
Loading