summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-09-04 19:39:03 -0700
committerMark Brown <broonie@linaro.org>2013-09-17 13:07:13 +0100
commitd191bd8de8c61619563f2b19f1fdcc0944ff1a72 (patch)
treebc77d6f8573b03f9f2e938d22bc2d6f3ec0b4f86 /include/sound
parent272b98c6455f00884f0350f775c5342358ebb73f (diff)
downloadtalos-op-linux-d191bd8de8c61619563f2b19f1fdcc0944ff1a72.tar.gz
talos-op-linux-d191bd8de8c61619563f2b19f1fdcc0944ff1a72.zip
ASoC: snd_soc_codec includes snd_soc_component
Codec includes component by this patch, and component moved to upside of codec to avoid extra declaration. Codec dai will be registered via component by this patch. Current component register function is used for cpu, and it is using dai/dais functions properly to keep existing cpu dai name. And now, it will be used from codec also. But codec driver had been used dais function only even though it was single dai. This patch adds new flag which can selects dai/dais function on component register function to keep existing codec dai name. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h33
1 files changed, 19 insertions, 14 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index d22cb0a06feb..9a81e2e7d661 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -670,6 +670,21 @@ struct snd_soc_cache_ops {
int (*sync)(struct snd_soc_codec *codec);
};
+/* component interface */
+struct snd_soc_component_driver {
+ const char *name;
+};
+
+struct snd_soc_component {
+ const char *name;
+ int id;
+ int num_dai;
+ struct device *dev;
+ struct list_head list;
+
+ const struct snd_soc_component_driver *driver;
+};
+
/* SoC Audio Codec device */
struct snd_soc_codec {
const char *name;
@@ -715,6 +730,9 @@ struct snd_soc_codec {
struct mutex cache_rw_mutex;
int val_bytes;
+ /* component */
+ struct snd_soc_component component;
+
/* dapm */
struct snd_soc_dapm_context dapm;
unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
@@ -733,6 +751,7 @@ struct snd_soc_codec_driver {
int (*remove)(struct snd_soc_codec *);
int (*suspend)(struct snd_soc_codec *);
int (*resume)(struct snd_soc_codec *);
+ struct snd_soc_component_driver component_driver;
/* Default control and setup, added after probe() is run */
const struct snd_kcontrol_new *controls;
@@ -849,20 +868,6 @@ struct snd_soc_platform {
#endif
};
-struct snd_soc_component_driver {
- const char *name;
-};
-
-struct snd_soc_component {
- const char *name;
- int id;
- int num_dai;
- struct device *dev;
- struct list_head list;
-
- const struct snd_soc_component_driver *driver;
-};
-
struct snd_soc_dai_link {
/* config - must be set by machine driver */
const char *name; /* Codec name */
OpenPOWER on IntegriCloud