aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-03-11 21:27:21 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-13 07:07:58 -0400
commit030e79f658de11da43d32e7ad814b5d2d64c8bac (patch)
tree4f38f2b01aa2dc6da29d3b3fb3ffda556f5cb23a /include/sound
parentf6161aa153581da4a3867a2d1a7caf4be19b6ec9 (diff)
ASoC: add snd_soc_register_component()
Current ASoC has register function for platform/codec/dai/card, but doesn't have for cpu. It often produces confusion and fault on ASoC. As result of ASoC community discussion, we consider new struct snd_soc_component for CPU/CODEC, and will switch over to use it. This patch adds very basic struct snd_soc_component, and register function for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index a6a059ca3874..8c46d0a7e2c0 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -324,6 +324,8 @@ struct snd_soc_dai_link;
324struct snd_soc_platform_driver; 324struct snd_soc_platform_driver;
325struct snd_soc_codec; 325struct snd_soc_codec;
326struct snd_soc_codec_driver; 326struct snd_soc_codec_driver;
327struct snd_soc_component;
328struct snd_soc_component_driver;
327struct soc_enum; 329struct soc_enum;
328struct snd_soc_jack; 330struct snd_soc_jack;
329struct snd_soc_jack_zone; 331struct snd_soc_jack_zone;
@@ -377,6 +379,10 @@ int snd_soc_register_codec(struct device *dev,
377 const struct snd_soc_codec_driver *codec_drv, 379 const struct snd_soc_codec_driver *codec_drv,
378 struct snd_soc_dai_driver *dai_drv, int num_dai); 380 struct snd_soc_dai_driver *dai_drv, int num_dai);
379void snd_soc_unregister_codec(struct device *dev); 381void snd_soc_unregister_codec(struct device *dev);
382int snd_soc_register_component(struct device *dev,
383 const struct snd_soc_component_driver *cmpnt_drv,
384 struct snd_soc_dai_driver *dai_drv, int num_dai);
385void snd_soc_unregister_component(struct device *dev);
380int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, 386int snd_soc_codec_volatile_register(struct snd_soc_codec *codec,
381 unsigned int reg); 387 unsigned int reg);
382int snd_soc_codec_readable_register(struct snd_soc_codec *codec, 388int snd_soc_codec_readable_register(struct snd_soc_codec *codec,
@@ -841,6 +847,19 @@ struct snd_soc_platform {
841#endif 847#endif
842}; 848};
843 849
850struct snd_soc_component_driver {
851};
852
853struct snd_soc_component {
854 const char *name;
855 int id;
856 int num_dai;
857 struct device *dev;
858 struct list_head list;
859
860 const struct snd_soc_component_driver *driver;
861};
862
844struct snd_soc_dai_link { 863struct snd_soc_dai_link {
845 /* config - must be set by machine driver */ 864 /* config - must be set by machine driver */
846 const char *name; /* Codec name */ 865 const char *name; /* Codec name */