Bladeren bron

audio: Add support for APTX TWSP audio codec

- Add support for APTX TWSP audio format for BT.

CRs-Fixed: 2433041
Change-Id: I19e256ae981516e9054b6e6eed8372ae2929b006
ten
Dhananjay Kumar 2 jaren geleden
bovenliggende
commit
68a719eb24
No account linked to committer's email address

+ 3
- 0
media/java/android/media/AudioSystem.java Bestand weergeven

@@ -153,6 +153,7 @@ public class AudioSystem
public static final int AUDIO_FORMAT_LDAC = 0x23000000;
public static final int AUDIO_FORMAT_CELT = 0x26000000;
public static final int AUDIO_FORMAT_APTX_ADAPTIVE = 0x27000000;
public static final int AUDIO_FORMAT_APTX_TWSP = 0x2A000000;

/**
* Convert audio format enum values to Bluetooth codec values
@@ -167,6 +168,8 @@ public class AudioSystem
case AUDIO_FORMAT_CELT: return BluetoothCodecConfig.SOURCE_CODEC_TYPE_CELT;
case AUDIO_FORMAT_APTX_ADAPTIVE:
return BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_ADAPTIVE;
case AUDIO_FORMAT_APTX_TWSP:
return BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_TWSP;
default: return BluetoothCodecConfig.SOURCE_CODEC_TYPE_INVALID;
}
}

+ 2
- 0
services/core/java/com/android/server/audio/BtHelper.java Bestand weergeven

@@ -1011,6 +1011,8 @@ public class BtHelper {
return AudioSystem.AUDIO_FORMAT_CELT;
case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_ADAPTIVE:
return AudioSystem.AUDIO_FORMAT_APTX_ADAPTIVE;
case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_TWSP:
return AudioSystem.AUDIO_FORMAT_APTX_TWSP;
default:
return AudioSystem.AUDIO_FORMAT_DEFAULT;
}

Laden…
Annuleren
Opslaan