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
index f90f605b3971bb6555701eed75d25c93793e2a88,be6ecae247b0c608df5aa2554079d6bc4efca482,be6ecae247b0c608df5aa2554079d6bc4efca482,be6ecae247b0c608df5aa2554079d6bc4efca482,ac99fc083eecad03b80121e713f7a6f7d7a26178,be6ecae247b0c608df5aa2554079d6bc4efca482..7ba7130037a079f1fb065e9c8fdcf55353aa3c9e
@@@@@@@ -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 */
index 184ee7e2a3dab20054a30494bfb7ea65c27acb43,8838838e25ed89a9525e80b86cd92575701a75d9,e514e98e48c4836cd29688e875a832cdb1f160f4,8838838e25ed89a9525e80b86cd92575701a75d9,8bca6343d8a33968f75ffcddff355bf107be70f1,8bca6343d8a33968f75ffcddff355bf107be70f1..7678122f8fe042751d4e4dd8cc92613c6365e422
@@@@@@@ -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
index 68347b55f6e17ecd2aa900c875d22c45e4ab0bbe,5dcacc4954381f580101e73d83f05e844517132d,c28508da34cf3ba4354ba6d54de685a03d112ca4,c28508da34cf3ba4354ba6d54de685a03d112ca4,c28508da34cf3ba4354ba6d54de685a03d112ca4,c28508da34cf3ba4354ba6d54de685a03d112ca4..0eed9b1b24e1a5410eb4ddcc90908e919f559f65
@@@@@@@ -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;
      }
index 6164e78b466a7fe90e921ad0bc6c971fd37bcda1,f54a8fc992913ee837ee8c2914599274982bbba2,f54a8fc992913ee837ee8c2914599274982bbba2,f54a8fc992913ee837ee8c2914599274982bbba2,f54a8fc992913ee837ee8c2914599274982bbba2,0f23d1ae5be72ff0cf5829aa222e932218dc578c..081e406b3713aae2509206e9a779325eb7ec263e
@@@@@@@ -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
index 57de6a7d7ffa31305fcff66980c1004d9f63dfe1,d4bfd4a9076fe02fd50495e0fee6f97471500bb5,d4bfd4a9076fe02fd50495e0fee6f97471500bb5,d4bfd4a9076fe02fd50495e0fee6f97471500bb5,c612900c80ff7e2495a70e6dea0cc55346a8b223,d4bfd4a9076fe02fd50495e0fee6f97471500bb5..3d8cff629a18fda8b49a7e8cfb7450c436067d5d
@@@@@@@ -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