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 Tue 25 Nov 2014, 23:20
All times are UTC - 4
 Forum index » Advanced Topics » Hardware » Audio
Script fixes order of Multiple sound cards
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
darkcity


Joined: 23 May 2010
Posts: 2479
Location: near here

PostPosted: Sat 21 Jul 2012, 18:43    Post_subject:  Script fixes order of Multiple sound cards
Sub_title: remove problem of sounds card loading in different order
 

I've made a script in response to a post by OscarTalks and my own experiences-
http://www.murga-linux.com/puppy/viewtopic.php?p=641017#641017

This script will fix the order that sound card modules are loaded at boot-up. When executed it set the order to that of the current boot-up - as prescribed by the file-
/proc/asound/modules
for example,
Code:
 0 snd_intel8x0
 1 snd_ca0106


It takes this data and adds appropriate 'options' commands to-
/etc/modprobe.d/alsa-base.conf
for example
Code:
# set snd mod order - start tag
options snd_intel8x0 index=0
options snd_ca0106 index=1
# set snd mod order - end tag


It will remove this block from anywhere in the alsa-base file and add the new one on to the end.

A back up of alsa-base is stored in temp.

---

I'm new to scripting any suggestions welcome. If people find it works and they like it maybe it could be called as standard after running the Mutliple-Sound-Card-Wizard . . .
p-snd-car-order.tar.gz
Description 
gz

 Download 
Filename  p-snd-car-order.tar.gz 
Filesize  794 Bytes 
Downloaded  399 Time(s) 

_________________
helping Wiki for help | IF SendSpace link = "dead" THEN PM me ("up file to http://meownplanet.net/")
Back to top
View user's profile Send_private_message Visit_website 
darkcity


Joined: 23 May 2010
Posts: 2479
Location: near here

PostPosted: Mon 23 Jul 2012, 07:41    Post_subject:  

OscarTalks wrote:

Excellent work! I feel this is an important issue and looks like you have made a major breakthrough. I will do some testing on my various machines over the next day or two and report back.

My oldest machine is the most interesting case. That one has a USB soundcard as the second one. Looking at /proc/asound/modules in that I see that 4 modules are loaded:-

0 snd_intel8x0
1 snd_mpu401
2 snd_intel8x0m
3 snd_usb_audio

In this case index 2 is the dial-up modem, but I am not sure what snd_mpu401 is. Looks like something to do with MIDI, but if something like that were to grab index 0 at boot then even with no extra soundcards I'm sure my sound would be gone. This module does not show up at all as a card in the list in Multiple Sound Card Wizard so I get one random number missing and the others randomly juggled around. The script will hopefully lock these numbers down.

I am not sure what the best final implementation of something like this should be. Maybe a separate tool, built into Multiple Sound Card Wizard or built into Woof since it may be advantageous to run it on all Puppies regardless of additional soundcards?

If you are taking the order from the list in /proc/asound/modules then I suppose you need to be sure that they are arranged in a satisfactory order before writing the lines to /etc/modprobe.d/alsa-base.conf


Thanks for testing. You are right that mpu401 is MIDI,
http://en.wikipedia.org/wiki/MPU-401

snd-index8x0m should be black listed, do you have this entry in the
/etc/modprobe.d/alsa-base.conf ?

Code:
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options saa7134-alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=-2
options snd-usb-caiaq index=-2
options snd-usb-ua101 index=-2
options snd-usb-us122l index=-2
options snd-usb-usx2y index=-2


Quote:
built into Multiple Sound Card Wizard or built into Woof since it may be advantageous to run it on all Puppies regardless of additional soundcards?

Although, it would be harmless to run with one soundcard it would also be pointless. Therefore, I think it should be run after multi-soundcard-wizard (mswiz).

mswiz writes to /etc/asound.conf

for example,
Code:

defaults.pcm.card 1
defaults.pcm.device 0


In theory it should be irrelevant which card grabs the 'index 0', as 'index 0' != default. Not sure how alsamixer and retrovol handle it?

_________________
helping Wiki for help | IF SendSpace link = "dead" THEN PM me ("up file to http://meownplanet.net/")
Back to top
View user's profile Send_private_message Visit_website 
darkcity


Joined: 23 May 2010
Posts: 2479
Location: near here

PostPosted: Mon 23 Jul 2012, 09:07    Post_subject:  

two problems minor

-backup shouldn't be in /tmp as its wiped on reboot (probably best just to put an unnumbered backup in /etc/modprode.d ?)

-script probably won't work if your not running a root (not usually a problem on Puppy).

-----

-having trouble when ALSA doesn't define a driver for one of two cards, will report back

_________________
helping Wiki for help | IF SendSpace link = "dead" THEN PM me ("up file to http://meownplanet.net/")
Back to top
View user's profile Send_private_message Visit_website 
darkcity


Joined: 23 May 2010
Posts: 2479
Location: near here

PostPosted: Wed 05 Sep 2012, 16:09    Post_subject:  

the script no longer works with slacko 5.3.5 beta - it needs /root/mod - which is created by alsaconf
Code:

# /mnt/sda2/supportlibs2/-sound/soundcard/p-snd-card-orderb
'/root/mod' not present. Try command - alsawizard.

_________________
helping Wiki for help | IF SendSpace link = "dead" THEN PM me ("up file to http://meownplanet.net/")
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Hardware » Audio
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.0567s ][ Queries: 13 (0.0062s) ][ GZIP on ]