Update 550D beta, now with gain control

89 views
Skip to first unread message

Trammell Hudson

unread,
Aug 8, 2010, 3:51:18 PM8/8/10
to ml-d...@googlegroups.com
This most recent change set appears to fix both the hotplug problem
and the task override bug that was preventing audio input+gain from
working:

http://bitbucket.org/hudson/magic-lantern/changeset/f41a5acfdd32

Attached is an updated autoexec.bin.

--
Trammell

autoexec.bin

Ba...@aol.com

unread,
Aug 8, 2010, 10:22:33 PM8/8/10
to ml-d...@googlegroups.com
After running some more tests with camera,  I am wondering if  the amp/sound system on board is poorer than that which we find on the Canon 5D.  
 
I set the camera to 0 mgain, and to 0 digital gain,  and disconnect all incoming plugs, except I left an miniplug plugged into the mic port, so camera would not inadvertantly switch back  to the camera mic.
 
With no sound being fed through the mic port,   we still were should a floor noise level at -36 one side,   and -42 on the other.   It is my recollection that on the 5d, we were in the high 50's  or 60's or  better on that camera.   Can anyone else verify that is what may be going on ?
 
Chris Barcellos
 
--
http://magiclantern.wikia.com/

To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

Robert Rozak

unread,
Aug 8, 2010, 10:34:36 PM8/8/10
to Magic Lantern firmware development
Chris,

I've been using the juicedLink DT454 AGC Disable feature with the T2i,
and getting excellent results.

I would expect that your results should be at least as good (better).

As a datapoint for you, check out the T2i test video on the DT454
product page:
http://www.juicedlink.com/audio-preamps-mixers-etc/product-list/jl-dt454

The test with the T2i is about 1:50 into the video. It sounds great
(even with youtube compression), so ML should achieve better.


Thanks Trammel (and all)! This is another great contribution to the
community! People don't want to be messing around with AGC Disable,
and they want manual control in their cameras ...


Best Regards,

Robert

Ba...@aol.com

unread,
Aug 8, 2010, 10:35:13 PM8/8/10
to ml-d...@googlegroups.com
Okay ,  this time I put mgain at "4" representing + 10 gain.     I set the dgain in the config file at 10 also, just to see if the threshold level would change.   It did not.    Still at -36 and -42.     It would seem that though I am using different setting, that noise threshhold remains same.    Here is how I have the config file modified.  Am I doing something wrong ?
 
 
# Zebra levels
zebra.level = 61440
zebra.draw = 1
 
# Edge detection (too slow for real use)
edge.draw = 0
 
# Crop marks for 2.35:1
crop.draw = 1
hist.draw = 0
crop.file = A:/cropmarks.bmp
 
audio.alc-enable = 0
 
audio.mic-in = 1
 

# Audio data
# mgain is according to this table:
# 0 == +0 dB
# 1 == +20 dB
# 2 == +26 dB
# 3 == +32 dB
# 4 == +10 dB
# 5 == +17 dB
# 6 == +23 dB
# 7 == +29 dB
# mgain affects both channels equally.
audio.mgain = 4
 
# dgain is in dB.  If you want separate gains per channel,
# use audio.dgain.l and audio.dgain.r to set their gains.
audio.dgain = 10 # dB
 

# mic-power is boolean.  Turn it on if you are using an electret mic
audio.mic-power = 0
 
# Enable liveview automatically?
# Turn this off if your card has trouble booting
# You will need to hit the Live-View or menu button in a few
# seconds after booting
enable-liveview = 1
 
# Disable the powersave so that the LiveView never shuts off?
# WARNING -- this can cause problems with your sensor!
# DO NOT LEAVE THE CAMERA ON CONTINUOUSLY.
disable-powersave = 1
 

reloc.enabled = 1
 
C Barcellos

Trammell Hudson

unread,
Aug 8, 2010, 10:39:56 PM8/8/10
to ml-d...@googlegroups.com
On Sun, Aug 08, 2010 at 10:35:13PM -0400, Ba...@aol.com wrote:
> Here is how I have the config file modified. Am I doing something wrong ?

It's hard to say -- there are many things that might be going wrong
inside of the software in the camera, including the AK4646 registers
being rewritten by Canon's software (like they did in the 5D's 1.1.0
firmware). Sometime this week I hope to map the menu to a button so
that we can adjust the parameters on the fly and verify the changes.

Did you try the headphone monitoring on the USB? I need to make an
adapter cable to try it out, but the register should be set to
enable it as well.

--
Trammell

Ba...@aol.com

unread,
Aug 8, 2010, 11:57:39 PM8/8/10
to ml-d...@googlegroups.com
Trammel: 
 
I attempted head phone monitoring to my Sony MDR-7506.    I adapted using USB audio cable,  and joining the two audio cables with a why miniplug reducer. 
 
First attempt was plugging in to camera before starting camera.     I got audio,  but got no video to the LCD.
 
The second time,   I waited for start up and then plugged in the headphone through USB.   I got video to the LCD and to the headphones.   Signal waa very strong,  and actually will distort phones with lound speech or yelling.   
 
I added config  parameters to your original setting,  which may have affect output to the headphones.  Here is where it was when I tested:
_________________________________________________________________________________________
 
# Zebra levels
zebra.level = 61440
zebra.draw = 1
 
# Edge detection (too slow for real use)
edge.draw = 0
 
# Crop marks for 2.35:1
crop.draw = 1
hist.draw = 0
crop.file = A:/cropmarks.bmp
 
audio.alc-enable = 0
 
audio.mic-in = 1
 
audio.loopback = 1
 
audio.lovl = 3
 
# Audio data
# mgain is according to this table:
# 0 == +0 dB
# 1 == +20 dB
# 2 == +26 dB
# 3 == +32 dB
# 4 == +10 dB
# 5 == +17 dB
# 6 == +23 dB
# 7 == +29 dB
# mgain affects both channels equally.
audio.mgain = 0
 
# dgain is in dB.  If you want separate gains per channel,
# use audio.dgain.l and audio.dgain.r to set their gains.
audio.dgain = 0 # dB
 

# mic-power is boolean.  Turn it on if you are using an electret mic
audio.mic-power = 0
 
# Enable liveview automatically?
# Turn this off if your card has trouble booting
# You will need to hit the Live-View or menu button in a few
# seconds after booting
enable-liveview = 1
 
# Disable the powersave so that the LiveView never shuts off?
# WARNING -- this can cause problems with your sensor!
# DO NOT LEAVE THE CAMERA ON CONTINUOUSLY.
disable-powersave = 1
 

reloc.enabled = 1
 
 
 
 
 
 
 

Ba...@aol.com

unread,
Aug 9, 2010, 12:04:36 AM8/9/10
to ml-d...@googlegroups.com
To just see if I could affect levels to phones,  I reset the following in the config file:
 
audio.lovl = 3   ------------------------>   audio.lovl = 1
 
There didn't appear to be any head phone level change.   I don't know if I am even at the right function for that.
 
Chris
 

Daniel De Tomasi

unread,
Aug 9, 2010, 12:06:35 AM8/9/10
to ml-d...@googlegroups.com
How do i enable the Zebra on t2i?

2010/8/9 <Ba...@aol.com>



--
Daniel De Tomasi
------------------------------
Spacelab Filmes
www.spacelabfilmes.com.br
www.twitter.com/danieldetomasi
www.vimeo.com/dtomasi

arm.indy

unread,
Aug 19, 2010, 5:22:31 PM8/19/10
to Magic Lantern firmware development
in 550d 1.0.8

FF064D08 UnpowerMicAmp

might be useful ?

arm.indy

unread,
Sep 7, 2010, 3:49:07 PM9/7/10
to Magic Lantern firmware development
Hi,

Are audio levels adjusted to minimize wind noise ?
Does this explain problem with audio levels in 550d ?

ROM:FF1AB688 ALV_ObserveStart
ROM:FF1AB9B0 ALV_ObserveStop
ROM:FF1ABA38 ALV_SetInputVol
ROM:FF1ABBC8 alvSetALC
ROM:FF1ABCD0 ALV_SetWindCut
ROM:FF1ABD9C alvSetWind
ROM:FF1ABDA4 alvGetPeak
ROM:FF1AC6C8 alvIgnore
ROM:FF1ACAB0 ALV_Terminate <---
...
state object seems at off_FF4C462C

(from 550d 1.0.8)

Arm.Indy

Renny Hayes

unread,
Sep 20, 2010, 11:16:23 AM9/20/10
to Magic Lantern firmware development
I've been watching this thread anxiously, and just gained membership
to discuss it. I believe that the reason audio settings are not
changing is because NO settings are changing. To confirm this, try
setting mgain or dgain in magiclantern.cfg, and then see if it
modifies the readout on the camera that says "mgain 18/18, dgain 4".
Trammell mentioned earlier that the values might be getting
overwritten by the camera's original firmware, so maybe the autoexec
needs to be modified to overwrite the overwritten values?

I'll be waiting for that in-camera menu system, since that sounds like
it should (at least) pave over the config problems temporarily.

I know you get this a lot, but keep up the good work, devs! My T2i has
never given me such clean audio (even if it is incredibly quiet).
> _http://magiclantern.wikia.com/_(http://magiclantern.wikia.com/)
>
> To  post to this group, send email to ml-d...@googlegroups.com
> To unsubscribe  from this group, send email to
> ml-devel+u...@googlegroups.com
> For  more options, visit this group at _http://groups.google.com/group/ml-d
> evel?hl=en_ (http://groups.google.com/group/ml-devel?hl=en)  

phil

unread,
Sep 22, 2010, 2:45:32 AM9/22/10
to Magic Lantern firmware development
> I believe that the reason audio settings are not
> changing is because NO settings are changing.

No the problem is that the camera cannot open the file. Here it
generates an error:

"FILE * file = FIO_Open( filename, O_SYNC );
strcpy( head.value, filename );
if( file == INVALID_PTR )"
(in function config_parse_file)

I already fixed this for me, by changing the config file name in "5d-
hack.c" to a shorter name "B:/magic.cfg" which then works well for me.
Sorry that I didn't inform you earlier.

phil

unread,
Sep 22, 2010, 2:47:46 AM9/22/10
to Magic Lantern firmware development
> No the problem is ...
I meant, "yes this is the problem", it doensn't read any setting ;)

Alex

unread,
Sep 22, 2010, 3:10:42 PM9/22/10
to Magic Lantern firmware development
Great, Phil! Are your other changes to the ML source code available
online? It would be nice to see and learn from them.

phil

unread,
Sep 23, 2010, 2:40:56 AM9/23/10
to Magic Lantern firmware development
I have not published them, but it's the only important change I made.

The other changes are just small tests which set ISO value etc., so
really not useful.

Tapani Toivanen

unread,
Sep 28, 2010, 11:04:33 AM9/28/10
to Magic Lantern firmware development
I want to thank Trammell and everyone for the great work on this
project!

Here's my findings on the ML-550d:

(1.) I managed to build the 550d-branch of the magic lantern by the
instructions on the Wiki and this discussion board.
(2.) I too found out that the config file (magiclantern.cfg) was not
read. To fix this, I changed the name and references of the config
file to B:/magic.cfg as suggested by phil. I did the fix as follows:

mv magiclantern.cfg magic.cfg
grep -lr -e 'magiclantern.cfg' * | xargs sed -i 's/magiclantern.cfg/
magic.cfg/g'
rm *.o
make

(3.) Dgain setting from config file only works, if both channels are
set separately in config:
audio.dgain.l = 0 # dB
audio.dgain.r = 0 # dB

(4.) I tested the audio using the following setup:
Beyerdynamic MC-830(pair) -> JuicedLink CX231 preamp (Hi-gain) -> Mic-
Input of 550D
To my ears, there was still some kind of filter in play, even though
the signal was almost clean.
I then checked the audio.c file and enabled the audio register logging
after the register had been set.

Without further modifications I got:
AUDIO_IC_PM1 6d
AUDIO_IC_PM2 03
AUDIO_IC_SIG1 10
AUDIO_IC_SIG2 07
AUDIO_IC_ALC1 00
AUDIO_IC_ALC2 d2
AUDIO_IC_IVL 91
AUDIO_IC_IVR 91
AUDIO_IC_OVL 90
AUDIO_IC_OVR 00
AUDIO_IC_ALCVOL 91
AUDIO_IC_MODE3 c1
AUDIO_IC_MODE4 00
AUDIO_IC_PM3 07
AUDIO_IC_FIL1 20
AUDIO_IC_HPF0 00
AUDIO_IC_HPF1 00
AUDIO_IC_HPF2 00
AUDIO_IC_HPF3 00
AUDIO_IC_LPF0 00
AUDIO_IC_LPF1 00
AUDIO_IC_LPF2 00
AUDIO_IC_LPF3 00

From this log, I noticed that the only non-zero Filter register was
the AUDIO_IC_FIL1, which was set at 20. I checked the datasheet of the
internal sound IC, and found that FIL1 is used for stereo emphasis
filtering, and it should be off, when all of its bits are set to zero.
In an attempt to disable possible in-camera filters, I commented out
the setting of the LPF registers and set the FIL1 to 0x00 as follows:
// Enable the LPF
// Canon uses F2A/B = 0x0ED4 and 0x3DA9.
//audio_ic_write( AUDIO_IC_LPF0 | 0xD4 );
//audio_ic_write( AUDIO_IC_LPF1 | 0x0E );
//audio_ic_write( AUDIO_IC_LPF2 | 0xA9 );
//audio_ic_write( AUDIO_IC_LPF3 | 0x3D );
//audio_ic_write( AUDIO_IC_FIL1
// | audio_ic_read( AUDIO_IC_FIL1 )
// | (1<<5)
//);
audio_ic_write( AUDIO_IC_FIL1 | audio_ic_read( AUDIO_IC_FIL1 ) |
0x00);

After the modification I got:
AUDIO_IC_PM1 6d
AUDIO_IC_PM2 03
AUDIO_IC_SIG1 10
AUDIO_IC_SIG2 07
AUDIO_IC_ALC1 00
AUDIO_IC_ALC2 d2
AUDIO_IC_IVL 91
AUDIO_IC_IVR 91
AUDIO_IC_OVL 90
AUDIO_IC_OVR 00
AUDIO_IC_ALCVOL 91
AUDIO_IC_MODE3 c1
AUDIO_IC_MODE4 00
AUDIO_IC_PM3 07
AUDIO_IC_FIL1 00
AUDIO_IC_HPF0 00
AUDIO_IC_HPF1 00
AUDIO_IC_HPF2 00
AUDIO_IC_HPF3 00
AUDIO_IC_LPF0 00
AUDIO_IC_LPF1 00
AUDIO_IC_LPF2 00
AUDIO_IC_LPF3 00

And to my ear, the audio is even cleaner and I cannot hear any in-
camera filtering in effect.

(5.) During the audio testing with the modified version, my camera
went dead for two separate times while browsing the videos in the
camera.
The screen just went black, and there was no effect when turning off
or on the camera. After taking the battery out for couple of seconds
and then turning on, it started normally on both times.
I could not find a way to repeat the behavior for the third time.

(6.) There is a burst of noise during first seconds of recording.
Seems like the levels are set very high for that moment.

---------------

Questions:
(1.) Can someone confirm that there was in fact some in-camera digital
audio filtering in place and the reasons for setting these as they
were? Might that same filter be in play for the 5D versions of ML?
(2.) Does anyone have an idea, what could cause the blackout problem,
and how to fix it?
(3.) Now this may be trivial or found in some manuals: Can I use the
format function of the camera for cleaning up the ML-SD-cards?

Best Regards,
Tapani Toivanen

phil

unread,
Sep 29, 2010, 10:07:55 AM9/29/10
to Magic Lantern firmware development
Hi Tapani,
> (3.) Dgain setting from config file only works, if both channels are
> set separately in config:
> audio.dgain.l = 0 # dB
> audio.dgain.r = 0 # dB

Yes I also noticed that and just set both to 0 separately

> (4.) ...
> From this log, I noticed that the only non-zero Filter register was
> the AUDIO_IC_FIL1, which was set at 20. I checked the datasheet of the
> internal sound IC, and found that FIL1 is used for stereo emphasis
> filtering, and it should be off, when all of its bits are set to zero.

I didn't see or try that yet, but sounds very interesting.

> (6.) There is a burst of noise during first seconds of recording.
> Seems like the levels are set very high for that moment.

Yes I also noticed this very strange phenomenon. It occurs at around
1-2 seconds after the recording starts and lasts for less than a
second. Therefore started the recording a little earlier than actually
needed..

Additionally I noticed that when turning the camera on, my display
stays black. I have to push the DISP button to turn it on again.
Although the setting should be saved, I have to do this every time I
turn on the camera...

Sorry, I have no answers to your questions.

Matt

unread,
Nov 23, 2010, 1:46:37 AM11/23/10
to Magic Lantern firmware development
If I understand this correctly, the current compiled version for the
550d will not read the config file. It looks like this has been
corrected and it would be nice if someone could upload the fix. I am
currently trying to compile the code, but I am inexperienced and keep
hitting roadblocks.

Alex

unread,
Nov 27, 2010, 1:53:53 PM11/27/10
to ml-d...@googlegroups.com
The latest builds are already uploaded:

Piers' build: http://groups.google.com/group/ml-devel/msg/1c690d8dee580ee3 (fixes config file and some sound issues)
Arm.Indy's build: http://groups.google.com/group/ml-devel/msg/87b96d3cb43b4bec (fixes config file)

Please read their discussion thread before running. Enjoy!

If you have difficulties compiling ML, please tell me exactly what you did and what went wrong.



To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

Alex

unread,
Nov 27, 2010, 1:55:18 PM11/27/10
to Magic Lantern firmware development
Something went wrong, so I'm sending links again:

Piers' build: http://groups.google.com/group/ml-devel/msg/1c690d8dee580ee3
On Nov 27, 8:53 pm, Alex <broscutama...@gmail.com> wrote:
> The latest builds are already uploaded:
>
> Piers' build:http://groups.google.com/group/ml-devel/msg/1c690d8dee580ee3(fixes
> config file and some sound issues)
> Arm.Indy's build:http://groups.google.com/group/ml-devel/msg/87b96d3cb43b4bec(fixes config
> file)
>
> Please read their discussion thread before running. Enjoy!
>
> If you have difficulties compiling ML, please tell me exactly what you did
> and what went wrong.
>
> On Tue, Nov 23, 2010 at 8:46 AM, Matt <matts...@gmail.com> wrote:
> > If I understand this correctly, the current compiled version for the
> > 550d will not read the config file. It looks like this has been
> > corrected and it would be nice if someone could upload the fix. I am
> > currently trying to compile the code, but I am inexperienced and keep
> > hitting roadblocks.
>
> > --
> >http://magiclantern.wikia.com/
>
> > To post to this group, send email to ml-d...@googlegroups.com
> > To unsubscribe from this group, send email to
> > ml-devel+u...@googlegroups.com<ml-devel%2Bunsu...@googlegroups.com>
Reply all
Reply to author
Forward
0 new messages