Hello,
I'm trying to configure the Headphone Mic for audio input instead of On-board Mic for Tesnsorflow_kws example,
I'm already using OMTP headphones and I tried
wm8960Config.leftInputSource = kWM8960_InputDifferentialMicInput3;
but it is not working, So please let me know how can I configure the headphone mic
Thanks & Regards
Yogesh
Hi yogesh_modi,
It turns out you modify the wrong place.
Please note,
phone mic is circuited to the Left input in the codec, so you need to write the wm8960config like this:
wm8960_config_t wm8960Config = {
.i2cConfig = {.codecI2CInstance = BOARD_CODEC_I2C_INSTANCE, .codecI2CSourceClock = BOARD_CODEC_I2C_CLOCK_FREQ},
.route = kWM8960_RoutePlaybackandRecord,
.rightInputSource = kWM8960_InputDifferentialMicInput2,
.leftInputSource = kWM8960_InputDifferentialMicInput3,
.playSource = kWM8960_PlaySourceDAC,
.slaveAddress = WM8960_I2C_ADDR,
.bus = kWM8960_BusI2S,
.format = {.mclk_HZ = 6144000U, .sampleRate = kWM8960_AudioSampleRate16KHz, .bitWidth = kWM8960_AudioBitWidth16bit},
.master_slave = false,
};
You need to add the leftinput source as the phone mic.
I have tested it on my side, it works now.
Wish it helps you!
If you still have questions about it, please kindly let me know!
Best Regards,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-----------------------------------------------------------------------------
Hi yogesh_modi,
Except for the codec input channel modification, I still didn't find any other place to modify it, today I test the Sai playback code with a headphone mic, also not a success, tomorrow, I will check with some of our experts.
After I get the valuable feedback, I will let you know.
Please keep patient, thanks.
Best Regards,
Kerry