Re: [PATCH v2 2/2] ASoC: cs35l45: Adds support for SYNC bus
From: Ricardo Rivera-Matos
Date: Mon Aug 17 2026 - 15:36:39 EST
On 8/17/26 12:37 PM, Mark Brown wrote:
On Fri, Aug 14, 2026 at 10:34:53PM +0000, Ricardo Rivera-Matos wrote:
+static int cs35l45_sync_en_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
+{
+ struct snd_soc_component *component =
+ snd_soc_kcontrol_component(kcontrol);
$ git grep snd_soc_kcontrol_component asoc/for-next
$
Ack.
+ struct cs35l45_private *cs35l45 =
+ snd_soc_component_get_drvdata(component);
+
+ if (!cs35l45->sync_pin_set)
+ return -EPERM;
This will result in an unwriteable control on any system which does not
specify a sync pin which is just going to confuse things (eg, does
mixer-test think the control is writable?). It would be better to only
register the control if it's valid.
Sounds like a much better way to go about it. I'll add a snd_soc_add_component_controls call in cs35l45_component_probe to add the sync controls to the component.