audio: fix problem with unlinked control updates

When reading unlinked controls from mixer_paths.xml,
the first value is stored correctly, but successive
values are overwritten with the first. This is
because the unlinking phase was being done for every
successive value. Add a check to see if unlinking
has already been done for the control, since it
should only be done once.

If a path containing an unlinked control is applied,
mixer values greater than index 0 will not always be
sent to the mixer if the old values are linked. This
is because unlinked values were being compared to
possibly stale linked values. Only the value at
index 0 for linked controls is valid.

Bug: 7232465
Change-Id: I006d0f8cab5c56bf56cef5a79cbd3e25d5e6b387
1 file changed