public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Maciej Strozek <mstrozek@opensource.cirrus.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, patches@opensource.cirrus.com,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: sound: Increase max size of components field
Date: Mon, 27 Oct 2025 10:04:32 +0100	[thread overview]
Message-ID: <87ikg03ecf.wl-tiwai@suse.de> (raw)
In-Reply-To: <318f2ed3-57e6-495c-a773-4a094a3784cb@perex.cz>

On Thu, 23 Oct 2025 13:56:26 +0200,
Jaroslav Kysela wrote:
> 
> On 10/23/25 11:27, Maciej Strozek wrote:
> > The components field of snd_card can run out of space in new systems which
> > use many audio devices, hence increase its size to 256 bytes.
> 
> > @@ -1069,7 +1069,7 @@ struct snd_ctl_card_info {
> >   	unsigned char longname[80];	/* name + info text about soundcard */
> >   	unsigned char reserved_[16];	/* reserved for future (was ID of mixer) */
> >   	unsigned char mixername[80];	/* visual mixer identification */
> > -	unsigned char components[128];	/* card components / fine identification, delimited with one space (AC97 etc..) */
> > +	unsigned char components[256];	/* card components / fine identification, delimited with one space (AC97 etc..) */
> Unfortunately, this change will introduce kABI breakage (ioctl number
> change - structure size).
> 
> You can probably define another struct snd_ctl_card_info and
> SNDRV_CTL_IOCTL_CARD_INFO and update alsa-lib to use it depending the
> protocol version.
> 
> Or, we may introduce a separate ioctl for the components string. The
> stripped components string in struct snd_ctl_card_info may have a
> special ASCII mark like '>' at the end of string specifying the
> availability of the complete string through another ioctl. I would
> prefer this solution.
> 
> Also, the components string may be dynamic in the kernel structure
> (pointer) to save some space. 256 bytes is not small number.

As Jaroslav suggested, we need a different solution to keep the
compatibility.

My gut feeling is for the option to provide a new ioctl as it can be
most straightforward, but we can discuss further which is the good
choice.


thanks,

Takashi

  reply	other threads:[~2025-10-27  9:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-23  9:27 [PATCH] ALSA: sound: Increase max size of components field Maciej Strozek
2025-10-23 11:56 ` Jaroslav Kysela
2025-10-27  9:04   ` Takashi Iwai [this message]
2025-10-27 11:50     ` Maciej Strozek
2025-10-27 12:32       ` Richard Fitzgerald
2025-10-28  0:42       ` Takashi Sakamoto
2025-10-28 11:14         ` Maciej Strozek
2025-10-28 11:39       ` 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=87ikg03ecf.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=mstrozek@opensource.cirrus.com \
    --cc=patches@opensource.cirrus.com \
    --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