Page 1 of 1

HFP Client: How to use speaker and microphone with PCM?

Posted: Sun Jan 01, 2023 6:02 pm
by memotronics
I tried to make sense of the HFP Client code on Github but I couldn't figure out how to hook up a microphone and speaker to the PCM data stream.

I'm planning to use PCM, and the HFP client directly sends that data to GPIO pins. I see the sample code that muxes the GPIO pins accordingly.

What I can't quite figure out how / what to connect to those GPIO pins so that I can get full duplex audio: I want to connect an audio source as well as a speaker.

Any help would be appreciated !

Re: HFP Client: How to use speaker and microphone with PCM?

Posted: Mon Feb 20, 2023 8:33 pm
by danjulio
I also have this question as well as others.

What do the Acoustic Echo Cancellation signals attach to?

Is there a way to route the audio data to the built-in DAC and a ADC input on the ESP32? Could this be done with the HCI interface and the I2S driver configured for ADC/DAC? Is the sample rate 8 kHz in that case?