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

Commit d4e7035d authored by Sridhar Vashist's avatar Sridhar Vashist Committed by Chris Elliott
Browse files

Make default SBC bitrate configurable by device.



Configurable default SBC bitrate so that audio quality can be maintained
for sampling rates other than 44.1kHz

Change-Id: Ia4197c0a500088cfa48a8ba821e9738a16c3fc6e
Signed-off-by: default avatarSridhar Vashist <svashist@motorola.com>
parent 8b360fd8
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -153,8 +153,10 @@ enum {
#define BTIF_MEDIA_BITRATE_STEP 5
#endif

/* Middle quality quality setting @ 44.1 khz */
#define DEFAULT_SBC_BITRATE 328
#ifndef BTIF_A2DP_DEFAULT_BITRATE
/* High quality quality setting @ 44.1 khz */
#define BTIF_A2DP_DEFAULT_BITRATE 328
#endif

#ifndef BTIF_A2DP_NON_EDR_MAX_RATE
#define BTIF_A2DP_NON_EDR_MAX_RATE 229
@@ -623,7 +625,7 @@ static void btif_a2dp_data_cb(tUIPC_CH_ID ch_id, tUIPC_EVENT event)

static UINT16 btif_media_task_get_sbc_rate(void)
{
    UINT16 rate = DEFAULT_SBC_BITRATE;
    UINT16 rate = BTIF_A2DP_DEFAULT_BITRATE;

    /* restrict bitrate if a2dp link is non-edr */
    if (!btif_av_is_peer_edr())