Skip to contentSkip to conversation

ALSA: hda: Use imply for suggesting CONFIG_SERIAL_MULTI_INSTANTIATE

PATCH In review Takashi Iwai 2 participants 4 messages Jun 21, 2024 – Jun 24, 2024 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda: Use imply for suggesting CONFIG_SERIAL_MULTI_INSTANTIATE

The recent fix introduced a reverse selection of CONFIG_SERIAL_MULTI_INSTANTIATE, but its condition isn't always met. Use a weak reverse selection to suggest the config for avoiding such inconsistencies, instead.

---
 sound/pci/hda/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/hda/Kconfig +2 -2
index e59df40a0007..a3cf0725fc43 100644
@@ -162,7 +162,7 @@ config SND_HDA_SCODEC_CS35L56_I2C
 	depends on ACPI || COMPILE_TEST
 	depends on SND_SOC
 	select FW_CS_DSP
-	select SERIAL_MULTI_INSTANTIATE
+	imply SERIAL_MULTI_INSTANTIATE
 	select SND_HDA_GENERIC
 	select SND_SOC_CS35L56_SHARED
 	select SND_HDA_SCODEC_CS35L56
@@ -179,7 +179,7 @@ config SND_HDA_SCODEC_CS35L56_SPI
 	depends on ACPI || COMPILE_TEST
 	depends on SND_SOC
 	select FW_CS_DSP
-	select SERIAL_MULTI_INSTANTIATE
+	imply SERIAL_MULTI_INSTANTIATE
 	select SND_HDA_GENERIC
 	select SND_SOC_CS35L56_SHARED
 	select SND_HDA_SCODEC_CS35L56
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 28 lines · Takashi Iwai

The recent fix introduced a reverse selection of CONFIG_SERIAL_MULTI_INSTANTIATE, but its condition isn't always met. Use a weak reverse selection to suggest the config for avoiding such inconsistencies, instead.

---
  sound/pci/hda/Kconfig | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/hda/Kconfig +1 -1
index e59df40a0007..a3cf0725fc43 100644
@@ -162,7 +162,7 @@ config SND_HDA_SCODEC_CS35L56_I2C
  	depends on ACPI || COMPILE_TEST
  	depends on SND_SOC
  	select FW_CS_DSP
-	select SERIAL_MULTI_INSTANTIATE
+	imply SERIAL_MULTI_INSTANTIATE
  	select SND_HDA_GENERIC
  	select SND_SOC_CS35L56_SHARED
  	select SND_HDA_SCODEC_CS35L56

sound/pci/hda/Kconfig config SND_HDA_SCODEC_CS35L56_SPI · line 185

Quoted 8 lines
sound/pci/hda/Kconfig +1 -1
@@ -179,7 +179,7 @@ config SND_HDA_SCODEC_CS35L56_SPI
  	depends on ACPI || COMPILE_TEST
  	depends on SND_SOC
  	select FW_CS_DSP
-	select SERIAL_MULTI_INSTANTIATE
+	imply SERIAL_MULTI_INSTANTIATE
  	select SND_HDA_GENERIC
  	select SND_SOC_CS35L56_SHARED
  	select SND_HDA_SCODEC_CS35L56

Sorry about that. Thanks for fixing.

(Though I think this points at a bug in serial-multi-instantiate dependencies. When SPI support was added it was made mandatory to have both I2C AND SPI. But you shouldn't need to build in a subsystem if you don't have any devices of that type.)

#2 lore raw
Quoted 39 lines · Richard Fitzgerald
Quoted 28 lines · Takashi Iwai

The recent fix introduced a reverse selection of CONFIG_SERIAL_MULTI_INSTANTIATE, but its condition isn't always met. Use a weak reverse selection to suggest the config for avoiding such inconsistencies, instead.

---
  sound/pci/hda/Kconfig | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/hda/Kconfig +1 -1
index e59df40a0007..a3cf0725fc43 100644
@@ -162,7 +162,7 @@ config SND_HDA_SCODEC_CS35L56_I2C
  	depends on ACPI || COMPILE_TEST
  	depends on SND_SOC
  	select FW_CS_DSP
-	select SERIAL_MULTI_INSTANTIATE
+	imply SERIAL_MULTI_INSTANTIATE
  	select SND_HDA_GENERIC
  	select SND_SOC_CS35L56_SHARED
  	select SND_HDA_SCODEC_CS35L56

sound/pci/hda/Kconfig config SND_HDA_SCODEC_CS35L56_SPI · line 185

Quoted 8 lines
sound/pci/hda/Kconfig +1 -1
@@ -179,7 +179,7 @@ config SND_HDA_SCODEC_CS35L56_SPI
  	depends on ACPI || COMPILE_TEST
  	depends on SND_SOC
  	select FW_CS_DSP
-	select SERIAL_MULTI_INSTANTIATE
+	imply SERIAL_MULTI_INSTANTIATE
  	select SND_HDA_GENERIC
  	select SND_SOC_CS35L56_SHARED
  	select SND_HDA_SCODEC_CS35L56

Sorry about that. Thanks for fixing.

Quoted 6 lines

(Though I think this points at a bug in serial-multi-instantiate dependencies. When SPI support was added it was made mandatory to have both I2C AND SPI. But you shouldn't need to build in a subsystem if you don't have any devices of that type.)

Yeah, the condition there could be relaxed, I suppose.

But the use of imply isn't bad for a case like this, so let's go forward with this fix.

thanks,

Takashi

#3 lore raw
Quoted 48 lines · Takashi Iwai
Quoted 39 lines · Richard Fitzgerald
Quoted 28 lines · Takashi Iwai

The recent fix introduced a reverse selection of CONFIG_SERIAL_MULTI_INSTANTIATE, but its condition isn't always met. Use a weak reverse selection to suggest the config for avoiding such inconsistencies, instead.

---
   sound/pci/hda/Kconfig | 4 ++--
   1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/hda/Kconfig +1 -1
index e59df40a0007..a3cf0725fc43 100644
@@ -162,7 +162,7 @@ config SND_HDA_SCODEC_CS35L56_I2C
   	depends on ACPI || COMPILE_TEST
   	depends on SND_SOC
   	select FW_CS_DSP
-	select SERIAL_MULTI_INSTANTIATE
+	imply SERIAL_MULTI_INSTANTIATE
   	select SND_HDA_GENERIC
   	select SND_SOC_CS35L56_SHARED
   	select SND_HDA_SCODEC_CS35L56

sound/pci/hda/Kconfig config SND_HDA_SCODEC_CS35L56_SPI · line 185

Quoted 8 lines
sound/pci/hda/Kconfig +1 -1
@@ -179,7 +179,7 @@ config SND_HDA_SCODEC_CS35L56_SPI
   	depends on ACPI || COMPILE_TEST
   	depends on SND_SOC
   	select FW_CS_DSP
-	select SERIAL_MULTI_INSTANTIATE
+	imply SERIAL_MULTI_INSTANTIATE
   	select SND_HDA_GENERIC
   	select SND_SOC_CS35L56_SHARED
   	select SND_HDA_SCODEC_CS35L56

Sorry about that. Thanks for fixing.

Quoted 6 lines

(Though I think this points at a bug in serial-multi-instantiate dependencies. When SPI support was added it was made mandatory to have both I2C AND SPI. But you shouldn't need to build in a subsystem if you don't have any devices of that type.)

Quoted 5 lines

Yeah, the condition there could be relaxed, I suppose.

But the use of imply isn't bad for a case like this, so let's go forward with this fix.

Agreed.

Quoted 4 lines

thanks,

Takashi