Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: "otzelot2021@outlook.de" <otzelot2021@outlook.de>,
	tiwai@suse.com, linux-sound@vger.kernel.org
Subject: Re: [RFC] ALSA: how should a card name that is not ASCII be exposed?
Date: Tue, 15 Sep 2026 12:53:32 +0200	[thread overview]
Message-ID: <87eceun5ub.wl-tiwai@suse.de> (raw)
In-Reply-To: <7723e39f-982d-47cd-8322-ed0e71d99290@perex.cz>

On Mon, 14 Sep 2026 18:59:53 +0200,
Jaroslav Kysela wrote:
> 
> On 9/14/26 18:46, otzelot2021@outlook.de wrote:
> 
> > The larger option
> > -----------------
> > 
> > Add UTF-8 successors of the three fields, kept alongside the ASCII ones
> > rather than replacing them, allocated on demand like card->components
> > now is.  Either side may be empty, so nothing may assume a name is
> > present and every reader keeps a fallback.  Drivers fill both and keep
> > them semantically in sync.
> > 
> > For user space this needs no new ioctl: SNDRV_CTL_IOCTL_CARD_BYTES
> > already carries a variable-length card string with a type discriminator
> > that was added for exactly this kind of extension, so three more type
> > values would do.  Nothing existing changes, and an old kernel returns
> > -EINVAL for an unknown type, which a reader can treat as "use the ASCII
> > field".
> > 
> > id, driver and components would deliberately keep no UTF-8 counterpart
> > for the time being. They are not display names: id is the unique handle
> > and part of path
> > names, driver is what alsa-lib matches configuration against, and
> > components is a token list.
> 
> This looks like a best extension proposal IMHO. The current apps don't
> have any assumptions that the fields are in other character coding
> than ASCII.

I personally find it OK to have UTF-8 strings in short / long / mixer
names.  That's no new problem, and it's been over decades.  Of course,
a broken letter at the end could be a problem and we can fix it in
either kernel or alsa-lib, too.

OTOH, I'm fine with the extension, too.  That doesn't sound too
intrusive.

But, an open question is what should we fill into the short/long/mixer
names in ASCII, instead of vendor / product names?  With embedded IDs
like "USB 1234:abcd"?  Or shall we still pass the vendor / product
names if they are ASCII only, and falling back only if they are
non-ASCII?


thanks,

Takashi

  reply	other threads:[~2026-09-15 10:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14 16:46 [RFC] ALSA: how should a card name that is not ASCII be exposed? otzelot2021
2026-09-14 16:59 ` Jaroslav Kysela
2026-09-15 10:53   ` Takashi Iwai [this message]
2026-09-15 12:04     ` Jaroslav Kysela

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=87eceun5ub.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-sound@vger.kernel.org \
    --cc=otzelot2021@outlook.de \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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