Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.6 01/12] ALSA: hda: cs35l56: Fix lifecycle of codec pointer
@ 2024-07-01  0:13 Sasha Levin
  2024-07-01  0:13 ` [PATCH AUTOSEL 6.6 03/12] ALSA: hda/realtek: Support Lenovo Thinkbook 16P Gen 5 Sasha Levin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Sasha Levin @ 2024-07-01  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Simon Trimmer, Takashi Iwai, Sasha Levin, david.rhodes, rf, perex,
	tiwai, alsa-devel, patches, linux-sound

From: Simon Trimmer <simont@opensource.cirrus.com>

[ Upstream commit d339131bf02d4ed918415574082caf5e8af6e664 ]

The codec should be cleared when the amp driver is unbound and when
resuming it should be tested to prevent loading firmware into the device
and ALSA in a partially configured system state.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240531112716.25323-1-simont@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/pci/hda/cs35l56_hda.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
index 15e20d9261393..77e8da7dffc6a 100644
--- a/sound/pci/hda/cs35l56_hda.c
+++ b/sound/pci/hda/cs35l56_hda.c
@@ -702,6 +702,8 @@ static void cs35l56_hda_unbind(struct device *dev, struct device *master, void *
 	if (comps[cs35l56->index].dev == dev)
 		memset(&comps[cs35l56->index], 0, sizeof(*comps));
 
+	cs35l56->codec = NULL;
+
 	dev_dbg(cs35l56->base.dev, "Unbound\n");
 }
 
@@ -807,6 +809,9 @@ static int cs35l56_hda_system_resume(struct device *dev)
 
 	cs35l56->suspended = false;
 
+	if (!cs35l56->codec)
+		return 0;
+
 	ret = cs35l56_is_fw_reload_needed(&cs35l56->base);
 	dev_dbg(cs35l56->base.dev, "fw_reload_needed: %d\n", ret);
 	if (ret > 0) {
-- 
2.43.0


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

* [PATCH AUTOSEL 6.6 03/12] ALSA: hda/realtek: Support Lenovo Thinkbook 16P Gen 5
  2024-07-01  0:13 [PATCH AUTOSEL 6.6 01/12] ALSA: hda: cs35l56: Fix lifecycle of codec pointer Sasha Levin
@ 2024-07-01  0:13 ` Sasha Levin
  2024-07-01  0:13 ` [PATCH AUTOSEL 6.6 06/12] ALSA: hda/realtek: Add more codec ID to no shutup pins list Sasha Levin
  2024-07-01  0:13 ` [PATCH AUTOSEL 6.6 11/12] ALSA: hda: cs35l56: Select SERIAL_MULTI_INSTANTIATE Sasha Levin
  2 siblings, 0 replies; 6+ messages in thread
From: Sasha Levin @ 2024-07-01  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Stefan Binding, Takashi Iwai, Sasha Levin, perex, tiwai, kailang,
	luke, shenghao-ding, simont, foss, rf, linux-sound

From: Stefan Binding <sbinding@opensource.cirrus.com>

[ Upstream commit 75f2ea939b5c694b36aad8ef823a2f9bcf7b3d7d ]

Add support for this laptop, which uses CS35L41 HDA amps.
The laptop does not contain valid _DSD for these amps, so requires
entries into the CS35L41 configuration table to function correctly.

[ fixed to lower hex numbers in quirk entries -- tiwai ]

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240606130351.333495-4-sbinding@opensource.cirrus.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/pci/hda/patch_realtek.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 2151fb1bd0de7..97df0b01b211c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10275,6 +10275,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x17aa, 0x38cd, "Y790 VECO DUAL", ALC287_FIXUP_TAS2781_I2C),
 	SND_PCI_QUIRK(0x17aa, 0x38d2, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN),
 	SND_PCI_QUIRK(0x17aa, 0x38d7, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN),
+	SND_PCI_QUIRK(0x17aa, 0x38f9, "Thinkbook 16P Gen5", ALC287_FIXUP_CS35L41_I2C_2),
+	SND_PCI_QUIRK(0x17aa, 0x38fa, "Thinkbook 16P Gen5", ALC287_FIXUP_CS35L41_I2C_2),
 	SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
 	SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
 	SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
-- 
2.43.0


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

* [PATCH AUTOSEL 6.6 06/12] ALSA: hda/realtek: Add more codec ID to no shutup pins list
  2024-07-01  0:13 [PATCH AUTOSEL 6.6 01/12] ALSA: hda: cs35l56: Fix lifecycle of codec pointer Sasha Levin
  2024-07-01  0:13 ` [PATCH AUTOSEL 6.6 03/12] ALSA: hda/realtek: Support Lenovo Thinkbook 16P Gen 5 Sasha Levin
@ 2024-07-01  0:13 ` Sasha Levin
  2024-07-01  0:13 ` [PATCH AUTOSEL 6.6 11/12] ALSA: hda: cs35l56: Select SERIAL_MULTI_INSTANTIATE Sasha Levin
  2 siblings, 0 replies; 6+ messages in thread
From: Sasha Levin @ 2024-07-01  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Kailang Yang, Takashi Iwai, Sasha Levin, perex, tiwai, sbinding,
	luke, shenghao-ding, simont, foss, rf, linux-sound

From: Kailang Yang <kailang@realtek.com>

[ Upstream commit 70794b9563fe011988bcf6a081af9777e63e8d37 ]

If it enter to runtime D3 state, it didn't shutup Headset MIC pin.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/8d86f61e7d6f4a03b311e4eb4e5caaef@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/pci/hda/patch_realtek.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 97df0b01b211c..882ac9dba97c0 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -585,10 +585,14 @@ static void alc_shutup_pins(struct hda_codec *codec)
 	switch (codec->core.vendor_id) {
 	case 0x10ec0236:
 	case 0x10ec0256:
+	case 0x10ec0257:
 	case 0x19e58326:
 	case 0x10ec0283:
+	case 0x10ec0285:
 	case 0x10ec0286:
+	case 0x10ec0287:
 	case 0x10ec0288:
+	case 0x10ec0295:
 	case 0x10ec0298:
 		alc_headset_mic_no_shutup(codec);
 		break;
-- 
2.43.0


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

* [PATCH AUTOSEL 6.6 11/12] ALSA: hda: cs35l56: Select SERIAL_MULTI_INSTANTIATE
  2024-07-01  0:13 [PATCH AUTOSEL 6.6 01/12] ALSA: hda: cs35l56: Fix lifecycle of codec pointer Sasha Levin
  2024-07-01  0:13 ` [PATCH AUTOSEL 6.6 03/12] ALSA: hda/realtek: Support Lenovo Thinkbook 16P Gen 5 Sasha Levin
  2024-07-01  0:13 ` [PATCH AUTOSEL 6.6 06/12] ALSA: hda/realtek: Add more codec ID to no shutup pins list Sasha Levin
@ 2024-07-01  0:13 ` Sasha Levin
  2024-07-01  7:13   ` Takashi Iwai
  2 siblings, 1 reply; 6+ messages in thread
From: Sasha Levin @ 2024-07-01  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Simon Trimmer, Takashi Iwai, Sasha Levin, perex, tiwai, rf,
	broonie, shenghao-ding, sbinding, lukas.bulwahn, linux-sound

From: Simon Trimmer <simont@opensource.cirrus.com>

[ Upstream commit 9b1effff19cdf2230d3ecb07ff4038a0da32e9cc ]

The ACPI IDs used in the CS35L56 HDA drivers are all handled by the
serial multi-instantiate driver which starts multiple Linux device
instances from a single ACPI Device() node.

As serial multi-instantiate is not an optional part of the system add it
as a dependency in Kconfig so that it is not overlooked.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/20240619161602.117452-1-simont@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/pci/hda/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig
index 21046f72cdca9..f8ef87a30cab2 100644
--- a/sound/pci/hda/Kconfig
+++ b/sound/pci/hda/Kconfig
@@ -141,6 +141,7 @@ config SND_HDA_SCODEC_CS35L56_I2C
 	depends on ACPI || COMPILE_TEST
 	depends on SND_SOC
 	select FW_CS_DSP
+	select SERIAL_MULTI_INSTANTIATE
 	select SND_HDA_GENERIC
 	select SND_SOC_CS35L56_SHARED
 	select SND_HDA_SCODEC_CS35L56
@@ -155,6 +156,7 @@ config SND_HDA_SCODEC_CS35L56_SPI
 	depends on ACPI || COMPILE_TEST
 	depends on SND_SOC
 	select FW_CS_DSP
+	select SERIAL_MULTI_INSTANTIATE
 	select SND_HDA_GENERIC
 	select SND_SOC_CS35L56_SHARED
 	select SND_HDA_SCODEC_CS35L56
-- 
2.43.0


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

* Re: [PATCH AUTOSEL 6.6 11/12] ALSA: hda: cs35l56: Select SERIAL_MULTI_INSTANTIATE
  2024-07-01  0:13 ` [PATCH AUTOSEL 6.6 11/12] ALSA: hda: cs35l56: Select SERIAL_MULTI_INSTANTIATE Sasha Levin
@ 2024-07-01  7:13   ` Takashi Iwai
  2024-07-22 12:50     ` Sasha Levin
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2024-07-01  7:13 UTC (permalink / raw)
  To: Sasha Levin
  Cc: linux-kernel, stable, Simon Trimmer, Takashi Iwai, perex, tiwai,
	rf, broonie, shenghao-ding, sbinding, lukas.bulwahn, linux-sound

On Mon, 01 Jul 2024 02:13:30 +0200,
Sasha Levin wrote:
> 
> From: Simon Trimmer <simont@opensource.cirrus.com>
> 
> [ Upstream commit 9b1effff19cdf2230d3ecb07ff4038a0da32e9cc ]
> 
> The ACPI IDs used in the CS35L56 HDA drivers are all handled by the
> serial multi-instantiate driver which starts multiple Linux device
> instances from a single ACPI Device() node.
> 
> As serial multi-instantiate is not an optional part of the system add it
> as a dependency in Kconfig so that it is not overlooked.
> 
> Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
> Link: https://lore.kernel.org/20240619161602.117452-1-simont@opensource.cirrus.com
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> Signed-off-by: Sasha Levin <sashal@kernel.org>

This change breaks random builds, so please pick up a follow-up fix
17563b4a19d1844bdbccc7a82d2f31c28ca9cfae
    ALSA: hda: Use imply for suggesting CONFIG_SERIAL_MULTI_INSTANTIATE
too.


thanks,

Takashi

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

* Re: [PATCH AUTOSEL 6.6 11/12] ALSA: hda: cs35l56: Select SERIAL_MULTI_INSTANTIATE
  2024-07-01  7:13   ` Takashi Iwai
@ 2024-07-22 12:50     ` Sasha Levin
  0 siblings, 0 replies; 6+ messages in thread
From: Sasha Levin @ 2024-07-22 12:50 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: linux-kernel, stable, Simon Trimmer, perex, tiwai, rf, broonie,
	shenghao-ding, sbinding, lukas.bulwahn, linux-sound

On Mon, Jul 01, 2024 at 09:13:41AM +0200, Takashi Iwai wrote:
>On Mon, 01 Jul 2024 02:13:30 +0200,
>Sasha Levin wrote:
>>
>> From: Simon Trimmer <simont@opensource.cirrus.com>
>>
>> [ Upstream commit 9b1effff19cdf2230d3ecb07ff4038a0da32e9cc ]
>>
>> The ACPI IDs used in the CS35L56 HDA drivers are all handled by the
>> serial multi-instantiate driver which starts multiple Linux device
>> instances from a single ACPI Device() node.
>>
>> As serial multi-instantiate is not an optional part of the system add it
>> as a dependency in Kconfig so that it is not overlooked.
>>
>> Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
>> Link: https://lore.kernel.org/20240619161602.117452-1-simont@opensource.cirrus.com
>> Signed-off-by: Takashi Iwai <tiwai@suse.de>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>This change breaks random builds, so please pick up a follow-up fix
>17563b4a19d1844bdbccc7a82d2f31c28ca9cfae
>    ALSA: hda: Use imply for suggesting CONFIG_SERIAL_MULTI_INSTANTIATE
>too.

Will do.

-- 
Thanks,
Sasha

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

end of thread, other threads:[~2024-07-22 12:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-01  0:13 [PATCH AUTOSEL 6.6 01/12] ALSA: hda: cs35l56: Fix lifecycle of codec pointer Sasha Levin
2024-07-01  0:13 ` [PATCH AUTOSEL 6.6 03/12] ALSA: hda/realtek: Support Lenovo Thinkbook 16P Gen 5 Sasha Levin
2024-07-01  0:13 ` [PATCH AUTOSEL 6.6 06/12] ALSA: hda/realtek: Add more codec ID to no shutup pins list Sasha Levin
2024-07-01  0:13 ` [PATCH AUTOSEL 6.6 11/12] ALSA: hda: cs35l56: Select SERIAL_MULTI_INSTANTIATE Sasha Levin
2024-07-01  7:13   ` Takashi Iwai
2024-07-22 12:50     ` Sasha Levin

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