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

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.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f3ac3da7
......@@ -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);
......
......@@ -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)
{
......
......@@ -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)
{
......
......@@ -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)
{
......
......@@ -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)
{
......
......@@ -2014,7 +2014,7 @@ static int wcd9335_set_channel_map(struct snd_soc_dai *dai,
return 0;
}
static int wcd9335_get_channel_map(struct snd_soc_dai *dai,
static int wcd9335_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)
{
......
......@@ -1960,7 +1960,7 @@ static int wcd934x_set_channel_map(struct snd_soc_dai *dai,
return 0;
}
static int wcd934x_get_channel_map(struct snd_soc_dai *dai,
static int wcd934x_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)
{
......
......@@ -11,7 +11,7 @@
#include <sound/soc-link.h>
#define soc_dai_ret(dai, ret) _soc_dai_ret(dai, __func__, ret)
static inline int _soc_dai_ret(struct snd_soc_dai *dai,
static inline int _soc_dai_ret(const struct snd_soc_dai *dai,
const char *func, int ret)
{
/* Positive, Zero values are not errors */
......@@ -327,7 +327,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_channel_map);
* @rx_slot: pointer to an array which imply the RX slot number channel
* 0~num-1 uses
*/
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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment