Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e78496e authored by Vikram Panduranga's avatar Vikram Panduranga Committed by Gerrit - the friendly Code Review server
Browse files

hal: Add check for default backend on RX path

Add additional check for default backend entry in a concurrent
usecase scenario. Without this check there will be a failure
in matching common backend in a usecase involving TTY HCO handset
and speaker-headset combo. This failure leads to audio loss during
TTY HCO usecase.

Change-Id: I5a708551de06781b7c0e56d9973460fe806bf241
CRs-Fixed: 1078299
parent eba895c4
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -90,6 +90,7 @@
#define MIN_COMPRESS_OFFLOAD_FRAGMENT_SIZE (2 * 1024)
#define COMPRESS_OFFLOAD_FRAGMENT_SIZE_FOR_AV_STREAMING (2 * 1024)
#define COMPRESS_OFFLOAD_FRAGMENT_SIZE (32 * 1024)
#define DEFAULT_RX_BACKEND "SLIMBUS_0_RX"

/*
 * Offload buffer size for compress passthrough
@@ -2205,9 +2206,9 @@ bool platform_check_backends_match(snd_device_t snd_device1, snd_device_t snd_de
    if (NULL != be_itf1 && NULL != be_itf2) {
        if ((NULL == strstr(be_itf2, be_itf1)) && (NULL == strstr(be_itf1, be_itf2)))
            result = false;
    } else if (NULL == be_itf1 && NULL != be_itf2) {
    } else if (NULL == be_itf1 && NULL != be_itf2 && (NULL == strstr(be_itf2, DEFAULT_RX_BACKEND))) {
            result = false;
    } else if (NULL != be_itf1 && NULL == be_itf2) {
    } else if (NULL != be_itf1 && NULL == be_itf2 && (NULL == strstr(be_itf1, DEFAULT_RX_BACKEND))) {
            result = false;
    }

+4 −2
Original line number Diff line number Diff line
@@ -66,6 +66,8 @@
#define COMPRESS_OFFLOAD_FRAGMENT_SIZE_FOR_AV_STREAMING (2 * 1024)
#define COMPRESS_OFFLOAD_FRAGMENT_SIZE (32 * 1024)

#define DEFAULT_RX_BACKEND "SLIMBUS_0_RX"

/*
 * Offload buffer size for compress passthrough
 */
@@ -1987,9 +1989,9 @@ bool platform_check_backends_match(snd_device_t snd_device1, snd_device_t snd_de
    if (NULL != be_itf1 && NULL != be_itf2) {
        if ((NULL == strstr(be_itf2, be_itf1)) && (NULL == strstr(be_itf1, be_itf2)))
            result = false;
    } else if (NULL == be_itf1 && NULL != be_itf2) {
    } else if (NULL == be_itf1 && NULL != be_itf2 && (NULL == strstr(be_itf2, DEFAULT_RX_BACKEND))) {
            result = false;
    } else if (NULL != be_itf1 && NULL == be_itf2) {
    } else if (NULL != be_itf1 && NULL == be_itf2 && (NULL == strstr(be_itf1, DEFAULT_RX_BACKEND))) {
            result = false;
    }