Commit ae558268 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'sound-6.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A fair amount of commits at this time due to ASoC PR merge, but all
  look small and easy, mostly device-specific fixes spanned in various
  drivers. Hopefully this should be the last big chunk for 6.1"

* tag 'sound-6.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (21 commits)
  ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
  ALSA: hda/realtek: fix speakers for Samsung Galaxy Book Pro
  ALSA: usb-audio: Drop snd_BUG_ON() from snd_usbmidi_output_open()
  ASoC: stm32: dfsdm: manage cb buffers cleanup
  ASoC: sof_es8336: reduce pop noise on speaker
  ASoC: SOF: topology: No need to assign core ID if token parsing failed
  ASoC: soc-utils: Remove __exit for snd_soc_util_exit()
  ASoC: rt5677: fix legacy dai naming
  ASoC: rt5514: fix legacy dai naming
  ASoC: SOF: ipc3-topology: use old pipeline teardown flow with SOF2.1 and older
  ASoC: hda: intel-dsp-config: add ES83x6 quirk for IceLake
  ASoC: Intel: soc-acpi: add ES83x6 support to IceLake
  ASoC: tas2780: Fix set_tdm_slot in case of single slot
  ASoC: tas2764: Fix set_tdm_slot in case of single slot
  ASoC: tas2770: Fix set_tdm_slot in case of single slot
  ASoC: fsl_asrc fsl_esai fsl_sai: allow CONFIG_PM=N
  ASoC: core: Fix use-after-free in snd_soc_exit()
  MAINTAINERS: update Tzung-Bi's email address
  ASoC: Intel: bytcht_es8316: Add quirk for the Nanote UMPC-01
  ASoC: amd: yc: Add Alienware m17 R5 AMD into DMI table
  ...
