18c2ecf20Sopenharmony_ci===================== 28c2ecf20Sopenharmony_ciAudio Pops and Clicks 38c2ecf20Sopenharmony_ci===================== 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ciPops and clicks are unwanted audio artifacts caused by the powering up and down 68c2ecf20Sopenharmony_ciof components within the audio subsystem. This is noticeable on PCs when an 78c2ecf20Sopenharmony_ciaudio module is either loaded or unloaded (at module load time the sound card is 88c2ecf20Sopenharmony_cipowered up and causes a popping noise on the speakers). 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciPops and clicks can be more frequent on portable systems with DAPM. This is 118c2ecf20Sopenharmony_cibecause the components within the subsystem are being dynamically powered 128c2ecf20Sopenharmony_cidepending on the audio usage and this can subsequently cause a small pop or 138c2ecf20Sopenharmony_ciclick every time a component power state is changed. 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciMinimising Playback Pops and Clicks 178c2ecf20Sopenharmony_ci=================================== 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciPlayback pops in portable audio subsystems cannot be completely eliminated 208c2ecf20Sopenharmony_cicurrently, however future audio codec hardware will have better pop and click 218c2ecf20Sopenharmony_cisuppression. Pops can be reduced within playback by powering the audio 228c2ecf20Sopenharmony_cicomponents in a specific order. This order is different for startup and 238c2ecf20Sopenharmony_cishutdown and follows some basic rules:- 248c2ecf20Sopenharmony_ci:: 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci Startup Order :- DAC --> Mixers --> Output PGA --> Digital Unmute 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci Shutdown Order :- Digital Mute --> Output PGA --> Mixers --> DAC 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ciThis assumes that the codec PCM output path from the DAC is via a mixer and then 318c2ecf20Sopenharmony_cia PGA (programmable gain amplifier) before being output to the speakers. 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciMinimising Capture Pops and Clicks 358c2ecf20Sopenharmony_ci================================== 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ciCapture artifacts are somewhat easier to get rid as we can delay activating the 388c2ecf20Sopenharmony_ciADC until all the pops have occurred. This follows similar power rules to 398c2ecf20Sopenharmony_ciplayback in that components are powered in a sequence depending upon stream 408c2ecf20Sopenharmony_cistartup or shutdown. 418c2ecf20Sopenharmony_ci:: 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci Startup Order - Input PGA --> Mixers --> ADC 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci Shutdown Order - ADC --> Mixers --> Input PGA 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ciZipper Noise 498c2ecf20Sopenharmony_ci============ 508c2ecf20Sopenharmony_ciAn unwanted zipper noise can occur within the audio playback or capture stream 518c2ecf20Sopenharmony_ciwhen a volume control is changed near its maximum gain value. The zipper noise 528c2ecf20Sopenharmony_ciis heard when the gain increase or decrease changes the mean audio signal 538c2ecf20Sopenharmony_ciamplitude too quickly. It can be minimised by enabling the zero cross setting 548c2ecf20Sopenharmony_cifor each volume control. The ZC forces the gain change to occur when the signal 558c2ecf20Sopenharmony_cicrosses the zero amplitude line. 56