Re: [PATCH v3 1/1] sound: soc: codecs: wcd-mbhc-v2: expose ALSA control for jack
From: Mark Brown
Date: Sat Mar 25 2023 - 14:12:32 EST
On Sat, Mar 25, 2023 at 03:21:42PM +0100, Dylan Van Assche wrote:
>
> mutex_lock(&mbhc->lock);
>
> + ret = snd_jack_add_new_kctl(mbhc->jack->jack, "Headset Jack", WCD_MBHC_JACK_MASK);
> + if (ret)
> + dev_warn(component->dev, "failed creating Headset Jack kctl with err: %d\n", ret);
> +
No, drivers should not be open coding userspace reporting - there
is no reason for this device to be special, or for this device to
duplicate what machine drivers and the core are doing. Any
configuration should be done by the machine driver, the ASoC core
jack handling already creates userspace controls when asked.
Attachment:
signature.asc
Description: PGP signature