Re: [PATCH 2/2] ASoC: simple-card-utils: Add support of "hp-pin-name-headphone" property
From: Krzysztof Kozlowski
Date: Mon Dec 29 2025 - 06:43:19 EST
On 29/12/2025 12:18, Shengjiu Wang wrote:
> The 'Headphones Jack' name used in current simple-card and audio-graph
> card driver can't be recognized by user space service daemon like
> pulseaudio and pipewire, which only recognize the 'Headphone Jack',
> so add 'hp-pin-name-headphone' property for this case and it won't block
> original use cases for 'Headphones Jack'
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@xxxxxxx>
> ---
> sound/soc/generic/simple-card-utils.c | 22 ++++++++++++++++++++--
> 1 file changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
> index bdc02e85b089..3d2194e23373 100644
> --- a/sound/soc/generic/simple-card-utils.c
> +++ b/sound/soc/generic/simple-card-utils.c
> @@ -779,6 +779,24 @@ int simple_util_parse_pin_switches(struct snd_soc_card *card,
> }
> EXPORT_SYMBOL_GPL(simple_util_parse_pin_switches);
>
> +static const char *simple_util_parse_hp_pin_name(struct snd_soc_card *card,
> + char *prefix, char *pin)
> +{
> + struct device_node *node = card->dev->of_node;
> + const char *str = NULL;
> + char prop[128];
> +
> + if (!prefix)
> + prefix = "";
> +
> + snprintf(prop, sizeof(prop), "%s%s", prefix, "hp-pin-name-headphone");
> +
That's different name than you defined in the bindings.
Best regards,
Krzysztof