Skip to contentSkip to conversation

Adding a new architecture to alsa-driver

DISCUSSION Adrian McMenamin 4 participants 21 messages Apr 8, 2006 – Apr 14, 2006 Kbuild

lore
Share & tools
lore
#0 lore raw

I've now wasted two days of my life trying to do this and I have had no luck, can someone explain the steps needed to added SH (ie CONFIG_SUPERH) to the alsa-driver build. I am sure somebody knows the steps needed to make this happen

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#1 lore raw
Quoted 4 lines · Adrian McMenamin

I've now wasted two days of my life trying to do this and I have had no luck, can someone explain the steps needed to added SH (ie CONFIG_SUPERH) to the alsa-driver build. I am sure somebody knows the steps needed to make this happen

I already explained it. What *exactly* does not work if you change the Makefiles as I explained?

Lee

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#20 lore raw
In reply to Adrian McMenamin
Quoted 4 lines · Adrian McMenamin

I've now wasted two days of my life trying to do this and I have had no luck, can someone explain the steps needed to added SH (ie CONFIG_SUPERH) to the alsa-driver build. I am sure somebody knows the steps needed to make this happen

You need to post your driver as a patch against ALSA CVS.

Lee

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#2 lore raw
In reply to Lee Revell
Quoted 8 lines · Lee Revell
Quoted 4 lines · Adrian McMenamin

I've now wasted two days of my life trying to do this and I have had no luck, can someone explain the steps needed to added SH (ie CONFIG_SUPERH) to the alsa-driver build. I am sure somebody knows the steps needed to make this happen

I already explained it. What *exactly* does not work if you change the Makefiles as I explained?

The changes you suggest simply are inadequate. There is no makefile without configure and even though I have managed to patch the configure file so it will create a Makefile, a make simply builds the alsa core and doesn't touch the sh sub directory despite having this in the makefile:

ifeq (y,$(CONFIG_SUPERH))
SUBDIRS += sh
endif

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#3 lore raw
Quoted 1 line · Adrian McMenamin

The changes you suggest simply are inadequate.

I am not surprised. It should be a start though. Did you create the sh/Kconfig file?

Quoted 2 lines

There is no makefile
without configure

Yes, there is. Try a fresh CVS checkout of alsa-driver then "find -name Makefile" - you'll see ./ppc/Makefile, ./sparc/Makefile, etc.

I would have to see your driver in the form of a patch against ALSA CVS to comment further.

Lee

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#4 lore raw
In reply to Adrian McMenamin
Quoted 7 lines · Adrian McMenamin

The changes you suggest simply are inadequate. There is no makefile without configure and even though I have managed to patch the configure
file so it will create a Makefile, a make simply builds the alsa core and doesn't touch the sh sub directory despite having this in the makefile:

Did you patch alsa-driver/configure.in?

$ grep CONFIG_PARISC configure.in 
#elif defined(CONFIG_PARISC)
AC_SUBST(CONFIG_PARISC)

I don't know autoconf well enough to know exactly what this is doing but it seems like you could just copy/paste and s/PARISC/SUPERH/...

Lee

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#9 lore raw
In reply to Adrian McMenamin
Quoted 16 lines · Adrian McMenamin
Quoted 8 lines · Lee Revell
Quoted 4 lines · Adrian McMenamin

I've now wasted two days of my life trying to do this and I have had no luck, can someone explain the steps needed to added SH (ie CONFIG_SUPERH) to the alsa-driver build. I am sure somebody knows the steps needed to make this happen

I already explained it. What *exactly* does not work if you change the Makefiles as I explained?

The changes you suggest simply are inadequate. There is no makefile without configure and even though I have managed to patch the configure file so it will create a Makefile, a make simply builds the alsa core and doesn't touch the sh sub directory despite having this in the makefile:

Quoted 6 lines

ifeq (y,$(CONFIG_SUPERH))
SUBDIRS += sh
endif

OK, how does this work - try this patch against a clean alsa-driver CVS checkout, then add your driver. Replace c_opts with whatever CFLAGS you need.

Index: Makefile
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/Makefile,v
retrieving revision 1.121

Makefile +4 -1
diff -u -r1.121 Makefile
@@ -6,7 +6,7 @@
 ifneq ($(KERNELRELEASE),)
 # call from 2.6 kernel build system
 
-obj-m += acore/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/
+obj-m += acore/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/ sh/
 
 else
 
@@ -99,6 +99,9 @@
 ifeq (y,$(CONFIG_PARISC))
 SUBDIRS  += parisc
 endif
+ifeq (y,$(CONFIG_SUPERH))
+SUBDIRS  += sh 
+endif
 CSUBDIRS += include test utils
 
 KCONFIG_FILES = $(shell find $(SND_TOPDIR) -name Kconfig) $(shell find $(SND_TOPDIR)/alsa-kernel/ -name Kconfig)

Index: configure.in
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/configure.in,v retrieving revision 1.358

configure.in +8 -0
diff -u -r1.358 configure.in
@@ -872,6 +872,8 @@
 	fprintf(file, "amba");
 #elif defined(CONFIG_PARISC)
 	fprintf(file, "parisc");
+#elif defined(CONFIG_SUPERH)
+	fprintf(file, "sh");
 #elif defined(CONFIG_MVIAC3_2)
 	fprintf(file, "viac3_2");
 #else
@@ -1117,6 +1119,11 @@
     c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"
     test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
     ;;
+  sh)
+    ARCH=sh
+    c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"
+    test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
+    ;;
   viac3_2)
     ARCH=i386
     if $KCC -march=c3-2 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
@@ -1259,6 +1266,7 @@
 AC_SUBST(CONFIG_ISA)
 AC_SUBST(CONFIG_ISA_DMA_API)
 AC_SUBST(CONFIG_PARISC)
+AC_SUBST(CONFIG_SUPERH)
 test "$CONFIG_ISA" = "y" && AC_DEFINE(CONFIG_SND_ISA)
 
 dnl Check for SMP...

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#5 lore raw
In reply to Lee Revell
Quoted 9 lines · Lee Revell
Quoted 7 lines · Adrian McMenamin

The changes you suggest simply are inadequate. There is no makefile without configure and even though I have managed to patch the configure
file so it will create a Makefile, a make simply builds the alsa core and doesn't touch the sh sub directory despite having this in the makefile:

Quoted 9 lines

Did you patch alsa-driver/configure.in?

$ grep CONFIG_PARISC configure.in 
#elif defined(CONFIG_PARISC)
AC_SUBST(CONFIG_PARISC)

I don't know autoconf well enough to know exactly what this is doing but it seems like you could just copy/paste and s/PARISC/SUPERH/...

I had to patch it in about 6 or 7 places and that was one of them

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#10 lore raw
In reply to Lee Revell
Quoted 84 lines · Lee Revell
Quoted 16 lines · Adrian McMenamin
Quoted 8 lines · Lee Revell
Quoted 4 lines · Adrian McMenamin

I've now wasted two days of my life trying to do this and I have had no luck, can someone explain the steps needed to added SH (ie CONFIG_SUPERH) to the alsa-driver build. I am sure somebody knows the steps needed to make this happen

I already explained it. What *exactly* does not work if you change the Makefiles as I explained?

The changes you suggest simply are inadequate. There is no makefile without configure and even though I have managed to patch the configure file so it will create a Makefile, a make simply builds the alsa core and doesn't touch the sh sub directory despite having this in the makefile:

Quoted 6 lines

ifeq (y,$(CONFIG_SUPERH))
SUBDIRS += sh
endif

OK, how does this work - try this patch against a clean alsa-driver CVS checkout, then add your driver. Replace c_opts with whatever CFLAGS you need.

Index: Makefile
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/Makefile,v
retrieving revision 1.121
diff -u -r1.121 Makefile

Makefile +4 -1
@@ -6,7 +6,7 @@
 ifneq ($(KERNELRELEASE),)
 # call from 2.6 kernel build system
 
-obj-m += acore/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/
+obj-m += acore/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/ sh/
 
 else
 
@@ -99,6 +99,9 @@
 ifeq (y,$(CONFIG_PARISC))
 SUBDIRS  += parisc
 endif
+ifeq (y,$(CONFIG_SUPERH))
+SUBDIRS  += sh 
+endif
 CSUBDIRS += include test utils
 
 KCONFIG_FILES = $(shell find $(SND_TOPDIR) -name Kconfig) $(shell find $(SND_TOPDIR)/alsa-kernel/ -name Kconfig)

Index: configure.in
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/configure.in,v retrieving revision 1.358
diff -u -r1.358 configure.in

configure.in +7 -0
@@ -872,6 +872,8 @@
 	fprintf(file, "amba");
 #elif defined(CONFIG_PARISC)
 	fprintf(file, "parisc");
+#elif defined(CONFIG_SUPERH)
+	fprintf(file, "sh");
 #elif defined(CONFIG_MVIAC3_2)
 	fprintf(file, "viac3_2");
 #else
@@ -1117,6 +1119,11 @@
     c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"
     test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
     ;;
+  sh)
+    ARCH=sh
+    c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"
+    test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
+    ;;
   viac3_2)
     ARCH=i386
     if $KCC -march=c3-2 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then

configure.in line 1272

Quoted 7 lines
configure.in +1 -0
@@ -1259,6 +1266,7 @@
 AC_SUBST(CONFIG_ISA)
 AC_SUBST(CONFIG_ISA_DMA_API)
 AC_SUBST(CONFIG_PARISC)
+AC_SUBST(CONFIG_SUPERH)
 test "$CONFIG_ISA" = "y" && AC_DEFINE(CONFIG_SND_ISA)
 
 dnl Check for SMP...

I've done all of this except for the c_opts which obviously wouldn't impact on the non-building of the sh directory. I'll have another look shortly

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#6 lore raw
In reply to Adrian McMenamin
Quoted 16 lines · Adrian McMenamin
Quoted 15 lines · Lee Revell
Quoted 7 lines · Adrian McMenamin

The changes you suggest simply are inadequate. There is no makefile without configure and even though I have managed to patch the configure
file so it will create a Makefile, a make simply builds the alsa core and doesn't touch the sh sub directory despite having this in the makefile:

Did you patch alsa-driver/configure.in?

$ grep CONFIG_PARISC configure.in 
#elif defined(CONFIG_PARISC)
AC_SUBST(CONFIG_PARISC)
Quoted 5 lines
Quoted 3 lines

I don't know autoconf well enough to know exactly what this is doing but it seems like you could just copy/paste and s/PARISC/SUPERH/...

I had to patch it in about 6 or 7 places and that was one of them

Do you have a valid Kconfig file with your driver? The dependencies are parsed from Kconfig files.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#7 lore raw
Quoted 18 lines · Jaroslav Kysela
Quoted 16 lines · Adrian McMenamin
Quoted 15 lines · Lee Revell
Quoted 7 lines · Adrian McMenamin

The changes you suggest simply are inadequate. There is no makefile without configure and even though I have managed to patch the configure
file so it will create a Makefile, a make simply builds the alsa core and doesn't touch the sh sub directory despite having this in the makefile:

Did you patch alsa-driver/configure.in?

$ grep CONFIG_PARISC configure.in 
#elif defined(CONFIG_PARISC)
AC_SUBST(CONFIG_PARISC)
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

I don't know autoconf well enough to know exactly what this is doing but it seems like you could just copy/paste and s/PARISC/SUPERH/...

I had to patch it in about 6 or 7 places and that was one of them

Do you have a valid Kconfig file with your driver? The dependencies are parsed from Kconfig files.

Yes, though I have put it in alsa-kernel for the build as Lee suggested (the writing a driver document doesn't say that though)

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#8 lore raw

At Sun, 09 Apr 2006 13:26:06 +0100,

Quoted 24 lines · Adrian McMenamin
Quoted 22 lines · Jaroslav Kysela
Quoted 20 lines · Adrian McMenamin
Quoted 18 lines · Lee Revell
Quoted 7 lines · Adrian McMenamin

The changes you suggest simply are inadequate. There is no makefile without configure and even though I have managed to patch the configure
file so it will create a Makefile, a make simply builds the alsa core and doesn't touch the sh sub directory despite having this in the makefile:

Did you patch alsa-driver/configure.in?

$ grep CONFIG_PARISC configure.in 
#elif defined(CONFIG_PARISC)
AC_SUBST(CONFIG_PARISC)

I don't know autoconf well enough to know exactly what this is doing but it seems like you could just copy/paste and s/PARISC/SUPERH/...

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

I had to patch it in about 6 or 7 places and that was one of them

Do you have a valid Kconfig file with your driver? The dependencies are parsed from Kconfig files.

Yes, though I have put it in alsa-kernel for the build as Lee suggested (the writing a driver document doesn't say that though)

My document is not a bible that tells everything. Don't believe in it blindly.

For adding a new architecture, currently, you'd need to patch alsa-kernel/Kconfig. Or, an ugly hack, e.g. by including "../sh/Kconfig" from alsa-driver/acore/Kconfig. I'll fix this issue later.

But honestly, it's a quite time-cusuming thing that you ask us questions without showing your code. I strongly advise you to post a patch. You can create an all-in-one patch by

% diff -ruN old-tree new-tree

This will include changes for unnecessary files (like configure, config.*, */Makefile...), and you'll need to cut them manually via a text editor. A more clever way is, if you compare two CVS trees,

	% diff -ruN --exclude=CVS --exclude='.#*' \
		--exclude-from=.cvsignore \
		old-tree new-tree

or, using "cvs diff" on the new CVS tree,

% cvs diff -u -N

In the latter case, you need to add the new files via "cvs add". Otherwise "cvs diff" won't make a diff.

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#11 lore raw
In reply to Lee Revell
Quoted 2 lines · Lee Revell

c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"

I have tried this patch and it doesn't work. Essentially the aica card isn't picked up. I think this has something to do with aclocal.m4 or something similar.

To be honest I've hit a brick wall and any help at all would be welcome.

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#12 lore raw
Quoted 11 lines · Adrian McMenamin
Quoted 2 lines · Lee Revell

c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"

I have tried this patch and it doesn't work. Essentially the aica card isn't picked up. I think this has something to do with aclocal.m4 or something similar.

To be honest I've hit a brick wall and any help at all would be welcome.

I need to see your driver in the form of a patch against ALSA CVS sources to help any more.

Lee

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#13 lore raw
In reply to Adrian McMenamin
Quoted 5 lines · Adrian McMenamin
Quoted 2 lines · Lee Revell

c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"

Quoted 7 lines

I have tried this patch and it doesn't work. Essentially the aica card isn't picked up. I think this has something to do with aclocal.m4 or something similar.

To be honest I've hit a brick wall and any help at all would be welcome.

Adrian,

OK, here's the working (I think) patch against ALSA CVS.

I could not figure out how to add a new arch while leaving the driver in alsa-driver, so this adds it to alsa-kernel.

Lee

Kconfig +2 -0
diff -Nru alsa-kernel/Kconfig alsa-kernel2/Kconfig
@@ -74,6 +74,8 @@
 
 source "sound/parisc/Kconfig"
 
+source "sound/sh/Kconfig"
+
 endmenu
 
 menu "Open Sound System"
Makefile +1 -1
diff -Nru alsa-kernel/Makefile alsa-kernel2/Makefile
@@ -4,7 +4,7 @@
 obj-$(CONFIG_SOUND) += soundcore.o
 obj-$(CONFIG_SOUND_PRIME) += oss/
 obj-$(CONFIG_DMASOUND) += oss/
-obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/ mips/
+obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/ mips/ sh/
 
 ifeq ($(CONFIG_SND),y)
   obj-y += last.o
sh/Kconfig +16 -0
diff -Nru alsa-kernel/sh/Kconfig alsa-kernel2/sh/Kconfig
@@ -0,0 +1,16 @@
+menu "SH (Super-H) devices"
+	depends on SND!=n && SUPERH
+
+config SND_AICA
+	tristate "Yamaha AICA sound for SEGA Dreamcast"
+	depends on SND
+	depends on SH_DREAMCAST
+	select SND_PCM
+	help
+	  Say Y here to include support for sound on your SEGA Dreamcast
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called snd-aica.
+
+endmenu
+
sh/Makefile +2 -0
diff -Nru alsa-kernel/sh/Makefile alsa-kernel2/sh/Makefile
@@ -0,0 +1,2 @@
+  snd-aica-objs := aica.o
+  obj-$(CONFIG_SND_AICA) += snd-aica.o
sh/aica.c +802 -0

802 lines not on this page · raw message

sh/aica.h +79 -0

79 lines not on this page · raw message

Makefile +4 -1
diff -Nru alsa-driver/Makefile alsa-driver2/Makefile
@@ -6,7 +6,7 @@
 ifneq ($(KERNELRELEASE),)
 # call from 2.6 kernel build system
 
-obj-m += acore/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/
+obj-m += acore/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/ sh/
 
 else
 
@@ -99,6 +99,9 @@
 ifeq (y,$(CONFIG_PARISC))
 SUBDIRS  += parisc
 endif
+ifeq (y,$(CONFIG_SUPERH))
+SUBDIRS  += sh 
+endif
 CSUBDIRS += include test utils
 
 KCONFIG_FILES = $(shell find $(SND_TOPDIR) -name Kconfig) $(shell find $(SND_TOPDIR)/alsa-kernel/ -name Kconfig)
configure.in +8 -0
diff -Nru alsa-driver/configure.in alsa-driver2/configure.in
@@ -872,6 +872,8 @@
 	fprintf(file, "amba");
 #elif defined(CONFIG_PARISC)
 	fprintf(file, "parisc");
+#elif defined(CONFIG_SUPERH)
+	fprintf(file, "sh");
 #elif defined(CONFIG_MVIAC3_2)
 	fprintf(file, "viac3_2");
 #else
@@ -1117,6 +1119,11 @@
     c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"
     test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
     ;;
+  sh)
+    ARCH=sh
+    c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"
+    test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
+    ;;
   viac3_2)
     ARCH=i386
     if $KCC -march=c3-2 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
@@ -1259,6 +1266,7 @@
 AC_SUBST(CONFIG_ISA)
 AC_SUBST(CONFIG_ISA_DMA_API)
 AC_SUBST(CONFIG_PARISC)
+AC_SUBST(CONFIG_SUPERH)
 test "$CONFIG_ISA" = "y" && AC_DEFINE(CONFIG_SND_ISA)
 
 dnl Check for SMP...
sh/Makefile +10 -0
diff -Nru alsa-driver/sh/Makefile alsa-driver2/sh/Makefile
@@ -0,0 +1,10 @@
+ifndef SND_TOPDIR
+SND_TOPDIR=..
+endif
+
+include $(SND_TOPDIR)/toplevel.config
+include $(SND_TOPDIR)/Makefile.conf
+
+include $(SND_TOPDIR)/alsa-kernel/sh/Makefile
+
+include $(SND_TOPDIR)/Rules.make
sh/aica.c +3 -0
diff -Nru alsa-driver/sh/aica.c alsa-driver2/sh/aica.c
@@ -0,0 +1,3 @@
+#include "../alsa-kernel/sh/aica.c"
+EXPORT_NO_SYMBOLS;
+

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#14 lore raw

At Mon, 10 Apr 2006 21:13:36 -0400,

Quoted 15 lines · Lee Revell
Quoted 5 lines · Adrian McMenamin
Quoted 2 lines · Lee Revell

c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"

Quoted 7 lines

I have tried this patch and it doesn't work. Essentially the aica card isn't picked up. I think this has something to do with aclocal.m4 or something similar.

To be honest I've hit a brick wall and any help at all would be welcome.

Quoted 6 lines

Adrian,

OK, here's the working (I think) patch against ALSA CVS.

I could not figure out how to add a new arch while leaving the driver in alsa-driver, so this adds it to alsa-kernel.

As I wrote in another post, it's not possible cleanly right now. You can include sh/Kconfig from acore/Kconfig, for example, but better to fix alsa-driver/utils/mod-deps.c, which generates acinclude.m4 and toplevel config.

Makefile line 10

Quoted 12 lines

diff -Nru alsa-kernel/Makefile alsa-kernel2/Makefile

Makefile +1 -1
@@ -4,7 +4,7 @@
 obj-$(CONFIG_SOUND) += soundcore.o
 obj-$(CONFIG_SOUND_PRIME) += oss/
 obj-$(CONFIG_DMASOUND) += oss/
-obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/ mips/
+obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/ mips/ sh/
 
 ifeq ($(CONFIG_SND),y)
   obj-y += last.o

This change is not necessary. Only the changes to Kconfigs are required in alsa-kernel tree. Others can be gracefully put solely in alsa-driver tree.

sh/Makefile line 2

Quoted 6 lines

diff -Nru alsa-kernel/sh/Makefile alsa-kernel2/sh/Makefile

sh/Makefile +2 -0
@@ -0,0 +1,2 @@
+  snd-aica-objs := aica.o
+  obj-$(CONFIG_SND_AICA) += snd-aica.o

This should go to alsa-driver/sh/Makefile.

sh/aica.c

Quoted 3 lines

diff -Nru alsa-kernel/sh/aica.c alsa-kernel2/sh/aica.c

sh/aica.c +0 -0

I don't comment on driver code here.
Many things I pointed are not fixed yet...

Quoted 4 lines

diff -Nru alsa-driver/sh/Makefile alsa-driver2/sh/Makefile

sh/Makefile line 10

Quoted 10 lines
sh/Makefile +10 -0
@@ -0,0 +1,10 @@
+ifndef SND_TOPDIR
+SND_TOPDIR=..
+endif
+
+include $(SND_TOPDIR)/toplevel.config
+include $(SND_TOPDIR)/Makefile.conf
+
+include $(SND_TOPDIR)/alsa-kernel/sh/Makefile
+
+include $(SND_TOPDIR)/Rules.make

The following should be in this file in replace of
include $(SND_TOPDIR)/alsa-kernel/sh/Makefile
snd-aica-objs := aica.o obj-$(CONFIG_SND_AICA) += snd-aica.o

sh/aica.c line 3

Quoted 7 lines

diff -Nru alsa-driver/sh/aica.c alsa-driver2/sh/aica.c

sh/aica.c +3 -0
@@ -0,0 +1,3 @@
+#include "../alsa-kernel/sh/aica.c"
+EXPORT_NO_SYMBOLS;
+

Also, aica.c and aica.h should be directly here.

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#16 lore raw
In reply to Lee Revell
Quoted 14 lines · Lee Revell
Quoted 5 lines · Adrian McMenamin
Quoted 2 lines · Lee Revell

c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"

Quoted 7 lines

I have tried this patch and it doesn't work. Essentially the aica card isn't picked up. I think this has something to do with aclocal.m4 or something similar.

To be honest I've hit a brick wall and any help at all would be welcome.

Quoted 6 lines

Adrian,

OK, here's the working (I think) patch against ALSA CVS.

I could not figure out how to add a new arch while leaving the driver in alsa-driver, so this adds it to alsa-kernel.

I just cannot get this patch to apply. It seems to be made at two different patch levels

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#17 lore raw
Quoted 3 lines · Adrian McMenamin

I just cannot get this patch to apply. It seems to be made at two different patch levels

cvs diff was not working for me (I could not get it to show the contents of the "sh" directories, diff -Nru style) so I made a separate patch for alsa-driver and alsa-kernel and combined them.

It works for me:

$ cat ~/aica-new.patch | patch -p0 --dry-run
patching file alsa-kernel/Kconfig
patching file alsa-kernel/Makefile
patching file alsa-kernel/sh/Kconfig
patching file alsa-kernel/sh/Makefile
patching file alsa-kernel/sh/aica.c
patching file alsa-kernel/sh/aica.h
patching file alsa-driver/Makefile
patching file alsa-driver/configure.in
patching file alsa-driver/sh/Makefile
patching file alsa-driver/sh/aica.c

Lee

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#18 lore raw
Quoted 11 lines · Lee Revell
Quoted 3 lines · Adrian McMenamin

I just cannot get this patch to apply. It seems to be made at two different patch levels

cvs diff was not working for me (I could not get it to show the contents of the "sh" directories, diff -Nru style) so I made a separate patch for alsa-driver and alsa-kernel and combined them.

It works for me:

Quoted 12 lines
$ cat ~/aica-new.patch | patch -p0 --dry-run
patching file alsa-kernel/Kconfig
patching file alsa-kernel/Makefile
patching file alsa-kernel/sh/Kconfig
patching file alsa-kernel/sh/Makefile
patching file alsa-kernel/sh/aica.c
patching file alsa-kernel/sh/aica.h
patching file alsa-driver/Makefile
patching file alsa-driver/configure.in
patching file alsa-driver/sh/Makefile
patching file alsa-driver/sh/aica.c

