2023/11/24 10:58
解决方法:
1,开启NAU88L24 DAC Zero Crossing的功能,会有一定的缓解作用。
见下面nau8824寄存器。
开启NAU88L24 DAC Zero Crossing的修改方法可以参考如下:
用 amixer 将 audio codec 的 Headphone zero cross 功能打开.
语法為 amixer cset numid=xx 1 (xx 為 Headphone ZC Switch 的 number id)
numid 可通过 amixer control 命令, 寻找 'Headphone ZC Switch', 可得知对应的 number id
下面是使用范例:
# amixer controls
numid=28,iface=MIXER,name='Headphone ZC Switch'
numid=30,iface=MIXER,name='Headphone Volume'
numid=29,iface=MIXER,name='Headphone Playback Switch'
numid=6,iface=MIXER,name='PCM Volume'
numid=37,iface=MIXER,name='Aux Boost Volume'
numid=39,iface=MIXER,name='ADC 128x Oversampling Switch'
numid=1,iface=MIXER,name='ADC Companding'
。。。
#
# amixer cset numid=28 1
numid=28,iface=MIXER,name='Headphone ZC Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on
#
2,修改音量,或者静音到取消静音时,采用渐渐增加或减小音量的方法。
比如当前音量是1,突然改到10,就不能直接将音量改成10,而是从1,2,3,4。。。渐渐增加到10。
不管是改codec还是改SOC,都需要渐变。