diff --git a/bthost_ipc/bthost_ipc.c b/bthost_ipc/bthost_ipc.c
index 7691ecf..660f8f7 100644
--- a/bthost_ipc/bthost_ipc.c
+++ b/bthost_ipc/bthost_ipc.c
@@ -286,11 +286,12 @@
         sbc_codec.bitrate |= (*p_cfg++ << 8);
         sbc_codec.bitrate |= (*p_cfg++ << 16);
         sbc_codec.bitrate |= (*p_cfg++ << 24);
+        sbc_codec.bits_per_sample = *(uint32_t *)p_cfg;
         *codec_type = AUDIO_FORMAT_SBC;
 
         if(sample_freq) *sample_freq = sbc_codec.sampling_rate;
 
-        ALOGW("SBC: Done copying full codec config");
+        ALOGW("SBC: Done copying full codec config bits_per_sample : %d", sbc_codec.bits_per_sample);
         return ((void *)(&sbc_codec));
     } else if (codec_cfg[CODEC_OFFSET] == CODEC_TYPE_AAC)
     {
@@ -385,11 +386,11 @@
 
         aac_bit_rate |= 0x000000FF & (((uint32_t)byte));
         aac_codec.bitrate = aac_bit_rate;
-
+        aac_codec.bits_per_sample = *(uint32_t *)p_cfg;
         *codec_type = AUDIO_FORMAT_AAC;
 
         if(sample_freq) *sample_freq = aac_codec.sampling_rate;
-        ALOGW("AAC: Done copying full codec config");
+        ALOGW("AAC: Done copying full codec config bits_per_sample : %d", aac_codec.bits_per_sample);
         return ((void *)(&aac_codec));
     }
     else if (codec_cfg[CODEC_OFFSET] == NON_A2DP_CODEC_TYPE)
@@ -571,9 +572,9 @@
         aptx_codec.bitrate |= (*p_cfg++ << 8);
         aptx_codec.bitrate |= (*p_cfg++ << 16);
         aptx_codec.bitrate |= (*p_cfg++ << 24);
-
+        aptx_codec.bits_per_sample = *(uint32_t *)p_cfg;
         if(sample_freq) *sample_freq = aptx_codec.sampling_rate;
-        ALOGW("APTx: Done copying full codec config");
+        ALOGW("APTx: Done copying full codec config bits_per_sample : %d", aptx_codec.bits_per_sample);
         if (*codec_type == ENC_CODEC_TYPE_APTX_DUAL_MONO)
         {
             memset(&aptx_tws_codec, 0, sizeof(audio_aptx_tws_encoder_config_t));
@@ -1629,8 +1630,8 @@
     ldac_codec.bitrate |= (*p_cfg++ << 24);
 
     ldac_codec.is_abr_enabled = (ldac_codec.bitrate == 0);
-
-    ALOGW("Create Lookup for %d with ABR %d", ldac_codec.sampling_rate, ldac_codec.is_abr_enabled);
+    ldac_codec.bits_per_sample = *(uint32_t *)p_cfg;
+    ALOGW("Create Lookup for %d with ABR %d, bits_per_sample %d", ldac_codec.sampling_rate, ldac_codec.is_abr_enabled, ldac_codec.bits_per_sample);
     if (ldac_codec.sampling_rate == 44100 ||
             ldac_codec.sampling_rate == 88200) {
         int num_of_level_entries =
diff --git a/bthost_ipc/bthost_ipc.h b/bthost_ipc/bthost_ipc.h
index 5d81bbf..64209be 100644
--- a/bthost_ipc/bthost_ipc.h
+++ b/bthost_ipc/bthost_ipc.h
@@ -278,6 +278,7 @@
     uint8_t  min_bitpool;   /* 2 */
     uint8_t  max_bitpool;   /*53(44.1khz),51 (48khz) */
     uint32_t bitrate;      /* 320kbps to 512kbps */
+    uint32_t bits_per_sample;
 } audio_sbc_encoder_config_t;
 
 
@@ -289,6 +290,7 @@
     uint16_t sampling_rate;
     uint8_t  channels;
     uint32_t bitrate;
+    uint32_t bits_per_sample;
 } audio_aptx_encoder_config_t;
 
 /* Information about BT APTX Adaptive encoder
@@ -345,6 +347,7 @@
     uint16_t mtu;
     bool is_abr_enabled;
     struct quality_level_to_bitrate_info level_to_bitrate_map;
+    uint32_t bits_per_sample;
 } audio_ldac_encoder_config_t;
 
 /* Information about BT AAC encoder configuration
@@ -357,6 +360,7 @@
     uint16_t channels; /* 1-Mono, 2-Stereo */
     uint32_t sampling_rate;
     uint32_t bitrate;
+    uint32_t bits_per_sample;
 } audio_aac_encoder_config_t;
 
 typedef struct {