I'll try it this way then

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#19 lore raw
In reply to Lee Revell

At Tue, 11 Apr 2006 17:57:55 -0400,

Quoted 8 lines · Lee Revell
Quoted 3 lines · Adrian McMenamin

I just cannot get this patch to apply. It seems to be made at two different patch levels

cvs diff was not working for me (I could not get it to show the contents of the "sh" directories, diff -Nru style)

cvs diff shows the patch for new files only when they are added to repo via cvs add. They don't have to be committed, though.

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#15 lore raw
In reply to Takashi Iwai
Quoted 86 lines · Takashi Iwai

At Mon, 10 Apr 2006 21:13:36 -0400,

Quoted 15 lines · Lee Revell
Quoted 5 lines · Adrian McMenamin
Quoted 2 lines · Lee Revell

c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"

Quoted 7 lines

I have tried this patch and it doesn't work. Essentially the aica card isn't picked up. I think this has something to do with aclocal.m4 or something similar.

To be honest I've hit a brick wall and any help at all would be welcome.

Quoted 6 lines

Adrian,

OK, here's the working (I think) patch against ALSA CVS.

I could not figure out how to add a new arch while leaving the driver in alsa-driver, so this adds it to alsa-kernel.

As I wrote in another post, it's not possible cleanly right now. You can include sh/Kconfig from acore/Kconfig, for example, but better to fix alsa-driver/utils/mod-deps.c, which generates acinclude.m4 and toplevel config.

Makefile line 10

Quoted 12 lines

diff -Nru alsa-kernel/Makefile alsa-kernel2/Makefile

Makefile +1 -1
@@ -4,7 +4,7 @@
 obj-$(CONFIG_SOUND) += soundcore.o
 obj-$(CONFIG_SOUND_PRIME) += oss/
 obj-$(CONFIG_DMASOUND) += oss/
-obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/ mips/
+obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/ mips/ sh/
 
 ifeq ($(CONFIG_SND),y)
   obj-y += last.o

This change is not necessary. Only the changes to Kconfigs are required in alsa-kernel tree. Others can be gracefully put solely in alsa-driver tree.

sh/Makefile line 2

Quoted 6 lines

diff -Nru alsa-kernel/sh/Makefile alsa-kernel2/sh/Makefile

sh/Makefile +2 -0
@@ -0,0 +1,2 @@
+  snd-aica-objs := aica.o
+  obj-$(CONFIG_SND_AICA) += snd-aica.o

This should go to alsa-driver/sh/Makefile.

sh/aica.c

Quoted 3 lines

diff -Nru alsa-kernel/sh/aica.c alsa-kernel2/sh/aica.c

sh/aica.c +0 -0

I don't comment on driver code here.
Many things I pointed are not fixed yet...

Quoted 4 lines

diff -Nru alsa-driver/sh/Makefile alsa-driver2/sh/Makefile

sh/Makefile line 10

Quoted 10 lines
sh/Makefile +10 -0
@@ -0,0 +1,10 @@
+ifndef SND_TOPDIR
+SND_TOPDIR=..
+endif
+
+include $(SND_TOPDIR)/toplevel.config
+include $(SND_TOPDIR)/Makefile.conf
+
+include $(SND_TOPDIR)/alsa-kernel/sh/Makefile
+
+include $(SND_TOPDIR)/Rules.make

The following should be in this file in replace of
include $(SND_TOPDIR)/alsa-kernel/sh/Makefile
snd-aica-objs := aica.o obj-$(CONFIG_SND_AICA) += snd-aica.o

Quoted 10 lines

sh/aica.c line 3

Quoted 7 lines

diff -Nru alsa-driver/sh/aica.c alsa-driver2/sh/aica.c

sh/aica.c +3 -0
@@ -0,0 +1,3 @@
+#include "../alsa-kernel/sh/aica.c"
+EXPORT_NO_SYMBOLS;
+

Also, aica.c and aica.h should be directly here.

This worked - in the sense that the alsa setup now tries to compile the driver. Yes, lots of things weren't fixed, but that was because I couldn't compile the driver against the alsa sources - I can now do that so will get on with fixing the driver.

However, I note the alsa anon cvs still seems to be shipping out code that was meant to be fixed 10 days ago.

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642