Skip to content

Commit

Permalink
control: remap - fix the endless loop in remap_numid_child_new()
Browse files Browse the repository at this point in the history
Avoid the new numid search for the maped only controls.

Link: https://lore.kernel.org/alsa-devel/[email protected]/
Reported-by: Charles Keepax <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
  • Loading branch information
perexg committed Dec 19, 2023
1 parent 3d4230a commit 60d6fad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/control/control_remap.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static snd_ctl_numid_t *remap_numid_child_new(snd_ctl_remap_t *priv, unsigned in

if (numid_child == 0)
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))
priv->numid_app_last++;
numid_app = priv->numid_app_last;
Expand Down Expand Up @@ -222,6 +222,7 @@ static snd_ctl_map_t *remap_find_map_numid(snd_ctl_remap_t *priv, unsigned int n
}
return NULL;
}

static snd_ctl_map_t *remap_find_map_id(snd_ctl_remap_t *priv, snd_ctl_elem_id_t *id)
{
size_t count;
Expand Down

0 comments on commit 60d6fad

Please sign in to comment.