public inbox for alsa-devel@alsa-project.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>,
	linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
	patches@opensource.cirrus.com, alsa-devel@alsa-project.org
Subject: Re: [PATCH v3 2/2] ALSA: control: add ioctl to retrieve full card components
Date: Thu, 05 Mar 2026 11:18:05 +0100	[thread overview]
Message-ID: <87pl5iy3z6.wl-tiwai@suse.de> (raw)
In-Reply-To: <cf59b85f5bfa3607b7ef799714df56bf42daa67a.camel@opensource.cirrus.com>

On Thu, 05 Mar 2026 11:11:40 +0100,
Maciej Strozek wrote:
> 
> W dniu czw, 05.03.2026 o godzinie 11∶04 +0100, użytkownik Takashi Iwai
> napisał:
> > On Thu, 05 Mar 2026 10:54:35 +0100,
> > Maciej Strozek wrote:
> > > 
> > > W dniu wto, 03.03.2026 o godzinie 16∶47 +0100, użytkownik Takashi
> > > Iwai
> > > napisał:
> > > > > 
> > > > > + */
> > > > > +struct snd_ctl_card_components {
> > > > > + int card;
> > > > > + unsigned int length;
> > > > > + unsigned char *components;
> > > > > +};
> > > > 
> > > > And the ioctl can serve for two purposes:
> > > > 
> > > > - When length=0 is set, the kernel stores the current number of
> > > > bytes
> > > >   and returns without copying.  User-space can use this mode for
> > > >   allocating the buffer.
> > > > 
> > > In alsa-lib all data must be allocated beforehand, so this
> > > length==0
> > > query is not very useful there, it will just go into a [512] array
> > > anyway. Are there any other users that may benefit from this?
> > 
> > My suggested API can work even with the fixed size 512, too, if 512
> > is
> > hight enough.  It's just more flexible.  And there is no restriction
> > about alsa-lib data allocation; the function can query the size then
> > allocate, too.
> > 
> > 
> > Takashi
> 
> OK, will prepare v4 with this, thanks

Well, let's see how others think, too.  The API design needs more
considerations because we can't change it any longer once after
defined.


thanks,

Takashi

  reply	other threads:[~2026-03-05 10:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-03 14:57 [PATCH v3 1/2] ALSA: control: tidy up whitespaces Maciej Strozek
2026-03-03 14:58 ` [PATCH v3 2/2] ALSA: control: add ioctl to retrieve full card components Maciej Strozek
2026-03-03 15:47   ` Takashi Iwai
2026-03-03 19:23     ` Jaroslav Kysela
2026-03-04 10:28       ` Takashi Iwai
2026-03-05  9:54     ` Maciej Strozek
2026-03-05 10:04       ` Takashi Iwai
2026-03-05 10:11         ` Maciej Strozek
2026-03-05 10:18           ` Takashi Iwai [this message]
2026-03-06  9:39             ` Jaroslav Kysela
2026-03-06 10:43               ` Takashi Iwai
2026-03-09  9:44                 ` Jaroslav Kysela
2026-03-09 10:02                   ` Takashi Iwai

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=87pl5iy3z6.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