audio: hal: update proper return value
[Issue] : Ringtone playback is muted when the incoming call
comes during A2DP playback
[Rootcause] : return value is not getting updated properly
[Fix] : Updated the return value
Change-Id: I2afc2e5794c320b72999745ec628c020cd1e77a5
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index df3d21a..8947a47 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -33,6 +33,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#define LOG_TAG "audio_hw_primary"
@@ -1909,7 +1911,7 @@
snd_device_t d1 = uc->out_snd_device;
snd_device_t d2 = new_snd_device;
- snd_device_t ret = 0;
+ int ret = 0;
list_init(&a1);
list_init(&a2);
@@ -1930,7 +1932,7 @@
compare_devices_for_any_match(&a1 ,&a2)) {
snd_device_t d3[2];
int num_devices = 0;
- int ret = platform_split_snd_device(platform,
+ ret = platform_split_snd_device(platform,
list_length(&a1) > 1 ? d1 : d2,
&num_devices,
d3);
@@ -1976,9 +1978,6 @@
}
}
- clear_devices(&a1);
- clear_devices(&a2);
-
end:
clear_devices(&a1);
clear_devices(&a2);