summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-06-15 22:58:42 +0300
committerMark Brown <broonie@kernel.org>2020-06-15 22:58:42 +0300
commit13919056bf44dc8f70c2301915433fa2b474c1ba (patch)
treeac39f9f703aa219244b0709983cb91716f50e7e7 /include/sound
parentb7a742cff3f618d848e62e5a1ade0ff816e93092 (diff)
parent45108214dbfdba4a07061d2a4db6dc12475049f2 (diff)
downloadlinux-13919056bf44dc8f70c2301915433fa2b474c1ba.tar.xz
Merge series "ASoC: soc-component: collect component functions" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark We have soc-component.c now, but still many component related functions are implemented many place. This patch-set collect these into soc-component.c. v1 -> v2 - remove soc-compress.c exchange (But I have plan to repost it) - fixup loop break issue on some functions - direct return on some functions Link: https://lore.kernel.org/r/87a71nzhy2.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (12): ASoC: soc-component: add soc_component_pin() and share code ASoC: soc-component: move snd_soc_component_xxx_regmap() to soc-component ASoC: soc-component: move snd_soc_component_initialize() to soc-component.c ASoC: soc-component: add soc_component_err() ASoC: soc-component: add snd_soc_pcm_component_prepare() ASoC: soc-component: add snd_soc_pcm_component_hw_params() ASoC: soc-component: add snd_soc_pcm_component_hw_free() ASoC: soc-component: add snd_soc_pcm_component_trigger() ASoC: soc-component: add snd_soc_component_init() ASoC: soc-component: merge soc-io.c into soc-component.c ASoC: soc-component: merge soc_pcm_trigger_start/stop() ASoC: soc-component: tidyup Copyright include/sound/soc-component.h | 29 +- sound/soc/Makefile | 2 +- sound/soc/soc-component.c | 666 ++++++++++++++++++++++++---------- sound/soc/soc-core.c | 102 +----- sound/soc/soc-io.c | 202 ----------- sound/soc/soc-pcm.c | 114 ++---- 6 files changed, 531 insertions(+), 584 deletions(-) delete mode 100644 sound/soc/soc-io.c -- 2.17.1
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-component.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 5663891148e3..4a4bb723ca9f 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -2,7 +2,8 @@
*
* soc-component.h
*
- * Copyright (c) 2019 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+ * Copyright (C) 2019 Renesas Electronics Corp.
+ * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
*/
#ifndef __SOC_COMPONENT_H
#define __SOC_COMPONENT_H
@@ -324,6 +325,13 @@ static inline int snd_soc_component_cache_sync(
return regcache_sync(component->regmap);
}
+int snd_soc_component_initialize(struct snd_soc_component *component,
+ const struct snd_soc_component_driver *driver,
+ struct device *dev, const char *name);
+void snd_soc_component_set_aux(struct snd_soc_component *component,
+ struct snd_soc_aux_dev *aux);
+int snd_soc_component_init(struct snd_soc_component *component);
+
/* component IO */
int snd_soc_component_read(struct snd_soc_component *component,
unsigned int reg, unsigned int *val);
@@ -359,6 +367,7 @@ int snd_soc_component_stream_event(struct snd_soc_component *component,
int snd_soc_component_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level);
+void snd_soc_component_setup_regmap(struct snd_soc_component *component);
#ifdef CONFIG_REGMAP
void snd_soc_component_init_regmap(struct snd_soc_component *component,
struct regmap *regmap);
@@ -421,16 +430,6 @@ int snd_soc_component_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream);
int snd_soc_component_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream);
-int snd_soc_component_prepare(struct snd_soc_component *component,
- struct snd_pcm_substream *substream);
-int snd_soc_component_hw_params(struct snd_soc_component *component,
- struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params);
-int snd_soc_component_hw_free(struct snd_soc_component *component,
- struct snd_pcm_substream *substream);
-int snd_soc_component_trigger(struct snd_soc_component *component,
- struct snd_pcm_substream *substream,
- int cmd);
void snd_soc_component_suspend(struct snd_soc_component *component);
void snd_soc_component_resume(struct snd_soc_component *component);
int snd_soc_component_is_suspended(struct snd_soc_component *component);
@@ -455,5 +454,13 @@ int snd_soc_pcm_component_mmap(struct snd_pcm_substream *substream,
struct vm_area_struct *vma);
int snd_soc_pcm_component_new(struct snd_soc_pcm_runtime *rtd);
void snd_soc_pcm_component_free(struct snd_soc_pcm_runtime *rtd);
+int snd_soc_pcm_component_prepare(struct snd_pcm_substream *substream);
+int snd_soc_pcm_component_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_soc_component **last);
+void snd_soc_pcm_component_hw_free(struct snd_pcm_substream *substream,
+ struct snd_soc_component *last);
+int snd_soc_pcm_component_trigger(struct snd_pcm_substream *substream,
+ int cmd);
#endif /* __SOC_COMPONENT_H */