[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87jzaxzi24.wl-tiwai@suse.de>
Date: Tue, 14 Jan 2025 13:38:43 +0100
From: Takashi Iwai <tiwai@...e.de>
To: Terry Junge <linuxhid@...micgizmosystems.com>
Cc: Jiri Kosina <jikos@...nel.org>,
Takashi Iwai <tiwai@...e.com>,
Wade Wang <wade.wang@...com>,
Benjamin Tissoires <bentiss@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
linux-input@...r.kernel.org,
linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names
On Tue, 14 Jan 2025 00:51:59 +0100,
Terry Junge wrote:
>
> +/*
> + * Some Plantronics headsets have control names that don't meet ALSA naming
> + * standards. This function fixes nonstandard source names. By the time
> + * this function is called the control name should look like one of these:
> + * "source names Playback Volume"
> + * "source names Playback Switch"
> + * "source names Capture Volume"
> + * "source names Capture Switch"
> + * If any of the trigger words are found in the name then the name will
> + * be changed to:
> + * "Headset Playback Volume"
> + * "Headset Playback Switch"
> + * "Headset Capture Volume"
> + * "Headset Capture Switch"
> + * depending on the current suffix.
> + */
> +static void snd_fix_plt_name(struct snd_usb_audio *chip,
> + typeof_member(struct snd_ctl_elem_id, name) * name)
I personally find this style of argument is difficult to use.
That said, IMO, it's better to stick with the argument
struct snd_ctl_elem_id *id
and access via id->name as in your earlier patch; it's more idiomatic,
and easier to read.
thanks,
Takashi
Powered by blists - more mailing lists