]> Git Repo - linux.git/commitdiff
Merge remote-tracking branches 'asoc/topic/cs47l24', 'asoc/topic/cx20442', 'asoc...
authorMark Brown <[email protected]>
Thu, 18 Jan 2018 11:55:50 +0000 (11:55 +0000)
committerMark Brown <[email protected]>
Thu, 18 Jan 2018 11:55:50 +0000 (11:55 +0000)
1  2  3  4  5  6 
include/sound/soc.h
sound/soc/soc-core.c

diff --combined include/sound/soc.h
index 8fd59dadaf011dea42f43f923d3b94f7c43c2258,1a7323238c495d7d51313f6ccd8780291ff3e9e5,1a7323238c495d7d51313f6ccd8780291ff3e9e5,1a7323238c495d7d51313f6ccd8780291ff3e9e5,1a7323238c495d7d51313f6ccd8780291ff3e9e5,be6b462e2c012552d61989a69ca5b9fe7340c52c..b655d987fbe767bb57787cf32af21dc2f68a96c3
@@@@@@@ -494,8 -494,6 -494,6 -494,6 -494,6 -494,6 +494,8 @@@@@@@ int soc_new_pcm(struct snd_soc_pcm_runt
      int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num);
      #endif
      
 +++++void snd_soc_disconnect_sync(struct device *dev);
 +++++
      struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card,
                const char *dai_link, int stream);
      struct snd_soc_pcm_runtime *snd_soc_get_pcm_runtime(struct snd_soc_card *card,
@@@@@@@ -804,9 -802,6 -802,6 -802,6 -802,6 -802,6 +804,9 @@@@@@@ struct snd_soc_component_driver 
        int (*suspend)(struct snd_soc_component *);
        int (*resume)(struct snd_soc_component *);
      
 +++++  unsigned int (*read)(struct snd_soc_component *, unsigned int);
 +++++  int (*write)(struct snd_soc_component *, unsigned int, unsigned int);
 +++++
        /* pcm creation and destruction */
        int (*pcm_new)(struct snd_soc_pcm_runtime *);
        void (*pcm_free)(struct snd_pcm *);
@@@@@@@ -863,12 -858,12 -858,12 -858,12 -858,12 -858,10 +863,10 @@@@@@@ struct snd_soc_component 
        struct list_head card_aux_list; /* for auxiliary bound components */
        struct list_head card_list;
      
-----   struct snd_soc_dai_driver *dai_drv;
-----   int num_dai;
----- 
        const struct snd_soc_component_driver *driver;
      
        struct list_head dai_list;
+++++   int num_dai;
      
        int (*read)(struct snd_soc_component *, unsigned int, unsigned int *);
        int (*write)(struct snd_soc_component *, unsigned int, unsigned int);
diff --combined sound/soc/soc-core.c
index e018a2badfde6f01f952b24b122d55fc386e3f8b,c0edac80df34e683291cff5fb86c560ee8e22ffd,c0edac80df34e683291cff5fb86c560ee8e22ffd,c0edac80df34e683291cff5fb86c560ee8e22ffd,c0edac80df34e683291cff5fb86c560ee8e22ffd,6a13fbcba23f398683d0e1b24cbec69601e20708..d3a4b58d6b7b906773dbe007fb5a52f3e538e725
@@@@@@@ -213,7 -213,7 -213,7 -213,7 -213,7 -213,7 +213,7 @@@@@@@ static umode_t soc_dev_attr_is_visible(
      
        if (attr == &dev_attr_pmdown_time.attr)
                return attr->mode; /* always visible */
 -----  return rtd->codec ? attr->mode : 0; /* enabled only with codec */
 +++++  return rtd->num_codecs ? attr->mode : 0; /* enabled only with codec */
      }
      
      static const struct attribute_group soc_dapm_dev_group = {
@@@@@@@ -598,7 -598,6 -598,6 -598,6 -598,6 -598,6 +598,7 @@@@@@@ struct snd_soc_component *snd_soc_rtdco
      
        return NULL;
      }
 +++++EXPORT_SYMBOL_GPL(snd_soc_rtdcom_lookup);
      
      struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card,
                const char *dai_link, int stream)
@@@@@@@ -1393,16 -1392,6 -1392,6 -1392,6 -1392,6 -1392,6 +1393,16 @@@@@@@ static int soc_init_dai_link(struct snd
        return 0;
      }
      
 +++++void snd_soc_disconnect_sync(struct device *dev)
 +++++{
 +++++  struct snd_soc_component *component = snd_soc_lookup_component(dev, NULL);
 +++++
 +++++  if (!component || !component->card)
 +++++          return;
 +++++
 +++++  snd_card_disconnect_sync(component->card->snd_card);
 +++++}
 +++++
      /**
       * snd_soc_add_dai_link - Add a DAI link dynamically
       * @card: The ASoC card to which the DAI link is added
@@@@@@@ -1956,9 -1945,7 -1945,7 -1945,7 -1945,7 -1945,7 +1956,9 @@@@@@@ int snd_soc_runtime_set_dai_fmt(struct 
        }
      
        /* Flip the polarity for the "CPU" end of a CODEC<->CODEC link */
 -----  if (cpu_dai->codec) {
 +++++  /* the component which has non_legacy_dai_naming is Codec */
 +++++  if (cpu_dai->codec ||
 +++++      cpu_dai->component->driver->non_legacy_dai_naming) {
                unsigned int inv_dai_fmt;
      
                inv_dai_fmt = dai_fmt & ~SND_SOC_DAIFMT_MASTER_MASK;
@@@@@@@ -3162,7 -3149,7 -3149,7 -3149,7 -3149,7 -3149,7 +3162,7 @@@@@@@ static struct snd_soc_dai *soc_add_dai(
        if (!dai->driver->ops)
                dai->driver->ops = &null_dai_ops;
      
-----   list_add(&dai->list, &component->dai_list);
+++++   list_add_tail(&dai->list, &component->dai_list);
        component->num_dai++;
      
        dev_dbg(dev, "ASoC: Registered DAI '%s'\n", dai->name);
@@@@@@@ -3189,8 -3176,8 -3176,8 -3176,8 -3176,8 -3176,6 +3189,6 @@@@@@@ static int snd_soc_register_dais(struc
      
        dev_dbg(dev, "ASoC: dai register %s #%zu\n", dev_name(dev), count);
      
-----   component->dai_drv = dai_drv;
----- 
        for (i = 0; i < count; i++) {
      
                dai = soc_add_dai(component, dai_drv + i,
@@@@@@@ -4367,6 -4354,6 -4354,6 -4354,6 -4354,6 -4352,7 +4365,7 @@@@@@@ int snd_soc_get_dai_name(struct of_phan
                                                             args,
                                                             dai_name);
                } else {
+++++                   struct snd_soc_dai *dai;
                        int id = -1;
      
                        switch (args->args_count) {
      
                        ret = 0;
      
-----                   *dai_name = pos->dai_drv[id].name;
+++++                   /* find target DAI */
+++++                   list_for_each_entry(dai, &pos->dai_list, list) {
+++++                           if (id == 0)
+++++                                   break;
+++++                           id--;
+++++                   }
+++++ 
+++++                   *dai_name = dai->driver->name;
                        if (!*dai_name)
                                *dai_name = pos->name;
                }
This page took 0.084472 seconds and 4 git commands to generate.