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

Commit a35b6079 authored by Aniket Kumar Lata's avatar Aniket Kumar Lata Committed by Gerrit - the friendly Code Review server
Browse files

hal: configure slimbus Rx channel for APTX AD at 96KHz

Configure slimbus Rx for aptX Adaptive at 96KHz to reduce
the time to transfer the packets across the slimbus.

CRs-Fixed: 2324088
Change-Id: I77ef702702414126a95aaa2db1d386bda483444e
parent 82debc53
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -844,10 +844,16 @@ static int a2dp_set_backend_cfg()
    uint32_t sampling_rate_rx = a2dp.enc_sampling_rate;
    struct mixer_ctl *ctl_sample_rate = NULL, *ctrl_in_channels = NULL;

    //For LDAC encoder open slimbus port at 96Khz for 48Khz input
    //and 88.2Khz for 44.1Khz input.
    /* For LDAC encoder open slimbus port at 96Khz for 48Khz input
     * and 88.2Khz for 44.1Khz input.
     * For APTX AD encoder, open slimbus port at 96Khz for 48Khz input.
     */
    if ((a2dp.bt_encoder_format == ENC_CODEC_TYPE_LDAC) &&
        (sampling_rate_rx == 48000 || sampling_rate_rx == 44100 )) {
        (sampling_rate_rx == SAMPLING_RATE_48K ||
         sampling_rate_rx == SAMPLING_RATE_441K)) {
        sampling_rate_rx *= 2;
    } else if (a2dp.bt_encoder_format == ENC_CODEC_TYPE_APTX_AD &&
               sampling_rate_rx == SAMPLING_RATE_48K) {
        sampling_rate_rx *= 2;
    }