Hi,
I just compiled ML for 550D/Rebel T2i with a shorter filename for the config file (in 5d-hack.c)
as done by Phil here in September:
The easiest approach to make a card bootable in a portable fashion
is to do it in the camera. In the 5Dm2 release there is a menu option
to write the partition table, but I was not able to get this to
work on the 550D.
If you look in bootflags.c, I have commented out the call to
bootflag_write_bootblock(). I did not figure out what has changed
in the sd_device structure that is hanging the camera when I try
to write the boot block..
--
Trammell
--
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
Sorry, in the previous post ment to say:
For my camera, setting AUDIO_IC_FIL1 to 0x00 seems to disable a HIGH PASS filter, but I'm now unsure that this is the right way to do it.
2010/11/14 Tapani Toivanen <toivase...@gmail.com>
Okay, I checked out the datasheet again and I think I previously confused the FIL1(Wind Reduction filter) and FIL3(Stereo Emphasis Filter). Looks like setting FIL1 to 0 doesn't necessarily disable this the wind reduction filter. It's possible that it sets the filter coefficients. If FIL1 setting in audio.c corresponds to the FIL1 in data sheet, then we have (data sheet page 62):
F1A13-0, F1B13-0: FIL1 (Wind-noise Reduction Filter) Coefficient (14bit x 2)
Default: F1A13-0 bits = 0x1FA9, F1B13-0 bits = 0x20AD
fc = 150Hz@fs=44.1kHz
The FIL1 (Wind-noise reduction filter) ON/OFF function is controlled as follows (from page 34):
HPFAD bit controls ON/OFF of the 1st
step HPF and HPF bit controls ON/OFF of the 2nd step HPF. When the HPF is OFF, the audio data passes this block by
0dB gain. The coefficient should be set when HPFAD=HPF bits = �0� or PMADL=PMADR= PMDAC bits = �0�.
I don't know if there is a known register address for the HPF and HPFAD bits. And since I don't completely understand the effects of setting the AUDIO_IC_FIL1, maybe it's best to leave it untouched until further investigation. For my camera, setting AUDIO_IC_FIL1 to 0x00 seems to disable a low pass filter, but I'm now unsure that this is the right way to do it.
Thanks,
Tapani
2010/11/14 arm.indy <arm.i...@gmail.com>
pages 34 and 35:
http://www.asahi-kasei.co.jp/akm/en/product/ak4646/ak4646_f03e.pdf
Indy
> 2010/11/14 arm.indy <arm.indi...@gmail.com>
On 14 nov, 15:49, Tapani Toivanen <toivasentap...@gmail.com> wrote:
> Good questions, and I'm not sure if I can answer these, as I don't know the
> whole story behind the code. What I did was just commenting out the LPF
> write calls and set the AUDIO_IC_FIL1 to 0. Maybe a simple enable/disable in
> conf? Surely if there's a doubt of any risks involved, it should not be in a
> public release yet.
>
> Tapani
>
> > > �There is some LPF register setting hard
> > > coded in audio.c
>
> > do you think about that ? how to improve this ?
>
> > � � � �// 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 );
>
> > > and also the stereo emphasis filter, AUDIO_IC_FIL1, which
> > > was set at 20.
>
> > � � � � audio_ic_write( AUDIO_IC_FIL1
> > � � � � � � � �| audio_ic_read( AUDIO_IC_FIL1 )
> > � � � � � � � �| (1<<5)
> > � � � �);
>
> > what variables names for these audio configurations are you
> > suggesting ?
> > "audio.lpf1" to lpf3 ?
> > "audio.fil1" ?
>
> > is their any risk to burn something if mlantern.cfg has wrong/extreme
> > values ?
>
> > what default and safe range for these values ?
>
> > I thing I understood how to add this, but I do not want to crash
> > anything.
>
> > Indy
>
> > > Best,
> > > Tapani Toivanen
>
> > > 2010/11/14 arm.indy <arm.indi...@gmail.com>
>
> > > > Hi Chris,
>
> > > > what would be the process to improve audio quality in 550d ?
> > > > do you need audio register outputs ?
>
> > > > do you want a special build with CONFIG_AUDIO_REG_LOG defined, so that
> > > > registers will be logged ?
>
> > > > fromhttps://bitbucket.org/hudson/magic-lantern/src/tip/audio.c
> > > > "
> > > > #ifdef CONFIG_AUDIO_REG_LOG
>
> > > > // Do not write the value; just read them and record to a logfile
> > > > static uint16_t audio_regs[] = {
> > > > "
>
> > > > Indy
>
> > > > On 14 nov, 09:41, Chris Barcellos <ba...@aol.com> wrote:
> > > > > I did find the method of setting up the larger cards in WIKI, � and
> > it
> > > > > looks fairly simple to set up my bigger cards now.
>
> > > > > I also tried the audio controls with my Juiced Link CX231. � The 231
> > > > > was definitely powerfull enought to get a decent sound signal from my
> > > > > Rode NTG 3, �when I set the analog and digital gain to zero. � I had
> > > > > the CX231 set on high, �and the dial turned to 3 oclock position.
> > > > > Looking at audio track in Vegas, the floor was still around 42-44 db,
> > > > > and I remember we could get the 5D to around 58 or higher. � Kicking
> > > > > the gain switch on the CX231 down to medium, �and leaving the dial
> > > > > around 3 oclock, � I got a lower floor db, �but also had to raise the
> > > > > level in Vegas by normalizing, �which raise the back ground noise.
>
> > > > > On Nov 13, 2:09 am, Piers <pie...@gmail.com> wrote:
>
> > > > > > On Nov 13, 6:44 pm, Chris Barcellos <ba...@aol.com> wrote:
>
> > > > > > > � �1. � Has anyone devised a simple method of preparing the card.
> > > > �I
> > > > > > > don't even know if I could go back and figure out how I did the
> > last
> > > > > > > one, �and I also remember I couldn't use any bigger than a 4 gig
> > > > > > > card. � �What is latest there.
Hi Guys, just eavesdropping on your thread.
I think that setting FIL1 to 0x00 might be disabling ALL filter functions (which is consistent with your observation of disabling the HPF), see below.
AUDIO_IC_FIL1 could possibly refer to "Digital Filter Select 1" byte as shown on page 53 (and again on page 61)
Addr Register Name D7 D6 D5 D4 D3 D2 D1 D0
11H Digital Filter Select 1 GN1 GN0 LPF HPF EQ0 FIL3 0 HPFAD
where the bits are as follows (Table 21 on page 32 has a diagram showing where these bits plug into the filter block)
GN1-0 = Gain Compensation is used to compensate the frequency response and the gain that is changed by Stereo Separation Emphasis Filter
LPF = LPF bit controls ON/OFF of the LPF
HPF = HPF bit controls ON/OFF of the 2nd step HPF
EQ0 = EQ0 bit controls ON/OFF of EQ0 (Part of Gain Compensation Filter)
FIL3 = FIL3 bit controls ON/OFF of FIL3, FIL3 is used to emphasize the stereo separation of stereo mic recording data or playback data
HPFAD = HPFAD bit controls ON/OFF of the 1st step HPF
Hope this helps.
Regards,
Morgan.
On 15/11/2010 6:33 a.m., Tapani Toivanen wrote:
Sorry, in the previous post ment to say:
For my camera, setting AUDIO_IC_FIL1 to 0x00 seems to disable a HIGH PASS filter, but I'm now unsure that this is the right way to do it.
2010/11/14 Tapani Toivanen <toivase...@gmail.com>
Okay, I checked out the datasheet again and I think I previously confused the FIL1(Wind Reduction filter) and FIL3(Stereo Emphasis Filter). Looks like setting FIL1 to 0 doesn't necessarily disable this the wind reduction filter. It's possible that it sets the filter coefficients. If FIL1 setting in audio.c corresponds to the FIL1 in data sheet, then we have (data sheet page 62):
F1A13-0, F1B13-0: FIL1 (Wind-noise Reduction Filter) Coefficient (14bit x 2)
Default: F1A13-0 bits = 0x1FA9, F1B13-0 bits = 0x20AD
fc = 150Hz@fs=44.1kHz
The FIL1 (Wind-noise reduction filter) ON/OFF function is controlled as follows (from page 34):
HPFAD bit controls ON/OFF of the 1st
step HPF and HPF bit controls ON/OFF of the 2nd step HPF. When the HPF is OFF, the audio data passes this block by
0dB gain. The coefficient should be set when HPFAD=HPF bits = “0” or PMADL=PMADR= PMDAC bits = “0”.
I don't know if there is a known register address for the HPF and HPFAD bits. And since I don't completely understand the effects of setting the AUDIO_IC_FIL1, maybe it's best to leave it untouched until further investigation. For my camera, setting AUDIO_IC_FIL1 to 0x00 seems to disable a low pass filter, but I'm now unsure that this is the right way to do it.
Thanks,
Tapani
2010/11/14 arm.indy <arm.i...@gmail.com>
pages 34 and 35:
http://www.asahi-kasei.co.jp/akm/en/product/ak4646/ak4646_f03e.pdf
Indy
> 2010/11/14 arm.indy <arm.indi...@gmail.com>
On 14 nov, 15:49, Tapani Toivanen <toivasentap...@gmail.com> wrote:
> Good questions, and I'm not sure if I can answer these, as I don't know the
> whole story behind the code. What I did was just commenting out the LPF
> write calls and set the AUDIO_IC_FIL1 to 0. Maybe a simple enable/disable in
> conf? Surely if there's a doubt of any risks involved, it should not be in a
> public release yet.
>
> Tapani
>
>
> > On 14 nov, 12:29, Tapani Toivanen <toivasentap...@gmail.com> wrote:
> > > There is some LPF register setting hard
> > > coded in audio.c
>
> > do you think about that ? how to improve this ?
>
> > // 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 );
>
> > > and also the stereo emphasis filter, AUDIO_IC_FIL1, which
> > > was set at 20.
>
> > audio_ic_write( AUDIO_IC_FIL1
> > | audio_ic_read( AUDIO_IC_FIL1 )
> > | (1<<5)
> > > > > I did find the method of setting up the larger cards in WIKI, and
> > it
> > > > > looks fairly simple to set up my bigger cards now.
>
> > > > > I also tried the audio controls with my Juiced Link CX231. The 231
> > > > > was definitely powerfull enought to get a decent sound signal from my
> > > > > Rode NTG 3, when I set the analog and digital gain to zero. I had
> > > > > the CX231 set on high, and the dial turned to 3 oclock position.
> > > > > Looking at audio track in Vegas, the floor was still around 42-44 db,
> > > > > and I remember we could get the 5D to around 58 or higher. Kicking
> > > > > the gain switch on the CX231 down to medium, and leaving the dial
> > > > > around 3 oclock, I got a lower floor db, but also had to raise the
> > > > > level in Vegas by normalizing, which raise the back ground noise.
>
> > > > > On Nov 13, 2:09 am, Piers <pie...@gmail.com> wrote:
>
> > > > > > On Nov 13, 6:44 pm, Chris Barcellos <ba...@aol.com> wrote:
>
> > > > > > > 1. Has anyone devised a simple method of preparing the card.
> > > > I
> > > > > > > don't even know if I could go back and figure out how I did the
> > last
> > > > > > > one, and I also remember I couldn't use any bigger than a 4 gig
> > > > > > > card. What is latest there.
Yep, with that assumption a setting 0x20 (00010100) would mean that the 2nd step of the HPF and the FIL3 would be in use. With 0x00 no filtering would be in use. Can someone confirm, or is testing the only option?
Hi Guys, just eavesdropping on your thread.
I think that setting FIL1 to 0x00 might be disabling ALL filter functions (which is consistent with your observation of disabling the HPF), see below.
AUDIO_IC_FIL1 could possibly refer to "Digital Filter Select 1" byte as shown on page 53 (and again on page 61)
Addr��� Register Name����������� D7���� D6��� D5���� D4���� D3���� D2�� D1� D0
11H���� Digital Filter Select 1� GN1� GN0� LPF� HPF� EQ0� FIL3� 0��� HPFAD
where the bits are as follows (Table 21 on page 32 has a diagram showing where these bits plug into the filter block)
GN1-0� = Gain Compensation is used to compensate the frequency response and the gain that is changed by Stereo Separation Emphasis Filter
Morgan.
Looking into the audio ic data sheet further, it seems it may be
possible to use the external stereo microphone input as a single
differential/balanced input. This could potentially provide a very
quiet signal path to the ADC.
Obviously - as this uses both (left and right) inputs - the resulting
recording will be mono. However depending on how Canon have connected
the internal microphone. This signal may be available as a separate
channel which can be recorded at the same time (depending on register
settings).
Also this is all largely dependent on what Canon have connected between
the stereo input and audio IC.
I do not see any mention in the 550D manual of whether mic power is
supplied out the external microphone input.
If it is, this will not work for providing power to a balanced
microphone, since both sides of the differential pair will be at the
same voltage.
This could possibly be blocked on the -ve input with a capacitor, then a
separate 1k resistance to ground could complete the mic power circuit.
Otherwise the power could be blocked on both inputs with capacitors, and
separate external power injected to the mic (9v battery).
Page 30 of the datasheet has information about connections and register
configurations used to configure the IC for this type of input.
Page 29 has information about stereo/mono configuration which may be
useful depending if it was desirable to have the built in mic as a
second recorded channel (or not).
Does this look feasible to anyone else?
Regards, Morgan.
--
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
--
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
https://bitbucket.org/hudson/magic-lantern/changeset/3d4f7f55273e
if (disable_filters) {
audio_ic_write( AUDIO_IC_FIL1 | 0x00 ); //no need to set them all to
0Hz, just turn em off, in one easy register
}
55 | CONFIG_INT( "audio.mic-in", mic_in, 0 ); | |
55 | //CONFIG_INT( "audio.mic-in", mic_in, 0 ); // not used any more? | |
56 | 56 | CONFIG_INT( "audio.loopback", loopback, 1 ); |
57 | CONFIG_INT( "audio.input-source", input_source, 0 ); //0=internal; 1=L int, R ext; 2 = stereo ext; 3 = L int, R ext balanced | |
58 | CONFIG_INT( "audio.disable-filters", disable_filters, 1 ); //disable the HPF, LPF and pre-emphasis filters | |
57 | 59 | |
510 | ||
511 | int pm3[] = { 0x00, 0x05, 0x07, 0x11 }; //should this be in a header file? | |
502 | 512 | |
503 | 513 | if( !force ) |
504 | 514 | { |
… | … | @@ -513,6 +523,10 @@ audio_configure( int force ) |
513 | 523 | } |
514 | 524 | |
515 | 525 | audio_ic_write( AUDIO_IC_PM1 | 0x6D ); // power up ADC and DAC |
526 | ||
527 | //mic_power is forced on if input source is 0, 1 or 3 | |
528 | mic_power = (input_source == 2) ? mic_power : 1; | |
529 | ||
516 | 530 | audio_ic_write( AUDIO_IC_SIG1 |
517 | 531 | | 0x10 |
518 | 532 | | ( mic_power ? 0x4 : 0x0 ) |
… | … | @@ -523,10 +537,8 @@ audio_configure( int force ) |
523 | 537 | | ( lovl & 0x3) << 0 // line output level |
524 | 538 | ); |
525 | 539 | |
526 | if( mic_in ) | |
527 | audio_ic_write( AUDIO_IC_PM3 | 0x00 ); // internal mic | |
528 | else | |
529 | audio_ic_write( AUDIO_IC_PM3 | 0x07 ); // external input | |
540 | //PM3 is set according to the input choice | |
541 | audio_ic_write( AUDIO_IC_PM3 | pm3[input_source] ); | |
530 | 542 | |
531 | 543 | gain.alc1 = alc_enable ? (1<<5) : 0; |
532 | 544 | audio_ic_write( AUDIO_IC_ALC1 | gain.alc1 ); // disable all ALC |
… | … | @@ -536,28 +548,11 @@ audio_configure( int force ) |
536 | 548 | |
537 | 549 | audio_ic_set_input_volume( 0, dgain_r ); |
538 | 550 | audio_ic_set_input_volume( 1, dgain_l ); |
551 | audio_ic_set_mgain( mgain ); | |
audio_ic_write( AUDIO_IC_FIL1 | 0x00 ); //no need to set them all to 0Hz, just turn em off, in one easy register |
any help would be appreciated..thanks,
sodo
thanks!
sodo
>audio.c:326:22: warning: operation on 'audio_levels[1].avg' may be
>undefined
>audio.c: At top level:
>audio.c:336:1: warning: initialization from incompatible pointer type
>audio.c:749:1: warning: return type defaults to 'int'
>audio.c:808:3: warning: initialization from incompatible pointer type
>audio.c: In function 'my_sounddev_task':
>audio.c:913:6: warning: unused variable 'count'
>audio.c:924:1: warning: initialization from incompatible pointer type
>audio.c:738:1: warning: 'audio_loopback_display' defined but not used
>audio.c: In function 'audio_filters_display':
>audio.c:758:1: warning: control reaches end of non-void function