Magic Lantern Firmware Wiki
Advertisement

Video Memo[]

Hook-able point



Confirmed HighPassFilter

HPF2 filter out function can not be strongly effected , but working.

I used wave from generator. http://www.ne.jp/asahi/fa/efu/soft/wg/wg.html Download:http://www.ne.jp/asahi/fa/efu/soft/wg/down_wg.html

Checked 400Hz


Head Phone monitoring behavior



Cannon audio behavior[]

Audioicworking

This is my understanding (miyake_t)









How to program the OKI chip to cancel in-camera audio amplification ?[]

Chip: Oki ML26121A (see Datasheets)

Audio registers

600D (Oki ML26121A)              550D (AK4646)
DisableAudioIC 
2100                             2100
0d00                             0d00

PowerMicAmp
230a                             2205
2f02                             SelectMic(0)
SelectMic(0)
1512
1311

UnpowerMicAmp
4903                             2040
1300                             3000
2300                             SetFilterOff
SetFilterRecOff
--

TurnAVLineMuteOn()=
0x4903 (audio_ic_write)          0x23C0 (audio_ic_write)        
0x693E (audio_ic_write)          0x2040 (audio_ic_write)        
                                 0x2200 (audio_ic_write)

TurnAVLineMuteOff=
0x5703                           0x2210
0x4903                           0x23C0  
0x4B00                           0x204C
0x3F33                           timer 
0x2502                           0x2380
0x27A0
0x2126
msleep(0x1fe)
0x4901
R0, R0, #0x6B00


UnpowerSpeakerForWAV()=
0x4903 (audio_ic_write)          0x2220 (audio_ic_write)
0x2713 (audio_ic_write)          0x2200 (audio_ic_write)
0x2700 (audio_ic_write)          msleep
ORR     R0, R0, #0x6B00 (wr)     0x2040 (audio_ic_write)
0x5500 (audio_ic_write)
0x3B1B (audio_ic_write)


PowerSpeakerForWAV=
0x5507                           0x2220
0x4903                           0x23C8
0x4B00                           0x2054
0x2713                           0x22A0
0x271F
0x4901
ORR     R0, R0, #0x6B00


SetFilterPlayOff=
UnpowerSpeakerForWAV
TurnAVLineMuteOn
0x1300
0x2106
msleep
0x2700
0x5700
0x2500
0x6700
0xAD00

SetFilterPlay=                   SetFilterOff=
0xADBD                           0x3100
0x673F
0x7F00
0x8175
0x832A
0x85A1
0x8795
0x896D
0x8B08
0x8D16
0x8FBD
0x9146
0x93EA
0x959C
0x9724
0x996D
0x9B08
0x9DCA
0x9FDB
0xA100
0xA300
0xA500
0xA700
0x75D5
0x77F4
0x79F1
0x7BF0
0x7D00
0xA95A

or

0xAD85
0x7F00
0x8300
0x8500
0x8700
0x8900
0x8B00
0x8D00
0x8F00
0x9100
0x9300
0x9500
0x9700
0x9900
0x9B00
0x9D00
0x9F00
0xA100
0xA300
0xA500
0xA700
0x75E7
0x77E7
0x79E7
0x7BE7
0x7DE7
0xA900



FF06A420 wav_volume_out_maybe=   FF063EA8 wav_volume_out_maybe
ORR     R0, R0, #0x3B00          ORR     R0, R4, #0x2A00 
ORR     R0, R5, #0x7100          ORR     R0, R4, #0x6500
---


---

DAC (digital->analog) (550D and 600D, bcoz handled by tx19a I think)

StopASIFDMADAC= 
0xC05000B0 <- 0
0XC092020C <- 0
-
SetASIFDACModeInterleaveINT16= 
0xC0920210 <- 6
-
SetASIFDACModeSingleINT16= 
0xC0920210 <- R0 or 0x04
-
SetASIFDACModeInterleaveUINT8= 
0xC0920210 <- 3
-
SetASIFDACModeSingleUINT8= 
0xC0920210 <- R0 or 0x01


ADC (analog->digital) (550D and 600D)

SetASIFADCModeInterleaveINT16=
0xC092011C <- 6
-
SetASIFADCModeSingleINT16=
0xC092011C <- 4
-
SetASIFADCModeInterleaveUINT8=
0xC092011C <- 3
-
SetASIFADCModeSingleUINT8=
0xC092011C <- 1



Eventprocs

SetAudioVolumeOut
InitializeAudioIC
DisableAudioIC
StartPlayWaveData (beep)
StopPlayWaveData
DumpAudioIcRegister
SendDataForAudioIC
ReceiveDataForAudioIC

Properties:

0x205000F AudioVolume (analog gain?)
0x2050017 MovieRecVolume L/R (digital gain?)

Registers (from 7k0r programming guide, may be the same or may not):

01 Sampling Rate
03 PLLNL
05 PLLNH
07 PLLML
09 PLLMH
0B PLLDIV
0D Clock Enable
0F CLK Input/Output control

13 rec/play
21 reference power bits
23 input power
25 dac power
27 power management
2f powersave
33 mic input volume
39 mic boost volume
3b speaker amp volume
49 amp volume control [?]
4b fader
55 speaker amp out control
69 volume control enable
6b mixer & volume
6d playback volume (digital)
67 filters enable
69 volume control enable
71 play digital volume
7f hpf2 cutoff
8* eq
9* eq
a* eq
b1 alc mode
b3-bf alc settings
c1 attack (for playback limiter)
c3 decay
c5 target
c7 min/max gain
c9 boost volume

Alsa driver analyzing[]

snd_soc_update_bits means:

/**

 * snd_soc_update_bits - update codec register bits
 * @codec: audio codec
 * @reg: codec register
 * @mask: register mask
 * @value: new value
 *
 * Writes new register value.
 *
 * Returns 1 for change, 0 for no change, or negative error code.
 */

int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg,

                                unsigned int mask, unsigned int value)



char * const ml26124_input_select

enum val
0 Analog MIC in Single Embeded
1 Digital MIC in
2 Analog Mic in Differential

struct soc_enum ml26124_insel_enum

sname shift val reference val
ML26124_MIC_IF_CTL (0)0000 000X 0-1 ml26124_input_select

struct snd_kcontrol_new ml26124_line_control

name sname shift val
Switch ML26124_PW_LOUT_PW_MNG (0)0000 00X0 0-1

ml26124_companding

enum val
0 16bit PCM
1 u-law
2 A-law

struct soc_enum ml26124_adc_companding_enum

sname shift val reference val
ML26124_SAI_TRANS_CTL (6)XX00 0000 0-3 ml26124_companding

struct soc_enum ml26124_dac_companding_enum

sname shift val reference val
ML26124_SAI_RCV_CTL (6)XX00 0000 0-3 ml26124_companding


struct snd_kcontrol_new ml26124_snd_controls[]

name sname shift max val
Capture Digital Volume ML26124_RECORD_DIG_VOL (0)XXXX XXXX 0-0xff
Playback Digital Volume ML26124_PLBAK_DIG_VOL (0)XXXX XXXX 0-0xff
Digital Boost Volume ML26124_DIGI_BOOST_VOL (0)00XX XXXX 0-0x3f
EQ Band0 Input Volume ML26124_EQ_GAIN_BRAND0 (0)XXXX XXXX 0-0xff
EQ Band1 Input Volume ML26124_EQ_GAIN_BRAND1 (0)XXXX XXXX 0-0xff
EQ Band2 Input Volume ML26124_EQ_GAIN_BRAND2 (0)XXXX XXXX 0-0xff
EQ Band3 Input Volume ML26124_EQ_GAIN_BRAND3 (0)XXXX XXXX 0-0xff
EQ Band4 Input Volume ML26124_EQ_GAIN_BRAND4 (0)XXXX XXXX 0-0xff
ALC Target Level ML26124_ALC_TARGET_LEV (0)0000 XXXX 0-0xf
ALC Min Input Volume ML26124_ALC_MAXMIN_GAIN (0)0000 0XXX 0-7
ALC MAX Input Volume ML26124_ALC_MAXMIN_GAIN (4)0XXX 0000 1-7
Playback Limitter Min Input Volume ML26124_PL_MAXMIN_GAIN (0)0000 0XXX 0-7
Playback Limitter Max Input Volume ML26124_PL_MAXMIN_GAIN (4)0XXX 0000 1-7
Playback Boost Volume ML26124_PLYBAK_BOST_VOL (0)00XX XXXX 0-0x3f
DC High Pass Filter Switch ML26124_FILTER_EN (0)0000 000X 0-1
NOISE High Pass Filter Switch ML26124_FILTER_EN (1)0000 00X0 0-1
EQ BAND0 Switch ML26124_FILTER_EN (2)0000 0X00 0-1
EQ BAND1 Switch ML26124_FILTER_EN (3)0000 X000 0-1
EQ BAND2 Switch ML26124_FILTER_EN (4)000X 0000 0-1
EQ BAND3 Switch ML26124_FILTER_EN (5)00X0 0000 0-1
EQ BAND4 Switch ML26124_FILTER_EN (6)0X00 0000 0-1
Play Limitter Switch ML26124_DVOL_CTL (0)0000 000X 0-1
Capture Limitter Switch ML26124_DVOL_CTL (1)0000 00X0 0-1
Digital Volume Fade Switch ML26124_DVOL_CTL (3)0000 X000 0-1
Digital Volume Switch ML26124_DVOL_CTL (4)000X 0000 0-1


ml26124_output_mixer_controls

name sname reg(shift) val
DAC Switch ML26124_SPK_AMP_OUT (1)0000 00X0 0-1
Line in Switch ML26124_SPK_AMP_OUT (3)0000 X000 0-1
PGA Switch ML26124_SPK_AMP_OUT (5)00X0 0000 0-1


struct snd_soc_dapm_widget ml26124_dapm_widgets[]

name sname reg(shift) event ref val
MCLK ML26124_CLK_EN (0)0000 000X NULL -
PLL ML26124_CLK_EN (1)0000 00X0 NULL -
MICBIAS ML26124_PW_REF_PW_MNG (0)0000 000X NULL -
Output Mixer ML26124_PW_SPAMP_PW_MNG (0)0000 000X - ml26124_output_mixer_controls[0]
DAC Playback ML26124_PW_DAC_PW_MNG (1)0000 00X0 - -
ADC Capture ML26124_PW_IN_PW_MNG (1)0000 00X0 - -
PGA ML26124_PW_IN_PW_MNG (3)0000 X000 NULL -
InputMux SND_SOC_NOPM (0)0000 000X - &ml26124_input_mux_controls
LineOutEnable SND_SOC_NOPM (0)0000 000X - &ml26124_line_control
VIDEOIN
MDIN
MIN
LIN
VIDEOOUT
SPOUT
LOUT


See Register_Map
See DMA
Advertisement