aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-11-08 05:43:24 -0500
committerMark Brown <broonie@linaro.org>2013-11-08 05:43:24 -0500
commitd20b09f0c5aaaa49a8a0189837a87adbc40095f0 (patch)
treed16d7c1f74edafee2a9f05d81e4e903d86ad9053 /include
parent2fc175c4a347153a5e4f370a7dd574d56d46bb8a (diff)
parentcb470087669a3fab1958fec79dd7db280b33f178 (diff)
Merge remote-tracking branch 'asoc/topic/component' into asoc-next
Diffstat (limited to 'include')
-rw-r--r--include/sound/soc.h41
1 files changed, 27 insertions, 14 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index d22cb0a06feb..1dd7dc5f7d52 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -13,6 +13,7 @@
13#ifndef __LINUX_SND_SOC_H 13#ifndef __LINUX_SND_SOC_H
14#define __LINUX_SND_SOC_H 14#define __LINUX_SND_SOC_H
15 15
16#include <linux/of.h>
16#include <linux/platform_device.h> 17#include <linux/platform_device.h>
17#include <linux/types.h> 18#include <linux/types.h>
18#include <linux/notifier.h> 19#include <linux/notifier.h>
@@ -670,6 +671,26 @@ struct snd_soc_cache_ops {
670 int (*sync)(struct snd_soc_codec *codec); 671 int (*sync)(struct snd_soc_codec *codec);
671}; 672};
672 673
674/* component interface */
675struct snd_soc_component_driver {
676 const char *name;
677
678 /* DT */
679 int (*of_xlate_dai_name)(struct snd_soc_component *component,
680 struct of_phandle_args *args,
681 const char **dai_name);
682};
683
684struct snd_soc_component {
685 const char *name;
686 int id;
687 int num_dai;
688 struct device *dev;
689 struct list_head list;
690
691 const struct snd_soc_component_driver *driver;
692};
693
673/* SoC Audio Codec device */ 694/* SoC Audio Codec device */
674struct snd_soc_codec { 695struct snd_soc_codec {
675 const char *name; 696 const char *name;
@@ -715,6 +736,9 @@ struct snd_soc_codec {
715 struct mutex cache_rw_mutex; 736 struct mutex cache_rw_mutex;
716 int val_bytes; 737 int val_bytes;
717 738
739 /* component */
740 struct snd_soc_component component;
741
718 /* dapm */ 742 /* dapm */
719 struct snd_soc_dapm_context dapm; 743 struct snd_soc_dapm_context dapm;
720 unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ 744 unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
@@ -733,6 +757,7 @@ struct snd_soc_codec_driver {
733 int (*remove)(struct snd_soc_codec *); 757 int (*remove)(struct snd_soc_codec *);
734 int (*suspend)(struct snd_soc_codec *); 758 int (*suspend)(struct snd_soc_codec *);
735 int (*resume)(struct snd_soc_codec *); 759 int (*resume)(struct snd_soc_codec *);
760 struct snd_soc_component_driver component_driver;
736 761
737 /* Default control and setup, added after probe() is run */ 762 /* Default control and setup, added after probe() is run */
738 const struct snd_kcontrol_new *controls; 763 const struct snd_kcontrol_new *controls;
@@ -849,20 +874,6 @@ struct snd_soc_platform {
849#endif 874#endif
850}; 875};
851 876
852struct snd_soc_component_driver {
853 const char *name;
854};
855
856struct snd_soc_component {
857 const char *name;
858 int id;
859 int num_dai;
860 struct device *dev;
861 struct list_head list;
862
863 const struct snd_soc_component_driver *driver;
864};
865
866struct snd_soc_dai_link { 877struct snd_soc_dai_link {
867 /* config - must be set by machine driver */ 878 /* config - must be set by machine driver */
868 const char *name; /* Codec name */ 879 const char *name; /* Codec name */
@@ -1201,6 +1212,8 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
1201 const char *propname); 1212 const char *propname);
1202unsigned int snd_soc_of_parse_daifmt(struct device_node *np, 1213unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
1203 const char *prefix); 1214 const char *prefix);
1215int snd_soc_of_get_dai_name(struct device_node *of_node,
1216 const char **dai_name);
1204 1217
1205#include <sound/soc-dai.h> 1218#include <sound/soc-dai.h>
1206 1219