ASoC: simple_card_utils.h: convert not to use asoc_xxx()

ASoC is using 2 type of prefix (asoc_xxx() vs snd_soc_xxx()),
but these are unified into snd_soc_xxx().

simple_card / audio_graph drivers are historically using
asoc_xxx() prefix too. simple_card / audio_graph are not
ASoC framework, so let's use simple_card_xxx_() / audio_graph_xxx()
for global function prefix.

This patch has asoc_xxx() as define to keep compatible.
It will be removed if all drivers were switched to new style.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87edj4s26a.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2023-09-11 23:47:09 +00:00 committed by Mark Brown
parent 1d5a2b5dd0
commit b5a95c5bf6
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0
4 changed files with 157 additions and 114 deletions

View file

@ -9,27 +9,27 @@
#include <sound/simple_card_utils.h> #include <sound/simple_card_utils.h>
typedef int (*GRAPH2_CUSTOM)(struct asoc_simple_priv *priv, typedef int (*GRAPH2_CUSTOM)(struct simple_util_priv *priv,
struct device_node *lnk, struct device_node *lnk,
struct link_info *li); struct link_info *li);
struct graph2_custom_hooks { struct graph2_custom_hooks {
int (*hook_pre)(struct asoc_simple_priv *priv); int (*hook_pre)(struct simple_util_priv *priv);
int (*hook_post)(struct asoc_simple_priv *priv); int (*hook_post)(struct simple_util_priv *priv);
GRAPH2_CUSTOM custom_normal; GRAPH2_CUSTOM custom_normal;
GRAPH2_CUSTOM custom_dpcm; GRAPH2_CUSTOM custom_dpcm;
GRAPH2_CUSTOM custom_c2c; GRAPH2_CUSTOM custom_c2c;
}; };
int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev); int audio_graph_parse_of(struct simple_util_priv *priv, struct device *dev);
int audio_graph2_parse_of(struct asoc_simple_priv *priv, struct device *dev, int audio_graph2_parse_of(struct simple_util_priv *priv, struct device *dev,
struct graph2_custom_hooks *hooks); struct graph2_custom_hooks *hooks);
int audio_graph2_link_normal(struct asoc_simple_priv *priv, int audio_graph2_link_normal(struct simple_util_priv *priv,
struct device_node *lnk, struct link_info *li); struct device_node *lnk, struct link_info *li);
int audio_graph2_link_dpcm(struct asoc_simple_priv *priv, int audio_graph2_link_dpcm(struct simple_util_priv *priv,
struct device_node *lnk, struct link_info *li); struct device_node *lnk, struct link_info *li);
int audio_graph2_link_c2c(struct asoc_simple_priv *priv, int audio_graph2_link_c2c(struct simple_util_priv *priv,
struct device_node *lnk, struct link_info *li); struct device_node *lnk, struct link_info *li);
#endif /* __GRAPH_CARD_H */ #endif /* __GRAPH_CARD_H */

View file

@ -12,15 +12,18 @@
#include <sound/soc.h> #include <sound/soc.h>
#include <sound/simple_card_utils.h> #include <sound/simple_card_utils.h>
struct asoc_simple_card_info { /* REMOVE ME */
#define asoc_simple_card_info simple_util_info
struct simple_util_info {
const char *name; const char *name;
const char *card; const char *card;
const char *codec; const char *codec;
const char *platform; const char *platform;
unsigned int daifmt; unsigned int daifmt;
struct asoc_simple_dai cpu_dai; struct simple_util_dai cpu_dai;
struct asoc_simple_dai codec_dai; struct simple_util_dai codec_dai;
}; };
#endif /* __SIMPLE_CARD_H */ #endif /* __SIMPLE_CARD_H */

View file

