Enable Sidetone Feature on DA7218 Audio Codec

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
3 posts / 0 new
Last post
格言
Offline
Last seen:1 year 7 months ago
加入:2018-03-01 10:10
Enable Sidetone Feature on DA7218 Audio Codec

I'm trying to enable the sidetone feature for the DA7218 audio codec. Both microphone and speaker work fine. However the sidetone doesn't work.

I'm using the DA14195DEVKTD with SDK v.1.6.2.

# include <组件\司机\ Codec\Include\DA7217\IDrvCodec_DA7217.h> #include  static void EnableSidetone(void) { uint16_t reg; writeCodecReg(SIDETONE_IN_SELECT_REG_adr, SIDE_TONE_SELCET_ADC_2L); // Use anlog mic on ADC2 as a source reg = readCodecReg(DROUTING_ST_OUTFILT_1L_REG_adr); // Enable sidetone for left channel reg |= (1 << 2); writeCodecReg(DROUTING_ST_OUTFILT_1L_REG_adr, reg); reg = readCodecReg(DROUTING_ST_OUTFILT_1R_REG_adr); // Enabled sidetone for right channel reg |= (1 << 2); writeCodecReg(DROUTING_ST_OUTFILT_1R_REG_adr, reg); writeCodecReg(SIDETONE_GAIN_REG_adr, 0x1c); // Set sidetone gain to 0 dB reg = SIDETONE_CTRL_SIDETONE_FILTER_EN; writeCodecReg(SIDETONE_CTRL_REG_adr, reg); // sidetone_filter_en=1, sidetone_mute_en=0 }

The coefficients of the sidetone biquad filter are left at the reset values.

Device:
ED_Dialog
Offline
Last seen:11 hours 46 min ago
工作人员
加入:2017-09-18 11:54
Hello maxim,

Hello maxim,

Sorry for the slow reponse, I will look into this for you.

What is the final application?

Kind regards,
Elliott Dexter

格言
Offline
Last seen:1 year 7 months ago
加入:2018-03-01 10:10
Hello Elliott,

Hello Elliott,

I've already found a solution. The problem was with the biquad filter. The sidetone works fine after loading coefficients (1.0 for a00, a10, a20, and 0.0 for others, with proper scaling).

Thank you for yor response.