pal: update number of channels in resourcemanager for proxy
When we get device switch back to back without setparameters the value
of channels is 0 because of which the channel number in resource manager
is not getting updated. Hence, updating the number of channels and reset
is done on device close when no device is connected.
Change-Id: I54031d57587df4b8b1deed3a9e9e09f3880c5833
diff --git a/device/src/Device.cpp b/device/src/Device.cpp
index 5694e41..fd36ac3 100644
--- a/device/src/Device.cpp
+++ b/device/src/Device.cpp
@@ -493,6 +493,8 @@
disableDevice(audioRoute, mSndDeviceName);
mCurrentPriority = MIN_USECASE_PRIORITY;
deviceStartStopCount = 0;
+ if(rm->num_proxy_channels != 0)
+ rm->num_proxy_channels = 0;
}
}
PAL_INFO(LOG_TAG, "Exit. deviceCount %d for device id %d (%s), exit status %d", deviceCount,
diff --git a/resource_manager/src/ResourceManager.cpp b/resource_manager/src/ResourceManager.cpp
index 8007e33..f275647 100644
--- a/resource_manager/src/ResourceManager.cpp
+++ b/resource_manager/src/ResourceManager.cpp
@@ -2683,8 +2683,8 @@
{
PAL_INFO(LOG_TAG, "wfd TX is not in progress");
if (rm->num_proxy_channels) {
+ PAL_INFO(LOG_TAG, "proxy device channel number: %d", rm->num_proxy_channels);
deviceattr->config.ch_info.channels = rm->num_proxy_channels;
- rm->num_proxy_channels = 0;
}
}
PAL_INFO(LOG_TAG, "PAL_DEVICE_OUT_PROXY sample rate %d bitwidth %d ch:%d",