Re: [PATCH v2 2/2] ASoC: cs35l45: Adds support for SYNC bus

Mark Brown <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.sound,gmane.linux.drivers.devicetree
Message-ID <[email protected]>
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
$

> +	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.
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmqDRs8ACgkQJNaLcl1U
h9CvQwf+KHDi4bP5FDdWcK9zH4xLrLLlZr9xH5X5UgCbLQVBRnnxEsmPtf9nuHDN
3B7gCUNLOGILiNYIY8epo4tSKuTqpQzT6nZ7oo57mBhMJvF1NWkbR9Co96neqZk1
zoLMLgU3JhwUKxAHHfsV/wByJxF6B5IiiCYcWuqWA78na2TeSY6TGz009Eivil7g
O4at1t8WcJ1xu+oRugHDr9/4OSXk3+kf05tKQvwMONhxN5C9G7eUmF7QXfjfMaoj
Abbg9Rh8/GUuuHDd7pXRHn+bPGwFObrETVK92vbq6Jnm3RhRMda+yhTVz17gNX01
0WPf1EJc1XmcPUVBbQg+B7Sr4HcmNg==
=7m8K
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.