mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
control: remap - fix the endless loop in remap_numid_child_new()
Avoid the new numid search for the maped only controls. Link: https://lore.kernel.org/alsa-devel/20231219164539.GB14858@ediswmail.ad.cirrus.com/ Reported-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
3d4230aa8c
commit
60d6fad711
1 changed files with 2 additions and 1 deletions
|
|
@ -148,7 +148,7 @@ static snd_ctl_numid_t *remap_numid_child_new(snd_ctl_remap_t *priv, unsigned in
|
||||||
|
|
||||||
if (numid_child == 0)
|
if (numid_child == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (remap_find_numid_app(priv, numid_child)) {
|
if (priv->numid_remap_active && remap_find_numid_app(priv, numid_child)) {
|
||||||
while (remap_find_numid_app(priv, priv->numid_app_last))
|
while (remap_find_numid_app(priv, priv->numid_app_last))
|
||||||
priv->numid_app_last++;
|
priv->numid_app_last++;
|
||||||
numid_app = priv->numid_app_last;
|
numid_app = priv->numid_app_last;
|
||||||
|
|
@ -222,6 +222,7 @@ static snd_ctl_map_t *remap_find_map_numid(snd_ctl_remap_t *priv, unsigned int n
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static snd_ctl_map_t *remap_find_map_id(snd_ctl_remap_t *priv, snd_ctl_elem_id_t *id)
|
static snd_ctl_map_t *remap_find_map_id(snd_ctl_remap_t *priv, snd_ctl_elem_id_t *id)
|
||||||
{
|
{
|
||||||
size_t count;
|
size_t count;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue