Search by Tags

Audio driver registry settings

 

Article updated at 20 Jul 2018
Compare with Revision




There are a number of registry settings to control features directly in the audio codec. Please refer the respective datasheet for more details.

The following table shows the featured audio codec for each Colibri module:

ColibriAudio Codec
PXA270NXP UCB1400
PXA320 V1.xNXP UCB1400
PXA270 V2.xWolfson WM9715
PXA310Wolfson WM9715
PXA320Wolfson WM9715
PXA300(none)
PXA300 XTWolfson WM9715
T20Wolfson WM9715
T30NXP/Freescale SGTL5000
VF61Wolfson WM9715
IMX6NXP/Freescale SGTL5000
IMX7NXP/Freescale SGTL5000

Registry Settings For PXAxxx Only

The following registry settings are only available on Colibri PXAxxx modules.

[HKLM\Drivers\Builtin\WaveDev]
"Priority256"  = dword:0x000000D2   ;audio driver thread priority 0(highest) to 255(lowest) default is 210
"RecSel"       = dword:0x00000000   ;register Record Select (0x1A)
	                                   ;default no key (microphone)
 
"RecGain"      = dword:0x00000f0f   ;register Record Gain (0x1C) 
	                                   ;default no key (codec defaults)
 
"BoostInput"   = dword:0x00000001   ;Boost Input 1:boost 0:No boost
	                                   ;default no key (boost enabled)  
 
"MicVolume"    = dword:0x00000000   ;register MIC Volume (0x0E)
	                                   ;for UCB: should not be used anymore (but can be used) 
	                                   ;(Use input boost to enable 20db mic boost)

; Image 3.4 and later
"extAmpSODIMM" = dword:0xffffffff   ; On/Off pin for an external audio amplifier. Default is -1 (pin not used)
"extAmpPol"    = dword:0x00000001   ; Polarity to turn the amplifier on. Default is 1 (1 = amplifier is on)

;UCB1400 only
"FeatCSR1"     = dword:0x00005400  ;register CSR1

;WM971x
"ToneCtrl"     = dword:0x00000000  ;Tone Control register 
	                                   ;(Register 0x20 on WM9713, Register 0x08 on WM9715)
	                                   ;default no key (codec defaults)

Headphone Driver (UCB1400 only)

For modules featuring the UCB1400 codec, the internal headphone driver is disabled by default for better audio quality. To enable the headphone driver, change the following registry key:

[HKLM\Drivers\Builtin\WaveDev]
"FeatCSR1"   = dword:0x5440 

Registry Settings For Tegra Only

Controlling Powering of Codec

Note: Available from image V2.0beta 1.

[HKLM\Drivers\Builtin\NvWaveDev]
"PowerDownTimeout"      = dword:500    ; Timeout (ms) between last usage of codec and switching 
                                       ; off its clock. Set to -1 to disable power off. 
                                       ; Default value: 500ms

Controlling External Amplifier

Note: Available from image V2.0beta 1.

If you your carrier board is equipped with an external amplifier we offer some additional features to control this one. There are two ways to signalize the amplifier the audio codec finished or starts audio playback:

  • Toggle a SODIMM / MXM pin (see registry configuration bellow).
  • Trigger the named event "extAmpNotifyEvent" which can be handled in users application / driver.

[HKLM\Drivers\Builtin\NvWaveDev]
 
"extAmpPin"             = dword:-1    ; SODIMM / MXM PIN used to signalize external amplifier to turn 
                                      ; off after playback has finished. Set to -1 if not used. 
                                      ; Default value: -1 (not used)
"extAmpPol"             = dword:-1    ; Polarity of extAmpPin. Default value: 1
"extAmpOnDelay"         = dword:50    ; Delay(ms). Time between switching on external amplifier and
                                      ; playing of any sound. Default value: 50ms
"extAmpOffTimeout"      = dword:1000  ; Timeout (ms) after last audio playback and signaling turning off 
                                      ; the external amplifier. Default value: 1000ms

Controlling AC97 Sub-Units Power Management

Note: Available from image V1.3beta3.

[HKLM\Drivers\Builtin\NvWaveDev]
"Reg0x000"      = dword:0x0            ; modify 16-bit AC97 register 0x000 after powering up the audio codec
;...                                   ; ...
"Reg0xfff"      = dword:0x0            ; modify 16-bit AC97 register 0xfff after powering up the audio codec
	                               ; Bits 31..16 are a mask which bits should be modified (0=don't touch, 1=modify)
	                               ; Bits 15..00 contain the actual bit values
	                               ; Example: double the speaker amplitude on Limestone by routing the inverted SPKL to SPKR:
	                               ;          "Reg0x01e"=0x1c000800       -> modifies bits 12..10: Bit12=0, Bit11=1, Bit10=0
"PowerDownMask" = dword:0x7700         ; Set the Powerdown/Status register (0x26) on powering down. Default: Power down all other than VREF. Colibri T20 Only . (1)
"PowerUpMask"   = dword:0x7F00         ; Set the Powerdown/Status register (0x26) on powering up. Default: Power up all. Colibri T20 Only. (1)

Notes:

  1. If you hear blop noises after playing sound remove the PR6 (Disables HPOUTL, HPOUTR and OUT3 Buffer) from the PowerDownMask, set the value to 0x3700. All register settings can be found in WM9715 datasheet. Look for regsiter 0x26 in section Power Management.

Controlling Buffer Size

Note: Available from image V2.1b4.

The audio buffer can be too big for short audio samples as for example tick sounds. If the sounds are played shortly after each other some parts get not played. To fix this issue the buffer size can be reduced.

[HKLM\Drivers\Builtin\NvWaveDev]
"maxBufferSize"      = dword:0x8000            ;  Default size is 32'768 bytes

Registry Settings For iMX6 and iMX7 Only

[HKEY_LOCAL_MACHINE\Drivers\Builtin\Audio]
"HPVolume"      = dword:0
Currently, the audio driver uses only the main volume setting on the external audio chip to configure output volume, this leads to a low volume on the headset output used as audio output on the modules. The volume can be increase by setting the "HPVolume" dword value under [HKEY_LOCAL_MACHINE\Drivers\Builtin\Audio] to a value between 0 and 127. with 0 being the highest volume. Increasing this volume above a certain value can lead to distortion on the output, depending on the configuration of the carrier board and speakers, so you may need to do some tests to find the optimal value for your specific setup.

Custom codec configuration

Those settings apply to PXA (image 4.0 and later), Tegra and iMX6-based modules (image 1.4b4 and later). Using those entries it's possible to configure registers or specific bits in the codec, allowing specific customization of its behaviour.


; Bits 31..16 are a mask which bits should be modified (0=don't touch, 1=modify)
; Bits 15..00 contain the actual bit values
; Example: double the speaker amplitude on Limestone by routing the inverted SPKL to SPKR:
; "Reg0x1e"=0x1c000800       -> modifies bits 12..10: Bit12=0, Bit11=1, Bit10=0
 
"Reg0x00"      = dword:0x0000000000 ; modify 16-bit AC97 register 0x00 after powering up the audio codec
;...                                ; ...
"Reg0xff"      = dword:0x0000000000 ; modify 16-bit AC97 register 0xff after powering up the audio codec