Merge remote-tracking branches 'asoc/topic/jack', 'asoc/topic/max98357a', 'asoc/topic...
[linux-drm-fsl-dcu.git] / include / sound / soc.h
index b4fca9aed2a2b00296ce040428b830b93095d562..bc6cfabc0e357cc129b20007364dc30a174bfbc3 100644 (file)
@@ -429,6 +429,9 @@ bool snd_soc_runtime_ignore_pmdown_time(struct snd_soc_pcm_runtime *rtd);
 void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream);
 void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream);
 
+int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
+       unsigned int dai_fmt);
+
 /* Utility functions to get clock rates from various things */
 int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots);
 int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params);
@@ -447,8 +450,10 @@ int soc_dai_hw_params(struct snd_pcm_substream *substream,
                      struct snd_soc_dai *dai);
 
 /* Jack reporting */
-int snd_soc_jack_new(struct snd_soc_codec *codec, const char *id, int type,
-                    struct snd_soc_jack *jack);
+int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type,
+       struct snd_soc_jack *jack, struct snd_soc_jack_pin *pins,
+       unsigned int num_pins);
+
 void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask);
 int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count,
                          struct snd_soc_jack_pin *pins);
@@ -498,6 +503,7 @@ int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg,
                                unsigned int mask, unsigned int value);
 
 #ifdef CONFIG_SND_SOC_AC97_BUS
+struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec);
 struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec);
 void snd_soc_free_ac97_codec(struct snd_ac97 *ac97);
 
@@ -655,7 +661,7 @@ struct snd_soc_jack_gpio {
 struct snd_soc_jack {
        struct mutex mutex;
        struct snd_jack *jack;
-       struct snd_soc_codec *codec;
+       struct snd_soc_card *card;
        struct list_head pins;
        int status;
        struct blocking_notifier_head notifier;
@@ -950,6 +956,9 @@ 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;
 
@@ -1067,11 +1076,16 @@ struct snd_soc_card {
 
        /*
         * Card-specific routes and widgets.
+        * Note: of_dapm_xxx for Device Tree; Otherwise for driver build-in.
         */
        const struct snd_soc_dapm_widget *dapm_widgets;
        int num_dapm_widgets;
        const struct snd_soc_dapm_route *dapm_routes;
        int num_dapm_routes;
+       const struct snd_soc_dapm_widget *of_dapm_widgets;
+       int num_of_dapm_widgets;
+       const struct snd_soc_dapm_route *of_dapm_routes;
+       int num_of_dapm_routes;
        bool fully_routed;
 
        struct work_struct deferred_resume_work;