Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 02 Oct 2014, 06:36
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
ALSA fix for legacy sound cards in Puppy 2x
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
tempestuous

Joined: 10 Jun 2005
Posts: 5263
Location: Australia

PostPosted: Tue 20 Jun 2006, 23:26    Post_subject:  ALSA fix for legacy sound cards in Puppy 2x  

Usually in Linux, older ISA-based sound cards are not automatically detected at boot. So those of use with these sound cards know that we have to run "alsaconf" to set up the ALSA driver. The correct ALSA module is then configured to load with particular dma settings, and sometimes these dma settings do not agree with those defined in BIOS. Sometimes ALSA simply won't work with "standard" dma settings.

If you have an ISA sound card that requires such a "non-standard" ALSA dma configuration, then you will have a problem with Puppy2.
Puppy2's 2.6.16 kernel has "improved" ISAPNP routines(!!) which will disallow driver settings that don't agree with what it thinks is correct. The new PNP stuff can be found in /sys/devices/pnp0/
There are many directories here which earlier kernels did not have.

After much trial-and-error, my solution was to "coax" the ALSA module into accepting the standard dma values, like this:
First load the ALSA module (mine is snd-es18xx) with ONLY the dma1 setting.
Then after a brief pause, load the module again with both dma1 AND dma2 settings.
(My Sony VAIO's BIOS assigns dma1=1 dma2=5 for its ESS ES1879 sound chip)
Code:
## first load the core ALSA module
modprobe snd
## specify ONLY dma1 value
modprobe snd-es18xx isapnp=0 irq=5 dma1=1
sleep 1
## now specify both dma1 AND dma2 values
modprobe snd-es18xx isapnp=0 irq=5 dma1=1 dma2=5

Do this from /etc/rc.d/rc.local at each boot.
Don't run "alsaconf or Puppy's "ALSA sound Wizard".
Back to top
View user's profile Send_private_message 
willhunt


Joined: 05 Oct 2005
Posts: 495

PostPosted: Wed 21 Jun 2006, 02:24    Post_subject: Thanks :)  

I have been having same problem with snd-intel8x0
I changed the irq to 7 shazam! Very Happy
I cut and pasted it to /ect/rc.d/rc.local and I back in biz
thanks again
Back to top
View user's profile Send_private_message 
tempestuous

Joined: 10 Jun 2005
Posts: 5263
Location: Australia

PostPosted: Wed 21 Jun 2006, 03:18    Post_subject:  

That's good to hear, but you have come up with a similar solution to a different problem.

1. Intel 8x0 AC97-based sound chips are not legacy ISA devices. They're PCI devices, which have always been auto detected in Linux quite well.

2. The ALSA snd-intel8x0 driver will not accept "irq" or "dma" as parameters. I think this is the same for all ALSA PCI drivers.

It sounds like you changed your settings in hardware (BIOS) so that the operating system and ALSA driver were more "happy".

There is another possible fix for you; the snd-intel8x0 module has the parameter "buggy_irq", 0=disable 1=enable. You could try putting your hardware irq setting back to normal, then load the module like this -
modprobe snd-intel8x0 buggy_irq=1

I should have mentioned in my first post that I also tried to change my dma2 setting in BIOS, thus changing the "standard" settings. But whatever I changed it to, alsaconf wanted to choose something different.
The only solution was to coax/force the ALSA driver to accept the correct dma values.
Back to top
View user's profile Send_private_message 
willhunt


Joined: 05 Oct 2005
Posts: 495

PostPosted: Wed 28 Jun 2006, 19:26    Post_subject: well  

my sound chip is a C-Media but worked with the intel sound driver but when I updated to pup 2.0 it found no sound driver this worked to restore my sound
Back to top
View user's profile Send_private_message 
nicom

Joined: 05 Feb 2006
Posts: 34
Location: Melbourne, Australia

PostPosted: Wed 28 Jun 2006, 22:40    Post_subject:  

Tempetuous

This sounds just what I'm after, but I have a couple of questions.

I run Puppy 2.01 on an old machine (P133,32MB) by a hard disk installation. I have tried to get my sound blaster pro compatable card working using the ALSA wizard without success.

Can I now just use your method to detect my card, or do I need get rid of the sound card configuration that the wizard came up with and tries to execute whenever I boot?

If I need to go back to scratch with no card configuration, can I do it without a full reinstall?
Back to top
View user's profile Send_private_message 
tempestuous

Joined: 10 Jun 2005
Posts: 5263
Location: Australia

PostPosted: Thu 29 Jun 2006, 04:30    Post_subject:  

Both alsaconf and the ALSA sound Wizard will add their sound configuration details to the end of /etc/modprobe.conf
All you need to do is open this file in a text editor and delete (or comment out) those last lines -

alias snd-card-0 ...
alias sound-slot-0 ...

(I also see the "sb" module listed at line 142, but don't worry, that's the old OSS driver, which has been removed from Puppy2.)

Now reboot and you should have no ALSA modules loaded. Check with "lsmod". Now you can try my 2-stage module loading method from the commandline before committing your commands to /etc/rc.d/rc.local
If it works, please report the commands you used. It may help others.
Back to top
View user's profile Send_private_message 
nicom

Joined: 05 Feb 2006
Posts: 34
Location: Melbourne, Australia

PostPosted: Thu 29 Jun 2006, 08:23    Post_subject:  

Success!

I did however need to go to a three step approach.

Firstly my sound card chip is an ALS100 which I notice is included in /lib/modules/2.6.16.7/sound/isa directory. I can get the card going in windows98 and looking at the hardware profile it tells me that IRQ=5, dma=1 and dma=3.

Code:
modprobe snd
modprobe snd-als100
modprobe snd-als100 isapnp=0 irq=5 dma1=1
modprobe snd-als100 isapnp=0 irq=5 dma1=1 dma2=3


If I try to do it in 2 steps as per your instructions I get a fatal error.

So far I have only done it from the console. I assume I should put the "sleep 1" command between my steps.

Thanks for your help.
Back to top
View user's profile Send_private_message 
tempestuous

Joined: 10 Jun 2005
Posts: 5263
Location: Australia

PostPosted: Thu 29 Jun 2006, 10:58    Post_subject:  

Well done.
But in the interests of good science (versus good luck) it would be worth checking a little further - different modules have different parameters. The parameters for my snd-es18xx module are not the same as yours. Run "modinfo snd-als100" to see what your available parameters are.
"isapnp" is not available. And for you, "dma1" should be "dma8" and "dma2" should be "dma16".
I suggest you first try to do everything in one hit -
Code:
modprobe snd
modprobe snd-als100 irq=5 dma8=1 dma16=3

If no success, now try one dma value at a time.
Regarding sleep placement and duration - trial and error, I'm afraid.
Back to top
View user's profile Send_private_message 
willhunt


Joined: 05 Oct 2005
Posts: 495

PostPosted: Thu 29 Jun 2006, 15:05    Post_subject: it it helps  

I sell surplus computer so I allways have a bunch of different boxs to try it on
Back to top
View user's profile Send_private_message 
nicom

Joined: 05 Feb 2006
Posts: 34
Location: Melbourne, Australia

PostPosted: Fri 30 Jun 2006, 20:45    Post_subject:  

You were right. When I run modinfo-ALS100 it refers to both dma8 and dma16. With the correct reference I was able to install the driver in a single step as you suggest.

Is there any way of finding out what values to insert in the two "dma=" statements other than running windows as I did?
Back to top
View user's profile Send_private_message 
nicom

Joined: 05 Feb 2006
Posts: 34
Location: Melbourne, Australia

PostPosted: Fri 30 Jun 2006, 20:47    Post_subject:  

Oops! I meant "modinfo snd-ALS100" in my previous post.
Back to top
View user's profile Send_private_message 
tempestuous

Joined: 10 Jun 2005
Posts: 5263
Location: Australia

PostPosted: Fri 30 Jun 2006, 23:45    Post_subject:  

nicom wrote:
Is there any way of finding out what values to insert in the two "dma=" statements other than running windows as I did?

Those dma and irq settings should be listed in your bios.

Since your setup is now quite conventional, you don't need to load the ALSA drivers from /etc/rc.d/rc.local
Add this to the end of /etc/modprobe.conf -

alias snd-card-0 snd-als100
alias sound-slot-0 snd-als100
options snd-als100 irq=5 dma8=1 dma16=3
Back to top
View user's profile Send_private_message 
nicom

Joined: 05 Feb 2006
Posts: 34
Location: Melbourne, Australia

PostPosted: Sat 01 Jul 2006, 20:04    Post_subject:  

Once again you are correct. I have modified the etc/modprobe.conf and now the sound card works on boot up (well as good as it's going to work on that machine).

I checked the bios and could not find any reference to dma and irq settings. I should point out it's a very old version, Award Modular BIOS v4.51PG. Any other suggestions.

Although I have my card working now, if I can understand it a bit better I will try to write an idiots guide to getting sounds card going.

Thanks for your help.
Back to top
View user's profile Send_private_message 
zigbert


Joined: 29 Mar 2006
Posts: 5729
Location: Valåmoen, Norway

PostPosted: Sun 02 Jul 2006, 04:20    Post_subject:  

Quote:
...I will try to write an idiots guide to getting sounds card going.


nicom, I'm one of your idiots.
Back to top
View user's profile Send_private_message Visit_website 
tempestuous

Joined: 10 Jun 2005
Posts: 5263
Location: Australia

PostPosted: Sun 02 Jul 2006, 09:39    Post_subject:  

Sorry, the bios will only show audio settings for onboard ISA audio devices, typical with older laptops.

For separate ISA sound cards, the irq and dma settings are SOMETIMES determined by the sound card manufacturer and should be listed in the card's documentation. And it's possible that these settings can be changed by jumpers on the card.

But SOMETIMES, the irq and dma settings are determined by the motherboard, and can vary depending on which ISA slot the card is plugged into.

So to your original question ... how to find out? I think "pnpdump" is what you want ... but this utility is not included in Puppy2, so I attach it. gunzip it into /sbin
It will only work with ISA devices which are PnP (Plug-and-Play) compatible.
pnpdump.gz
Description 
gz

 Download 
Filename  pnpdump.gz 
Filesize  16.33 KB 
Downloaded  2061 Time(s) 
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0802s ][ Queries: 13 (0.0072s) ][ GZIP on ]