From: Takashi Iwai <tiwai@suse.de>
To: Terry Junge <linuxhid@cosmicgizmosystems.com>
Cc: Takashi Iwai <tiwai@suse.de>, Jiri Kosina <jikos@kernel.org>,
Takashi Iwai <tiwai@suse.com>, Wade Wang <wade.wang@hp.com>,
Benjamin Tissoires <bentiss@kernel.org>,
Jaroslav Kysela <perex@perex.cz>,
linux-input@vger.kernel.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names
Date: Wed, 15 Jan 2025 08:42:09 +0100 [thread overview]
Message-ID: <87ed14le0e.wl-tiwai@suse.de> (raw)
In-Reply-To: <6273ad6b-3c3c-4cc3-9b7e-1da5066d2321@cosmicgizmosystems.com>
On Tue, 14 Jan 2025 23:14:13 +0100,
Terry Junge wrote:
>
> On 1/14/25 4:38 AM, Takashi Iwai wrote:
> > 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.
> >
> So, is the coding of the rest of the function body acceptable if I just pass a
> struct snd_ctl_elem_id *id
> instead of an
> unsigned char[44] *name
> ?
Likely yes.
thanks,
Takashi
next prev parent reply other threads:[~2025-01-15 7:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-13 23:51 [PATCH v3 0/2] Introduce Poly/Plantronics mute event support Terry Junge
2025-01-13 23:51 ` [PATCH v3 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks Terry Junge
2025-01-14 6:44 ` Wang, Wade
2025-01-13 23:51 ` [PATCH v3 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names Terry Junge
2025-01-14 6:51 ` Wang, Wade
2025-01-14 12:38 ` Takashi Iwai
2025-01-14 22:14 ` Terry Junge
2025-01-15 7:42 ` Takashi Iwai [this message]
2025-01-18 0:58 ` [PATCH v4 0/2] Introduce Poly/Plantronics mute event support Terry Junge
2025-01-18 0:58 ` [PATCH v4 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks Terry Junge
2025-01-20 2:19 ` Wang, Wade
2025-01-18 0:58 ` [PATCH v4 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names Terry Junge
2025-01-20 2:19 ` Wang, Wade
2025-01-18 8:13 ` [PATCH v4 0/2] Introduce Poly/Plantronics mute event support Takashi Iwai
2025-02-03 10:09 ` Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ed14le0e.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linuxhid@cosmicgizmosystems.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=wade.wang@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox