]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge branch 'for-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
authorMark Brown <broonie@kernel.org>
Fri, 10 Jan 2020 11:51:21 +0000 (11:51 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 10 Jan 2020 11:51:21 +0000 (11:51 +0000)
1  2 
sound/soc/intel/boards/bytcht_es8316.c
sound/soc/intel/boards/cml_rt1011_rt5682.c
sound/soc/soc-component.c

index 12a1c52554844605b3712d517e392f73b9a088a4,54e97455d7f6603b36e9df79f21264a212e3ed51..ce760c361eb24ccfb9fbd6eb499b4dc7a3f0d3b5
@@@ -360,10 -360,7 +360,10 @@@ static struct snd_soc_dai_link byt_cht_
  
  /* SoC card */
  static char codec_name[SND_ACPI_I2C_ID_LEN];
 +#if !IS_ENABLED(CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES)
  static char long_name[50]; /* = "bytcht-es8316-*-spk-*-mic" */
 +#endif
 +static char components_string[32]; /* = "cfg-spk:* cfg-mic:* */
  
  static int byt_cht_es8316_suspend(struct snd_soc_card *card)
  {
@@@ -445,7 -442,8 +445,8 @@@ static const struct dmi_system_id byt_c
                        DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"),
                        DMI_MATCH(DMI_PRODUCT_NAME, "NB41"),
                },
-               .driver_data = (void *)(BYT_CHT_ES8316_INTMIC_IN2_MAP
+               .driver_data = (void *)(BYT_CHT_ES8316_SSP0
+                                       | BYT_CHT_ES8316_INTMIC_IN2_MAP
                                        | BYT_CHT_ES8316_JD_INVERTED),
        },
        {       /* Teclast X98 Plus II */
@@@ -575,19 -573,11 +576,19 @@@ static int snd_byt_cht_es8316_mc_probe(
                }
        }
  
 -      /* register the soc card */
 +      snprintf(components_string, sizeof(components_string),
 +               "cfg-spk:%s cfg-mic:%s",
 +               (quirk & BYT_CHT_ES8316_MONO_SPEAKER) ? "1" : "2",
 +               mic_name[BYT_CHT_ES8316_MAP(quirk)]);
 +      byt_cht_es8316_card.components = components_string;
 +#if !IS_ENABLED(CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES)
        snprintf(long_name, sizeof(long_name), "bytcht-es8316-%s-spk-%s-mic",
                 (quirk & BYT_CHT_ES8316_MONO_SPEAKER) ? "mono" : "stereo",
                 mic_name[BYT_CHT_ES8316_MAP(quirk)]);
        byt_cht_es8316_card.long_name = long_name;
 +#endif
 +
 +      /* register the soc card */
        snd_soc_card_set_drvdata(&byt_cht_es8316_card, priv);
  
        ret = devm_snd_soc_register_card(dev, &byt_cht_es8316_card);
index ab1196108d2380bd07f15e43b42826150987b198,5f1bf6d3800c6c9c7be395cdc87b3e20b24260bc..d6efc554898c7edbe3205f9d0a00e7f38ac6937a
@@@ -11,7 -11,6 +11,6 @@@
  #include <linux/clk.h>
  #include <linux/dmi.h>
  #include <linux/slab.h>
- #include <asm/cpu_device_id.h>
  #include <linux/acpi.h>
  #include <sound/core.h>
  #include <sound/jack.h>
@@@ -406,19 -405,19 +405,19 @@@ static struct snd_soc_dai_link cml_rt10
  
  static struct snd_soc_codec_conf rt1011_conf[] = {
        {
 -              .dev_name = "i2c-10EC1011:00",
 +              .dlc = COMP_CODEC_CONF("i2c-10EC1011:00"),
                .name_prefix = "WL",
        },
        {
 -              .dev_name = "i2c-10EC1011:01",
 +              .dlc = COMP_CODEC_CONF("i2c-10EC1011:01"),
                .name_prefix = "WR",
        },
        {
 -              .dev_name = "i2c-10EC1011:02",
 +              .dlc = COMP_CODEC_CONF("i2c-10EC1011:02"),
                .name_prefix = "TL",
        },
        {
 -              .dev_name = "i2c-10EC1011:03",
 +              .dlc = COMP_CODEC_CONF("i2c-10EC1011:03"),
                .name_prefix = "TR",
        },
  };
index 9054558ce38619faf28a5bc535d59608e912f7ea,6a8f26bf09ba44e246283739db93d0f19305f444..b94680fb26fa76b904d767e96f588cb299244529
@@@ -444,25 -444,6 +444,25 @@@ int snd_soc_pcm_component_ioctl(struct 
        return snd_pcm_lib_ioctl(substream, cmd, arg);
  }
  
 +int snd_soc_pcm_component_sync_stop(struct snd_pcm_substream *substream)
 +{
 +      struct snd_soc_pcm_runtime *rtd = substream->private_data;
 +      struct snd_soc_component *component;
 +      struct snd_soc_rtdcom_list *rtdcom;
 +      int ret;
 +
 +      for_each_rtd_components(rtd, rtdcom, component) {
 +              if (component->driver->ioctl) {
 +                      ret = component->driver->sync_stop(component,
 +                                                         substream);
 +                      if (ret < 0)
 +                              return ret;
 +              }
 +      }
 +
 +      return 0;
 +}
 +
  int snd_soc_pcm_component_copy_user(struct snd_pcm_substream *substream,
                                    int channel, unsigned long pos,
                                    void __user *buf, unsigned long bytes)
@@@ -539,6 -520,9 +539,9 @@@ void snd_soc_pcm_component_free(struct 
        struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_component *component;
  
+       if (!rtd->pcm)
+               return;
        for_each_rtd_components(rtd, rtdcom, component)
                if (component->driver->pcm_destruct)
                        component->driver->pcm_destruct(component, rtd->pcm);