Merge branch 'topic/jack' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
authorMark Brown <broonie@kernel.org>
Tue, 11 Apr 2017 15:58:30 +0000 (16:58 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 11 Apr 2017 15:58:30 +0000 (16:58 +0100)
1  2 
include/sound/soc.h

diff --combined include/sound/soc.h
@@@ -434,6 -434,8 +434,8 @@@ int snd_soc_codec_set_sysclk(struct snd
                             int source, unsigned int freq, int dir);
  int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
                          unsigned int freq_in, unsigned int freq_out);
+ int snd_soc_codec_set_jack(struct snd_soc_codec *codec,
+                          struct snd_soc_jack *jack, void *data);
  
  int snd_soc_register_card(struct snd_soc_card *card);
  int snd_soc_unregister_card(struct snd_soc_card *card);
@@@ -497,8 -499,6 +499,8 @@@ void snd_soc_runtime_deactivate(struct 
  int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
        unsigned int dai_fmt);
  
 +int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour);
 +
  /* 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);
@@@ -509,6 -509,9 +511,6 @@@ int snd_soc_params_to_bclk(struct snd_p
  int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
        const struct snd_pcm_hardware *hw);
  
 -int snd_soc_platform_trigger(struct snd_pcm_substream *substream,
 -              int cmd, struct snd_soc_platform *platform);
 -
  int soc_dai_hw_params(struct snd_pcm_substream *substream,
                      struct snd_pcm_hw_params *params,
                      struct snd_soc_dai *dai);
@@@ -721,6 -724,7 +723,7 @@@ struct snd_soc_jack_gpio 
        /* private: */
        struct snd_soc_jack *jack;
        struct delayed_work work;
+       struct notifier_block pm_notifier;
        struct gpio_desc *desc;
  
        void *data;
@@@ -784,10 -788,6 +787,10 @@@ struct snd_soc_component_driver 
        int (*suspend)(struct snd_soc_component *);
        int (*resume)(struct snd_soc_component *);
  
 +      /* pcm creation and destruction */
 +      int (*pcm_new)(struct snd_soc_pcm_runtime *);
 +      void (*pcm_free)(struct snd_pcm *);
 +
        /* DT */
        int (*of_xlate_dai_name)(struct snd_soc_component *component,
                                 struct of_phandle_args *args,
@@@ -816,7 -816,6 +819,7 @@@ struct snd_soc_component 
        unsigned int suspended:1; /* is in suspend PM state */
  
        struct list_head list;
 +      struct list_head card_aux_list; /* for auxiliary bound components */
        struct list_head card_list;
  
        struct snd_soc_dai_driver *dai_drv;
        void (*remove)(struct snd_soc_component *);
        int (*suspend)(struct snd_soc_component *);
        int (*resume)(struct snd_soc_component *);
 +      int (*pcm_new)(struct snd_soc_pcm_runtime *);
 +      void (*pcm_free)(struct snd_pcm *);
  
        /* machine specific init */
        int (*init)(struct snd_soc_component *component);
@@@ -913,6 -910,8 +916,8 @@@ struct snd_soc_codec_driver 
                          int clk_id, int source, unsigned int freq, int dir);
        int (*set_pll)(struct snd_soc_codec *codec, int pll_id, int source,
                unsigned int freq_in, unsigned int freq_out);
+       int (*set_jack)(struct snd_soc_codec *codec,
+                       struct snd_soc_jack *jack,  void *data);
  
        /* codec IO */
        struct regmap *(*get_regmap)(struct device *);
@@@ -946,11 -945,20 +951,11 @@@ struct snd_soc_platform_driver 
        int (*pcm_new)(struct snd_soc_pcm_runtime *);
        void (*pcm_free)(struct snd_pcm *);
  
 -      /*
 -       * For platform caused delay reporting.
 -       * Optional.
 -       */
 -      snd_pcm_sframes_t (*delay)(struct snd_pcm_substream *,
 -              struct snd_soc_dai *);
 -
        /* platform stream pcm ops */
        const struct snd_pcm_ops *ops;
  
        /* platform stream compress ops */
        const struct snd_compr_ops *compr_ops;
 -
 -      int (*bespoke_trigger)(struct snd_pcm_substream *, int);
  };
  
  struct snd_soc_dai_link_component {
@@@ -1095,8 -1103,6 +1100,8 @@@ struct snd_soc_card 
        const char *name;
        const char *long_name;
        const char *driver_name;
 +      char dmi_longname[80];
 +
        struct device *dev;
        struct snd_card *snd_card;
        struct module *owner;
         */
        struct snd_soc_aux_dev *aux_dev;
        int num_aux_devs;
 +      struct list_head aux_comp_list;
  
        const struct snd_kcontrol_new *controls;
        int num_controls;
@@@ -1547,7 -1552,6 +1552,7 @@@ static inline void snd_soc_initialize_c
        INIT_LIST_HEAD(&card->widgets);
        INIT_LIST_HEAD(&card->paths);
        INIT_LIST_HEAD(&card->dapm_list);
 +      INIT_LIST_HEAD(&card->aux_comp_list);
        INIT_LIST_HEAD(&card->component_dev_list);
  }
  
@@@ -1645,21 -1649,37 +1650,21 @@@ static inline struct snd_soc_platform *
  int snd_soc_util_init(void);
  void snd_soc_util_exit(void);
  
 -#define snd_soc_of_parse_card_name(card, propname) \
 -      snd_soc_of_parse_card_name_from_node(card, NULL, propname)
 -int snd_soc_of_parse_card_name_from_node(struct snd_soc_card *card,
 -                                       struct device_node *np,
 -                                       const char *propname);
 -#define snd_soc_of_parse_audio_simple_widgets(card, propname)\
 -      snd_soc_of_parse_audio_simple_widgets_from_node(card, NULL, propname)
 -int snd_soc_of_parse_audio_simple_widgets_from_node(struct snd_soc_card *card,
 -                                                  struct device_node *np,
 -                                                  const char *propname);
 -
 +int snd_soc_of_parse_card_name(struct snd_soc_card *card,
 +                             const char *propname);
 +int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card,
 +                                        const char *propname);
  int snd_soc_of_parse_tdm_slot(struct device_node *np,
                              unsigned int *tx_mask,
                              unsigned int *rx_mask,
                              unsigned int *slots,
                              unsigned int *slot_width);
 -#define snd_soc_of_parse_audio_prefix(card, codec_conf, of_node, propname) \
 -      snd_soc_of_parse_audio_prefix_from_node(card, NULL, codec_conf, \
 -                                              of_node, propname)
 -void snd_soc_of_parse_audio_prefix_from_node(struct snd_soc_card *card,
 -                                 struct device_node *np,
 +void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card,
                                   struct snd_soc_codec_conf *codec_conf,
                                   struct device_node *of_node,
                                   const char *propname);
 -
 -#define snd_soc_of_parse_audio_routing(card, propname) \
 -      snd_soc_of_parse_audio_routing_from_node(card, NULL, propname)
 -int snd_soc_of_parse_audio_routing_from_node(struct snd_soc_card *card,
 -                                           struct device_node *np,
 -                                           const char *propname);
 -
 +int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
 +                                 const char *propname);
  unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
                                     const char *prefix,
                                     struct device_node **bitclkmaster,