parents 4ab9ffda 1abfd71e
...@@ -416,6 +416,7 @@ TripleX Chung <xxx.phy@gmail.com> <triplex@zh-kernel.org> ...@@ -416,6 +416,7 @@ TripleX Chung <xxx.phy@gmail.com> <triplex@zh-kernel.org>
TripleX Chung <xxx.phy@gmail.com> <zhongyu@18mail.cn> TripleX Chung <xxx.phy@gmail.com> <zhongyu@18mail.cn>
Tsuneo Yoshioka <Tsuneo.Yoshioka@f-secure.com> Tsuneo Yoshioka <Tsuneo.Yoshioka@f-secure.com>
Tycho Andersen <tycho@tycho.pizza> <tycho@tycho.ws> Tycho Andersen <tycho@tycho.pizza> <tycho@tycho.ws>
Tzung-Bi Shih <tzungbi@kernel.org> <tzungbi@google.com>
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Uwe Kleine-König <ukleinek@strlen.de> Uwe Kleine-König <ukleinek@strlen.de>
......
...@@ -8,7 +8,7 @@ title: Audio codec controlled by ChromeOS EC ...@@ -8,7 +8,7 @@ title: Audio codec controlled by ChromeOS EC
maintainers: maintainers:
- Cheng-Yi Chiang <cychiang@chromium.org> - Cheng-Yi Chiang <cychiang@chromium.org>
- Tzung-Bi Shih <tzungbi@google.com> - Tzung-Bi Shih <tzungbi@kernel.org>
description: | description: |
Google's ChromeOS EC codec is a digital mic codec provided by the Google's ChromeOS EC codec is a digital mic codec provided by the
......
...@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# ...@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Realtek rt1015p codec devicetree bindings title: Realtek rt1015p codec devicetree bindings
maintainers: maintainers:
- Tzung-Bi Shih <tzungbi@google.com> - Tzung-Bi Shih <tzungbi@kernel.org>
description: | description: |
Rt1015p is a rt1015 variant which does not support I2C and Rt1015p is a rt1015 variant which does not support I2C and
......
...@@ -4911,7 +4911,7 @@ F: drivers/platform/chrome/ ...@@ -4911,7 +4911,7 @@ F: drivers/platform/chrome/
CHROMEOS EC CODEC DRIVER CHROMEOS EC CODEC DRIVER
M: Cheng-Yi Chiang <cychiang@chromium.org> M: Cheng-Yi Chiang <cychiang@chromium.org>
M: Tzung-Bi Shih <tzungbi@google.com> M: Tzung-Bi Shih <tzungbi@kernel.org>
R: Guenter Roeck <groeck@chromium.org> R: Guenter Roeck <groeck@chromium.org>
L: chrome-platform@lists.linux.dev L: chrome-platform@lists.linux.dev
S: Maintained S: Maintained
......
...@@ -36,6 +36,10 @@ enum sof_ipc_ext_data { ...@@ -36,6 +36,10 @@ enum sof_ipc_ext_data {
SOF_IPC_EXT_USER_ABI_INFO = 4, SOF_IPC_EXT_USER_ABI_INFO = 4,
}; };
/* Build u32 number in format MMmmmppp */
#define SOF_FW_VER(MAJOR, MINOR, PATCH) ((uint32_t)( \
((MAJOR) << 24) | ((MINOR) << 12) | (PATCH)))
/* FW version - SOF_IPC_GLB_VERSION */ /* FW version - SOF_IPC_GLB_VERSION */
struct sof_ipc_fw_version { struct sof_ipc_fw_version {
struct sof_ipc_hdr hdr; struct sof_ipc_hdr hdr;
......
...@@ -320,6 +320,11 @@ static const struct config_entry config_table[] = { ...@@ -320,6 +320,11 @@ static const struct config_entry config_table[] = {
{} {}
} }
}, },
{
.flags = FLAG_SOF,
.device = 0x34c8,
.codec_hid = &essx_83x6,
},
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x34c8, .device = 0x34c8,
......
...@@ -9436,6 +9436,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { ...@@ -9436,6 +9436,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP), SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP),
SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP), SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP),
SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP), SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP),
SND_PCI_QUIRK(0x144d, 0xc1a6, "Samsung Galaxy Book Pro 360 (NP930QBD)", ALC298_FIXUP_SAMSUNG_AMP),
SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8), SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8),
SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP), SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP),
SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP), SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP),
......
...@@ -206,6 +206,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { ...@@ -206,6 +206,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "UM5302TA"), DMI_MATCH(DMI_PRODUCT_NAME, "UM5302TA"),
} }
}, },
{
.driver_data = &acp6x_card,
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Alienware"),
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m17 R5 AMD"),
}
},
{} {}
}; };
......
...@@ -305,6 +305,7 @@ static const struct snd_soc_component_driver rt5514_spi_component = { ...@@ -305,6 +305,7 @@ static const struct snd_soc_component_driver rt5514_spi_component = {
.hw_free = rt5514_spi_hw_free, .hw_free = rt5514_spi_hw_free,
.pointer = rt5514_spi_pcm_pointer, .pointer = rt5514_spi_pcm_pointer,
.pcm_construct = rt5514_spi_pcm_new, .pcm_construct = rt5514_spi_pcm_new,
.legacy_dai_naming = 1,
}; };
/** /**
......
...@@ -405,6 +405,7 @@ static const struct snd_soc_component_driver rt5677_spi_dai_component = { ...@@ -405,6 +405,7 @@ static const struct snd_soc_component_driver rt5677_spi_dai_component = {
.prepare = rt5677_spi_prepare, .prepare = rt5677_spi_prepare,
.pointer = rt5677_spi_pcm_pointer, .pointer = rt5677_spi_pcm_pointer,
.pcm_construct = rt5677_spi_pcm_new, .pcm_construct = rt5677_spi_pcm_new,
.legacy_dai_naming = 1,
}; };
/* Select a suitable transfer command for the next transfer to ensure /* Select a suitable transfer command for the next transfer to ensure
......
...@@ -438,12 +438,6 @@ static int tas2764_set_dai_tdm_slot(struct snd_soc_dai *dai, ...@@ -438,12 +438,6 @@ static int tas2764_set_dai_tdm_slot(struct snd_soc_dai *dai,
if (tx_mask == 0 || rx_mask != 0) if (tx_mask == 0 || rx_mask != 0)
return -EINVAL; return -EINVAL;
if (slots == 1) {
if (tx_mask != 1)
return -EINVAL;
left_slot = 0;
right_slot = 0;
} else {
left_slot = __ffs(tx_mask); left_slot = __ffs(tx_mask);
tx_mask &= ~(1 << left_slot); tx_mask &= ~(1 << left_slot);
if (tx_mask == 0) { if (tx_mask == 0) {
...@@ -452,7 +446,6 @@ static int tas2764_set_dai_tdm_slot(struct snd_soc_dai *dai, ...@@ -452,7 +446,6 @@ static int tas2764_set_dai_tdm_slot(struct snd_soc_dai *dai,
right_slot = __ffs(tx_mask); right_slot = __ffs(tx_mask);
tx_mask &= ~(1 << right_slot); tx_mask &= ~(1 << right_slot);
} }
}
if (tx_mask != 0 || left_slot >= slots || right_slot >= slots) if (tx_mask != 0 || left_slot >= slots || right_slot >= slots)
return -EINVAL; return -EINVAL;
......
...@@ -395,13 +395,6 @@ static int tas2770_set_dai_tdm_slot(struct snd_soc_dai *dai, ...@@ -395,13 +395,6 @@ static int tas2770_set_dai_tdm_slot(struct snd_soc_dai *dai,
if (tx_mask == 0 || rx_mask != 0) if (tx_mask == 0 || rx_mask != 0)
return -EINVAL; return -EINVAL;
if (slots == 1) {
if (tx_mask != 1)
return -EINVAL;
left_slot = 0;
right_slot = 0;
} else {
left_slot = __ffs(tx_mask); left_slot = __ffs(tx_mask);
tx_mask &= ~(1 << left_slot); tx_mask &= ~(1 << left_slot);
if (tx_mask == 0) { if (tx_mask == 0) {
...@@ -410,7 +403,6 @@ static int tas2770_set_dai_tdm_slot(struct snd_soc_dai *dai, ...@@ -410,7 +403,6 @@ static int tas2770_set_dai_tdm_slot(struct snd_soc_dai *dai,
right_slot = __ffs(tx_mask); right_slot = __ffs(tx_mask);
tx_mask &= ~(1 << right_slot); tx_mask &= ~(1 << right_slot);
} }
}
if (tx_mask != 0 || left_slot >= slots || right_slot >= slots) if (tx_mask != 0 || left_slot >= slots || right_slot >= slots)
return -EINVAL; return -EINVAL;
......
...@@ -380,12 +380,6 @@ static int tas2780_set_dai_tdm_slot(struct snd_soc_dai *dai, ...@@ -380,12 +380,6 @@ static int tas2780_set_dai_tdm_slot(struct snd_soc_dai *dai,
if (tx_mask == 0 || rx_mask != 0) if (tx_mask == 0 || rx_mask != 0)
return -EINVAL; return -EINVAL;
if (slots == 1) {
if (tx_mask != 1)
return -EINVAL;
left_slot = 0;
right_slot = 0;
} else {
left_slot = __ffs(tx_mask); left_slot = __ffs(tx_mask);
tx_mask &= ~(1 << left_slot); tx_mask &= ~(1 << left_slot);
if (tx_mask == 0) { if (tx_mask == 0) {
...@@ -394,7 +388,6 @@ static int tas2780_set_dai_tdm_slot(struct snd_soc_dai *dai, ...@@ -394,7 +388,6 @@ static int tas2780_set_dai_tdm_slot(struct snd_soc_dai *dai,
right_slot = __ffs(tx_mask); right_slot = __ffs(tx_mask);
tx_mask &= ~(1 << right_slot); tx_mask &= ~(1 << right_slot);
} }
}
if (tx_mask != 0 || left_slot >= slots || right_slot >= slots) if (tx_mask != 0 || left_slot >= slots || right_slot >= slots)
return -EINVAL; return -EINVAL;
......
...@@ -1232,7 +1232,7 @@ static int fsl_asrc_probe(struct platform_device *pdev) ...@@ -1232,7 +1232,7 @@ static int fsl_asrc_probe(struct platform_device *pdev)
} }
ret = pm_runtime_put_sync(&pdev->dev); ret = pm_runtime_put_sync(&pdev->dev);
if (ret < 0) if (ret < 0 && ret != -ENOSYS)
goto err_pm_get_sync; goto err_pm_get_sync;
ret = devm_snd_soc_register_component(&pdev->dev, &fsl_asrc_component, ret = devm_snd_soc_register_component(&pdev->dev, &fsl_asrc_component,
......
...@@ -1069,7 +1069,7 @@ static int fsl_esai_probe(struct platform_device *pdev) ...@@ -1069,7 +1069,7 @@ static int fsl_esai_probe(struct platform_device *pdev)
regmap_write(esai_priv->regmap, REG_ESAI_RSMB, 0); regmap_write(esai_priv->regmap, REG_ESAI_RSMB, 0);
ret = pm_runtime_put_sync(&pdev->dev); ret = pm_runtime_put_sync(&pdev->dev);
if (ret < 0) if (ret < 0 && ret != -ENOSYS)
goto err_pm_get_sync; goto err_pm_get_sync;
/* /*
......
...@@ -1446,7 +1446,7 @@ static int fsl_sai_probe(struct platform_device *pdev) ...@@ -1446,7 +1446,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
} }
ret = pm_runtime_put_sync(dev); ret = pm_runtime_put_sync(dev);
if (ret < 0) if (ret < 0 && ret != -ENOSYS)
goto err_pm_get_sync; goto err_pm_get_sync;
/* /*
......
...@@ -443,6 +443,13 @@ static const struct dmi_system_id byt_cht_es8316_quirk_table[] = { ...@@ -443,6 +443,13 @@ static const struct dmi_system_id byt_cht_es8316_quirk_table[] = {
| BYT_CHT_ES8316_INTMIC_IN2_MAP | BYT_CHT_ES8316_INTMIC_IN2_MAP
| BYT_CHT_ES8316_JD_INVERTED), | BYT_CHT_ES8316_JD_INVERTED),
}, },
{ /* Nanote UMPC-01 */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "RWC CO.,LTD"),
DMI_MATCH(DMI_PRODUCT_NAME, "UMPC-01"),
},
.driver_data = (void *)BYT_CHT_ES8316_INTMIC_IN1_MAP,
},
{ /* Teclast X98 Plus II */ { /* Teclast X98 Plus II */
.matches = { .matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"), DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
......
...@@ -63,6 +63,7 @@ struct sof_es8336_private { ...@@ -63,6 +63,7 @@ struct sof_es8336_private {
struct snd_soc_jack jack; struct snd_soc_jack jack;
struct list_head hdmi_pcm_list; struct list_head hdmi_pcm_list;
bool speaker_en; bool speaker_en;
struct delayed_work pcm_pop_work;
}; };
struct sof_hdmi_pcm { struct sof_hdmi_pcm {
...@@ -111,6 +112,46 @@ static void log_quirks(struct device *dev) ...@@ -111,6 +112,46 @@ static void log_quirks(struct device *dev)
dev_info(dev, "quirk headset at mic1 port enabled\n"); dev_info(dev, "quirk headset at mic1 port enabled\n");
} }
static void pcm_pop_work_events(struct work_struct *work)
{
struct sof_es8336_private *priv =
container_of(work, struct sof_es8336_private, pcm_pop_work.work);
gpiod_set_value_cansleep(priv->gpio_speakers, priv->speaker_en);
if (quirk & SOF_ES8336_HEADPHONE_GPIO)
gpiod_set_value_cansleep(priv->gpio_headphone, priv->speaker_en);
}
static int sof_8336_trigger(struct snd_pcm_substream *substream, int cmd)
{
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_card *card = rtd->card;
struct sof_es8336_private *priv = snd_soc_card_get_drvdata(card);
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
case SNDRV_PCM_TRIGGER_RESUME:
break;
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_STOP:
if (priv->speaker_en == false)
if (substream->stream == 0) {
cancel_delayed_work(&priv->pcm_pop_work);
gpiod_set_value_cansleep(priv->gpio_speakers, true);
}
break;
default:
return -EINVAL;
}
return 0;
}
static int sof_es8316_speaker_power_event(struct snd_soc_dapm_widget *w, static int sof_es8316_speaker_power_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event) struct snd_kcontrol *kcontrol, int event)
{ {
...@@ -122,19 +163,7 @@ static int sof_es8316_speaker_power_event(struct snd_soc_dapm_widget *w, ...@@ -122,19 +163,7 @@ static int sof_es8316_speaker_power_event(struct snd_soc_dapm_widget *w,
priv->speaker_en = !SND_SOC_DAPM_EVENT_ON(event); priv->speaker_en = !SND_SOC_DAPM_EVENT_ON(event);
if (SND_SOC_DAPM_EVENT_ON(event)) queue_delayed_work(system_wq, &priv->pcm_pop_work, msecs_to_jiffies(70));
msleep(70);
gpiod_set_value_cansleep(priv->gpio_speakers, priv->speaker_en);
if (!(quirk & SOF_ES8336_HEADPHONE_GPIO))
return 0;
if (SND_SOC_DAPM_EVENT_ON(event))
msleep(70);
gpiod_set_value_cansleep(priv->gpio_headphone, priv->speaker_en);
return 0; return 0;
} }
...@@ -344,6 +373,7 @@ static int sof_es8336_hw_params(struct snd_pcm_substream *substream, ...@@ -344,6 +373,7 @@ static int sof_es8336_hw_params(struct snd_pcm_substream *substream,
/* machine stream operations */ /* machine stream operations */
static struct snd_soc_ops sof_es8336_ops = { static struct snd_soc_ops sof_es8336_ops = {
.hw_params = sof_es8336_hw_params, .hw_params = sof_es8336_hw_params,
.trigger = sof_8336_trigger,
}; };
static struct snd_soc_dai_link_component platform_component[] = { static struct snd_soc_dai_link_component platform_component[] = {
...@@ -723,7 +753,8 @@ static int sof_es8336_probe(struct platform_device *pdev) ...@@ -723,7 +753,8 @@ static int sof_es8336_probe(struct platform_device *pdev)
} }
INIT_LIST_HEAD(&priv->hdmi_pcm_list); INIT_LIST_HEAD(&priv->hdmi_pcm_list);
INIT_DELAYED_WORK(&priv->pcm_pop_work,
pcm_pop_work_events);
snd_soc_card_set_drvdata(card, priv); snd_soc_card_set_drvdata(card, priv);
if (mach->mach_params.dmic_num > 0) { if (mach->mach_params.dmic_num > 0) {
...@@ -752,6 +783,7 @@ static int sof_es8336_remove(struct platform_device *pdev) ...@@ -752,6 +783,7 @@ static int sof_es8336_remove(struct platform_device *pdev)
struct snd_soc_card *card = platform_get_drvdata(pdev); struct snd_soc_card *card = platform_get_drvdata(pdev);
struct sof_es8336_private *priv = snd_soc_card_get_drvdata(card); struct sof_es8336_private *priv = snd_soc_card_get_drvdata(card);
cancel_delayed_work(&priv->pcm_pop_work);
gpiod_put(priv->gpio_speakers); gpiod_put(priv->gpio_speakers);
device_remove_software_node(priv->codec_dev); device_remove_software_node(priv->codec_dev);
put_device(priv->codec_dev); put_device(priv->codec_dev);
......
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
#include <sound/soc-acpi-intel-match.h> #include <sound/soc-acpi-intel-match.h>
#include "../skylake/skl.h" #include "../skylake/skl.h"
static const struct snd_soc_acpi_codecs essx_83x6 = {
.num_codecs = 3,
.codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
};
static struct skl_machine_pdata icl_pdata = { static struct skl_machine_pdata icl_pdata = {
.use_tplg_pcm = true, .use_tplg_pcm = true,
}; };
...@@ -27,6 +32,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = { ...@@ -27,6 +32,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = {
.drv_name = "sof_rt5682", .drv_name = "sof_rt5682",
.sof_tplg_filename = "sof-icl-rt5682.tplg", .sof_tplg_filename = "sof-icl-rt5682.tplg",
}, },
{
.comp_ids = &essx_83x6,
.drv_name = "sof-essx8336",
.sof_tplg_filename = "sof-icl-es8336", /* the tplg suffix is added at run time */
.tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |
SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
},
{}, {},
}; };
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_machines); EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_machines);
......
...@@ -3477,10 +3477,23 @@ EXPORT_SYMBOL_GPL(snd_soc_of_get_dai_link_cpus); ...@@ -3477,10 +3477,23 @@ EXPORT_SYMBOL_GPL(snd_soc_of_get_dai_link_cpus);
static int __init snd_soc_init(void) static int __init snd_soc_init(void)
{ {
int ret;
snd_soc_debugfs_init(); snd_soc_debugfs_init();
snd_soc_util_init(); ret = snd_soc_util_init();
if (ret)
goto err_util_init;
return platform_driver_register(&soc_driver); ret = platform_driver_register(&soc_driver);
if (ret)
goto err_register;
return 0;
err_register:
snd_soc_util_exit();
err_util_init:
snd_soc_debugfs_exit();
return ret;
} }
module_init(snd_soc_init); module_init(snd_soc_init);
......
...@@ -3645,7 +3645,7 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm, ...@@ -3645,7 +3645,7 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
switch (w->id) { switch (w->id) {
case snd_soc_dapm_regulator_supply: case snd_soc_dapm_regulator_supply:
w->regulator = devm_regulator_get(dapm->dev, w->name); w->regulator = devm_regulator_get(dapm->dev, widget->name);
if (IS_ERR(w->regulator)) { if (IS_ERR(w->regulator)) {
ret = PTR_ERR(w->regulator); ret = PTR_ERR(w->regulator);
goto request_failed; goto request_failed;
......
...@@ -264,7 +264,7 @@ int __init snd_soc_util_init(void) ...@@ -264,7 +264,7 @@ int __init snd_soc_util_init(void)
return ret; return ret;
} }
void __exit snd_soc_util_exit(void) void snd_soc_util_exit(void)
{ {
platform_driver_unregister(&soc_dummy_driver); platform_driver_unregister(&soc_dummy_driver);
platform_device_unregister(soc_dummy_dev); platform_device_unregister(soc_dummy_dev);
......
...@@ -2275,6 +2275,7 @@ static int sof_ipc3_tear_down_all_pipelines(struct snd_sof_dev *sdev, bool verif ...@@ -2275,6 +2275,7 @@ static int sof_ipc3_tear_down_all_pipelines(struct snd_sof_dev *sdev, bool verif
struct sof_ipc_fw_version *v = &sdev->fw_ready.version; struct sof_ipc_fw_version *v = &sdev->fw_ready.version;
struct snd_sof_widget *swidget; struct snd_sof_widget *swidget;
struct snd_sof_route *sroute; struct snd_sof_route *sroute;
bool dyn_widgets = false;
int ret; int ret;
/* /*
...@@ -2284,12 +2285,14 @@ static int sof_ipc3_tear_down_all_pipelines(struct snd_sof_dev *sdev, bool verif ...@@ -2284,12 +2285,14 @@ static int sof_ipc3_tear_down_all_pipelines(struct snd_sof_dev *sdev, bool verif
* topology loading the sound card unavailable to open PCMs. * topology loading the sound card unavailable to open PCMs.
*/ */
list_for_each_entry(swidget, &sdev->widget_list, list) { list_for_each_entry(swidget, &sdev->widget_list, list) {
if (swidget->dynamic_pipeline_widget) if (swidget->dynamic_pipeline_widget) {
dyn_widgets = true;
continue; continue;
}
/* Do not free widgets for static pipelines with FW ABI older than 3.19 */ /* Do not free widgets for static pipelines with FW older than SOF2.2 */
if (!verify && !swidget->dynamic_pipeline_widget && if (!verify && !swidget->dynamic_pipeline_widget &&
v->abi_version < SOF_ABI_VER(3, 19, 0)) { SOF_FW_VER(v->major, v->minor, v->micro) < SOF_FW_VER(2, 2, 0)) {
swidget->use_count = 0; swidget->use_count = 0;
swidget->complete = 0; swidget->complete = 0;
continue; continue;
...@@ -2303,9 +2306,11 @@ static int sof_ipc3_tear_down_all_pipelines(struct snd_sof_dev *sdev, bool verif ...@@ -2303,9 +2306,11 @@ static int sof_ipc3_tear_down_all_pipelines(struct snd_sof_dev *sdev, bool verif
/* /*
* Tear down all pipelines associated with PCMs that did not get suspended * Tear down all pipelines associated with PCMs that did not get suspended
* and unset the prepare flag so that they can be set up again during resume. * and unset the prepare flag so that they can be set up again during resume.
* Skip this step for older firmware. * Skip this step for older firmware unless topology has any
* dynamic pipeline (in which case the step is mandatory).
*/ */
if (!verify && v->abi_version >= SOF_ABI_VER(3, 19, 0)) { if (!verify && (dyn_widgets || SOF_FW_VER(v->major, v->minor, v->micro) >=
SOF_FW_VER(2, 2, 0))) {
ret = sof_tear_down_left_over_pipelines(sdev); ret = sof_tear_down_left_over_pipelines(sdev);
if (ret < 0) { if (ret < 0) {
dev_err(sdev->dev, "failed to tear down paused pipelines\n"); dev_err(sdev->dev, "failed to tear down paused pipelines\n");
......
...@@ -1344,16 +1344,6 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index, ...@@ -1344,16 +1344,6 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index,
break; break;
} }
if (sof_debug_check_flag(SOF_DBG_DISABLE_MULTICORE)) {
swidget->core = SOF_DSP_PRIMARY_CORE;
} else {
int core = sof_get_token_value(SOF_TKN_COMP_CORE_ID, swidget->tuples,
swidget->num_tuples);
if (core >= 0)
swidget->core = core;
}
/* check token parsing reply */ /* check token parsing reply */
if (ret < 0) { if (ret < 0) {
dev_err(scomp->dev, dev_err(scomp->dev,
...@@ -1365,6 +1355,16 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index, ...@@ -1365,6 +1355,16 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index,
return ret; return ret;
} }
if (sof_debug_check_flag(SOF_DBG_DISABLE_MULTICORE)) {
swidget->core = SOF_DSP_PRIMARY_CORE;
} else {
int core = sof_get_token_value(SOF_TKN_COMP_CORE_ID, swidget->tuples,
swidget->num_tuples);
if (core >= 0)
swidget->core = core;
}
/* bind widget to external event */ /* bind widget to external event */
if (tw->event_type) { if (tw->event_type) {
if (widget_ops[w->id].bind_event) { if (widget_ops[w->id].bind_event) {
......
...@@ -304,6 +304,11 @@ static int stm32_adfsdm_dummy_cb(const void *data, void *private) ...@@ -304,6 +304,11 @@ static int stm32_adfsdm_dummy_cb(const void *data, void *private)
return 0; return 0;
} }
static void stm32_adfsdm_cleanup(void *data)
{
iio_channel_release_all_cb(data);
}
static struct snd_soc_component_driver stm32_adfsdm_soc_platform = { static struct snd_soc_component_driver stm32_adfsdm_soc_platform = {
.open = stm32_adfsdm_pcm_open, .open = stm32_adfsdm_pcm_open,
.close = stm32_adfsdm_pcm_close, .close = stm32_adfsdm_pcm_close,
...@@ -350,6 +355,12 @@ static int stm32_adfsdm_probe(struct platform_device *pdev) ...@@ -350,6 +355,12 @@ static int stm32_adfsdm_probe(struct platform_device *pdev)
if (IS_ERR(priv->iio_cb)) if (IS_ERR(priv->iio_cb))
return PTR_ERR(priv->iio_cb); return PTR_ERR(priv->iio_cb);
ret = devm_add_action_or_reset(&pdev->dev, stm32_adfsdm_cleanup, priv->iio_cb);
if (ret < 0) {
dev_err(&pdev->dev, "Unable to add action\n");
return ret;
}
component = devm_kzalloc(&pdev->dev, sizeof(*component), GFP_KERNEL); component = devm_kzalloc(&pdev->dev, sizeof(*component), GFP_KERNEL);
if (!component) if (!component)
return -ENOMEM; return -ENOMEM;
......
...@@ -1133,10 +1133,8 @@ static int snd_usbmidi_output_open(struct snd_rawmidi_substream *substream) ...@@ -1133,10 +1133,8 @@ static int snd_usbmidi_output_open(struct snd_rawmidi_substream *substream)
port = &umidi->endpoints[i].out->ports[j]; port = &umidi->endpoints[i].out->ports[j];
break; break;
} }
if (!port) { if (!port)
snd_BUG();
return -ENXIO; return -ENXIO;
}
substream->runtime->private_data = port; substream->runtime->private_data = port;
port->state = STATE_UNKNOWN; port->state = STATE_UNKNOWN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment