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

Commit ed8e3553 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "audio: add linein to BT headset loopback support"

parents 31ada2d1 25b584c1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -171,6 +171,7 @@ bool is_supported_sink_device(audio_devices_t sink_device_mask)
    if((sink_device_mask & AUDIO_DEVICE_OUT_SPEAKER) ||
       (sink_device_mask & AUDIO_DEVICE_OUT_WIRED_HEADSET) ||
       (sink_device_mask & AUDIO_DEVICE_OUT_WIRED_HEADPHONE) ||
       (sink_device_mask & AUDIO_DEVICE_OUT_BLUETOOTH_A2DP) ||
       (sink_device_mask & AUDIO_DEVICE_OUT_LINE)) {
           return true;
       }
+2 −0
Original line number Diff line number Diff line
@@ -2345,6 +2345,8 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
             }
         } else if ((usecase->stream.out != NULL) &&
              !(usecase->stream.out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) &&
              (usecase->type != TRANSCODE_LOOPBACK_TX) &&
              (usecase->type != TRANSCODE_LOOPBACK_RX) &&
              usecase->stream.out->started) {
              if (is_bt_soc_on(adev) == false) {
                  ALOGD("BT SCO/A2dp disconnected while in connection");
+7 −0
Original line number Diff line number Diff line
@@ -579,6 +579,7 @@ int main(int argc, char *argv[]) {
    log_file = stdout;
    transcode_loopback_config_t    *transcode_loopback_config = NULL;
    transcode_loopback_config_t *temp = NULL;
    char param[100] = {0};

    struct option long_options[] = {
        /* These options set a flag. */
@@ -654,6 +655,12 @@ int main(int argc, char *argv[]) {
        exit_process_thread = true;
        goto exit_transcode_loopback_test;
    }

    if (sink_device == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP) {
        snprintf(param, sizeof(param), "%s=%d", "connect", sink_device);
        qahw_set_parameters(primary_hal_handle, param);
    }

    transcode_loopback_config->hal_handle = primary_hal_handle;
    fprintf(log_file,"\nLoading HAL for loopback usecase done\n");