mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
ctl: fix returning zero for dimension level 4
In ALSA kernel/userspace interfaces, 'struct snd_ctl_elem_info' has a 'dimension' parameter. This parameter consists of an array with four elements. Each element represents the number of members in corresponding dimension level to construct matrix. In current implementation, a get function, 'snd_ctl_elem_info_get_dimension()' is hardcoded to return zero to level 4, against actual value. This commit fixes the bug. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
5eb8ae1bb0
commit
7bc886584f
1 changed files with 1 additions and 1 deletions
|
|
@ -2483,7 +2483,7 @@ int snd_ctl_elem_info_get_dimension(const snd_ctl_elem_info_t *obj, unsigned int
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
assert(obj);
|
assert(obj);
|
||||||
if (idx >= 3)
|
if (idx > 3)
|
||||||
return 0;
|
return 0;
|
||||||
return obj->dimen.d[idx];
|
return obj->dimen.d[idx];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue