[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#464197: Any update on this issue?



On Mon, 2009-05-04 at 01:35 +0200, Antonio Ospite wrote:
> On Mon, 04 May 2009 00:17:03 +0100
> Ben Hutchings <ben@decadent.org.uk> wrote:
> 
> > On Mon, 2009-04-20 at 21:45 -0600, dann frazier wrote:
> > > 
> > > Kalle: would you mind submitting your patch upstream, if you haven't
> > > already? A lot of similar patches for other drives have been accepted
> > > in recent months.
> > 
> > Kalle's patch has a serious problem in that it attempts to byte-swap the
> > firmware in place.  On a big-endian system where the firmware is built
> > into the kernel, or if a cache is implemented, this will corrupt the
> > image or cause an oops.
> >
> 
> I saw also that some drivers provide blobs as ihex files, a textual
> representation of the binary data, and convert it to a binary image at
> build time. Could this be useful in this case?

In the upstream repository, all firmware extracted from drivers is
stored in some variant of Intel hex format.  But this is still
byte-oriented and does not help to avoid byte-swapping.

> > Furthermore, I think any patch sent upstream will need to handle the
> > "new" DSP code as well.
> >
> 
> Indeed.
> 
> > Anyway, here's my proposed patch for unstable (against 2.6.30-rc4) that
> > deals with the first problem.  I'll have a go at handling the "new" DSP
> > code as well, but as I don't have the hardware for this driver this will
> > need testing by others.
> >
> 
> I will test this patch soon; wrt the NEW DSP feature, I don't know if I
> can test everything, because I have a Thinkpad T20, only stereo output.
> 
> BTW, what binary image to use? Is the one extracted with the tool in
> this thread, to be run on a little-endian host, ok?

You would need to apply this patch to cs46xx_image.h before running that
program:

--- a/sound/pci/cs46xx/cs46xx_image.h
+++ b/sound/pci/cs46xx/cs46xx_image.h
@@ -1,14 +1,13 @@
 struct BA1struct {
 	struct {
-		unsigned long offset;
-		unsigned long size;
+		u32 size;
 	} memory[BA1_MEMORY_COUNT];
 	u32 map[BA1_DWORD_SIZE];
 };
 
 
 static struct BA1struct BA1Struct = {
-{{ 0x00000000, 0x00003000 },{ 0x00010000, 0x00003800 },{ 0x00020000, 0x00007000 }},
+{{ 0x00003000 },{ 0x00003800 },{ 0x00007000 }},
 {0x00000000,0x00000000,0x00000000,0x00000000,
 0x00000000,0x00000000,0x00000000,0x00000000,
 0x00000000,0x00000000,0x00000163,0x00000000,
--- END ---

Also note the change of filename (partly because of the format change).

Ben.

-- 
Ben Hutchings
No political challenge can be met by shopping. - George Monbiot

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: