* [PATCH AUTOSEL 6.0 03/44] ASoC: amd: yc: Add Alienware m17 R5 AMD into DMI table
[not found] <20221123124057.264822-1-sashal@kernel.org>
@ 2022-11-23 12:40 ` Sasha Levin
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 04/44] ASoC: Intel: bytcht_es8316: Add quirk for the Nanote UMPC-01 Sasha Levin
` (5 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2022-11-23 12:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, alsa-devel, tiwai, lgirdwood, Mark Brown,
Mario Limonciello, leohearts, xazrael, Brent Mendelsohn,
Syed.SabaKareem
From: Brent Mendelsohn <mendiebm@gmail.com>
[ Upstream commit d40b6529c6269cd5afddb1116a383cab9f126694 ]
This model requires an additional detection quirk to enable the
internal microphone - BIOS doesn't seem to support AcpDmicConnected
(nothing in acpidump output).
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216590
Signed-off-by: Brent Mendelsohn <mendiebm@gmail.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20221024174227.4160-1-mendiebm@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/amd/yc/acp6x-mach.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
index 2cb50d5cf1a9..a868a890f00c 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -185,6 +185,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
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"),
+ }
+ },
{}
};
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH AUTOSEL 6.0 04/44] ASoC: Intel: bytcht_es8316: Add quirk for the Nanote UMPC-01
[not found] <20221123124057.264822-1-sashal@kernel.org>
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 03/44] ASoC: amd: yc: Add Alienware m17 R5 AMD into DMI table Sasha Levin
@ 2022-11-23 12:40 ` Sasha Levin
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 05/44] ASoC: Intel: soc-acpi: add ES83x6 support to IceLake Sasha Levin
` (4 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2022-11-23 12:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, cezary.rojewski, ckeepax, kai.vehmanen,
yung-chuan.liao, tiwai, alsa-devel, Pierre-Louis Bossart,
ranjani.sridharan, liam.r.girdwood, Hans de Goede, Mark Brown,
akihiko.odaki, peter.ujfalusi
From: Hans de Goede <hdegoede@redhat.com>
[ Upstream commit 8bb0ac0e6f64ebdf15d963c26b028de391c9bcf9 ]
The Nanote UMPC-01 mini laptop has stereo speakers, while the default
bytcht_es8316 settings assume a mono speaker setup. Add a quirk for this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20221025140942.509066-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/intel/boards/bytcht_es8316.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
index 6432b83f616f..a935c5fd9edb 100644
--- a/sound/soc/intel/boards/bytcht_es8316.c
+++ b/sound/soc/intel/boards/bytcht_es8316.c
@@ -443,6 +443,13 @@ static const struct dmi_system_id byt_cht_es8316_quirk_table[] = {
| BYT_CHT_ES8316_INTMIC_IN2_MAP
| 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 */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH AUTOSEL 6.0 05/44] ASoC: Intel: soc-acpi: add ES83x6 support to IceLake
[not found] <20221123124057.264822-1-sashal@kernel.org>
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 03/44] ASoC: amd: yc: Add Alienware m17 R5 AMD into DMI table Sasha Levin
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 04/44] ASoC: Intel: bytcht_es8316: Add quirk for the Nanote UMPC-01 Sasha Levin
@ 2022-11-23 12:40 ` Sasha Levin
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 07/44] ASoC: hda: intel-dsp-config: add ES83x6 quirk for IceLake Sasha Levin
` (3 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2022-11-23 12:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, cezary.rojewski, kai.vehmanen, rander.wang,
peter.ujfalusi, tiwai, Pierre-Louis Bossart, ranjani.sridharan,
liam.r.girdwood, alsa-devel, Mark Brown, Bard Liao
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
[ Upstream commit 9a1d248bb4beaf1b43d17ba12481ee0629fa29b9 ]
Missing entry to find a machine driver for ES83x6-based platforms.
Link: https://github.com/thesofproject/linux/issues/3873
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20221031195836.250193-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/intel/common/soc-acpi-intel-icl-match.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/sound/soc/intel/common/soc-acpi-intel-icl-match.c b/sound/soc/intel/common/soc-acpi-intel-icl-match.c
index b032bc07de8b..d0062f2cd256 100644
--- a/sound/soc/intel/common/soc-acpi-intel-icl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-icl-match.c
@@ -10,6 +10,11 @@
#include <sound/soc-acpi-intel-match.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 = {
.use_tplg_pcm = true,
};
@@ -27,6 +32,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = {
.drv_name = "sof_rt5682",
.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);
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH AUTOSEL 6.0 07/44] ASoC: hda: intel-dsp-config: add ES83x6 quirk for IceLake
[not found] <20221123124057.264822-1-sashal@kernel.org>
` (2 preceding siblings ...)
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 05/44] ASoC: Intel: soc-acpi: add ES83x6 support to IceLake Sasha Levin
@ 2022-11-23 12:40 ` Sasha Levin
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 08/44] ASoC: SOF: ipc3-topology: use old pipeline teardown flow with SOF2.1 and older Sasha Levin
` (2 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2022-11-23 12:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, alsa-devel, kai.vehmanen, Takashi Iwai, gongjun.song,
tiwai, Pierre-Louis Bossart, Mark Brown, muralidhar.reddy,
amadeuszx.slawinski, Bard Liao, brent.lu
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
[ Upstream commit 5d73263f9e7c54ccb20814dc50809b9deb9e2bc7 ]
Yet another hardware variant we need to handle.
Link: https://github.com/thesofproject/linux/issues/3873
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20221031195639.250062-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/hda/intel-dsp-config.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
index b9eb3208f288..ae31bb127594 100644
--- a/sound/hda/intel-dsp-config.c
+++ b/sound/hda/intel-dsp-config.c
@@ -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,
.device = 0x34c8,
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH AUTOSEL 6.0 08/44] ASoC: SOF: ipc3-topology: use old pipeline teardown flow with SOF2.1 and older
[not found] <20221123124057.264822-1-sashal@kernel.org>
` (3 preceding siblings ...)
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 07/44] ASoC: hda: intel-dsp-config: add ES83x6 quirk for IceLake Sasha Levin
@ 2022-11-23 12:40 ` Sasha Levin
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 14/44] ASoC: sof_es8336: reduce pop noise on speaker Sasha Levin
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 19/44] ASoC: stm32: dfsdm: manage cb buffers cleanup Sasha Levin
6 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2022-11-23 12:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, alsa-devel, Kai Vehmanen, lgirdwood, yung-chuan.liao,
tiwai, yang.jie, Pierre-Louis Bossart, daniel.baluta,
Ranjani Sridharan, Mark Brown, Péter Ujfalusi,
sound-open-firmware
From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
[ Upstream commit 003b786b678919e072c2b12ffa73901ef840963e ]
Originally in commit b2ebcf42a48f ("ASoC: SOF: free widgets in
sof_tear_down_pipelines() for static pipelines"), freeing of pipeline
components at suspend was only done with recent FW as there were known
limitations in older firmware versions.
Tests show that if static pipelines are used, i.e. all pipelines are
setup whenever firmware is powered up, the reverse action of freeing all
components at power down, leads to firmware failures with also SOF2.0
and SOF2.1 based firmware.
The problems can be specific to certain topologies with e.g. components
not prepared to be freed at suspend (as this did not happen with older
SOF kernels).
To avoid hitting these problems when kernel is upgraded and used with an
older firmware, bump the firmware requirement to SOF2.2 or newer. If an
older firmware is used, and pipeline is a static one, do not free the
components at suspend. This ensures the suspend flow remains backwards
compatible with older firmware versions. This limitation does not apply
if the product configuration is updated to dynamic pipelines.
The limitation is not linked to firmware ABI, as the interface to free
pipeline components has been available already before ABI3.19. The
problem is in the implementation, so firmware version should be used to
decide whether it is safe to use the newer flow or not. This patch adds
a new SOF_FW_VER() macro to compare SOF firmware release versions.
Link: https://github.com/thesofproject/sof/issues/6475
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20221101114913.1292671-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/sound/sof/info.h | 4 ++++
sound/soc/sof/ipc3-topology.c | 15 ++++++++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/include/sound/sof/info.h b/include/sound/sof/info.h
index 65e86e4e9fd8..75193850ead0 100644
--- a/include/sound/sof/info.h
+++ b/include/sound/sof/info.h
@@ -36,6 +36,10 @@ enum sof_ipc_ext_data {
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 */
struct sof_ipc_fw_version {
struct sof_ipc_hdr hdr;
diff --git a/sound/soc/sof/ipc3-topology.c b/sound/soc/sof/ipc3-topology.c
index a39b43850f0e..bf8a46463cec 100644
--- a/sound/soc/sof/ipc3-topology.c
+++ b/sound/soc/sof/ipc3-topology.c
@@ -2242,6 +2242,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 snd_sof_widget *swidget;
struct snd_sof_route *sroute;
+ bool dyn_widgets = false;
int ret;
/*
@@ -2251,12 +2252,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.
*/
list_for_each_entry(swidget, &sdev->widget_list, list) {
- if (swidget->dynamic_pipeline_widget)
+ if (swidget->dynamic_pipeline_widget) {
+ dyn_widgets = true;
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 &&
- 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->complete = 0;
continue;
@@ -2270,9 +2273,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
* 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);
if (ret < 0) {
dev_err(sdev->dev, "failed to tear down paused pipelines\n");
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH AUTOSEL 6.0 14/44] ASoC: sof_es8336: reduce pop noise on speaker
[not found] <20221123124057.264822-1-sashal@kernel.org>
` (4 preceding siblings ...)
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 08/44] ASoC: SOF: ipc3-topology: use old pipeline teardown flow with SOF2.1 and older Sasha Levin
@ 2022-11-23 12:40 ` Sasha Levin
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 19/44] ASoC: stm32: dfsdm: manage cb buffers cleanup Sasha Levin
6 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2022-11-23 12:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, cezary.rojewski, mchehab, andrey.turkin, Zhu Ning,
kai.vehmanen, yung-chuan.liao, tiwai, pierre-louis.bossart,
ranjani.sridharan, liam.r.girdwood, alsa-devel, Mark Brown,
muralidhar.reddy, Zhu Ning, peter.ujfalusi
From: Zhu Ning <zhuning0077@gmail.com>
[ Upstream commit 89cdb224f2abe37ec4ac21ba0d9ddeb5a6a9cf68 ]
The Speaker GPIO needs to be turned on slightly behind the codec turned on.
It also need to be turned off slightly before the codec turned down.
Current code uses delay in DAPM_EVENT to do it but the mdelay delays the
DAPM itself and thus has no effect. A delayed_work is added to turn on the
speaker.
The Speaker is turned off in .trigger since trigger is called slightly
before the DAPM events.
Signed-off-by: Zhu Ning <zhuning@everest-semi.com>
------------
v1: cancel delayed work while disabling speaker.
Link: https://lore.kernel.org/r/20221028020456.90286-1-zhuning0077@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/intel/boards/sof_es8336.c | 60 ++++++++++++++++++++++-------
1 file changed, 46 insertions(+), 14 deletions(-)
diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
index 606cc3242a60..5c218a39ca20 100644
--- a/sound/soc/intel/boards/sof_es8336.c
+++ b/sound/soc/intel/boards/sof_es8336.c
@@ -63,6 +63,7 @@ struct sof_es8336_private {
struct snd_soc_jack jack;
struct list_head hdmi_pcm_list;
bool speaker_en;
+ struct delayed_work pcm_pop_work;
};
struct sof_hdmi_pcm {
@@ -111,6 +112,46 @@ static void log_quirks(struct device *dev)
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,
struct snd_kcontrol *kcontrol, int event)
{
@@ -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);
- if (SND_SOC_DAPM_EVENT_ON(event))
- 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);
-
+ queue_delayed_work(system_wq, &priv->pcm_pop_work, msecs_to_jiffies(70));
return 0;
}
@@ -344,6 +373,7 @@ static int sof_es8336_hw_params(struct snd_pcm_substream *substream,
/* machine stream operations */
static struct snd_soc_ops sof_es8336_ops = {
.hw_params = sof_es8336_hw_params,
+ .trigger = sof_8336_trigger,
};
static struct snd_soc_dai_link_component platform_component[] = {
@@ -722,7 +752,8 @@ static int sof_es8336_probe(struct platform_device *pdev)
}
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);
if (mach->mach_params.dmic_num > 0) {
@@ -751,6 +782,7 @@ static int sof_es8336_remove(struct platform_device *pdev)
struct snd_soc_card *card = platform_get_drvdata(pdev);
struct sof_es8336_private *priv = snd_soc_card_get_drvdata(card);
+ cancel_delayed_work(&priv->pcm_pop_work);
gpiod_put(priv->gpio_speakers);
device_remove_software_node(priv->codec_dev);
put_device(priv->codec_dev);
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH AUTOSEL 6.0 19/44] ASoC: stm32: dfsdm: manage cb buffers cleanup
[not found] <20221123124057.264822-1-sashal@kernel.org>
` (5 preceding siblings ...)
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 14/44] ASoC: sof_es8336: reduce pop noise on speaker Sasha Levin
@ 2022-11-23 12:40 ` Sasha Levin
6 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2022-11-23 12:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, alsa-devel, mcoquelin.stm32, alexandre.torgue, tiwai,
lgirdwood, Mark Brown, Olivier Moysan, arnaud.pouliquen,
linux-stm32, linux-arm-kernel
From: Olivier Moysan <olivier.moysan@foss.st.com>
[ Upstream commit 7d945b046be3d2605dbb1806e73095aadd7ae129 ]
Ensure that resources allocated by iio_channel_get_all_cb()
are released on driver unbind.
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://lore.kernel.org/r/20221109170849.273719-1-olivier.moysan@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/stm/stm32_adfsdm.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sound/soc/stm/stm32_adfsdm.c b/sound/soc/stm/stm32_adfsdm.c
index 643fc8a17018..837c1848d9bf 100644
--- a/sound/soc/stm/stm32_adfsdm.c
+++ b/sound/soc/stm/stm32_adfsdm.c
@@ -304,6 +304,11 @@ static int stm32_adfsdm_dummy_cb(const void *data, void *private)
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 = {
.open = stm32_adfsdm_pcm_open,
.close = stm32_adfsdm_pcm_close,
@@ -350,6 +355,12 @@ static int stm32_adfsdm_probe(struct platform_device *pdev)
if (IS_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);
if (!component)
return -ENOMEM;
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-11-23 12:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20221123124057.264822-1-sashal@kernel.org>
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 03/44] ASoC: amd: yc: Add Alienware m17 R5 AMD into DMI table Sasha Levin
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 04/44] ASoC: Intel: bytcht_es8316: Add quirk for the Nanote UMPC-01 Sasha Levin
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 05/44] ASoC: Intel: soc-acpi: add ES83x6 support to IceLake Sasha Levin
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 07/44] ASoC: hda: intel-dsp-config: add ES83x6 quirk for IceLake Sasha Levin
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 08/44] ASoC: SOF: ipc3-topology: use old pipeline teardown flow with SOF2.1 and older Sasha Levin
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 14/44] ASoC: sof_es8336: reduce pop noise on speaker Sasha Levin
2022-11-23 12:40 ` [PATCH AUTOSEL 6.0 19/44] ASoC: stm32: dfsdm: manage cb buffers cleanup Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).