Attention is currently required from: Naveen M, Paul Menzel, Pranava Y N, Varun Upadhyay.
Karthik Ramasubramanian has posted comments on this change by Varun Upadhyay. ( https://review.coreboot.org/c/coreboot/+/85282?usp=email )
Change subject: drivers/soundwire/alc711: Add common Kconfig for ALC7xx soundwire codecs ......................................................................
Patch Set 8:
(2 comments)
File src/drivers/soundwire/alc711/alc711.c:
https://review.coreboot.org/c/coreboot/+/85282/comment/a3cbf0e1_100f5139?usp... : PS7, Line 110: config->alc711_address[dev->path.generic.id].version = SOUNDWIRE_VERSION_1_1; : config->alc711_address[dev->path.generic.id].class = MIPI_CLASS_NONE; : } else { : config->alc711_address[dev->path.generic.id].version = SOUNDWIRE_VERSION_1_2; : config->alc711_address[dev->path.generic.id].class = MIPI_CLASS_SDCA;
hi Karthik, […]
After incorporating the suggestions in https://review.coreboot.org/c/coreboot/+/85282/comment/775ae108_1417b21d/ and updating the adlrvp for ALC711, you can remove this code. That way you dont need any conditional code block in the future for any new SOUNDWIRE_VERSION.
File src/drivers/soundwire/alc711/chip.h:
https://review.coreboot.org/c/coreboot/+/85282/comment/672b4c84_20dee7ed?usp... : PS7, Line 13: [MAX_SNDW_LINKS]
hi Karthik, […]
Eventhough a platform can support multiple Soundwire links, only one is going to be enabled at any point in time based on the FW config. So you don't need 4 SNDW_LINKS here. One is good enough. Also the concerned chip driver here is Realtek codec specific and not platform specific. So please do not couple the codec driver with platform.
You can update the devicetree as follows:
``` device ref hda on chip drivers/intel/soundwire device generic 0 on chip drivers/soundwire/alc711 register "desc" = ""Headset Codec"" register "alc711_address.version" = "SOUNDWIRE_VERSION_1_2" register "alc711_address.class" = "MIPI_CLASS_SDCA" register "alc711_address.part_id" = "MIPI_DEV_ID_REALTEK_ALC722" # SoundWire Link 1 ID 1 device generic 1.1 on probe AUDIO AUDIO_ALC722_SNDW end end chip drivers/soundwire/alc711 register "desc" = ""Headset Codec"" register "alc711_address.version" = "SOUNDWIRE_VERSION_1_2" register "alc711_address.class" = "MIPI_CLASS_SDCA" register "alc711_address.part_id" = "MIPI_DEV_ID_REALTEK_ALC721" # SoundWire Link 3 ID 1 device generic 3.1 on probe AUDIO AUDIO_ALC721_SNDW end end end end ```
Please `#include <mipi/ids.h>` in this chip.h to include all the required preprocessor definitions eg. MIPI_DEV_ID_REALTEK_ALC721