[alsa-devel] [PATCH 2/8] firmware: Sigma: Skip header during CRC generation

Mike Frysinger vapier at gentoo.org
Fri Nov 25 21:00:50 CET 2011


On Friday 25 November 2011 03:55:42 Lars-Peter Clausen wrote:
> On 11/24/2011 06:21 PM, Mike Frysinger wrote:
> > On Thursday 24 November 2011 07:48:21 Lars-Peter Clausen wrote:
> >> The firmware header is not part of the CRC, so skip it. Otherwise the
> >> firmware will be rejected due to non-matching CRCs.
> > 
> > that's because you didn't compare to the right value ;).  include the CRC
> > -> compare to 0.  omit the CRC -> compare to the CRC value.
> 
> Does this really work if the CRC is inserted somewhere in the middle of the
> bytestream?

i don't think the position matters to the CRC algorithm used by sigmadsp.  
math principle: a ^ b ^ c is the same thing as b ^ a ^ c and c ^ b ^ a.

i could be wrong as to the CRC algo used though.  simple enough for you to 
check -- i implemented this firmware code based on a spec i wrote up for the 
sigmadsp peeps; i never actually had real firmware to test with.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20111125/ed3286d8/attachment.sig 


More information about the Alsa-devel mailing list