Merge remote-tracking branches 'asoc/topic/topology', 'asoc/topic/twl6040', 'asoc...
[linux-drm-fsl-dcu.git] / include / sound / soc.h
index bfd84a7edfa578dafea2cd6948223f161ea52ebf..93df8bf9d54a9e1b9502836faec752b4c6aa20b0 100644 (file)
@@ -397,8 +397,20 @@ int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
 int snd_soc_register_card(struct snd_soc_card *card);
 int snd_soc_unregister_card(struct snd_soc_card *card);
 int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card);
+#ifdef CONFIG_PM_SLEEP
 int snd_soc_suspend(struct device *dev);
 int snd_soc_resume(struct device *dev);
+#else
+static inline int snd_soc_suspend(struct device *dev)
+{
+       return 0;
+}
+
+static inline int snd_soc_resume(struct device *dev)
+{
+       return 0;
+}
+#endif
 int snd_soc_poweroff(struct device *dev);
 int snd_soc_register_platform(struct device *dev,
                const struct snd_soc_platform_driver *platform_drv);
@@ -962,6 +974,24 @@ struct snd_soc_dai_link {
 
        enum snd_soc_dpcm_trigger trigger[2]; /* trigger type for DPCM */
 
+       /* codec/machine specific init - e.g. add machine controls */
+       int (*init)(struct snd_soc_pcm_runtime *rtd);
+
+       /* optional hw_params re-writing for BE and FE sync */
+       int (*be_hw_params_fixup)(struct snd_soc_pcm_runtime *rtd,
+                       struct snd_pcm_hw_params *params);
+
+       /* machine stream operations */
+       const struct snd_soc_ops *ops;
+       const struct snd_soc_compr_ops *compr_ops;
+
+       /* For unidirectional dai links */
+       bool playback_only;
+       bool capture_only;
+
+       /* Mark this pcm with non atomic ops */
+       bool nonatomic;
+
        /* Keep DAI active over suspend */
        unsigned int ignore_suspend:1;
 
@@ -970,9 +1000,6 @@ struct snd_soc_dai_link {
        unsigned int symmetric_channels:1;
        unsigned int symmetric_samplebits:1;
 
-       /* Mark this pcm with non atomic ops */
-       bool nonatomic;
-
        /* Do not create a PCM for this DAI link (Backend link) */
        unsigned int no_pcm:1;
 
@@ -983,23 +1010,11 @@ struct snd_soc_dai_link {
        unsigned int dpcm_capture:1;
        unsigned int dpcm_playback:1;
 
+       /* DPCM used FE & BE merged format */
+       unsigned int dpcm_merged_format:1;
+
        /* pmdown_time is ignored at stop */
        unsigned int ignore_pmdown_time:1;
-
-       /* codec/machine specific init - e.g. add machine controls */
-       int (*init)(struct snd_soc_pcm_runtime *rtd);
-
-       /* optional hw_params re-writing for BE and FE sync */
-       int (*be_hw_params_fixup)(struct snd_soc_pcm_runtime *rtd,
-                       struct snd_pcm_hw_params *params);
-
-       /* machine stream operations */
-       const struct snd_soc_ops *ops;
-       const struct snd_soc_compr_ops *compr_ops;
-
-       /* For unidirectional dai links */
-       bool playback_only;
-       bool capture_only;
 };
 
 struct snd_soc_codec_conf {