⚠️
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.
12 posts / 0 new
Last post
ulrich.sorensen
Offline
Last seen:2 years 7 months ago
Joined:2016-09-15 07:40
DA7212 ALC issue

Hi,

I am experiencing periodic issues with the ALC in the DA7212 codec. The system is running Linux and uses the DA7213 SoC driver provided by Dialog Semi.

The issue is that sometimes the ALC does not recover after it has lowered the gain. It seems like the issue is triggered by a sudden high input on the microphones which causes the ALC to turn down the gain but it never turns the gain back up.

ALC_ATTACK = 44/fs
ALC_RELEASE = 176/fs

ALC_INTEG_RELEASE = 1/4
ALC_INTEG_ATTACK = 1/4
ALC_HOLD = 62/fs

ALC_THRESHOLD_MIN = -24 dB
ALC_THRESHOLD_MAX = -9 dB

ALC_ATTEN_MAX = 60 dB
ALC_GAIN_MAX = 60 dB

ALC_ANA_GAIN_MAX = 36 dB
ALC_ANA_GAIN_MIN = 0 dB

ALC_ANTICLIP_EN is disabled
ALC_ANTICLIP_LEVEL = 0.

ALC噪声水平设置为-94.5 dB

任何想法接近这是为什么?Any registers in the DA7212 which I can monitor to see the internal status/operation of the ALC.

此致,
Ulrich

Device:
ED_Dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2017-09-18 11:54
Hello Ulrich,

Hello Ulrich,

Let me look into this.

Kind regards,
Elliott Dexterb

ED_Dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2017-09-18 11:54
Hello Ulrich,

Hello Ulrich,

Would you be able to provide me with a register dump?

Kind regards,

Elliott Dexter

ulrich.sorensen
Offline
Last seen:2 years 7 months ago
Joined:2016-09-15 07:40
Hi,

Hi,

Please see the register dump below during streaming. Please note the ALC is behaving normally in this case.


root@x:~ i2cdump -f -y 2 0x1a
未指定大小(使用字节数据访问)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... ......
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20:00 10 0A 08 07 EA 1E 88 80 08 32 8B 00 00 00 00。?????????? 2?....
30: 35 35 02 02 0f 0f 6f 6f 88 07 07 00 00 00 00 00 55????oo???.....
40: 00 88 88 08 80 6f 6f 61 39 39 30 00 00 00 00 00 .????ooa990.....
50:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60:64 64 11 08 08 28 28 20 20 60 60 68 68 68 18 18 18 18 18 DD ???((`hhh ??
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 00 21 89 03 00 00 00 00 00 00 00 00 00 00 00 00 .!??............
90: 00 00 00 00 03 32 95 00 00 00 00 00 3f 10 06 aa ....?2?.....????
a0: 71 00 00 d0 0f 00 00 00 85 0f 00 00 00 00 00 00 q..??...??......
b0: 00 00 00 00 00 00 00 55 15 00 40 02 01 00 00 00 .......U?.@??...
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?...............
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 .............?..

此致,
Ulrich

ED_Dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2017-09-18 11:54
Hello Ulrich,

Hello Ulrich,

Thank you for the register dump. We managed to recreate your issue in the lab, we found a potential work around, changing ALC_Gain_Max to 72dB. We have not observed the issue since changing the value. We will look further into why this issue occured.

Kind regards,
Elliott Dexter

ulrich.sorensen
Offline
Last seen:2 years 7 months ago
Joined:2016-09-15 07:40
Hi,

Hi,

Thanks for your feedback. I will test your suggestion and report back.

此致,
Ulrich

ulrich.sorensen
Offline
Last seen:2 years 7 months ago
Joined:2016-09-15 07:40
Hi,

Hi,

I have tested the proposed change and it does not solve the problem. Still the ALC still does not always recover after it has lowered the gain. Also changing ALC_Gain_Max to 72dB results in distortion due to clipping of the signal.

Can you explain what causes this unintended behavior in the ALC? Any other suggestions to solve the problem.

此致,
Ulrich

ulrich.sorensen
Offline
Last seen:2 years 7 months ago
Joined:2016-09-15 07:40
Hi Elliot,

Hi Elliot,

Another observation relating to the ALC is that I see a big difference between the amplitude of the left end right channels. This is only seen when using the ALC. From what I read in the datasheet, the ALC applies the same gain to both channels right?

Using fixed gain, the amplitude of the left end right channels are equal.

此致,
Ulrich

ED_Dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2017-09-18 11:54
Hi Ulrich,

Hi Ulrich,

这是有趣的,周围的工作似乎在这里工作。我再次向球队提出了这个,我可以尽快给你答复一些答案。

Kind regards,

Elliott Dexter

ED_Dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2017-09-18 11:54
Hello Ulrich,

Hello Ulrich,

Sorry for the late response, i am out of office at the moment. I have a few questions and a suggestion:

  1. What is the amplitude of the signal that is being applied when the ALC has lowered the gain?
  2. Is it possible to view the schematics of the board ?
  3. 建议:

Set ALC_SYNC_MODE to enabled, which assume we have then we also need the ALC_ANTICLP_CTRL Enabled = 0xA1 to 0x80 and the ALC_ANTICLIP_LEVEL = 0xA2 to 0x64.This should resolve the issues that are being observed.

Kind regards,

Elliott Dexter

ulrich.sorensen
Offline
Last seen:2 years 7 months ago
Joined:2016-09-15 07:40
Hi Elliott,

Hi Elliott,

回答您的问题:

1. The amplitude of the signal during my test is normal speech. I then tap the microphone to provoke a high input to the ALC. The gain is of course lowered as expected but when I stop tapping the microphone the gain sometimes remain low.
2. See attachment
我还没有尝试过。

我尝试的是使用ALC而没有自动校准,似乎可以解决问题。我设置了ALC_SYNC_MODE = 1和ALC_OFFSET_EN = 0.可能会产生什么影响?

对我而言,看起来alc偏移校准不是正确完成的,这导致ALC有时会失败。我附上了我的Linux DA7213驱动程序。对你有什么看法吗?

此致,
Ulrich

Attachment:
ulrich.sorensen
Offline
Last seen:2 years 7 months ago
Joined:2016-09-15 07:40
Hi,

Hi,

The schematic attachment.

此致,
Ulrich

Attachment: