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

Re: please review alsaconf patch


Martin Habets wrote:
> Thanks for the info. I guess you must have an "audio" device on the
> ebus then, and I failed to check for that in my original patch.
> Could you try the patch attached in stead of the original one, please?

Unfortunately, it didn't work out-of-the-box. With a bit of polishing I
could at least make it run (see attached incremental patch to your changes).

Some comments to the respective changes:

(1) $PROCFS was not defined, so I set it manually. I didn't know where
you intended it to come from so I just set it in the beginning of the
patch to /proc.

(2) I guess you meant mounting openpromfs in case /proc/openprom exists?
Therefore && instead of ||.

(3) Under /proc/openprom/pci@40,4700000/ebus@5, I have a directory
called "audio@1,200000". Therefore, I needed to search for "audio*"
instead of "audio".

(4) The file "compatible" contains: "'SUNW,CS4231'" (with single
quotes). I needed to remove them.

Now, alsaconf detects the device fine. (Also consider FJP's comments on
using modprobe.)

However, there are some issues left with my CS4231: On bootup, the
modules are not loaded automatically (even hotplug doesn't care about
them). So I need to put "snd-sun-cs4231" into /etc/modules. Further,
when I want to play something (e.g., with xmms), I often (unpredictably)
get (white?) noise. Retrying helps every 3rd or 4th time. Maybe
alignment or endianess issues. But these are different issues and not
related to alsaconf I think. If noone else has experienced this yet, I
will need to dive into the driver myself later.

Thanks for now.

--- alsaconf.orig	2005-11-01 12:39:37.000000000 +0100
+++ alsaconf	2005-11-01 12:38:53.000000000 +0100
@@ -588,16 +588,19 @@
     # Sparc
+    PROCFS=/proc
     if grep -q Sparc $PROCFS/cpuinfo; then
-	test -r $PROCFS/openprom || /bin/mount -t openpromfs none $PROCFS/openprom >/dev/null 2>&1
+	test -r $PROCFS/openprom && /bin/mount -t openpromfs none $PROCFS/openprom >/dev/null 2>&1
 	# Check for an "audio" device
 	if test -r $PROCFS/openprom; then
-	    audio=`find $PROCFS/openprom -follow -type d -name "audio" -print`
+	    audio=`find $PROCFS/openprom -follow -type d -name "audio*" -print`
 	if test -n "$audio"; then
 	    compat=`cat $audio/compatible`
+	    compat=${compat#\'}
+	    compat=${compat%\'}
 	# Go through all cards we have

Reply to: