control: ucm: add ioctl to retrieve full card components#494
Open
mstrozek wants to merge 1 commit intoalsa-project:masterfrom
Open
control: ucm: add ioctl to retrieve full card components#494mstrozek wants to merge 1 commit intoalsa-project:masterfrom
mstrozek wants to merge 1 commit intoalsa-project:masterfrom
Conversation
mstrozek
added a commit
to mstrozek/alsa-utils
that referenced
this pull request
Jan 22, 2026
Changes added to kernel [1] and alsa-lib [2] allow usage of an extended components string, amend amixer to allow display of the new string. [1] https://lore.kernel.org/all/20260122111249.67319-1-mstrozek@opensource.cirrus.com/ [2] alsa-project/alsa-lib#494 Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Member
|
Thanks for your change, but the situation with new components string can be handled using new internal structure in alsa-lib like: Difference for memory allocations should be already covered using |
d90ae37 to
e1352ee
Compare
perexg
requested changes
Feb 19, 2026
perexg
requested changes
Feb 19, 2026
bdbc0d4 to
1ab0036
Compare
perexg
requested changes
Feb 24, 2026
include/local.h
Outdated
| 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 */ | ||
| char *components; |
Member
There was a problem hiding this comment.
Unfortunately, for alsa-lib, the all data must be allocated together ahead. See snd_ctl_card_info_alloca. So, please, return back fixed array to this structure.
Author
There was a problem hiding this comment.
Returned to components[512]. In this case also removed the "length query" from the ioctl, writing into info->components directly and only running a quick sanity xheck on the length, though not sure if it is necessary
The fixed-size components field in SNDRV_CTL_IOCTL_CARD_INFO can be too small on systems with many audio devices. The kernel [1] will provide a new ioctl to read the full string while truncating the original in card_info if it grows too big. Make sure alsa-lib can read the full string if the original is truncated. [1] https://lore.kernel.org/all/20260303145815.9930-1-mstrozek@opensource.cirrus.com/ Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fixed-size components field in SNDRV_CTL_IOCTL_CARD_INFO can be too small on systems with many audio devices. The kernel [1] will provide a new ioctl to read the full string while truncating the original in card_info if it grows too big. Make sure alsa-lib can read the full string if the original is truncated.
[1] https://lore.kernel.org/all/20260303145815.9930-1-mstrozek@opensource.cirrus.com/