summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-11-10 22:41:46 +0100
committerMark Brown <broonie@kernel.org>2014-11-18 15:26:06 +0000
commit336b8423e285174ebecf02a743d69913b83bbc48 (patch)
tree68df16c040d0624e6e6c7979e0d9de8db51bafee /include
parent70f3af3ca15affaef3d026a5aa6e44c4627ea6c7 (diff)
ASoC: Move AC'97 support to its own file
Currently the AC'97 support is splattered all throughout soc-core.c. Some parts are #ifdef'd some parts are not. This patch moves the AC'97 support to its own file, this should make the code a bit more clearer and also makes it possible to easily not compile it into the kernel when not needed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/sound/soc.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 7ba7130037a..adef34fa520 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -366,8 +366,6 @@ struct snd_soc_jack_gpio;
typedef int (*hw_write_t)(void *,const char* ,int);
-extern struct snd_ac97_bus_ops *soc_ac97_ops;
-
enum snd_soc_pcm_subclass {
SND_SOC_PCM_CLASS_PCM = 0,
SND_SOC_PCM_CLASS_BE = 1,
@@ -500,6 +498,7 @@ int snd_soc_update_bits_locked(struct snd_soc_codec *codec,
int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg,
unsigned int mask, unsigned int value);
+#ifdef CONFIG_SND_SOC_AC97_BUS
int snd_soc_new_ac97_codec(struct snd_soc_codec *codec,
struct snd_ac97_bus_ops *ops, int num);
void snd_soc_free_ac97_codec(struct snd_soc_codec *codec);
@@ -508,6 +507,31 @@ int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops);
int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
struct platform_device *pdev);
+extern struct snd_ac97_bus_ops *soc_ac97_ops;
+
+int snd_soc_ac97_register_dai_links(struct snd_soc_card *card);
+void snd_soc_ac97_add_pdata(struct snd_soc_pcm_runtime *rtd);
+#else
+
+static inline int snd_soc_ac97_register_dai_links(struct snd_soc_card *card)
+{
+ return 0;
+}
+
+static inline void snd_soc_ac97_add_pdata(struct snd_soc_pcm_runtime *rtd) {}
+
+static inline int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
+ struct platform_device *pdev)
+{
+ return 0;
+}
+
+static inline int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops)
+{
+ return 0;
+}
+#endif
+
/*
*Controls
*/