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

Re: please review alsaconf patch



Roland,

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?

This patch may also work for the AMD7930, and I would be gratefull if
someone with an AMD7930 could test it.

Thanks,
	Martin

On Sun, Oct 30, 2005 at 07:40:49PM +0100, Roland Stigge wrote:
> Hi Martin,
> 
> you wrote:
> > I created the patch below to make alsaconf work with the DBRI and
> > CS4231 chips. But I'm not sure if this will work for the AMD7930
> > chip. The patch tries to find a "SUNW,AMD7930*" directory in this
> > case, but I don't know if that exists. Can somebody with an AMD7930
> > sound chip confirm/deny this?
> >
> > Other feedback (like better approaches) is welcome too. I'll submit
> > it to Takashi once the AMD7930 issue is resolved.
> 
> I tried with my CS4231 and that didn't work. Loading the module
> snd-sun-cs4231 manually works fine.
> 
> Maybe the following debug output is of interest:
> 
> # /sbin/modprobe -a -l | grep 'snd-sun-'
> /lib/modules/2.6.12-1-sparc64/kernel/sound/sparc/snd-sun-cs4231.ko
> /lib/modules/2.6.12-1-sparc64/kernel/sound/sparc/snd-sun-amd7930.ko
> 
> /proc/openprom# find /proc/openprom -follow -type d -name "SUNW,*"
> /proc/openprom/packages/SUNW,builtin-drivers
> /proc/openprom/SUNW,UltraSPARC-III@40,0
> /proc/openprom/pci@40,4600000/SUNW,qlc@4
> /proc/openprom/upa@40,4480000/SUNW,afb@1c,0
> 
> (On A SunBlade 1000.)
> 
> So there's no 'SUNW,CS4231*' which results in the whole patch giving no
> output.
> 
> Is this problem related to the above
> 
> bye,
>   Roland
---------------------------------------------------------------------------
--- alsaconf.orig	2005-10-25 16:00:11.000000000 +0100
+++ alsaconf	2005-10-31 13:02:07.000000000 +0000
@@ -696,6 +696,40 @@
 	    echo "PowerMac $i" >> $FOUND
 	done
     fi
+
+    #
+    # Sparc
+    #
+    if grep -q Sparc $PROCFS/cpuinfo; then
+	test -r $PROCFS/openprom || /bin/mount -t openpromfs none $PROCFS/openprom >/dev/null 2>&1
+	# Check for an "audio" device
+	audio=
+	compat=
+	if test -r $PROCFS/openprom; then
+	    audio=`find $PROCFS/openprom -follow -type d -name "audio" -print`
+	fi
+	if test -n "$audio"; then
+	    compat=`cat $audio/compatible`
+	    compat=${compat#SUNW,}
+	fi
+	# Go through all cards we have
+	/sbin/modprobe -a -l | grep 'snd-sun-' | \
+	while read i; do
+	    i=${i##*/}
+	    i=${i%%.o}
+	    i=${i%%.ko}
+	    sdev=`echo ${i#snd-sun-} | tr "[a-z]" "[A-Z]"`
+
+	    if test "$sdev" = "$compat"; then
+		echo "$sdev $i" >> $FOUND
+	    elif test -r $PROCFS/openprom; then
+		find $PROCFS/openprom -follow -type d -name "SUNW,${sdev}*" \
+		    -exec echo "$sdev $i" \; 2>/dev/null >> $FOUND
+	    else
+		echo "$sdev $i" >> $FOUND
+	    fi
+	done
+    fi
 }
 
 #



Reply to: