From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Change of iomem types Date: Tue, 21 Sep 2004 12:24:18 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <200409202120.i8KLKSEL027402@sanctuary.aproximation.org> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: multipart/mixed; boundary="Multipart_Tue_Sep_21_12:24:18_2004-1" Return-path: In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: thewade Cc: alsa-devel List-Id: alsa-devel@alsa-project.org --Multipart_Tue_Sep_21_12:24:18_2004-1 Content-Type: text/plain; charset=US-ASCII At Tue, 21 Sep 2004 12:03:59 +0200, I wrote: > > At Mon, 20 Sep 2004 15:20:28 -0600, > thewade wrote: > > > > > > 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; > > 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 --Multipart_Tue_Sep_21_12:24:18_2004-1 Content-Type: text/plain; charset=US-ASCII Index: alsa-kernel/include/hdsp.h =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/include/hdsp.h,v retrieving revision 1.8 diff -u -r1.8 hdsp.h --- alsa-kernel/include/hdsp.h 23 Jun 2004 13:34:03 -0000 1.8 +++ alsa-kernel/include/hdsp.h 21 Sep 2004 10:16:24 -0000 @@ -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 diff -u -r1.69 hdsp.c --- alsa-kernel/pci/rme9652/hdsp.c 16 Sep 2004 18:36:59 -0000 1.69 +++ alsa-kernel/pci/rme9652/hdsp.c 21 Sep 2004 10:20:25 -0000 @@ -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; } --Multipart_Tue_Sep_21_12:24:18_2004-1-- ------------------------------------------------------- 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