Unverified Commit e952e89b authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: convert asoc_xxx() to snd_soc_xxx()

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

ASoC is using 2 type of prefix (asoc_xxx() vs snd_soc_xxx()), but there
is no particular reason about that [1].
To reduce confusing, standarding these to snd_soc_xxx() is sensible.

This patch adds asoc_xxx() macro to keep compatible for a while.
It will be removed if all drivers were switched to new style.

Link: https://lore.kernel.org/r/87h6td3hus.wl-kuninori.morimoto.gx@renesas.com [1]
parents 7b71da59 c067b1f8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -759,7 +759,7 @@ static int intel_prepare(struct snd_pcm_substream *substream,
	}

	if (dai_runtime->suspended) {
		struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
		struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
		struct snd_pcm_hw_params *hw_params;

		hw_params = &rtd->dpcm[substream->stream].hw_params;
+1 −1
Original line number Diff line number Diff line
@@ -327,7 +327,7 @@ static int intel_prepare(struct snd_pcm_substream *substream,
	}

	if (dai_runtime->suspended) {
		struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
		struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
		struct snd_pcm_hw_params *hw_params;

		hw_params = &rtd->dpcm[substream->stream].hw_params;
+1 −1
Original line number Diff line number Diff line
@@ -1819,7 +1819,7 @@ void sdw_shutdown_stream(void *sdw_substream)
	struct snd_soc_dai *dai;

	/* Find stream from first CPU DAI */
	dai = asoc_rtd_to_cpu(rtd, 0);
	dai = snd_soc_rtd_to_cpu(rtd, 0);

	sdw_stream = snd_soc_dai_get_stream(dai, substream->stream);

+8 −8
Original line number Diff line number Diff line
@@ -9,27 +9,27 @@

#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 link_info *li);

struct graph2_custom_hooks {
	int (*hook_pre)(struct asoc_simple_priv *priv);
	int (*hook_post)(struct asoc_simple_priv *priv);
	int (*hook_pre)(struct simple_util_priv *priv);
	int (*hook_post)(struct simple_util_priv *priv);
	GRAPH2_CUSTOM custom_normal;
	GRAPH2_CUSTOM custom_dpcm;
	GRAPH2_CUSTOM custom_c2c;
};

int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev);
int audio_graph2_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 simple_util_priv *priv, struct device *dev,
			  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);
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);
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);

#endif /* __GRAPH_CARD_H */
+6 −3
Original line number Diff line number Diff line
@@ -12,15 +12,18 @@
#include <sound/soc.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 *card;
	const char *codec;
	const char *platform;

	unsigned int daifmt;
	struct asoc_simple_dai cpu_dai;
	struct asoc_simple_dai codec_dai;
	struct simple_util_dai cpu_dai;
	struct simple_util_dai codec_dai;
};

#endif /* __SIMPLE_CARD_H */
Loading