aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 11cfb5953e06..0992dff55959 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -231,6 +231,7 @@ enum snd_soc_bias_level {
231 SND_SOC_BIAS_ON = 3, 231 SND_SOC_BIAS_ON = 3,
232}; 232};
233 233
234struct device_node;
234struct snd_jack; 235struct snd_jack;
235struct snd_soc_card; 236struct snd_soc_card;
236struct snd_soc_pcm_stream; 237struct snd_soc_pcm_stream;
@@ -266,8 +267,6 @@ enum snd_soc_control_type {
266 267
267enum snd_soc_compress_type { 268enum snd_soc_compress_type {
268 SND_SOC_FLAT_COMPRESSION = 1, 269 SND_SOC_FLAT_COMPRESSION = 1,
269 SND_SOC_LZO_COMPRESSION,
270 SND_SOC_RBTREE_COMPRESSION
271}; 270};
272 271
273enum snd_soc_pcm_subclass { 272enum snd_soc_pcm_subclass {
@@ -318,6 +317,7 @@ int snd_soc_platform_read(struct snd_soc_platform *platform,
318 unsigned int reg); 317 unsigned int reg);
319int snd_soc_platform_write(struct snd_soc_platform *platform, 318int snd_soc_platform_write(struct snd_soc_platform *platform,
320 unsigned int reg, unsigned int val); 319 unsigned int reg, unsigned int val);
320int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num);
321 321
322/* Utility functions to get clock rates from various things */ 322/* Utility functions to get clock rates from various things */
323int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); 323int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots);
@@ -593,8 +593,7 @@ struct snd_soc_codec_driver {
593 /* driver ops */ 593 /* driver ops */
594 int (*probe)(struct snd_soc_codec *); 594 int (*probe)(struct snd_soc_codec *);
595 int (*remove)(struct snd_soc_codec *); 595 int (*remove)(struct snd_soc_codec *);
596 int (*suspend)(struct snd_soc_codec *, 596 int (*suspend)(struct snd_soc_codec *);
597 pm_message_t state);
598 int (*resume)(struct snd_soc_codec *); 597 int (*resume)(struct snd_soc_codec *);
599 598
600 /* Default control and setup, added after probe() is run */ 599 /* Default control and setup, added after probe() is run */
@@ -706,8 +705,11 @@ struct snd_soc_dai_link {
706 const char *name; /* Codec name */ 705 const char *name; /* Codec name */
707 const char *stream_name; /* Stream name */ 706 const char *stream_name; /* Stream name */
708 const char *codec_name; /* for multi-codec */ 707 const char *codec_name; /* for multi-codec */
708 const struct device_node *codec_of_node;
709 const char *platform_name; /* for multi-platform */ 709 const char *platform_name; /* for multi-platform */
710 const struct device_node *platform_of_node;
710 const char *cpu_dai_name; 711 const char *cpu_dai_name;
712 const struct device_node *cpu_dai_of_node;
711 const char *codec_dai_name; 713 const char *codec_dai_name;
712 714
713 unsigned int dai_fmt; /* format to set on init */ 715 unsigned int dai_fmt; /* format to set on init */
@@ -718,6 +720,9 @@ struct snd_soc_dai_link {
718 /* Symmetry requirements */ 720 /* Symmetry requirements */
719 unsigned int symmetric_rates:1; 721 unsigned int symmetric_rates:1;
720 722
723 /* pmdown_time is ignored at stop */
724 unsigned int ignore_pmdown_time:1;
725
721 /* codec/machine specific init - e.g. add machine controls */ 726 /* codec/machine specific init - e.g. add machine controls */
722 int (*init)(struct snd_soc_pcm_runtime *rtd); 727 int (*init)(struct snd_soc_pcm_runtime *rtd);
723 728
@@ -813,6 +818,7 @@ struct snd_soc_card {
813 int num_dapm_widgets; 818 int num_dapm_widgets;
814 const struct snd_soc_dapm_route *dapm_routes; 819 const struct snd_soc_dapm_route *dapm_routes;
815 int num_dapm_routes; 820 int num_dapm_routes;
821 bool fully_routed;
816 822
817 struct work_struct deferred_resume_work; 823 struct work_struct deferred_resume_work;
818 824
@@ -840,8 +846,8 @@ struct snd_soc_card {
840}; 846};
841 847
842/* SoC machine DAI configuration, glues a codec and cpu DAI together */ 848/* SoC machine DAI configuration, glues a codec and cpu DAI together */
843struct snd_soc_pcm_runtime { 849struct snd_soc_pcm_runtime {
844 struct device dev; 850 struct device *dev;
845 struct snd_soc_card *card; 851 struct snd_soc_card *card;
846 struct snd_soc_dai_link *dai_link; 852 struct snd_soc_dai_link *dai_link;
847 struct mutex pcm_mutex; 853 struct mutex pcm_mutex;
@@ -927,12 +933,12 @@ static inline void *snd_soc_platform_get_drvdata(struct snd_soc_platform *platfo
927static inline void snd_soc_pcm_set_drvdata(struct snd_soc_pcm_runtime *rtd, 933static inline void snd_soc_pcm_set_drvdata(struct snd_soc_pcm_runtime *rtd,
928 void *data) 934 void *data)
929{ 935{
930 dev_set_drvdata(&rtd->dev, data); 936 dev_set_drvdata(rtd->dev, data);
931} 937}
932 938
933static inline void *snd_soc_pcm_get_drvdata(struct snd_soc_pcm_runtime *rtd) 939static inline void *snd_soc_pcm_get_drvdata(struct snd_soc_pcm_runtime *rtd)
934{ 940{
935 return dev_get_drvdata(&rtd->dev); 941 return dev_get_drvdata(rtd->dev);
936} 942}
937 943
938static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card) 944static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card)
@@ -960,6 +966,11 @@ static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
960int snd_soc_util_init(void); 966int snd_soc_util_init(void);
961void snd_soc_util_exit(void); 967void snd_soc_util_exit(void);
962 968
969int snd_soc_of_parse_card_name(struct snd_soc_card *card,
970 const char *propname);
971int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
972 const char *propname);
973
963#include <sound/soc-dai.h> 974#include <sound/soc-dai.h>
964 975
965#ifdef CONFIG_DEBUG_FS 976#ifdef CONFIG_DEBUG_FS