sco_util: set voice settings based on esablished codec

This commit is contained in:
Matthias Ringwald 2016-07-24 22:49:47 +02:00
parent d2c1d59ab5
commit 973d7173e5

View File

@ -223,6 +223,10 @@ static void sco_demo_init_mSBC(void){
hfp_msbc_init();
sco_demo_fill_audio_frame();
// HACK: should be handled by HFP or HSP layer on (e)SCO connection request, not here
// transparent data
hci_set_sco_voice_setting(0x0003);
}
static void sco_demo_init_CVSD(void){
@ -236,6 +240,10 @@ static void sco_demo_init_CVSD(void){
const int bytes_per_sample = 1;
num_samples_to_write = num_samples;
write_wav_header(wav_writer_state.wav_file, sample_rate, num_channels, num_samples, bytes_per_sample);
// HACK: should be handled by HFP or HSP layer on (e)SCO connection request, not here
// signed 8 bit pcm data with CVSD over the air
hci_set_sco_voice_setting(0x0040);
}