AudioFlinger: update cache in/out configuration on device port id change
In case of creation of AudioPatch with the same device type but a different
device id (typically: a device has been connected / disconnection, so
removed and re-attached to its corresponding module, a new Id is assigned),
the cache configuration of the clients is not updated.
If the client calls getRoutedDevice, the id will not be up to date and even
may refer to unknown port id.
Test: as follows:
1 / Calls setDeviceConnectionState AUDIO_DEVICE_OUT_HDMI state=1 mame=y_dummy_hdmi @=my_dummy_hdmi
2 / Plays explicititely on this device (by getting the id
AudioSystem::listAudioPorts
2 / Calls setDeviceConnectionState AUDIO_DEVICE_OUT_HDMI state=0
3 / Calls setDeviceConnectionState AUDIO_DEVICE_OUT_HDMI state=1 mame=y_dummy_hdmi @=my_dummy_hdmi
Plays explicititely on this device (by getting the id
AudioSystem::listAudioPorts
4 / Calls AudioTrack->getRoutedDeviceId()
The id shall match the second one, NOT the first one
that does not exist any more
Change-Id: I608ed8d78907b5ea1c9b6ef13c6cbfe528d88f44
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
Loading
Please register or sign in to comment