Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/dmic', 'asoc/topic...
authorMark Brown <broonie@kernel.org>
Mon, 6 Oct 2014 11:48:57 +0000 (12:48 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 6 Oct 2014 11:48:57 +0000 (12:48 +0100)
1  2  3  4  5  6 
include/sound/soc-dapm.h
include/sound/soc.h
sound/soc/codecs/Kconfig
sound/soc/codecs/rt5677.c
sound/soc/codecs/ssm2602.c
sound/soc/davinci/davinci-mcasp.c
sound/soc/fsl/Kconfig
sound/soc/soc-core.c
sound/soc/soc-dapm.c

Simple merge
@@@@@@@ -757,22 -731,6 -731,6 -731,6 -757,23 -731,6 +757,22 @@@@@@@ struct snd_soc_component 
        /* Don't use these, use snd_soc_component_get_dapm() */
        struct snd_soc_dapm_context dapm;
        struct snd_soc_dapm_context *dapm_ptr;
    -   bool steal_sibling_dai_widgets;
 +++ +
 +++ +  const struct snd_kcontrol_new *controls;
 +++ +  unsigned int num_controls;
 +++ +  const struct snd_soc_dapm_widget *dapm_widgets;
 +++ +  unsigned int num_dapm_widgets;
 +++ +  const struct snd_soc_dapm_route *dapm_routes;
 +++ +  unsigned int num_dapm_routes;
 +++ +  struct snd_soc_codec *codec;
 +++ +
 +++ +  int (*probe)(struct snd_soc_component *);
 +++ +  void (*remove)(struct snd_soc_component *);
 +++ +
 +++ +#ifdef CONFIG_DEBUG_FS
 +++ +  void (*init_debugfs)(struct snd_soc_component *component);
 +++ +  const char *debugfs_prefix;
 +++ +#endif
      };
      
      /* SoC Audio Codec device */
@@@@@@@ -57,9 -56,7 -56,8 -56,7 -56,9 -56,9 +57,10 @@@@@@@ config SND_SOC_ALL_CODEC
        select SND_SOC_DA7213 if I2C
        select SND_SOC_DA732X if I2C
        select SND_SOC_DA9055 if I2C
++ +++  select SND_SOC_DMIC
        select SND_SOC_BT_SCO
 +++    select SND_SOC_ES8328_SPI if SPI_MASTER
 +++    select SND_SOC_ES8328_I2C if I2C
        select SND_SOC_ISABELLE if I2C
        select SND_SOC_JZ4740_CODEC
        select SND_SOC_LM4857 if I2C
Simple merge
Simple merge
@@@@@@@ -874,14 -869,24 -857,14 -857,14 -857,14 -857,14 +886,24 @@@@@@@ static int davinci_mcasp_suspend(struc
      {
        struct davinci_mcasp *mcasp = snd_soc_dai_get_drvdata(dai);
        struct davinci_mcasp_context *context = &mcasp->context;
  ----  context->txfmtctl = mcasp_get_reg(mcasp, DAVINCI_MCASP_TXFMCTL_REG);
  ----  context->rxfmtctl = mcasp_get_reg(mcasp, DAVINCI_MCASP_RXFMCTL_REG);
  ----  context->txfmt = mcasp_get_reg(mcasp, DAVINCI_MCASP_TXFMT_REG);
  ----  context->rxfmt = mcasp_get_reg(mcasp, DAVINCI_MCASP_RXFMT_REG);
  ----  context->aclkxctl = mcasp_get_reg(mcasp, DAVINCI_MCASP_ACLKXCTL_REG);
  ----  context->aclkrctl = mcasp_get_reg(mcasp, DAVINCI_MCASP_ACLKRCTL_REG);
  ----  context->pdir = mcasp_get_reg(mcasp, DAVINCI_MCASP_PDIR_REG);
+ ++++  u32 reg;
+ ++++  int i;
+     
-       context->txfmtctl = mcasp_get_reg(mcasp, DAVINCI_MCASP_TXFMCTL_REG);
-       context->rxfmtctl = mcasp_get_reg(mcasp, DAVINCI_MCASP_RXFMCTL_REG);
-       context->txfmt = mcasp_get_reg(mcasp, DAVINCI_MCASP_TXFMT_REG);
-       context->rxfmt = mcasp_get_reg(mcasp, DAVINCI_MCASP_RXFMT_REG);
-       context->aclkxctl = mcasp_get_reg(mcasp, DAVINCI_MCASP_ACLKXCTL_REG);
-       context->aclkrctl = mcasp_get_reg(mcasp, DAVINCI_MCASP_ACLKRCTL_REG);
-       context->pdir = mcasp_get_reg(mcasp, DAVINCI_MCASP_PDIR_REG);
+ ++++  for (i = 0; i < ARRAY_SIZE(context_regs); i++)
+ ++++          context->config_regs[i] = mcasp_get_reg(mcasp, context_regs[i]);
+ ++++
+ ++++  if (mcasp->txnumevt) {
+ ++++          reg = mcasp->fifo_base + MCASP_WFIFOCTL_OFFSET;
+ ++++          context->afifo_regs[0] = mcasp_get_reg(mcasp, reg);
+ ++++  }
+ ++++  if (mcasp->rxnumevt) {
+ ++++          reg = mcasp->fifo_base + MCASP_RFIFOCTL_OFFSET;
+ ++++          context->afifo_regs[1] = mcasp_get_reg(mcasp, reg);
+ ++++  }
  ++++
+ ++++  for (i = 0; i < mcasp->num_serializer; i++)
+ ++++          context->xrsr_regs[i] = mcasp_get_reg(mcasp,
+ ++++                                          DAVINCI_MCASP_XRSRCTL_REG(i));
      
        return 0;
      }
@@@@@@@ -280,23 -269,6 -269,6 -269,6 -269,6 -281,20 +280,20 @@@@@@@ config SND_SOC_IMX_MC1378
        select SND_SOC_MC13783
        select SND_SOC_IMX_PCM_DMA
      
-       select SND_SOC_CS42XX8_I2C
-       select SND_SOC_SGTL5000
-       select SND_SOC_WM8962
 ++++ config SND_SOC_FSL_ASOC_CARD
 ++++   tristate "Generic ASoC Sound Card with ASRC support"
 ++++   depends on OF && I2C
 ++++   select SND_SOC_IMX_AUDMUX
 ++++   select SND_SOC_IMX_PCM_DMA
 ++++   select SND_SOC_FSL_ESAI
 ++++   select SND_SOC_FSL_SAI
 ++++   select SND_SOC_FSL_SSI
 ++++   help
 ++++    ALSA SoC Audio support with ASRC feature for Freescale SoCs that have
 ++++    ESAI/SAI/SSI and connect with external CODECs such as WM8962, CS42888
 ++++    and SGTL5000.
 ++++    Say Y if you want to add support for Freescale Generic ASoC Sound Card.
 ++++ 
      endif # SND_IMX_SOC
      
      endmenu
@@@@@@@ -1083,42 -1173,42 -1173,42 -1173,42 -1086,75 -1173,42 +1086,42 @@@@@@@ static void soc_set_name_prefix(struct 
        }
      }
      
 --- -static int soc_probe_codec(struct snd_soc_card *card,
 --- -                     struct snd_soc_codec *codec)
 +++ +static int soc_probe_component(struct snd_soc_card *card,
 +++ +  struct snd_soc_component *component)
      {
 --- -  int ret = 0;
 --- -  const struct snd_soc_codec_driver *driver = codec->driver;
 +++ +  struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
    -   struct snd_soc_component *dai_component, *component2;
        struct snd_soc_dai *dai;
 +++ +  int ret;
 +++ +
 +++ +  if (component->probed)
 +++ +          return 0;
      
 --- -  codec->component.card = card;
 --- -  codec->dapm.card = card;
 --- -  soc_set_name_prefix(card, &codec->component);
 +++ +  component->card = card;
 +++ +  dapm->card = card;
 +++ +  soc_set_name_prefix(card, component);
      
 --- -  if (!try_module_get(codec->dev->driver->owner))
 +++ +  if (!try_module_get(component->dev->driver->owner))
                return -ENODEV;
      
 --- -  soc_init_codec_debugfs(codec);
 +++ +  soc_init_component_debugfs(component);
      
 --- -  if (driver->dapm_widgets) {
 --- -          ret = snd_soc_dapm_new_controls(&codec->dapm,
 --- -                                          driver->dapm_widgets,
 --- -                                          driver->num_dapm_widgets);
 +++ +  if (component->dapm_widgets) {
 +++ +          ret = snd_soc_dapm_new_controls(dapm, component->dapm_widgets,
 +++ +                  component->num_dapm_widgets);
      
                if (ret != 0) {
 --- -                  dev_err(codec->dev,
 +++ +                  dev_err(component->dev,
                                "Failed to create new controls %d\n", ret);
                        goto err_probe;
                }
        }
      
 --- -  /* Create DAPM widgets for each DAI stream */
 --- -  list_for_each_entry(dai, &codec->component.dai_list, list) {
 --- -          ret = snd_soc_dapm_new_dai_widgets(&codec->dapm, dai);
    -   /*
    -    * This is rather ugly, but certain platforms expect that the DAPM
    -    * widgets for the DAIs for components with the same parent device are
    -    * created in the platforms DAPM context. Until that is fixed we need to
    -    * keep this.
    -    */
    -   if (component->steal_sibling_dai_widgets) {
    -           dai_component = NULL;
    -           list_for_each_entry(component2, &component_list, list) {
    -                   if (component == component2)
    -                           continue;
    - 
    -                   if (component2->dev == component->dev &&
    -                       !list_empty(&component2->dai_list)) {
    -                           dai_component = component2;
    -                           break;
    -                   }
    -           }
    -   } else {
    -           dai_component = component;
    -           list_for_each_entry(component2, &component_list, list) {
    -                   if (component2->dev == component->dev &&
    -                       component2->steal_sibling_dai_widgets) {
    -                           dai_component = NULL;
    -                           break;
    -                   }
    -           }
    -   }
 -----
    -   if (dai_component) {
    -           list_for_each_entry(dai, &dai_component->dai_list, list) {
    -                   snd_soc_dapm_new_dai_widgets(dapm, dai);
    -                   if (ret != 0) {
    -                           dev_err(component->dev,
    -                                   "Failed to create DAI widgets %d\n",
    -                                   ret);
    -                           goto err_probe;
    -                   }
 +++++  list_for_each_entry(dai, &component->dai_list, list) {
 +++++          ret = snd_soc_dapm_new_dai_widgets(dapm, dai);
    +           if (ret != 0) {
 --- -                  dev_err(codec->dev,
 +++++                  dev_err(component->dev,
    +                           "Failed to create DAI widgets %d\n", ret);
    +                   goto err_probe;
                }
        }
      
@@@@@@@ -4127,15 -4261,10 -4261,10 -4261,10 -4170,28 -4261,10 +4133,15 @@@@@@@ int snd_soc_add_platform(struct device 
      
        platform->dev = dev;
        platform->driver = platform_drv;
 --- -  if (platform_drv->write)
 --- -          platform->component.write = snd_soc_platform_drv_write;
 --- -  if (platform_drv->read)
 --- -          platform->component.read = snd_soc_platform_drv_read;
    -   if (platform_drv->controls) {
    -           platform->component.controls = platform_drv->controls;
    -           platform->component.num_controls = platform_drv->num_controls;
    -   }
    -   if (platform_drv->dapm_widgets) {
    -           platform->component.dapm_widgets = platform_drv->dapm_widgets;
    -           platform->component.num_dapm_widgets = platform_drv->num_dapm_widgets;
    -           platform->component.steal_sibling_dai_widgets = true;
    -   }
    -   if (platform_drv->dapm_routes) {
    -           platform->component.dapm_routes = platform_drv->dapm_routes;
    -           platform->component.num_dapm_routes = platform_drv->num_dapm_routes;
    -   }
 +++ +
 +++ +  if (platform_drv->probe)
 +++ +          platform->component.probe = snd_soc_platform_drv_probe;
 +++ +  if (platform_drv->remove)
 +++ +          platform->component.remove = snd_soc_platform_drv_remove;
 +++ +
 +++ +#ifdef CONFIG_DEBUG_FS
 +++ +  platform->component.debugfs_prefix = "platform";
 +++ +#endif
      
        mutex_lock(&client_mutex);
        snd_soc_component_add_unlocked(&platform->component);
@@@@@@@ -4347,7 -4445,7 -4445,7 -4445,7 -4403,9 -4445,7 +4353,8 @@@@@@@ int snd_soc_register_codec(struct devic
        if (codec_drv->read)
                codec->component.read = snd_soc_codec_drv_read;
        codec->component.ignore_pmdown_time = codec_drv->ignore_pmdown_time;
 -----  codec->dapm.codec = codec;
 +++ +  codec->dapm.idle_bias_off = codec_drv->idle_bias_off;
++++ +  codec->dapm.suspend_bias_off = codec_drv->suspend_bias_off;
        if (codec_drv->seq_notifier)
                codec->dapm.seq_notifier = codec_drv->seq_notifier;
        if (codec_drv->set_bias_level)
Simple merge