diff options
author | Mark Brown <broonie@linaro.org> | 2013-09-17 08:25:28 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-17 08:25:28 -0400 |
commit | 7d930ce26e01470590cd003484b32df29529906c (patch) | |
tree | 7fd2b7d0f85f104009ef9edeb32806f6bbc47070 /include/sound | |
parent | 7f05cc98bd9b10b9a0173f3f5d20c2223fdf7470 (diff) | |
parent | cb470087669a3fab1958fec79dd7db280b33f178 (diff) |
Merge remote-tracking branch 'asoc/topic/component' into asoc-core
Conflicts:
include/sound/soc.h
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc.h | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index a72af6327987..b13eecbaea78 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> |
@@ -630,6 +631,26 @@ struct snd_soc_compr_ops { | |||
630 | int (*trigger)(struct snd_compr_stream *); | 631 | int (*trigger)(struct snd_compr_stream *); |
631 | }; | 632 | }; |
632 | 633 | ||
634 | /* component interface */ | ||
635 | struct snd_soc_component_driver { | ||
636 | const char *name; | ||
637 | |||
638 | /* DT */ | ||
639 | int (*of_xlate_dai_name)(struct snd_soc_component *component, | ||
640 | struct of_phandle_args *args, | ||
641 | const char **dai_name); | ||
642 | }; | ||
643 | |||
644 | struct snd_soc_component { | ||
645 | const char *name; | ||
646 | int id; | ||
647 | int num_dai; | ||
648 | struct device *dev; | ||
649 | struct list_head list; | ||
650 | |||
651 | const struct snd_soc_component_driver *driver; | ||
652 | }; | ||
653 | |||
633 | /* SoC Audio Codec device */ | 654 | /* SoC Audio Codec device */ |
634 | struct snd_soc_codec { | 655 | struct snd_soc_codec { |
635 | const char *name; | 656 | const char *name; |
@@ -670,6 +691,9 @@ struct snd_soc_codec { | |||
670 | struct mutex cache_rw_mutex; | 691 | struct mutex cache_rw_mutex; |
671 | int val_bytes; | 692 | int val_bytes; |
672 | 693 | ||
694 | /* component */ | ||
695 | struct snd_soc_component component; | ||
696 | |||
673 | /* dapm */ | 697 | /* dapm */ |
674 | struct snd_soc_dapm_context dapm; | 698 | struct snd_soc_dapm_context dapm; |
675 | unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ | 699 | unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ |
@@ -688,6 +712,7 @@ struct snd_soc_codec_driver { | |||
688 | int (*remove)(struct snd_soc_codec *); | 712 | int (*remove)(struct snd_soc_codec *); |
689 | int (*suspend)(struct snd_soc_codec *); | 713 | int (*suspend)(struct snd_soc_codec *); |
690 | int (*resume)(struct snd_soc_codec *); | 714 | int (*resume)(struct snd_soc_codec *); |
715 | struct snd_soc_component_driver component_driver; | ||
691 | 716 | ||
692 | /* Default control and setup, added after probe() is run */ | 717 | /* Default control and setup, added after probe() is run */ |
693 | const struct snd_kcontrol_new *controls; | 718 | const struct snd_kcontrol_new *controls; |
@@ -801,20 +826,6 @@ struct snd_soc_platform { | |||
801 | #endif | 826 | #endif |
802 | }; | 827 | }; |
803 | 828 | ||
804 | struct snd_soc_component_driver { | ||
805 | const char *name; | ||
806 | }; | ||
807 | |||
808 | struct snd_soc_component { | ||
809 | const char *name; | ||
810 | int id; | ||
811 | int num_dai; | ||
812 | struct device *dev; | ||
813 | struct list_head list; | ||
814 | |||
815 | const struct snd_soc_component_driver *driver; | ||
816 | }; | ||
817 | |||
818 | struct snd_soc_dai_link { | 829 | struct snd_soc_dai_link { |
819 | /* config - must be set by machine driver */ | 830 | /* config - must be set by machine driver */ |
820 | const char *name; /* Codec name */ | 831 | const char *name; /* Codec name */ |
@@ -1145,6 +1156,8 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, | |||
1145 | const char *propname); | 1156 | const char *propname); |
1146 | unsigned int snd_soc_of_parse_daifmt(struct device_node *np, | 1157 | unsigned int snd_soc_of_parse_daifmt(struct device_node *np, |
1147 | const char *prefix); | 1158 | const char *prefix); |
1159 | int snd_soc_of_get_dai_name(struct device_node *of_node, | ||
1160 | const char **dai_name); | ||
1148 | 1161 | ||
1149 | #include <sound/soc-dai.h> | 1162 | #include <sound/soc-dai.h> |
1150 | 1163 | ||