From 6c3fed5bf495c0969adb311f6cd2acd88dc2d8bc Mon Sep 17 00:00:00 2001 From: Anil Kumar Date: Fri, 2 Feb 2024 16:50:16 -0800 Subject: drivers/soundwire: Support Realtek ALC722 codec This patch adds SoundWire driver to support ALC722 audio codec. The existing ALC711 codec driver is refactored to include support for ALC722 device based on config flag. The ACPI address for the codec is calculated with the information in the codec driver combined with the devicetree.cb hierarchy where the link and unique IDs are extracted from the device path. For example this device is connected to master link ID 0 and has strap settings configuring it for unique ID 1: chip drivers/soundwire/alc711 register "desc" = ""Headset Codec"" device generic 0.1 on end end reference datasheet: Realtek ALC722-CG ver. 0.56 TEST=This driver was tested on Intel RVP with on board ALC722 codec by booting and disassembling the runtime SSDT to ensure that the devices have the expected address and properties. Test soundcard binding works and devices are detected and check for audio playback using speaker output. Signed-off-by: Anil Kumar Change-Id: Ieb16a1c6f3a79321fdc35987468daa8be33b6e49 Reviewed-on: https://review.coreboot.org/c/coreboot/+/81920 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik --- src/drivers/soundwire/alc711/Kconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/drivers/soundwire/alc711/Kconfig') diff --git a/src/drivers/soundwire/alc711/Kconfig b/src/drivers/soundwire/alc711/Kconfig index 0d96fa96bb..96ed819d7f 100644 --- a/src/drivers/soundwire/alc711/Kconfig +++ b/src/drivers/soundwire/alc711/Kconfig @@ -1,4 +1,18 @@ ## SPDX-License-Identifier: GPL-2.0-only +config DRIVERS_SOUNDWIRE_ALC_BASE_7XX + bool + help + Base code for Realtek ALC7xxx Codec SoundWire driver. + config DRIVERS_SOUNDWIRE_ALC711 bool + select DRIVERS_SOUNDWIRE_ALC_BASE_7XX + help + SoundWire driver for Realtek ALC711 device + +config DRIVERS_SOUNDWIRE_ALC722 + bool + select DRIVERS_SOUNDWIRE_ALC_BASE_7XX + help + SoundWire driver for Realtek ALC722 device -- cgit v1.2.3