Re: [PATCH 2/2] ASoC: es8328: set SLRCK for the ES8388

From: Mark Brown

Date: Mon Oct 26 2026 - 16:15:12 EST


> The ES8388 has a single LRCK pin, so the DAC and the ADC have to take
> their frame clock from that one pin. With SLRCK clear, which is the
> power-on default, the capture path never gets a frame clock and records
> digital silence while playback keeps working, so boards appear to have a
> dead microphone.

> @@ -13,6 +13,7 @@
> #include <linux/pm.h>
> #include <linux/regmap.h>
> #include <linux/slab.h>
> +#include <linux/of.h>

Please keep the includes sorted.

>
> + /*
> + * The ES8388 has a single LRCK pin, so the DAC and the ADC must
> + * share it: without SLRCK the capture path never gets a frame
> + * clock and records digital silence while playback still works.
> + * Bit 7 of DAC Control 21 is SLRCK on the ES8388 and LD2MO (left
> + * DAC to the mono mixer) on the ES8328, so write it only here.
> + */
> + if (of_device_is_compatible(component->dev->of_node,

It'd be better to put an ID in the match tables and then use
i2c_get_match_data() to look up the variant, that way the driver will
work on ACPI systems as well.

> + ret = snd_soc_component_write(component, ES8328_DACCONTROL21,
> + 0x80);

It'd be better to add a define for the bit.

--
Mark Brown <broonie@xxxxxxxxxx>