Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CS4231 / XMMS Garbled Sound [Solved!]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
davidfowler2000
n00b
n00b


Joined: 04 Nov 2005
Posts: 57
Location: Glasgow, Scotland

PostPosted: Thu Nov 10, 2005 7:03 pm    Post subject: CS4231 / XMMS Garbled Sound [Solved!] Reply with quote

Hi

I'm trying to get my Ultra 5 to start making sounds through it's built in CS4231 sound chip. Problem is, when i emerge ALSA i get the following error...

Quote:
Some of the drivers you selected require PNP in your kernel (interwave interwave-stb). Either enable PNP in your kernel or trim which drivers get compiled using ALSA_CARDS in /etc/make.conf .
Please check to make sure these options are set correctly.
Failure to do so may cause unexpected problems.
Once you have satisfied these options, please try merging this package again.


When i compiled my kernel (2.4.31-sparc-r2) at first i used "genkernel all" on the assumption that everything would work but it obviously didn't. So after i emerged (well tried to) ALSA, i done make menuconfig to go through all the options enabling various sound options that were either in as modules or not at all. After exiting i ran the "make dep" command and still getting the same error.

On the subject of KDE, whenever i start it up i get

"/dev/dsp" cannot be found or is busy. I assume this has just about everything to do with ALSA.

Any help is appreciated as i am new to Linux


Last edited by davidfowler2000 on Sat Nov 19, 2005 9:27 pm; edited 3 times in total
Back to top
View user's profile Send private message
TheWitePony
Apprentice
Apprentice


Joined: 04 Feb 2004
Posts: 211

PostPosted: Thu Nov 10, 2005 7:19 pm    Post subject: Reply with quote

I may be wrong, but does PNP mean Plug and Play?

You can see if its enabled by going into Device Drivers--->Plug and Play Support---->
Back to top
View user's profile Send private message
davidfowler2000
n00b
n00b


Joined: 04 Nov 2005
Posts: 57
Location: Glasgow, Scotland

PostPosted: Thu Nov 10, 2005 7:33 pm    Post subject: Reply with quote

I dont have a Device Drivers or Plug and Play Support section in my menu config. Here's what i do have at the top level...

Quote:
Code maturity level support
Loadable module support
General setup
Console drivers
Misc Linux/SPARC drivers
Linux/SPARC audio subsystem (EXPERIMENTAL)
Memory technology devices
Block devices
Networking Options
ATA/IDE/MFM/RLL Support
SCSI support
FIbre channel support
Unix 98 PTY support
Video for linux
XFree86 DRI support
Input core system
File systems
Sound
USB support
Bluetooth support
Watchdog
Kernel hacking
Cryptographic options
Library routines
Grsecurity


Inside the obvious sound ones are
Quote:
Linux/SPARC audio subsystem (Experimental) --->

(*)Audio support (EXPERIMENTAL)
(*)CS4231 lowlevel driver
(*)Dummy lowlevel driver


Sound --->
(*)Sound Card Support
(*)Crystal Sound CS4281
(*)OSS Sound Modules
(*)Crystal CS4232 based (PNP) cards


I also tried the Alsa-driver approach and putting

"ALSA_CARDS="CS4231"

into make.conf but naturally it doesnt have a clue what CS4231 is. Also, before someone asks...lspci doesn't spit out sound card information.
Back to top
View user's profile Send private message
Pete M
Apprentice
Apprentice


Joined: 30 Apr 2005
Posts: 154

PostPosted: Thu Nov 10, 2005 7:44 pm    Post subject: Reply with quote

Try

Code:
ALSA_CARDS="snd-cs4231"


or

Code:
ALSA_CARDS="snd-card-cs4231"


In /etc/make.conf

Alsa page here
http://www.alsa-project.org/alsa-doc/doc-php/template.php?company=Cirrus+Logic&card=True+Sound+724.&chip=CS4231&module=cs4231

Pete
Back to top
View user's profile Send private message
davidfowler2000
n00b
n00b


Joined: 04 Nov 2005
Posts: 57
Location: Glasgow, Scotland

PostPosted: Thu Nov 10, 2005 7:56 pm    Post subject: Reply with quote

No joy...couldnt find either of them. One thing that puzzle's me is that your link to the ALSA project page states that the CS4231 is a Cirrus Logic chip but upon looking in the machine, it distinctly says "Crystal" on the chip. However that is irrelevant at the moment.
Back to top
View user's profile Send private message
Pete M
Apprentice
Apprentice


Joined: 30 Apr 2005
Posts: 154

PostPosted: Thu Nov 10, 2005 8:08 pm    Post subject: Reply with quote

Post the audio section from the command

Code:
lspci -vv


Pete
Back to top
View user's profile Send private message
davidfowler2000
n00b
n00b


Joined: 04 Nov 2005
Posts: 57
Location: Glasgow, Scotland

PostPosted: Thu Nov 10, 2005 8:22 pm    Post subject: Reply with quote

lspci says nothing about sound. I said that before

<<Edit>>

This is because the CS4231 uses the SBUS interface, not PCI or ISA


Last edited by davidfowler2000 on Sat Nov 19, 2005 12:45 am; edited 1 time in total
Back to top
View user's profile Send private message
Pete M
Apprentice
Apprentice


Joined: 30 Apr 2005
Posts: 154

PostPosted: Thu Nov 10, 2005 8:38 pm    Post subject: Reply with quote

Sorry my BAD

Pete
Back to top
View user's profile Send private message
davidfowler2000
n00b
n00b


Joined: 04 Nov 2005
Posts: 57
Location: Glasgow, Scotland

PostPosted: Thu Nov 10, 2005 8:44 pm    Post subject: Reply with quote

Right, i've been playing around, looking through these forums and other websites etc and i have found that /dev/sound/cs4231 actually exists on my machine and the module is being loaded by the kernel so im going to hazard a guess that the sound driver is actually installed. So, my next question is how do you get KDE to map to /dev/sound/cs4231 (or /dev/sound/audio because ive heard stories of this working) instead of /dev/dsp?

ALSA would be nice though so if anyone has any ideas, i'd love to hear them.

Cheers
-David
Back to top
View user's profile Send private message
gust4voz
Retired Dev
Retired Dev


Joined: 09 Sep 2003
Posts: 373
Location: Buenos Aires, Argentina

PostPosted: Thu Nov 10, 2005 10:08 pm    Post subject: Reply with quote

The cs4231 alsa driver isn't currently working well.
_________________
Gustavo Zacarias
Gentoo/SPARC monkey
Back to top
View user's profile Send private message
i-right-i
Tux's lil' helper
Tux's lil' helper


Joined: 08 Nov 2004
Posts: 118
Location: Chandler, AZ USA

PostPosted: Fri Nov 11, 2005 10:41 pm    Post subject: Reply with quote

I have had this exact same issue for over a year, and nobody has ever been able to give any useful info around this at all.

Therefore, I have come to the conslusion if you have cs4231 sound, forget it because it will never work.

i-right-i
_________________
Gentoo on x86
Gentoo on SPARC
Back to top
View user's profile Send private message
davidfowler2000
n00b
n00b


Joined: 04 Nov 2005
Posts: 57
Location: Glasgow, Scotland

PostPosted: Fri Nov 11, 2005 11:21 pm    Post subject: Reply with quote

I would hardly say "Forget It" to cs4231 just because there is no (or very little) alsa support. The main thing i don't get with alsa is that wierd error you get when you emerge it - my original post.

There are plenty examples of people on these forums that have managed to get something out of the dam thing as long as you use /dev/sound/audio instead of /dev/dsp by either cat'ing to it or using XMMS. I suppose all you would have to do is get KDE to stop mapping to the dsp device by default by either changing it's configuration or changing the /dev/dsp pointer so that it points to /dev/sound/audio (could this be done with symlinks???) but im going to stop myself short right there before someone asks me how to do it.

Once i get my machine back up and running (full hard drive and corrupt fs) i'll get kde back on and look through it's config tools. Short of that, we have an old YMF744 or 724 pci card in work that wouldn't be noticed missing (partly because i am the only person in work who has faith in Yamaha cards).
Back to top
View user's profile Send private message
davidfowler2000
n00b
n00b


Joined: 04 Nov 2005
Posts: 57
Location: Glasgow, Scotland

PostPosted: Sat Nov 12, 2005 10:28 pm    Post subject: Reply with quote

Right now im getting annoyed. I got the YMF724 card and a nice new hdd for my box. So started from scratch install with the 724 card installed, got to kernel compile, done a "genkernel all". Works fine. Now there is no /dev/dsp or /dev/sound/* dir's.

I tried to emerge alsa again and found that sound wasn't enabled in the kernel. Why??? who knows? So i done make menuconfig and made sure sound functionailty was in the kernel and not just a module. Done the same with the YMFxxx driver. make dep and rebooted. Tried to emerge alsa again and got the strange PNP error message again.

So tried the other option in /etc/make.conf

Code:
ALSA_CARDS="ymfpci"


Now when i emerge alsa it starts compiling and i get the following error multiple times -

Code:
cc1 error: -m64 is not supported by this configuration.
cc1 error: -mlong-double-64 not allowed with -m64
cc1 error: -mcmodel= is not supported on 32bit systems


Right so i gave up on that and went back to /dev, praying that /dev/dsp or /dev/sound had magically appeared but nothing. Am i doing something wrong or is this just Linux for you?

P.S - lspci spots the YMF724 card and spits out it's device string unlike the cs4231
Back to top
View user's profile Send private message
Weeve
Retired Dev
Retired Dev


Joined: 30 Oct 2002
Posts: 641

PostPosted: Sun Nov 13, 2005 4:13 am    Post subject: Reply with quote

The alsa-driver package really only works currently if you have a 2.6 kernel installed as the module building system is smarter than it was in the 2.4 series. The error you are seeing is due to the fact that we do not have a 64 bit userland C compiler, and alsa-driver is trying to use the same gcc instance for building the modules as the rest of the files it would normally build in 32 bits.
Back to top
View user's profile Send private message
davidfowler2000
n00b
n00b


Joined: 04 Nov 2005
Posts: 57
Location: Glasgow, Scotland

PostPosted: Mon Nov 14, 2005 4:52 pm    Post subject: Reply with quote

In that case, when is sparc-sources to become 2.6 by default. I've heard some talk about it on these forums but it's a sorta grey area
Back to top
View user's profile Send private message
Weeve
Retired Dev
Retired Dev


Joined: 30 Oct 2002
Posts: 641

PostPosted: Mon Nov 14, 2005 5:56 pm    Post subject: Reply with quote

sparc-sources will only use 2.4 based kernels. for 2.6, gentoo-sources will be what you'd what to use. Since you're running on an Ultra 5, 2.6 should be pretty stable for you. The nice part about it is that ALSA also comes included in the kernel so you won't have to emerge the alsa-driver package if you don't want to (you can still do it this way however, if you'd rather utilize the package).

If you do not have ACCEPT_KEYWORDS="~sparc" in your make.conf already, you may want to put the following like in your /etc/portage/package.keywords file to get gentoo-sources to emerge;

sys-kernel/gentoo-sources ~sparc
Back to top
View user's profile Send private message
davidfowler2000
n00b
n00b


Joined: 04 Nov 2005
Posts: 57
Location: Glasgow, Scotland

PostPosted: Mon Nov 14, 2005 5:59 pm    Post subject: Reply with quote

Cool. I'll give 2.6 a bash and see how i get on with everything. Thanks for all the help, i'll post back here to let y'all know how i get on

Cheers
-David
Back to top
View user's profile Send private message
davidfowler2000
n00b
n00b


Joined: 04 Nov 2005
Posts: 57
Location: Glasgow, Scotland

PostPosted: Thu Nov 17, 2005 12:51 am    Post subject: Reply with quote

OK I'm struggling. 2.6 was a disaster - console was garbled and keyboard didn't work at all so i went back to 2.4.

I done menuconfig as i have done about a gazillion times already and compiled the SPARC/Linux soundsystem and CS4231 in as modules. So i saved and came back out and done:

Code:
make dep <---Worked fine
make modules <---Worked fine
make modules_install <---Worked fine

modprobe cs4231 <---Finds cs4231 and installs it
modprobe audio <---Oooh that worked too :)

ls /dev/sound/audio <---It exists. Oh my god how has this never happened before? but at the same time /dev/audio, /dev/audioctl and /dev/dsp also exist.

cat [a .wav file] > /dev/sound/audio <---Ouch - sound junk through the PC speaker - not stereo out. Completely garbled


Went into KDE and got the bog standard error - "/dev/dsp is busy or does not exist". Hang on...didn't ls /dev/dsp say it was there??? Never mind, told KDE Control Centre to point to /dev/sound/audio.

"/dev/sound/audio is busy blah blah" plus the other error you get saying that arts cant write to the file. So after looking about here again for however long, i saw the suggestion that turning arts off will make XMMS work. So i tried that, pointed XMMS' OSS output module to /dev/sound/audio and all i get is the horrible garbled crap again (thru pc speaker). Plus XMMS usually crashes.

Shrugging that aside, i stuck my YMF724 card back in and done make menuconfig but this time made sure "Sound Card Support", "OSS Sound Modules" and "YMF 724 / 744 etc" options were in as modules.

Came out and done the make modules / install and done modprobe ymfpci. This didn't work. It spat out about 6 error messages about it trying to access an unsupported / illegal / unknown mixer device and eventually didnt install. So i went tback to menuconfig and put the whole lot in as compile with kernel. Then all i got was the same errors when linux booted. Back in and install as modules. Now when i do make modules, it fails on one of the dma****.c modules that is OSS and doesn't even get to the YMF724 one.

The cs4231 and audio modules are still there so i can listen to sound junk / pseudo modem noises should i so desire but i'd rather listen to mp3's.

Is this the point where i give up and put solaris on it to get sound or use my Windows PC?

Thanks again
-David
Back to top
View user's profile Send private message
Drunkula
Apprentice
Apprentice


Joined: 28 Jul 2003
Posts: 257
Location: Denton, TX - USA

PostPosted: Thu Nov 17, 2005 1:19 pm    Post subject: Reply with quote

This has me intriqued. I had the cs4321 working in my Ultra2E before (just reinstalled Gentoo this week because I toyed with the 6.0 release of FreeBSD out of curiosity). I don't recall which kernel I was suing but I'm fairly certain it was a 2.4 variety of sparc-sources. Also I could not get it working as a module - had to compile it into the kernel.

When I get home I will see if I can get mine working again....
_________________
Go away or I will replace you with a very small shell script.
Back to top
View user's profile Send private message
davidfowler2000
n00b
n00b


Joined: 04 Nov 2005
Posts: 57
Location: Glasgow, Scotland

PostPosted: Thu Nov 17, 2005 10:55 pm    Post subject: Reply with quote

Do you mean compile cs4231 into the kernel because whenever i do that, i get nothing in /dev. Well nothing for sound :P
Back to top
View user's profile Send private message
Drunkula
Apprentice
Apprentice


Joined: 28 Jul 2003
Posts: 257
Location: Denton, TX - USA

PostPosted: Fri Nov 18, 2005 12:18 am    Post subject: Reply with quote

Right. I just checked and it appears my devices are there. From /dev....
Code:
r-xr-xr-x  1 root root    11 Nov 16 11:15 audio -> sound/audio
lr-xr-xr-x  1 root root    14 Nov 16 11:15 audioctl -> sound/audioctl
lr-xr-xr-x  1 root root     9 Nov 16 11:15 dsp -> sound/dsp
lr-xr-xr-x  1 root root    10 Nov 16 11:15 dspW -> sound/dspW
lr-xr-xr-x  1 root root    11 Nov 16 11:15 mixer -> sound/mixer
drwxr-xr-x  1 root root     0 Dec 31  1969 sound


Okay now I feel like an idiot. What the heck am I supposed to use as a mixer app if I'm not using OSS or ALSA? :?
_________________
Go away or I will replace you with a very small shell script.
Back to top
View user's profile Send private message
davidfowler2000
n00b
n00b


Joined: 04 Nov 2005
Posts: 57
Location: Glasgow, Scotland

PostPosted: Fri Nov 18, 2005 12:20 pm    Post subject: Reply with quote

I get all those devices too but sound still doesnt work. Ill need to grab an au file from somewhere and double check the cat output. For mixer app i heard of someone on these forums using something called aumixer. Theres no ebuild for it so i suppose you would have to hunt the net for it. On the other hand, you could use KMix for KDE, other than that...i have no idea.

<<Edit>>

I can get audiotest.au from python2.4 to play through the pc speaker but not the stereo out. I shall persivere with XMMS

<<Edit 2>>

XMMS Just produces that horrible garbled, screechy crap but at least it's coming through the speakers rather than the PC Speaker. Is there an audio-output plugin that i need to get to make it work? Ive installed xmms-mpg123, -wma, -jack, -stereo, wav and -mp3cue. And i installed KMix to divert sound away from Speaker to PCM (Speakers). But still is garbled
Back to top
View user's profile Send private message
Drunkula
Apprentice
Apprentice


Joined: 28 Jul 2003
Posts: 257
Location: Denton, TX - USA

PostPosted: Fri Nov 18, 2005 11:27 pm    Post subject: Reply with quote

:?
Well I was able to play a .au file by cat'ing it to /dev/sound/audio, once. After that subsequent commands would appear to lock up as if waiting for the device to be available again (even as root). I' can't really comment on sound quality as the volume was too low and now I can't play any sound (via the command line at least).

I'm using sparc-sources-2.4.31-r2. May have to try 2.6.x...
_________________
Go away or I will replace you with a very small shell script.
Back to top
View user's profile Send private message
davidfowler2000
n00b
n00b


Joined: 04 Nov 2005
Posts: 57
Location: Glasgow, Scotland

PostPosted: Fri Nov 18, 2005 11:39 pm    Post subject: Reply with quote

The sound on mine was very loud. Even through th PC Speaker. I definately heard the shrill voice of Micheal Palin going "Noooooone expects ths Spanish inquisition!". It's just XMMS is the problem. It can't play au by default, and anything else it tries to play is just junk
Back to top
View user's profile Send private message
chance2105
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jun 2004
Posts: 112
Location: Norman, OK USA

PostPosted: Sat Nov 19, 2005 5:24 pm    Post subject: Reply with quote

This is a pretty easy problem to fix, although it might not be evident when you first try it.

I run a U60, using the "dreaded" CS4231 chip.

How I make it work (in my case, I run beep-media-player, last I remember it works the same way with XMMS):

(1) use 2.4 sources. I specifically use gentoo-sources.
(2) compile in "Linux/SPARC audio subsystem (EXPERIMENTAL) --> CS4231 Lowlevel driver".
I compile this in, however it probably works as a module as well. Install, wash, dry.
(3) be sure you have the ESD USE-flag enabled. This is a Good Thing. Compile things with it.
Do an "emerge --newuse" if you need to.
(4) don't mess with aRts. I never got it to work. I'm sure someone, somewhere, has gotten it to work. But, bleh, for playing mp3's, it's pretty unnecessary.
(5) Boot up beep-media-player. Right-click on it, select "Preferences" .. Click on the "Output" tab, then select the "eSound Output Plugin". At this point, you should be able to play mp3's beautifully through the wonders of the internal speaker.
(6) as your regular user that you will be playing mp3's, on the console, do: "audioctl -w play.port=0x4". This finally switches the output to the line-out of the cs4231. You can select other outputs as well, like the internal speaker, headphone out, etc etc (do "audioctl -a" to see all the options that are available). Make sure your speakers are hooked to the line-out, as line-out and headphone-out are not the same.

Viola. The only kink here is that audioctl is not persistent. Every time you reboot, you'll have to remember to run it (well, "have" to remember it is a misnomer, when you go to play an mp3 and it comes out of your internal speaker it's a pretty good reminder). If you reboot a lot, I'm sure you could stick it in a script somewhere.

As for the mixer, almost any desktop Multimedia mixer program works.

Hope this helps
chance
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum