[alsa-devel] [PATCH] ASoC: nau8825: erase pop noise by soft mute

John Hsu KCHSU0 at nuvoton.com
Mon Oct 3 13:21:40 CEST 2016


On 9/25/2016 3:11 AM, Mark Brown wrote:
> On Wed, Sep 14, 2016 at 03:47:32PM +0800, John Hsu wrote:
>
>   
>> + * Enable soft mute to gradually lower DAC volume to zero;
>> + * Soft unmute will gradually increase DAC volume to volume setting.
>>     
>
>   
>> +		regmap_write(nau8825->regmap, NAU8825_REG_DAC_DGAIN_CTRL, 0);
>> +		regmap_update_bits(nau8825->regmap, NAU8825_REG_MUTE_CTRL,
>> +			NAU8825_DAC_SOFT_MUTE, NAU8825_DAC_SOFT_MUTE);
>>     
>
> Why are we not just exposing soft mute as a userspace control like other
> drivers do?  It seems like there's some weird interaction between
> sidetones and the soft mute which this is trying to work around but
> that's not really explained, it seems to be the main point here.
> Basically I can't figure out what's intended here.
>
>   

The issue only happens in the begin of playback. The amplitude of
output signal has abnormal change in a short time and then recover
to the level by user configuration. The amplitude change makes pop
noise. For the reason, we use soft mute to fix the pop noise because
the signal will output from small to normal case gradually. But the
steps of soft mute is not enough to cover the period of amplitude
change. Thus, we need to defer the soft mute and put the triggered
point near the signal output. The userspace control can't catch the
point as we wish.

>> +EXPORT_SYMBOL_GPL(nau8825_soft_mute);
>>     
>
> Why is this exported, how will it be used?  The function seems to be
> called from inside this driver as well...
>   

The function is exported for the machine driver. When the platform
stops the playback and it makes soft mute. When the playback starts,
the playform makes soft unmute in trigger start function. The trigger
function is the closest point of output signal, and the codec driver
can make the soft unmute deferring as short as possible.



More information about the Alsa-devel mailing list