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

Commit c83207cf authored by Harsh Bansal's avatar Harsh Bansal Committed by Garmond Leung
Browse files

hal: passthru: Fix to avoid mute in DDP passthru

-Mute ovserved on HDMI sink while rendering
high bitrate DDP content
-Offload buffer size is just 2k,
increasing it to handle high bit rate content
-QAF: Session close is blocked if pcm stream open is failed
--This is fixed by cleaning up the pcm stream

Change-Id: Ibc0efd99194ba4039921029f52f580dc9db79503
parent 0345a209
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -69,6 +69,8 @@ static const int dts_transmission_sample_rates[] = {

#define MIN_COMPRESS_PASSTHROUGH_FRAGMENT_SIZE (2 * 1024)

#define DDP_COMPRESS_PASSTHROUGH_FRAGMENT_SIZE (10 * 1024)

static const audio_format_t audio_passthru_formats[] = {
    AUDIO_FORMAT_AC3,
    AUDIO_FORMAT_E_AC3,
@@ -490,8 +492,14 @@ int audio_extn_passthru_get_buffer_size(audio_offload_info_t* info)
               (info->format == AUDIO_FORMAT_DTS_HD)) {
        fragment_size = MAX_COMPRESS_PASSTHROUGH_FRAGMENT_SIZE;
        goto done;
    } else if (info->format == AUDIO_FORMAT_E_AC3) {
        fragment_size = DDP_COMPRESS_PASSTHROUGH_FRAGMENT_SIZE;
        if(property_get("audio.ddp.buffer.size.kb", value, "") &&
                atoi(value)) {
            fragment_size = atoi(value) * 1024;
        }
        goto done;
    }

done:
    return fragment_size;

+5 −1
Original line number Diff line number Diff line
@@ -2007,7 +2007,11 @@ static int qaf_stream_open(struct stream_out *out,
                                                input_config,
                                                devices,
                                                AUDIO_STREAM_SYSTEM_TONE);
        if (status == 0) {
            qaf_mod->stream_in[QAF_IN_PCM] = out;
        } else {
            ERROR_MSG("System tone stream open failed with QAF module !!!");
        }
    } else if ((flags & AUDIO_OUTPUT_FLAG_MAIN) && (flags & AUDIO_OUTPUT_FLAG_ASSOCIATED)) {
        if (is_main_active(qaf_mod) || is_dual_main_active(qaf_mod)) {
            ERROR_MSG("Dual Main or Main already active. So, Cannot open main and associated stream");