Add ASoC machine driver support for the RT766 and RT767 codecs.
Subsystems (4)
v2 cover Add ASoC machine driver support for the RT766 and RT767 codecs.
This series adds the required codec information and codec-specific DAPM routes, enables wake capability on Intel platforms, and avoids re-initializing blind writes.
The series includes:
Add RT766 and RT767 to the SoundWire wake-capable codec list. Add RT766 and RT767 codec information to sdw_utils. Add support for codec versions 3 and 4.
Add the RT766 speaker and headset DAPM routes. Avoid re-initializing blind writes.
With these changes, the generic SoundWire machine driver can recognize the RT766/RT767 codecs and set up the corresponding ASoC DAI links and codec routes.
---
Changes in v2:
- use b4 command to send this series and add a cover letter
---
Shuming Fan (3):
soundwire: intel_auxdevice: add rt766/rt767 codec to wake_capable_list
ASoC: sdw_utils: Add rt766/rt767 support
ASoC: rt766: avoid re-initialize the blind write
drivers/soundwire/intel_auxdevice.c | 2 + sound/soc/codecs/rt766-sdca.c | 2 +- sound/soc/sdw_utils/soc_sdw_rt_mf_sdca.c | 6 + sound/soc/sdw_utils/soc_sdw_rt_sdca_jack_common.c | 8 + sound/soc/sdw_utils/soc_sdw_utils.c | 172 ++++++++++++++++++++++ 5 files changed, 189 insertions(+), 1 deletion(-)
---
base-commit: 782424a17d77ae6de07b490618b523066c528f59
change-id: 20260924-rt766-e20c3019ad0f
Best regards,
Signature · 1 line
Shuming Fan <[email protected]>
PATCH v2 1/3 soundwire: intel_auxdevice: add rt766/rt767 codec to wake_capable_list
rt766/rt767 have wake capability. Add it to the wake_capable_list.
--- drivers/soundwire/intel_auxdevice.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/soundwire/intel_auxdevice.c +2 -0
@@ -73,6 +73,8 @@ static struct wake_capable_part wake_capable_list[] = { {0x025d, 0x717}, {0x025d, 0x721}, {0x025d, 0x722}, + {0x025d, 0x766}, + {0x025d, 0x767}, {0x04b3, 0x9356}, };
Signature · 1 line
2.55.0
PATCH v2 2/3 ASoC: sdw_utils: Add rt766/rt767 support
In reply to Shuming FanThis patch adds the codec_info and route-related settings.
--- sound/soc/sdw_utils/soc_sdw_rt_mf_sdca.c | 6 + sound/soc/sdw_utils/soc_sdw_rt_sdca_jack_common.c | 8 + sound/soc/sdw_utils/soc_sdw_utils.c | 172 ++++++++++++++++++++++ 3 files changed, 186 insertions(+)
sound/soc/sdw_utils/soc_sdw_rt_mf_sdca.c +6 -0
@@ -33,6 +33,11 @@ static const struct snd_soc_dapm_route rt722_spk_map[] = { { "Speaker", NULL, "rt722 SPK" }, }; +static const struct snd_soc_dapm_route rt766_spk_map[] = { + {"Speaker" ,NULL ,"rt766 SPOL" }, + {"Speaker" ,NULL ,"rt766 SPOR" }, +}; +/* Structure to map codec names to respective route arrays and sizes */ struct codec_route_map { const char *codec_name;
@@ -45,6 +50,7 @@ static const struct codec_route_map codec_routes[] = { { "rt712", rt712_spk_map, ARRAY_SIZE(rt712_spk_map) }, { "rt721", rt721_spk_map, ARRAY_SIZE(rt721_spk_map) }, { "rt722", rt722_spk_map, ARRAY_SIZE(rt722_spk_map) }, + { "rt766", rt766_spk_map, ARRAY_SIZE(rt766_spk_map) }, };static const struct codec_route_map *get_codec_route_map (const char *codec_name)
sound/soc/sdw_utils/soc_sdw_rt_sdca_jack_common.c +8 -0
@@ -70,6 +70,11 @@ static const struct snd_soc_dapm_route rt722_sdca_map[] = { { "rt722 MIC2", NULL, "Headset Mic" }, }; +static const struct snd_soc_dapm_route rt766_sdca_map[] = { + { "Headphone", NULL, "rt766 HP" }, + { "rt766 MIC2", NULL, "Headset Mic" }, +}; + static struct snd_soc_jack_pin rt_sdca_jack_pins[] = { { .pin = "Headphone",
@@ -133,6 +138,9 @@ int asoc_sdw_rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_s }else if (strstr (component->name_prefix,"rt722" )) { ret =snd_soc_dapm_add_routes (dapm, rt722_sdca_map,ARRAY_SIZE (rt722_sdca_map)); + }else if (strstr (component->name_prefix,"rt766" )) { + ret =snd_soc_dapm_add_routes (dapm, rt766_sdca_map, +ARRAY_SIZE (rt766_sdca_map)); }else {dev_err (card->dev,"%s is not supported\n" , component->name_prefix);return -EINVAL ;
sound/soc/sdw_utils/soc_sdw_utils.c +172 -0
178 lines not on this page · raw message
Signature · 1 line
2.55.0
PATCH v2 3/3 ASoC: rt766: avoid re-initialize the blind write
In reply to Shuming FanWe only need to check the function_status to determine whether the system has undergone a cold or warm reboot.
--- sound/soc/codecs/rt766-sdca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rt766-sdca.c +1 -1
@@ -1297,7 +1297,7 @@ static int rt766_func_initialize(struct rt766_sdca_priv *rt766, struct sdca_funcregmap_read (rt766->regmap, func_status_reg, &func_status);dev_dbg (dev,"%s, %s func_status=0x%x\n" , __func__, func_data->desc->name, func_status); -if ((func_status &SDCA_CTL_ENTITY_0_FUNCTION_NEEDS_INITIALIZATION ) || (!rt766->first_hw_init)) { +if ((func_status &SDCA_CTL_ENTITY_0_FUNCTION_NEEDS_INITIALIZATION )) { ret =sdca_regmap_write_init (dev, rt766->regmap, func_data);if (ret) {dev_err (dev,"%s initialization table update failed\n" , func_data->desc->name);
Signature · 1 line
2.55.0
Mark Brown
maintainerRe: (subset) [PATCH v2 0/3] Add ASoC machine driver support for the RT766 and RT767 codecs.
In reply to Shuming FanQuoted 8 lines · Shuming Fan
Add ASoC machine driver support for the RT766 and RT767 codecs.
This series adds the required codec information and codec-specific DAPM routes, enables wake capability on Intel platforms, and avoids re-initializing blind writes.
The series includes:
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4
Thanks!
[2/3] ASoC: sdw_utils: Add rt766/rt767 support
https://git.kernel.org/broonie/sound/c/8eb2b0c88286 [3/3] ASoC: rt766: avoid re-initialize the blind write https://git.kernel.org/broonie/sound/c/be190d999369
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark