Skip to contentSkip to conversation

Change of iomem types

DISCUSSION thewade 2 participants 3 messages Sep 20, 2004 – Sep 21, 2004

lore
Share & tools
lore

thewade

author
#0 lore raw
Quoted 8 lines
Quoted 4 lines

I answered my own question (I thought).
I checked out the CVS version of alsa and copied the alsa-kernel contents to linux/sound
but when I compiled I get this, any ideas why? Thanks!

Apparently, you didn\'t copy the header files to linux/include/sound. Also, the alsa-kernel tree is kept for the very recent linux-kernel version (2.6.9-rc2) only. So, this way won\'t work for you anyway.

As usual you are correct Mr. Iwai. I downloaded and patched 2.6.8.1 to 2.6.9-rc2 and copied the alsa-kernel contents to sound and alsa-kernel/include to include/sound but now it doesnt detect the cardbus on boot and running hdsploader freezes my machine.

You had mentioned that you merged your iomem code with the kernel; if I download and patch kernel 2.6.8.1 to 2.6.9-rc2-bk6 will I then have the iomem code in the kernel?

Thanks for your work and your patience with newbies like me whos coding skills cannot save themselves.

-thewade

-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

#1 lore raw

At Mon, 20 Sep 2004 15:20:28 -0600,

Quoted 10 lines · thewade
Quoted 9 lines
Quoted 5 lines

I answered my own question (I thought).
I checked out the CVS version of alsa and copied the alsa-kernel contents to linux/sound
but when I compiled I get this, any ideas why? Thanks!

Apparently, you didn\'t copy the header files to linux/include/sound. Also, the alsa-kernel tree is kept for the very recent linux-kernel version (2.6.9-rc2) only. So, this way won\'t work for you anyway.

Quoted 6 lines

As usual you are correct Mr. Iwai. I downloaded and patched 2.6.8.1 to 2.6.9-rc2 and copied the alsa-kernel contents to sound and alsa-kernel/include to include/sound but now it doesnt detect the cardbus on boot and running hdsploader freezes my machine.

You had mentioned that you merged your iomem code with the kernel;

No, I mentioned it's merged to ALSA CVS tree. It's not the mainline kernel tree :)

You can compile alsa-driver externally from tarball even for 2.6 kernels. Grab the cvs alsa-kernel and alsa-driver codes (see instruction in the download page of ALSA web), run "./configure", "make" and "make install-modules".

HTH.

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

#2 lore raw

At Tue, 21 Sep 2004 12:03:59 +0200,

Quoted 20 lines · I wrote:

At Mon, 20 Sep 2004 15:20:28 -0600,

Quoted 10 lines · thewade
Quoted 9 lines
Quoted 5 lines

I answered my own question (I thought).
I checked out the CVS version of alsa and copied the alsa-kernel contents to linux/sound
but when I compiled I get this, any ideas why? Thanks!

Apparently, you didn\'t copy the header files to linux/include/sound. Also, the alsa-kernel tree is kept for the very recent linux-kernel version (2.6.9-rc2) only. So, this way won\'t work for you anyway.

Quoted 6 lines

As usual you are correct Mr. Iwai. I downloaded and patched 2.6.8.1 to 2.6.9-rc2 and copied the alsa-kernel contents to sound and alsa-kernel/include to include/sound but now it doesnt detect the cardbus on boot and running hdsploader freezes my machine.

You had mentioned that you merged your iomem code with the kernel;

Quoted 7 lines

No, I mentioned it's merged to ALSA CVS tree. It's not the mainline kernel tree :)

You can compile alsa-driver externally from tarball even for 2.6 kernels. Grab the cvs alsa-kernel and alsa-driver codes (see instruction in the download page of ALSA web), run "./configure", "make" and "make install-modules".

Now I took a look at hdsp code and found an obvious bug which likely has hit you. Could you try the attached patch?

Takashi

Index: alsa-kernel/include/hdsp.h
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/include/hdsp.h,v retrieving revision 1.8

include/hdsp.h +1 -1
diff -u -r1.8 hdsp.h
@@ -76,7 +76,7 @@
 typedef struct _snd_hdsp_firmware hdsp_firmware_t;
 
 struct _snd_hdsp_firmware {
-	unsigned long __user *firmware_data;	/* 24413 long words */
+	void __user *firmware_data;	/* 24413 x 4 bytes */
 };
 
 #define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, hdsp_firmware_t)

Index: alsa-kernel/pci/rme9652/hdsp.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/rme9652/hdsp.c,v retrieving revision 1.69

pci/rme9652/hdsp.c +3 -3
diff -u -r1.69 hdsp.c
@@ -4445,7 +4445,7 @@
 		int i;
 		
 		if (hdsp->io_type == H9652) {
-			unsigned long rms_low, rms_high;
+			u32 rms_low, rms_high;
 			int doublespeed = 0;
 			if (hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DoubleSpeedStatus)
 				doublespeed = 1;
@@ -4620,7 +4620,7 @@
 	}
 	case SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE: {
 		hdsp_firmware_t __user *firmware;
-		unsigned long __user *firmware_data;
+		u32 __user *firmware_data;
 		int err;
 		
 		if (hdsp->io_type == H9652 || hdsp->io_type == H9632) return -EINVAL;
@@ -4638,7 +4638,7 @@
 			return -EIO;
 		}
 
-		if (copy_from_user(hdsp->firmware_cache, firmware_data, sizeof(unsigned long)*24413) != 0) {
+		if (copy_from_user(hdsp->firmware_cache, firmware_data, sizeof(hdsp->firmware_cache)) != 0) {
 			return -EFAULT;
 		}