@ -11,18 +11,29 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <sound/soc.h> #include <sound/soc.h>
#define asoc_simple_init_hp(card, sjack, prefix) \ /* REMOVE ME */
asoc_simple_init_jack(card, sjack, 1, prefix, NULL) #define asoc_simple_init_hp simple_util_init_hp
#define asoc_simple_init_mic(card, sjack, prefix) \ #define asoc_simple_init_mic simple_util_init_mic
asoc_simple_init_jack(card, sjack, 0, prefix, NULL)
struct asoc_simple_tdm_width_map { #define simple_util_init_hp(card, sjack, prefix) \
simple_util_init_jack(card, sjack, 1, prefix, NULL)
#define simple_util_init_mic(card, sjack, prefix) \
simple_util_init_jack(card, sjack, 0, prefix, NULL)
/* REMOVE ME */
#define asoc_simple_tdm_width_map simple_util_tdm_width_map
#define asoc_simple_dai simple_util_dai
#define asoc_simple_data simple_util_data
#define asoc_simple_jack simple_util_jack
#define asoc_simple_priv simple_util_priv
struct simple_util_tdm_width_map {
u8 sample_bits; u8 sample_bits;
u8 slot_count; u8 slot_count;
u16 slot_width; u16 slot_width;
}; };
struct asoc_simple_dai { struct simple_util_dai {
const char *name; const char *name;
unsigned int sysclk; unsigned int sysclk;
int clk_direction; int clk_direction;
@ -32,17 +43,17 @@ struct asoc_simple_dai {
unsigned int rx_slot_mask; unsigned int rx_slot_mask;
struct clk *clk; struct clk *clk;
bool clk_fixed; bool clk_fixed;
struct asoc_simple_tdm_width_map *tdm_width_map; struct simple_util_tdm_width_map *tdm_width_map;
int n_tdm_widths; int n_tdm_widths;
}; };
struct asoc_simple_data { struct simple_util_data {
u32 convert_rate; u32 convert_rate;
u32 convert_channels; u32 convert_channels;
const char *convert_sample_format; const char *convert_sample_format;
}; };
struct asoc_simple_jack { struct simple_util_jack {
struct snd_soc_jack jack; struct snd_soc_jack jack;
struct snd_soc_jack_pin pin; struct snd_soc_jack_pin pin;
struct snd_soc_jack_gpio gpio; struct snd_soc_jack_gpio gpio;
@ -54,21 +65,21 @@ struct prop_nums {
int platforms; int platforms;
}; };
struct asoc_simple_priv { struct simple_util_priv {
struct snd_soc_card snd_card; struct snd_soc_card snd_card;
struct simple_dai_props { struct simple_dai_props {
struct asoc_simple_dai *cpu_dai; struct simple_util_dai *cpu_dai;
struct asoc_simple_dai *codec_dai; struct simple_util_dai *codec_dai;
struct asoc_simple_data adata; struct simple_util_data adata;
struct snd_soc_codec_conf *codec_conf; struct snd_soc_codec_conf *codec_conf;
struct prop_nums num; struct prop_nums num;
unsigned int mclk_fs; unsigned int mclk_fs;
} *dai_props; } *dai_props;
struct asoc_simple_jack hp_jack; struct simple_util_jack hp_jack;
struct asoc_simple_jack mic_jack; struct simple_util_jack mic_jack;
struct snd_soc_jack *aux_jacks; struct snd_soc_jack *aux_jacks;
struct snd_soc_dai_link *dai_link; struct snd_soc_dai_link *dai_link;
struct asoc_simple_dai *dais; struct simple_util_dai *dais;
struct snd_soc_dai_link_component *dlcs; struct snd_soc_dai_link_component *dlcs;
struct snd_soc_codec_conf *codec_conf; struct snd_soc_codec_conf *codec_conf;
struct gpio_desc *pa_gpio; struct gpio_desc *pa_gpio;
@ -130,75 +141,104 @@ struct link_info {
struct prop_nums num[SNDRV_MAX_LINKS]; struct prop_nums num[SNDRV_MAX_LINKS];
}; };
int asoc_simple_parse_daifmt(struct device *dev, /* REMOVE ME */
#define asoc_simple_parse_daifmt simple_util_parse_daifmt
#define asoc_simple_parse_tdm_width_map simple_util_parse_tdm_width_map
#define asoc_simple_set_dailink_name simple_util_set_dailink_name
#define asoc_simple_parse_card_name simple_util_parse_card_name
#define asoc_simple_parse_clk simple_util_parse_clk
#define asoc_simple_startup simple_util_startup
#define asoc_simple_shutdown simple_util_shutdown
#define asoc_simple_hw_params simple_util_hw_params
#define asoc_simple_dai_init simple_util_dai_init
#define asoc_simple_be_hw_params_fixup simple_util_be_hw_params_fixup
#define asoc_simple_parse_tdm simple_util_parse_tdm
#define asoc_simple_canonicalize_platform simple_util_canonicalize_platform
#define asoc_simple_canonicalize_cpu simple_util_canonicalize_cpu
#define asoc_simple_clean_reference simple_util_clean_reference
#define asoc_simple_parse_convert simple_util_parse_convert
#define asoc_simple_is_convert_required simple_util_is_convert_required
#define asoc_simple_parse_routing simple_util_parse_routing
#define asoc_simple_parse_widgets simple_util_parse_widgets
#define asoc_simple_parse_pin_switches simple_util_parse_pin_switches
#define asoc_simple_init_jack simple_util_init_jack
#define asoc_simple_init_aux_jacks simple_util_init_aux_jacks
#define asoc_simple_init_priv simple_util_init_priv
#define asoc_simple_remove simple_util_remove
#define asoc_simple_debug_info simple_util_debug_info
#define asoc_graph_card_probe graph_util_card_probe
#define asoc_graph_is_ports0 graph_util_is_ports0
#define asoc_graph_parse_dai graph_util_parse_dai
int simple_util_parse_daifmt(struct device *dev,
struct device_node *node, struct device_node *node,
struct device_node *codec, struct device_node *codec,
char *prefix, char *prefix,
unsigned int *retfmt); unsigned int *retfmt);
int asoc_simple_parse_tdm_width_map(struct device *dev, struct device_node *np, int simple_util_parse_tdm_width_map(struct device *dev, struct device_node *np,
struct asoc_simple_dai *dai); struct simple_util_dai *dai);
__printf(3, 4) __printf(3, 4)
int asoc_simple_set_dailink_name(struct device *dev, int simple_util_set_dailink_name(struct device *dev,
struct snd_soc_dai_link *dai_link, struct snd_soc_dai_link *dai_link,
const char *fmt, ...); const char *fmt, ...);
int asoc_simple_parse_card_name(struct snd_soc_card *card, int simple_util_parse_card_name(struct snd_soc_card *card,
char *prefix); char *prefix);
int asoc_simple_parse_clk(struct device *dev, int simple_util_parse_clk(struct device *dev,
struct device_node *node, struct device_node *node,
struct asoc_simple_dai *simple_dai, struct simple_util_dai *simple_dai,
struct snd_soc_dai_link_component *dlc); struct snd_soc_dai_link_component *dlc);
int asoc_simple_startup(struct snd_pcm_substream *substream); int simple_util_startup(struct snd_pcm_substream *substream);
void asoc_simple_shutdown(struct snd_pcm_substream *substream); void simple_util_shutdown(struct snd_pcm_substream *substream);
int asoc_simple_hw_params(struct snd_pcm_substream *substream, int simple_util_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params); struct snd_pcm_hw_params *params);
int asoc_simple_dai_init(struct snd_soc_pcm_runtime *rtd); int simple_util_dai_init(struct snd_soc_pcm_runtime *rtd);
int asoc_simple_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, int simple_util_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params); struct snd_pcm_hw_params *params);
#define asoc_simple_parse_tdm(np, dai) \ #define simple_util_parse_tdm(np, dai) \
snd_soc_of_parse_tdm_slot(np, &(dai)->tx_slot_mask, \ snd_soc_of_parse_tdm_slot(np, &(dai)->tx_slot_mask, \
&(dai)->rx_slot_mask, \ &(dai)->rx_slot_mask, \
&(dai)->slots, \ &(dai)->slots, \
&(dai)->slot_width); &(dai)->slot_width);
void asoc_simple_canonicalize_platform(struct snd_soc_dai_link_component *platforms, void simple_util_canonicalize_platform(struct snd_soc_dai_link_component *platforms,
struct snd_soc_dai_link_component *cpus); struct snd_soc_dai_link_component *cpus);
void asoc_simple_canonicalize_cpu(struct snd_soc_dai_link_component *cpus, void simple_util_canonicalize_cpu(struct snd_soc_dai_link_component *cpus,
int is_single_links); int is_single_links);
void asoc_simple_clean_reference(struct snd_soc_card *card); void simple_util_clean_reference(struct snd_soc_card *card);
void asoc_simple_parse_convert(struct device_node *np, char *prefix, void simple_util_parse_convert(struct device_node *np, char *prefix,
struct asoc_simple_data *data); struct simple_util_data *data);
bool asoc_simple_is_convert_required(const struct asoc_simple_data *data); bool simple_util_is_convert_required(const struct simple_util_data *data);
int asoc_simple_parse_routing(struct snd_soc_card *card, int simple_util_parse_routing(struct snd_soc_card *card,
char *prefix); char *prefix);
int asoc_simple_parse_widgets(struct snd_soc_card *card, int simple_util_parse_widgets(struct snd_soc_card *card,
char *prefix); char *prefix);
int asoc_simple_parse_pin_switches(struct snd_soc_card *card, int simple_util_parse_pin_switches(struct snd_soc_card *card,
char *prefix); char *prefix);
int asoc_simple_init_jack(struct snd_soc_card *card, int simple_util_init_jack(struct snd_soc_card *card,
struct asoc_simple_jack *sjack, struct simple_util_jack *sjack,
int is_hp, char *prefix, char *pin); int is_hp, char *prefix, char *pin);
int asoc_simple_init_aux_jacks(struct asoc_simple_priv *priv, int simple_util_init_aux_jacks(struct simple_util_priv *priv,
char *prefix); char *prefix);
int asoc_simple_init_priv(struct asoc_simple_priv *priv, int simple_util_init_priv(struct simple_util_priv *priv,
struct link_info *li); struct link_info *li);
int asoc_simple_remove(struct platform_device *pdev); int simple_util_remove(struct platform_device *pdev);
int asoc_graph_card_probe(struct snd_soc_card *card); int graph_util_card_probe(struct snd_soc_card *card);
int asoc_graph_is_ports0(struct device_node *port); int graph_util_is_ports0(struct device_node *port);
int asoc_graph_parse_dai(struct device *dev, struct device_node *ep, int graph_util_parse_dai(struct device *dev, struct device_node *ep,
struct snd_soc_dai_link_component *dlc, int *is_single_link); struct snd_soc_dai_link_component *dlc, int *is_single_link);
#ifdef DEBUG #ifdef DEBUG
static inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv, static inline void simple_util_debug_dai(struct simple_util_priv *priv,
char *name, char *name,
struct asoc_simple_dai *dai) struct simple_util_dai *dai)
{ {
struct device *dev = simple_priv_to_dev(priv); struct device *dev = simple_priv_to_dev(priv);
@ -228,7 +268,7 @@ static inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv,
name, dai->clk_direction ? "OUT" : "IN"); name, dai->clk_direction ? "OUT" : "IN");
} }
static inline void asoc_simple_debug_info(struct asoc_simple_priv *priv) static inline void simple_util_debug_info(struct simple_util_priv *priv)
{ {
struct snd_soc_card *card = simple_priv_to_card(priv); struct snd_soc_card *card = simple_priv_to_card(priv);
struct device *dev = simple_priv_to_dev(priv); struct device *dev = simple_priv_to_dev(priv);
@ -241,7 +281,7 @@ static inline void asoc_simple_debug_info(struct asoc_simple_priv *priv)
for (i = 0; i < card->num_links; i++) { for (i = 0; i < card->num_links; i++) {
struct simple_dai_props *props = simple_priv_to_props(priv, i); struct simple_dai_props *props = simple_priv_to_props(priv, i);
struct snd_soc_dai_link *link = simple_priv_to_link(priv, i); struct snd_soc_dai_link *link = simple_priv_to_link(priv, i);
struct asoc_simple_dai *dai; struct simple_util_dai *dai;
struct snd_soc_codec_conf *cnf; struct snd_soc_codec_conf *cnf;
int j; int j;
@ -249,10 +289,10 @@ static inline void asoc_simple_debug_info(struct asoc_simple_priv *priv)
dev_dbg(dev, "cpu num = %d\n", link->num_cpus); dev_dbg(dev, "cpu num = %d\n", link->num_cpus);
for_each_prop_dai_cpu(props, j, dai) for_each_prop_dai_cpu(props, j, dai)
asoc_simple_debug_dai(priv, "cpu", dai); simple_util_debug_dai(priv, "cpu", dai);
dev_dbg(dev, "codec num = %d\n", link->num_codecs); dev_dbg(dev, "codec num = %d\n", link->num_codecs);
for_each_prop_dai_codec(props, j, dai) for_each_prop_dai_codec(props, j, dai)
asoc_simple_debug_dai(priv, "codec", dai); simple_util_debug_dai(priv, "codec", dai);
if (link->name) if (link->name)
dev_dbg(dev, "dai name = %s\n", link->name); dev_dbg(dev, "dai name = %s\n", link->name);
@ -270,7 +310,7 @@ static inline void asoc_simple_debug_info(struct asoc_simple_priv *priv)
} }
} }
#else #else
#define asoc_simple_debug_info(priv) #define simple_util_debug_info(priv)
#endif /* DEBUG */ #endif /* DEBUG */
#endif /* __SIMPLE_CARD_UTILS_H */ #endif /* __SIMPLE_CARD_UTILS_H */

View file

@ -41,7 +41,7 @@ static void asoc_simple_fixup_sample_fmt(struct asoc_simple_data *data,
} }
} }
void asoc_simple_parse_convert(struct device_node *np, void simple_util_parse_convert(struct device_node *np,
char *prefix, char *prefix,
struct asoc_simple_data *data) struct asoc_simple_data *data)
{ {
@ -62,7 +62,7 @@ void asoc_simple_parse_convert(struct device_node *np,
snprintf(prop, sizeof(prop), "%s%s", prefix, "convert-sample-format"); snprintf(prop, sizeof(prop), "%s%s", prefix, "convert-sample-format");
of_property_read_string(np, prop, &data->convert_sample_format); of_property_read_string(np, prop, &data->convert_sample_format);
} }
EXPORT_SYMBOL_GPL(asoc_simple_parse_convert); EXPORT_SYMBOL_GPL(simple_util_parse_convert);
/** /**
* asoc_simple_is_convert_required() - Query if HW param conversion was requested * asoc_simple_is_convert_required() - Query if HW param conversion was requested
@ -71,15 +71,15 @@ EXPORT_SYMBOL_GPL(asoc_simple_parse_convert);
* Returns true if any HW param conversion was requested for this DAI link with * Returns true if any HW param conversion was requested for this DAI link with
* any "convert-xxx" properties. * any "convert-xxx" properties.
*/ */
bool asoc_simple_is_convert_required(const struct asoc_simple_data *data) bool simple_util_is_convert_required(const struct asoc_simple_data *data)
{ {
return data->convert_rate || return data->convert_rate ||
data->convert_channels || data->convert_channels ||
data->convert_sample_format; data->convert_sample_format;
} }
EXPORT_SYMBOL_GPL(asoc_simple_is_convert_required); EXPORT_SYMBOL_GPL(simple_util_is_convert_required);
int asoc_simple_parse_daifmt(struct device *dev, int simple_util_parse_daifmt(struct device *dev,
struct device_node *node, struct device_node *node,
struct device_node *codec, struct device_node *codec,
char *prefix, char *prefix,
@ -113,9 +113,9 @@ int asoc_simple_parse_daifmt(struct device *dev,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(asoc_simple_parse_daifmt); EXPORT_SYMBOL_GPL(simple_util_parse_daifmt);
int asoc_simple_parse_tdm_width_map(struct device *dev, struct device_node *np, int simple_util_parse_tdm_width_map(struct device *dev, struct device_node *np,
struct asoc_simple_dai *dai) struct asoc_simple_dai *dai)
{ {
u32 *array_values, *p; u32 *array_values, *p;
@ -158,9 +158,9 @@ int asoc_simple_parse_tdm_width_map(struct device *dev, struct device_node *np,
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(asoc_simple_parse_tdm_width_map); EXPORT_SYMBOL_GPL(simple_util_parse_tdm_width_map);
int asoc_simple_set_dailink_name(struct device *dev, int simple_util_set_dailink_name(struct device *dev,
struct snd_soc_dai_link *dai_link, struct snd_soc_dai_link *dai_link,
const char *fmt, ...) const char *fmt, ...)
{ {
@ -181,9 +181,9 @@ int asoc_simple_set_dailink_name(struct device *dev,
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(asoc_simple_set_dailink_name); EXPORT_SYMBOL_GPL(simple_util_set_dailink_name);
int asoc_simple_parse_card_name(struct snd_soc_card *card, int simple_util_parse_card_name(struct snd_soc_card *card,
char *prefix) char *prefix)
{ {
int ret; int ret;
@ -207,7 +207,7 @@ int asoc_simple_parse_card_name(struct snd_soc_card *card,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(asoc_simple_parse_card_name); EXPORT_SYMBOL_GPL(simple_util_parse_card_name);
static int asoc_simple_clk_enable(struct asoc_simple_dai *dai) static int asoc_simple_clk_enable(struct asoc_simple_dai *dai)
{ {
@ -223,7 +223,7 @@ static void asoc_simple_clk_disable(struct asoc_simple_dai *dai)
clk_disable_unprepare(dai->clk); clk_disable_unprepare(dai->clk);
} }
int asoc_simple_parse_clk(struct device *dev, int simple_util_parse_clk(struct device *dev,
struct device_node *node, struct device_node *node,
struct asoc_simple_dai *simple_dai, struct asoc_simple_dai *simple_dai,
struct snd_soc_dai_link_component *dlc) struct snd_soc_dai_link_component *dlc)
@ -258,7 +258,7 @@ int asoc_simple_parse_clk(struct device *dev,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(asoc_simple_parse_clk); EXPORT_SYMBOL_GPL(simple_util_parse_clk);
static int asoc_simple_check_fixed_sysclk(struct device *dev, static int asoc_simple_check_fixed_sysclk(struct device *dev,
struct asoc_simple_dai *dai, struct asoc_simple_dai *dai,
@ -276,7 +276,7 @@ static int asoc_simple_check_fixed_sysclk(struct device *dev,
return 0; return 0;
} }
int asoc_simple_startup(struct snd_pcm_substream *substream) int simple_util_startup(struct snd_pcm_substream *substream)
{ {
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card); struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card);
@ -334,9 +334,9 @@ int asoc_simple_startup(struct snd_pcm_substream *substream)
} }
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(asoc_simple_startup); EXPORT_SYMBOL_GPL(simple_util_startup);
void asoc_simple_shutdown(struct snd_pcm_substream *substream) void simple_util_shutdown(struct snd_pcm_substream *substream)
{ {
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card); struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card);
@ -363,7 +363,7 @@ void asoc_simple_shutdown(struct snd_pcm_substream *substream)
asoc_simple_clk_disable(dai); asoc_simple_clk_disable(dai);
} }
} }
EXPORT_SYMBOL_GPL(asoc_simple_shutdown); EXPORT_SYMBOL_GPL(simple_util_shutdown);
static int asoc_simple_set_clk_rate(struct device *dev, static int asoc_simple_set_clk_rate(struct device *dev,
struct asoc_simple_dai *simple_dai, struct asoc_simple_dai *simple_dai,
@ -424,7 +424,7 @@ static int asoc_simple_set_tdm(struct snd_soc_dai *dai,
return 0; return 0;
} }
int asoc_simple_hw_params(struct snd_pcm_substream *substream, int simple_util_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params) struct snd_pcm_hw_params *params)
{ {
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
@ -494,9 +494,9 @@ int asoc_simple_hw_params(struct snd_pcm_substream *substream,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(asoc_simple_hw_params); EXPORT_SYMBOL_GPL(simple_util_hw_params);
int asoc_simple_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, int simple_util_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params) struct snd_pcm_hw_params *params)
{ {
struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card); struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card);
@ -518,7 +518,7 @@ int asoc_simple_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(asoc_simple_be_hw_params_fixup); EXPORT_SYMBOL_GPL(simple_util_be_hw_params_fixup);
static int asoc_simple_init_dai(struct snd_soc_dai *dai, static int asoc_simple_init_dai(struct snd_soc_dai *dai,
struct asoc_simple_dai *simple_dai) struct asoc_simple_dai *simple_dai)
@ -609,7 +609,7 @@ static int asoc_simple_init_for_codec2codec(struct snd_soc_pcm_runtime *rtd,
return 0; return 0;
} }
int asoc_simple_dai_init(struct snd_soc_pcm_runtime *rtd) int simple_util_dai_init(struct snd_soc_pcm_runtime *rtd)
{ {
struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card); struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card);
struct simple_dai_props *props = simple_priv_to_props(priv, rtd->num); struct simple_dai_props *props = simple_priv_to_props(priv, rtd->num);
@ -633,9 +633,9 @@ int asoc_simple_dai_init(struct snd_soc_pcm_runtime *rtd)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(asoc_simple_dai_init); EXPORT_SYMBOL_GPL(simple_util_dai_init);
void asoc_simple_canonicalize_platform(struct snd_soc_dai_link_component *platforms, void simple_util_canonicalize_platform(struct snd_soc_dai_link_component *platforms,
struct snd_soc_dai_link_component *cpus) struct snd_soc_dai_link_component *cpus)
{ {
/* /*
@ -651,9 +651,9 @@ void asoc_simple_canonicalize_platform(struct snd_soc_dai_link_component *platfo
if (!platforms->of_node) if (!platforms->of_node)
snd_soc_dlc_use_cpu_as_platform(platforms, cpus); snd_soc_dlc_use_cpu_as_platform(platforms, cpus);
} }
EXPORT_SYMBOL_GPL(asoc_simple_canonicalize_platform); EXPORT_SYMBOL_GPL(simple_util_canonicalize_platform);
void asoc_simple_canonicalize_cpu(struct snd_soc_dai_link_component *cpus, void simple_util_canonicalize_cpu(struct snd_soc_dai_link_component *cpus,
int is_single_links) int is_single_links)
{ {
/* /*
@ -668,9 +668,9 @@ void asoc_simple_canonicalize_cpu(struct snd_soc_dai_link_component *cpus,
if (is_single_links) if (is_single_links)
cpus->dai_name = NULL; cpus->dai_name = NULL;
} }
EXPORT_SYMBOL_GPL(asoc_simple_canonicalize_cpu); EXPORT_SYMBOL_GPL(simple_util_canonicalize_cpu);
void asoc_simple_clean_reference(struct snd_soc_card *card) void simple_util_clean_reference(struct snd_soc_card *card)
{ {
struct snd_soc_dai_link *dai_link; struct snd_soc_dai_link *dai_link;
struct snd_soc_dai_link_component *cpu; struct snd_soc_dai_link_component *cpu;
@ -684,9 +684,9 @@ void asoc_simple_clean_reference(struct snd_soc_card *card)
of_node_put(codec->of_node); of_node_put(codec->of_node);
} }
} }
EXPORT_SYMBOL_GPL(asoc_simple_clean_reference); EXPORT_SYMBOL_GPL(simple_util_clean_reference);
int asoc_simple_parse_routing(struct snd_soc_card *card, int simple_util_parse_routing(struct snd_soc_card *card,
char *prefix) char *prefix)
{ {
struct device_node *node = card->dev->of_node; struct device_node *node = card->dev->of_node;
@ -702,9 +702,9 @@ int asoc_simple_parse_routing(struct snd_soc_card *card,
return snd_soc_of_parse_audio_routing(card, prop); return snd_soc_of_parse_audio_routing(card, prop);
} }
EXPORT_SYMBOL_GPL(asoc_simple_parse_routing); EXPORT_SYMBOL_GPL(simple_util_parse_routing);
int asoc_simple_parse_widgets(struct snd_soc_card *card, int simple_util_parse_widgets(struct snd_soc_card *card,
char *prefix) char *prefix)
{ {
struct device_node *node = card->dev->of_node; struct device_node *node = card->dev->of_node;
@ -721,9 +721,9 @@ int asoc_simple_parse_widgets(struct snd_soc_card *card,
/* no widgets is not error */ /* no widgets is not error */
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(asoc_simple_parse_widgets); EXPORT_SYMBOL_GPL(simple_util_parse_widgets);
int asoc_simple_parse_pin_switches(struct snd_soc_card *card, int simple_util_parse_pin_switches(struct snd_soc_card *card,
char *prefix) char *prefix)
{ {
char prop[128]; char prop[128];
@ -735,9 +735,9 @@ int asoc_simple_parse_pin_switches(struct snd_soc_card *card,
return snd_soc_of_parse_pin_switches(card, prop); return snd_soc_of_parse_pin_switches(card, prop);
} }
EXPORT_SYMBOL_GPL(asoc_simple_parse_pin_switches); EXPORT_SYMBOL_GPL(simple_util_parse_pin_switches);
int asoc_simple_init_jack(struct snd_soc_card *card, int simple_util_init_jack(struct snd_soc_card *card,
struct asoc_simple_jack *sjack, struct asoc_simple_jack *sjack,
int is_hp, char *prefix, int is_hp, char *prefix,
char *pin) char *pin)
@ -793,9 +793,9 @@ int asoc_simple_init_jack(struct snd_soc_card *card,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(asoc_simple_init_jack); EXPORT_SYMBOL_GPL(simple_util_init_jack);
int asoc_simple_init_aux_jacks(struct asoc_simple_priv *priv, char *prefix) int simple_util_init_aux_jacks(struct asoc_simple_priv *priv, char *prefix)
{ {
struct snd_soc_card *card = simple_priv_to_card(priv); struct snd_soc_card *card = simple_priv_to_card(priv);
struct snd_soc_component *component; struct snd_soc_component *component;
@ -842,9 +842,9 @@ int asoc_simple_init_aux_jacks(struct asoc_simple_priv *priv, char *prefix)
} }
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(asoc_simple_init_aux_jacks); EXPORT_SYMBOL_GPL(simple_util_init_aux_jacks);
int asoc_simple_init_priv(struct asoc_simple_priv *priv, int simple_util_init_priv(struct asoc_simple_priv *priv,
struct link_info *li) struct link_info *li)
{ {
struct snd_soc_card *card = simple_priv_to_card(priv); struct snd_soc_card *card = simple_priv_to_card(priv);
@ -956,9 +956,9 @@ int asoc_simple_init_priv(struct asoc_simple_priv *priv,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(asoc_simple_init_priv); EXPORT_SYMBOL_GPL(simple_util_init_priv);
int asoc_simple_remove(struct platform_device *pdev) int simple_util_remove(struct platform_device *pdev)
{ {
struct snd_soc_card *card = platform_get_drvdata(pdev); struct snd_soc_card *card = platform_get_drvdata(pdev);
@ -966,9 +966,9 @@ int asoc_simple_remove(struct platform_device *pdev)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(asoc_simple_remove); EXPORT_SYMBOL_GPL(simple_util_remove);
int asoc_graph_card_probe(struct snd_soc_card *card) int graph_util_card_probe(struct snd_soc_card *card)
{ {
struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card); struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card);
int ret; int ret;
@ -983,9 +983,9 @@ int asoc_graph_card_probe(struct snd_soc_card *card)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(asoc_graph_card_probe); EXPORT_SYMBOL_GPL(graph_util_card_probe);
int asoc_graph_is_ports0(struct device_node *np) int graph_util_is_ports0(struct device_node *np)
{ {
struct device_node *port, *ports, *ports0, *top; struct device_node *port, *ports, *ports0, *top;
int ret; int ret;
@ -1011,7 +1011,7 @@ int asoc_graph_is_ports0(struct device_node *np)
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(asoc_graph_is_ports0); EXPORT_SYMBOL_GPL(graph_util_is_ports0);
static int graph_get_dai_id(struct device_node *ep) static int graph_get_dai_id(struct device_node *ep)
{ {
@ -1066,7 +1066,7 @@ static int graph_get_dai_id(struct device_node *ep)
return id; return id;
} }
int asoc_graph_parse_dai(struct device *dev, struct device_node *ep, int graph_util_parse_dai(struct device *dev, struct device_node *ep,
struct snd_soc_dai_link_component *dlc, int *is_single_link) struct snd_soc_dai_link_component *dlc, int *is_single_link)
{ {
struct device_node *node; struct device_node *node;
@ -1129,7 +1129,7 @@ int asoc_graph_parse_dai(struct device *dev, struct device_node *ep,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(asoc_graph_parse_dai); EXPORT_SYMBOL_GPL(graph_util_parse_dai);
/* Module information */ /* Module information */
MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>"); MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");