* [PATCH AUTOSEL 6.4 04/31] ASoC: amd: vangogh: Use dmi_first_match() for DMI quirk handling
[not found] <20230908193201.3462957-1-sashal@kernel.org>
@ 2023-09-08 19:31 ` Sasha Levin
2023-09-08 23:20 ` Mark Brown
2023-09-08 19:31 ` [PATCH AUTOSEL 6.4 15/31] ASoC: SOF: topology: simplify code to prevent static analysis warnings Sasha Levin
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Sasha Levin @ 2023-09-08 19:31 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Cristian Ciocaltea, Mark Brown, Sasha Levin, lgirdwood, perex,
tiwai, lucas.tanure, pierre-louis.bossart, rander.wang,
kuninori.morimoto.gx, alsa-devel
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
[ Upstream commit 3dd26e27ccb4f18b4d25c0a49e1888eca9c6a724 ]
In preparation for supporting ACPI probing, move DMI quirk handling
logic at the probe's top, to be able to return as quickly as possible in
case there is no DMI matching.
Additionally, simplify the code by replacing dmi_check_system() and
related callback with dmi_first_match(). While at it, also drop a few
unnecessary empty lines.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://lore.kernel.org/r/20230705214800.193244-3-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/amd/vangogh/acp5x-mach.c | 28 +++++++---------------------
1 file changed, 7 insertions(+), 21 deletions(-)
diff --git a/sound/soc/amd/vangogh/acp5x-mach.c b/sound/soc/amd/vangogh/acp5x-mach.c
index e5bcd1e6eb73a..7040809b24729 100644
--- a/sound/soc/amd/vangogh/acp5x-mach.c
+++ b/sound/soc/amd/vangogh/acp5x-mach.c
@@ -22,7 +22,6 @@
#define DRV_NAME "acp5x_mach"
#define DUAL_CHANNEL 2
-#define VG_JUPITER 1
#define ACP5X_NAU8821_BCLK 3072000
#define ACP5X_NAU8821_FREQ_OUT 12288000
#define ACP5X_NAU8821_COMP_NAME "i2c-NVTN2020:00"
@@ -31,7 +30,6 @@
#define ACP5X_CS35L41_COMP_RNAME "spi-VLV1776:01"
#define ACP5X_CS35L41_DAI_NAME "cs35l41-pcm"
-static unsigned long acp5x_machine_id;
static struct snd_soc_jack vg_headset;
SND_SOC_DAILINK_DEF(platform, DAILINK_COMP_ARRAY(COMP_PLATFORM("acp5x_i2s_dma.0")));
@@ -242,7 +240,6 @@ static int acp5x_cs35l41_hw_params(struct snd_pcm_substream *substream,
}
return 0;
-
}
static const struct snd_soc_ops acp5x_cs35l41_play_ops = {
@@ -292,8 +289,6 @@ static struct snd_soc_dai_link acp5x_8821_35l41_dai[] = {
},
};
-
-
static const struct snd_soc_dapm_widget acp5x_8821_35l41_widgets[] = {
SND_SOC_DAPM_HP("Headphone", NULL),
SND_SOC_DAPM_MIC("Headset Mic", NULL),
@@ -331,16 +326,8 @@ static struct snd_soc_card acp5x_8821_35l41_card = {
.num_controls = ARRAY_SIZE(acp5x_8821_controls),
};
-static int acp5x_vg_quirk_cb(const struct dmi_system_id *id)
-{
- acp5x_machine_id = VG_JUPITER;
-
- return 1;
-}
-
static const struct dmi_system_id acp5x_vg_quirk_table[] = {
{
- .callback = acp5x_vg_quirk_cb,
.matches = {
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Valve"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Jupiter"),
@@ -351,23 +338,22 @@ static const struct dmi_system_id acp5x_vg_quirk_table[] = {
static int acp5x_probe(struct platform_device *pdev)
{
+ const struct dmi_system_id *dmi_id;
struct acp5x_platform_info *machine;
struct device *dev = &pdev->dev;
struct snd_soc_card *card;
int ret;
+ dmi_id = dmi_first_match(acp5x_vg_quirk_table);
+ if (!dmi_id)
+ return -ENODEV;
+
+ card = &acp5x_8821_35l41_card;
+
machine = devm_kzalloc(dev, sizeof(*machine), GFP_KERNEL);
if (!machine)
return -ENOMEM;
- dmi_check_system(acp5x_vg_quirk_table);
- switch (acp5x_machine_id) {
- case VG_JUPITER:
- card = &acp5x_8821_35l41_card;
- break;
- default:
- return -ENODEV;
- }
card->dev = dev;
platform_set_drvdata(pdev, card);
snd_soc_card_set_drvdata(card, machine);
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH AUTOSEL 6.4 04/31] ASoC: amd: vangogh: Use dmi_first_match() for DMI quirk handling
2023-09-08 19:31 ` [PATCH AUTOSEL 6.4 04/31] ASoC: amd: vangogh: Use dmi_first_match() for DMI quirk handling Sasha Levin
@ 2023-09-08 23:20 ` Mark Brown
2023-09-18 21:29 ` Sasha Levin
0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2023-09-08 23:20 UTC (permalink / raw)
To: Sasha Levin
Cc: linux-kernel, stable, Cristian Ciocaltea, lgirdwood, perex, tiwai,
lucas.tanure, pierre-louis.bossart, rander.wang,
kuninori.morimoto.gx, alsa-devel
[-- Attachment #1: Type: text/plain, Size: 490 bytes --]
On Fri, Sep 08, 2023 at 03:31:33PM -0400, Sasha Levin wrote:
> From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
>
> [ Upstream commit 3dd26e27ccb4f18b4d25c0a49e1888eca9c6a724 ]
>
> In preparation for supporting ACPI probing, move DMI quirk handling
> logic at the probe's top, to be able to return as quickly as possible in
> case there is no DMI matching.
As the changelog clearly says this is preparatory work for a new feature
and therefore not stable material.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH AUTOSEL 6.4 04/31] ASoC: amd: vangogh: Use dmi_first_match() for DMI quirk handling
2023-09-08 23:20 ` Mark Brown
@ 2023-09-18 21:29 ` Sasha Levin
0 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2023-09-18 21:29 UTC (permalink / raw)
To: Mark Brown
Cc: linux-kernel, stable, Cristian Ciocaltea, lgirdwood, perex, tiwai,
lucas.tanure, pierre-louis.bossart, rander.wang,
kuninori.morimoto.gx, alsa-devel
On Sat, Sep 09, 2023 at 12:20:16AM +0100, Mark Brown wrote:
>On Fri, Sep 08, 2023 at 03:31:33PM -0400, Sasha Levin wrote:
>> From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
>>
>> [ Upstream commit 3dd26e27ccb4f18b4d25c0a49e1888eca9c6a724 ]
>>
>> In preparation for supporting ACPI probing, move DMI quirk handling
>> logic at the probe's top, to be able to return as quickly as possible in
>> case there is no DMI matching.
>
>As the changelog clearly says this is preparatory work for a new feature
>and therefore not stable material.
Dropped, thanks!
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH AUTOSEL 6.4 15/31] ASoC: SOF: topology: simplify code to prevent static analysis warnings
[not found] <20230908193201.3462957-1-sashal@kernel.org>
2023-09-08 19:31 ` [PATCH AUTOSEL 6.4 04/31] ASoC: amd: vangogh: Use dmi_first_match() for DMI quirk handling Sasha Levin
@ 2023-09-08 19:31 ` Sasha Levin
2023-09-08 19:31 ` [PATCH AUTOSEL 6.4 16/31] ASoC: Intel: sof_sdw: Update BT offload config for soundwire config Sasha Levin
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2023-09-08 19:31 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Pierre-Louis Bossart, Rander Wang, Daniel Baluta, Yaochun Hung,
Mark Brown, Sasha Levin, lgirdwood, peter.ujfalusi,
yung-chuan.liao, ranjani.sridharan, perex, tiwai, matthias.bgg,
sound-open-firmware, alsa-devel, linux-arm-kernel, linux-mediatek
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
[ Upstream commit 55cb3dc271d81f1982c949a2ac483a6daf613b92 ]
make KCFLAGS='-fanalyzer' sound/soc/sof/intel/ reports a possible NULL
pointer dereference.
sound/soc/sof/topology.c:1136:21: error: dereference of NULL ‘w’
[CWE-476] [-Werror=analyzer-null-dereference]
1136 | strcmp(w->sname, rtd->dai_link->stream_name))
The code is rather confusing and can be simplified to make static
analysis happy. No functionality change.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Yaochun Hung <yc.hung@mediatek.com>
Link: https://lore.kernel.org/r/20230731213748.440285-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/sof/topology.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index f160dc454b448..8e6f6148f0a07 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -1117,10 +1117,11 @@ static void sof_disconnect_dai_widget(struct snd_soc_component *scomp,
{
struct snd_soc_card *card = scomp->card;
struct snd_soc_pcm_runtime *rtd;
+ const char *sname = w->sname;
struct snd_soc_dai *cpu_dai;
int i, stream;
- if (!w->sname)
+ if (!sname)
return;
if (w->id == snd_soc_dapm_dai_out)
@@ -1133,7 +1134,7 @@ static void sof_disconnect_dai_widget(struct snd_soc_component *scomp,
list_for_each_entry(rtd, &card->rtd_list, list) {
/* does stream match DAI link ? */
if (!rtd->dai_link->stream_name ||
- strcmp(w->sname, rtd->dai_link->stream_name))
+ strcmp(sname, rtd->dai_link->stream_name))
continue;
for_each_rtd_cpu_dais(rtd, i, cpu_dai)
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH AUTOSEL 6.4 16/31] ASoC: Intel: sof_sdw: Update BT offload config for soundwire config
[not found] <20230908193201.3462957-1-sashal@kernel.org>
2023-09-08 19:31 ` [PATCH AUTOSEL 6.4 04/31] ASoC: amd: vangogh: Use dmi_first_match() for DMI quirk handling Sasha Levin
2023-09-08 19:31 ` [PATCH AUTOSEL 6.4 15/31] ASoC: SOF: topology: simplify code to prevent static analysis warnings Sasha Levin
@ 2023-09-08 19:31 ` Sasha Levin
2023-09-08 19:31 ` [PATCH AUTOSEL 6.4 17/31] ALSA: hda: intel-dsp-cfg: add LunarLake support Sasha Levin
2023-09-08 19:31 ` [PATCH AUTOSEL 6.4 30/31] ASoC: SOF: amd: clear panic mask status when panic occurs Sasha Levin
4 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2023-09-08 19:31 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Uday M Bhat, Kai Vehmanen, Ranjani Sridharan, Bard Liao,
Jairaj Arava, Pierre-Louis Bossart, Mark Brown, Sasha Levin,
cezary.rojewski, liam.r.girdwood, peter.ujfalusi, perex, tiwai,
ckeepax, gongjun.song, alsa-devel
From: Uday M Bhat <uday.m.bhat@intel.com>
[ Upstream commit a14aded9299187bb17ef90700eb2cf1120ef5885 ]
For soundwire config, SSP1 is used for BT offload. This is enabled
in sof_sdw_quirk_table
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230731214257.444605-5-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/boards/sof_sdw.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index a6d13aae8f720..cc82cbcc1611a 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -439,7 +439,9 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
DMI_MATCH(DMI_PRODUCT_NAME, "Rex"),
},
- .driver_data = (void *)(SOF_SDW_PCH_DMIC),
+ .driver_data = (void *)(SOF_SDW_PCH_DMIC |
+ SOF_BT_OFFLOAD_SSP(1) |
+ SOF_SSP_BT_OFFLOAD_PRESENT),
},
/* LunarLake devices */
{
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH AUTOSEL 6.4 17/31] ALSA: hda: intel-dsp-cfg: add LunarLake support
[not found] <20230908193201.3462957-1-sashal@kernel.org>
` (2 preceding siblings ...)
2023-09-08 19:31 ` [PATCH AUTOSEL 6.4 16/31] ASoC: Intel: sof_sdw: Update BT offload config for soundwire config Sasha Levin
@ 2023-09-08 19:31 ` Sasha Levin
2023-09-08 19:31 ` [PATCH AUTOSEL 6.4 30/31] ASoC: SOF: amd: clear panic mask status when panic occurs Sasha Levin
4 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2023-09-08 19:31 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Pierre-Louis Bossart, Ranjani Sridharan, Bard Liao, Takashi Iwai,
Sasha Levin, perex, tiwai, broonie, amadeuszx.slawinski,
muralidhar.reddy, bradynorander, alsa-devel
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
[ Upstream commit d2852b8c045ebd31d753b06f2810df5be30ed56a ]
One more PCI ID for the road.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230802150105.24604-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/hda/intel-dsp-config.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
index 317bdf6dcbef4..2873420c9aca8 100644
--- a/sound/hda/intel-dsp-config.c
+++ b/sound/hda/intel-dsp-config.c
@@ -481,6 +481,14 @@ static const struct config_entry config_table[] = {
},
#endif
+/* Lunar Lake */
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_LUNARLAKE)
+ /* Lunarlake-P */
+ {
+ .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .device = PCI_DEVICE_ID_INTEL_HDA_LNL_P,
+ },
+#endif
};
static const struct config_entry *snd_intel_dsp_find_config
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH AUTOSEL 6.4 30/31] ASoC: SOF: amd: clear panic mask status when panic occurs
[not found] <20230908193201.3462957-1-sashal@kernel.org>
` (3 preceding siblings ...)
2023-09-08 19:31 ` [PATCH AUTOSEL 6.4 17/31] ALSA: hda: intel-dsp-cfg: add LunarLake support Sasha Levin
@ 2023-09-08 19:31 ` Sasha Levin
4 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2023-09-08 19:31 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Vijendar Mukunda, Mark Brown, Sasha Levin, pierre-louis.bossart,
lgirdwood, peter.ujfalusi, yung-chuan.liao, ranjani.sridharan,
daniel.baluta, perex, tiwai, Vsujithkumar.Reddy, paul.olaru,
AjitKumar.Pandey, venkataprasad.potturu, sound-open-firmware,
alsa-devel
From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
[ Upstream commit 3d02e1c439b4140215b624d423aa3c7554b17a5a ]
Due to scratch memory persistence, Once the DSP panic is reported, need to
clear the panic mask after handling DSP panic. Otherwise, It results in DSP
panic on next reboot.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/sof/amd/acp-ipc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/sof/amd/acp-ipc.c b/sound/soc/sof/amd/acp-ipc.c
index 749e856dc6011..6951c67bc599f 100644
--- a/sound/soc/sof/amd/acp-ipc.c
+++ b/sound/soc/sof/amd/acp-ipc.c
@@ -161,6 +161,8 @@ irqreturn_t acp_sof_ipc_irq_thread(int irq, void *context)
if ((status & SOF_IPC_PANIC_MAGIC_MASK) == SOF_IPC_PANIC_MAGIC) {
snd_sof_dsp_panic(sdev, sdev->dsp_box.offset + sizeof(status),
true);
+ status = 0;
+ acp_mailbox_write(sdev, sdev->dsp_box.offset, &status, sizeof(status));
return IRQ_HANDLED;
}
snd_sof_ipc_msgs_rx(sdev);
@@ -190,6 +192,8 @@ irqreturn_t acp_sof_ipc_irq_thread(int irq, void *context)
acp_mailbox_read(sdev, sdev->debug_box.offset, &status, sizeof(u32));
if ((status & SOF_IPC_PANIC_MAGIC_MASK) == SOF_IPC_PANIC_MAGIC) {
snd_sof_dsp_panic(sdev, sdev->dsp_oops_offset, true);
+ status = 0;
+ acp_mailbox_write(sdev, sdev->debug_box.offset, &status, sizeof(status));
return IRQ_HANDLED;
}
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread