Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.11 07/16] ASoC: tas2781: Add new driver version for tas2563 & tas2781 qfn chip
       [not found] <20241112103605.1652910-1-sashal@kernel.org>
@ 2024-11-12 10:35 ` Sasha Levin
  2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 11/16] ASoC: amd: yc: fix internal mic on Xiaomi Book Pro 14 2022 Sasha Levin
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-11-12 10:35 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Shenghao Ding, Mark Brown, Sasha Levin, kevin-lu, baojun.xu,
	lgirdwood, perex, tiwai, alsa-devel, linux-sound

From: Shenghao Ding <shenghao-ding@ti.com>

[ Upstream commit fe09de2db2365eed8b44b572cff7d421eaf1754a ]

Add new driver version to support tas2563 & tas2781 qfn chip

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20241104100055.48-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/codecs/tas2781-fmwlib.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/tas2781-fmwlib.c b/sound/soc/codecs/tas2781-fmwlib.c
index f3a7605f07104..6474cc551d551 100644
--- a/sound/soc/codecs/tas2781-fmwlib.c
+++ b/sound/soc/codecs/tas2781-fmwlib.c
@@ -1992,6 +1992,7 @@ static int tasdevice_dspfw_ready(const struct firmware *fmw,
 		break;
 	case 0x202:
 	case 0x400:
+	case 0x401:
 		tas_priv->fw_parse_variable_header =
 			fw_parse_variable_header_git;
 		tas_priv->fw_parse_program_data =
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 6.11 11/16] ASoC: amd: yc: fix internal mic on Xiaomi Book Pro 14 2022
       [not found] <20241112103605.1652910-1-sashal@kernel.org>
  2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 07/16] ASoC: tas2781: Add new driver version for tas2563 & tas2781 qfn chip Sasha Levin
@ 2024-11-12 10:35 ` Sasha Levin
  2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 12/16] ASoC: amd: yc: Support dmic on another model of Lenovo Thinkpad E14 Gen 6 Sasha Levin
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-11-12 10:35 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Mingcong Bai, Mark Brown, Sasha Levin, lgirdwood, perex, tiwai,
	mario.limonciello, end.to.start, me, linux-sound

From: Mingcong Bai <jeffbai@aosc.io>

[ Upstream commit de156f3cf70e17dc6ff4c3c364bb97a6db961ffd ]

Xiaomi Book Pro 14 2022 (MIA2210-AD) requires a quirk entry for its
internal microphone to be enabled.

This is likely due to similar reasons as seen previously on Redmi Book
14/15 Pro 2022 models (since they likely came with similar firmware):

- commit dcff8b7ca92d ("ASoC: amd: yc: Add Xiaomi Redmi Book Pro 15 2022
  into DMI table")
- commit c1dd6bf61997 ("ASoC: amd: yc: Add Xiaomi Redmi Book Pro 14 2022
  into DMI table")

A quirk would likely be needed for Xiaomi Book Pro 15 2022 models, too.
However, I do not have such device on hand so I will leave it for now.

Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
Link: https://patch.msgid.link/20241106024052.15748-1-jeffbai@aosc.io
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 ace6328e91e31..601785ee2f0b8 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -381,6 +381,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Redmi Book Pro 15 2022"),
 		}
 	},
+	{
+		.driver_data = &acp6x_card,
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "TIMI"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Xiaomi Book Pro 14 2022"),
+		}
+	},
 	{
 		.driver_data = &acp6x_card,
 		.matches = {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 6.11 12/16] ASoC: amd: yc: Support dmic on another model of Lenovo Thinkpad E14 Gen 6
       [not found] <20241112103605.1652910-1-sashal@kernel.org>
  2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 07/16] ASoC: tas2781: Add new driver version for tas2563 & tas2781 qfn chip Sasha Levin
  2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 11/16] ASoC: amd: yc: fix internal mic on Xiaomi Book Pro 14 2022 Sasha Levin
@ 2024-11-12 10:35 ` Sasha Levin
  2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 13/16] ASoC: stm: Prevent potential division by zero in stm32_sai_mclk_round_rate() Sasha Levin
  2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 14/16] ASoC: stm: Prevent potential division by zero in stm32_sai_get_clk_div() Sasha Levin
  4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-11-12 10:35 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Markus Petri, Mark Brown, Sasha Levin, lgirdwood, perex, tiwai,
	mario.limonciello, end.to.start, me, linux-sound

From: Markus Petri <mp@mpetri.org>

[ Upstream commit 8c21e40e1e481f7fef6e570089e317068b972c45 ]

Another model of Thinkpad E14 Gen 6 (21M4)
needs a quirk entry for the dmic to be detected.

Signed-off-by: Markus Petri <mp@mpetri.org>
Link: https://patch.msgid.link/20241107094020.1050935-1-mp@localhost
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 601785ee2f0b8..167b007865a6c 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -227,6 +227,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "21M3"),
 		}
 	},
+	{
+		.driver_data = &acp6x_card,
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "21M4"),
+		}
+	},
 	{
 		.driver_data = &acp6x_card,
 		.matches = {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 6.11 13/16] ASoC: stm: Prevent potential division by zero in stm32_sai_mclk_round_rate()
       [not found] <20241112103605.1652910-1-sashal@kernel.org>
                   ` (2 preceding siblings ...)
  2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 12/16] ASoC: amd: yc: Support dmic on another model of Lenovo Thinkpad E14 Gen 6 Sasha Levin
@ 2024-11-12 10:35 ` Sasha Levin
  2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 14/16] ASoC: stm: Prevent potential division by zero in stm32_sai_get_clk_div() Sasha Levin
  4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-11-12 10:35 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Luo Yifan, Mark Brown, Sasha Levin, olivier.moysan,
	arnaud.pouliquen, lgirdwood, perex, tiwai, mcoquelin.stm32,
	alexandre.torgue, alsa-devel, linux-sound, linux-stm32,
	linux-arm-kernel

From: Luo Yifan <luoyifan@cmss.chinamobile.com>

[ Upstream commit 63c1c87993e0e5bb11bced3d8224446a2bc62338 ]

This patch checks if div is less than or equal to zero (div <= 0). If
div is zero or negative, the function returns -EINVAL, ensuring the
division operation (*prate / div) is safe to perform.

Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
Link: https://patch.msgid.link/20241106014654.206860-1-luoyifan@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/stm/stm32_sai_sub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index ad2492efb1cdc..19307812ec765 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -378,8 +378,8 @@ static long stm32_sai_mclk_round_rate(struct clk_hw *hw, unsigned long rate,
 	int div;
 
 	div = stm32_sai_get_clk_div(sai, *prate, rate);
-	if (div < 0)
-		return div;
+	if (div <= 0)
+		return -EINVAL;
 
 	mclk->freq = *prate / div;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 6.11 14/16] ASoC: stm: Prevent potential division by zero in stm32_sai_get_clk_div()
       [not found] <20241112103605.1652910-1-sashal@kernel.org>
                   ` (3 preceding siblings ...)
  2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 13/16] ASoC: stm: Prevent potential division by zero in stm32_sai_mclk_round_rate() Sasha Levin
@ 2024-11-12 10:35 ` Sasha Levin
  4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-11-12 10:35 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Luo Yifan, Olivier Moysan, Mark Brown, Sasha Levin,
	arnaud.pouliquen, lgirdwood, perex, tiwai, mcoquelin.stm32,
	alexandre.torgue, alsa-devel, linux-sound, linux-stm32,
	linux-arm-kernel

From: Luo Yifan <luoyifan@cmss.chinamobile.com>

[ Upstream commit 23569c8b314925bdb70dd1a7b63cfe6100868315 ]

This patch checks if div is less than or equal to zero (div <= 0). If
div is zero or negative, the function returns -EINVAL, ensuring the
division operation is safe to perform.

Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
Reviewed-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://patch.msgid.link/20241107015936.211902-1-luoyifan@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/stm/stm32_sai_sub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index 19307812ec765..64f52c75e2aa8 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -317,7 +317,7 @@ static int stm32_sai_get_clk_div(struct stm32_sai_sub_data *sai,
 	int div;
 
 	div = DIV_ROUND_CLOSEST(input_rate, output_rate);
-	if (div > SAI_XCR1_MCKDIV_MAX(version)) {
+	if (div > SAI_XCR1_MCKDIV_MAX(version) || div <= 0) {
 		dev_err(&sai->pdev->dev, "Divider %d out of range\n", div);
 		return -EINVAL;
 	}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-12 10:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20241112103605.1652910-1-sashal@kernel.org>
2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 07/16] ASoC: tas2781: Add new driver version for tas2563 & tas2781 qfn chip Sasha Levin
2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 11/16] ASoC: amd: yc: fix internal mic on Xiaomi Book Pro 14 2022 Sasha Levin
2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 12/16] ASoC: amd: yc: Support dmic on another model of Lenovo Thinkpad E14 Gen 6 Sasha Levin
2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 13/16] ASoC: stm: Prevent potential division by zero in stm32_sai_mclk_round_rate() Sasha Levin
2024-11-12 10:35 ` [PATCH AUTOSEL 6.11 14/16] ASoC: stm: Prevent potential division by zero in stm32_sai_get_clk_div() Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox