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 28 Aug 2014, 03:35
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
problems setting usb sound card as default
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [20 Posts]   Goto page: 1, 2 Next
Author Message
alphamale

Joined: 28 Nov 2011
Posts: 18

PostPosted: Wed 19 Sep 2012, 12:10    Post subject:  problems setting usb sound card as default  

i'm on an hp mini 210, slacko 5.3.1

using a new usb sound card - audioquest dragonfly.

step 3 in alsawizard - the dragonfly shows up and i can select it, but after a reboot it never gets set as the default sound card.

step 4 in alsawizard removes the intel sound driver on the netbook, but then cannot find it again when it builds the card database. this leaves me with no sound drivers, so i have to revert to a backup save file.

i can use the dragonfly now but only on low volume. it uses to computer's master volume to control its volume. changing the master volume in puppy has no effect now since the dragonfly is not set as the default sound card.
Back to top
View user's profile Send private message 
OscarTalks

Joined: 05 Feb 2012
Posts: 863
Location: London, England

PostPosted: Wed 19 Sep 2012, 19:55    Post subject:  

What sound modules are in use? The USB sound card may be using snd-usb-audio if it is like my one. You may be able to lock things down by manually editing the file /etc/modprobe.d/alsa-base.conf which I usually have to do on computers with more than 1 sound card. The default card is the one defined as index 0 so for example add the lines:-

options snd-usb-audio index=0
options snd-other index=1

(where "other" is the other sound module, snd-intel8x0 for example)

look in /proc/asound/modules to see the ones that are loaded.

_________________
Oscar in England

Back to top
View user's profile Send private message 
alphamale

Joined: 28 Nov 2011
Posts: 18

PostPosted: Thu 20 Sep 2012, 01:10    Post subject: only one module is loaded  

here is what's in /proc/asound/modules...

0 snd_hda_intel


i think you may have a solution for me, but the problem right now is that when i run the 3rd step of alsawizard for using multiple cards nothing happens.

when i run the 4th step wich unloads all modules and then tries to find them again from the database, it can't find anything at all. this leaves me with no sound at all on my computer and i have to revert back to an old savefile.

if i can get alsawizard to work then your solution might work, but first i have to get the usb sound card module to load, or at least not be disabled

it looks like it is disabled here in /etc/modprobe.d/alsa-base.conf

# 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
# Ubuntu #62691, enable MPU for snd-cmipci
options snd-cmipci mpu_port=0x330 fm_port=0x388
# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
Back to top
View user's profile Send private message 
wow

Joined: 29 Jun 2006
Posts: 986
Location: Peru

PostPosted: Thu 20 Sep 2012, 04:21    Post subject:  

Edit/Create the $HOME/.asoundrc file: http://alsa.opensrc.org/FAQ026
_________________

Back to top
View user's profile Send private message 
alphamale

Joined: 28 Nov 2011
Posts: 18

PostPosted: Thu 20 Sep 2012, 05:31    Post subject: partial success  

i added these lines into /etc/asound.conf

pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}

where the 1 denotes the dragonfly card number

and it now plays when i select default audio card in my music player.

but volume control is not working from retrovol.

i ran alsamixer from shell and this works to control the volume

now i am trying to get alsamixergui working. unless there is a way to get mixer to control the retrovol
Back to top
View user's profile Send private message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Thu 20 Sep 2012, 06:56    Post subject:  

Perhaps you have already found retrovol's Configuration Window. If not, try this:

(CAUTION: I am unable to test this since I have only one sound device. When I try this on my Puppy, retrovol dies and won't run again until I manually edit /root/.retrovolrc to remove the line with "card=hw:1". I'm guessing that this is because I'm asking it to do the impossible, and it won't happen to you, since you do have an hw:1 card. But that's only a guess, so make sure that your save file is backed-up just in case.)

Right-click on the speaker icon in the tray.
Choose Config window
Choose Hardware
Change Sound Card to hw:1
Back to top
View user's profile Send private message 
alphamale

Joined: 28 Nov 2011
Posts: 18

PostPosted: Thu 20 Sep 2012, 07:14    Post subject:  

that worked.

problem is now switching between soundcards, and if the usb sound card is not connected retrovol won't work at all.

i'll stick with alsamixergui for now, seems to be the easiest thing unless i can get retrovol working when the usb card is not connected
Back to top
View user's profile Send private message 
OscarTalks

Joined: 05 Feb 2012
Posts: 863
Location: London, England

PostPosted: Thu 20 Sep 2012, 07:54    Post subject:  

The line in /proc/asound/modules

0 snd_hda_intel

indicates that only one module is loaded and that one looks like the one for the sound card on the motherboard.

Not sure what exactly you are doing with alsawizard, but there should be no need to do anything that disables any of the modules or soundcards. It should be OK to allow the 2 of them to load and run so long as you can get the required (USB) one as default. Not sure, but my feeling is you don't need alsawizard at all.

You can open the Multiple Sound Card Wizard from the menu (Setup category) just to have a look at the loaded soundcards and the order. The default will be the one at the top, BUT click CANCEL to close it after you have looked. Don't click OK because you don't want to actually run it as this will confuse things.

The line in /etc/modprobe.d/alsa-base.conf.....

options snd-usb-audio index=-2

doesn't totally disable the USB module but it is designed to prevent the USB soundcard from loading as the default, so you may want to try deleting that line or at least comment it out. It is in there twice so remove both instances of that line.

Then adding the lines....

options snd-usb-audio index=0
options snd-hda-intel index=1

would (I think) make the USB card the default and the motherboard card the secondary one.

Once you get the soundcard order as you want it then the next step is to configure retrovol as described by npierce and you should be able to have the volume icon in the tray controlling the output level from the USB card.

EDIT: I have 3 computers with 2 soundcards here. My oldest desktop runs Wary 5.3 and has a USB soundcard as the second one. I have never tried to make it the default before but I thought I would do a test and have just done so using the method I described above. It worked.

Not sure what might happen if at times you unplug the USB card though.

_________________
Oscar in England

Back to top
View user's profile Send private message 
alphamale

Joined: 28 Nov 2011
Posts: 18

PostPosted: Thu 20 Sep 2012, 09:06    Post subject:  

you're right i didn't need to run alsawizard.

as of my previous post i have both the internal sound card and the usb sound card working.

the only problem now is when i unplug the usb sound card. since it is set as the default, when it is unplugged retrovol then sees no sound modules and will not run.
Back to top
View user's profile Send private message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Thu 20 Sep 2012, 10:51    Post subject:  

If you are happy using alsamixergui, you can skip reading the remainder of this post.

But if you want to try one more experiment to get retrovol working for card 1 when it exists, and card 0 when it does not, you could try this:

Remove this section from the bottom of your /etc/asound.conf:
Code:
ctl.!default {
type hw
card 1
}

So the file will then look like this:
Code:
pcm.!default {
type hw
card 1
}


Then in the retrovol Configuration window, change the Sound Card to default (instead of hw:1, as I previously suggested).

I'm sorry that I can't properly test this (having only my onboard HDA Intel sound card), but I can report that my Puppy doesn't complain when I set the pcm default to card 1, even though I have no card 1. I am hoping that yours will also be happy when your card 1 is missing. I do have some doubts about card 1 still working without that ctl.!default configuration, but it might be worth a try.

(By the way, I'm guessing that you would need to at least exit from retrovol_tray and rerun /root/Startup/retrovol_tray after removing or inserting your USB sound card. Perhaps restarting X or rebooting might be necessary.)
Back to top
View user's profile Send private message 
OscarTalks

Joined: 05 Feb 2012
Posts: 863
Location: London, England

PostPosted: Thu 20 Sep 2012, 11:11    Post subject:  

I guess this is part of the reason why the system does not encourage users to set a USB soundcard as the default. Is it not practical for you just to leave it connected at all times?

Is there some reason why you have to set it as default? Could you not just leave the motherboard card as default and the USB as the second card and then just use the preferences in any application which you wish to route via the USB card?

Retrovol config does get a little complicated when you have 2 soundcards, but you can alter various things including (I believe) which fader the volume icon in the tray has control over.

If you do try the steps I suggested you may have to remove the changes you made to /etc/asound.conf which I think are the same as what Multiple Sound Card Wizard does, ie make card 1 the default instead of the normal scenario of card 0 automatically being the default. This is often OK as a work-around but does have some snags.

I have found that the modification of /etc/modprobe.d/alsa-base.conf addresses the base (as the file name suggests) of the issue. It locks down the index number allocation process at every boot and hence is all you really need to do, so long as you know the module names and the order you want them in.

_________________
Oscar in England

Back to top
View user's profile Send private message 
alphamale

Joined: 28 Nov 2011
Posts: 18

PostPosted: Thu 20 Sep 2012, 12:14    Post subject:  

deleting this...

ctl.!default {
type hw
card 1
}

did not work. the intel sound card showed up in alasmixer even when the usb sound card was plugged in.

i tried reverting back to having the intel laptop card be the default but then i can't change volume on the usb card because this particular card uses the master volume on the computer to change volume.

my preference would be to have the intel internal card be default and then just select the usb sound card when i want to use it, but as of now this does not seem possible.

so i'm stuck at having the usb sound card as default. but then i can't easily switch between the two cards. it gets really buggy when i switch back and forth a few times. worst case so far was digital hash coming out of the usb card and i had to reboot.

i can't believe there isn't an easier way to switch between sound cards.
Back to top
View user's profile Send private message 
OscarTalks

Joined: 05 Feb 2012
Posts: 863
Location: London, England

PostPosted: Thu 20 Sep 2012, 13:05    Post subject:  

When you are altering various different things it is easy to get lost.

To make the intel mobo card the default just do what I said but with the index numbers the other way round

options snd-hda-intel index=0
options snd-usb-audio index=1

and remove all of the editing that you did in asound.conf so that card 0 will be the default (not card 1).

If you mean switching soundcards in Retrovol then yes, it is not a user-friendly system (unless there is a method which I have not yet discovered). In my case once my levels are set I don't usually need to alter them, but if you are doing something which needs you to do lots of altering of volume settings then alsamixer is probably a better interface to use anyway. You just have to press F6 and select from the options to switch between cards.

_________________
Oscar in England

Back to top
View user's profile Send private message 
alphamale

Joined: 28 Nov 2011
Posts: 18

PostPosted: Thu 20 Sep 2012, 13:12    Post subject:  

i made incremental progress again. the default sound card is still usb but i can switch between cards in deadbeef with causing problems.

the only thing missing now is that the only output option in deadbeef is intel front speakers. there is no way now to select the intel headphone output.

asound.conf looks like this:

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

pcm.!default {
type hw
card Dragonfly
}

#ctl.!default {
# type hw
# card DragonFly
#}


the relevant line from alsa-base.conf are...

# 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
# Ubuntu #62691, enable MPU for snd-cmipci
options snd-cmipci mpu_port=0x330 fm_port=0x388
# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
# options snd-usb-audio index=-2

options snd-usb-audio index=0
options snd-hda-intel index=1

i'm a little confused about the first two lines in asound now.
but i'll try reversing indexes in alsa-base
Back to top
View user's profile Send private message 
OscarTalks

Joined: 05 Feb 2012
Posts: 863
Location: London, England

PostPosted: Thu 20 Sep 2012, 13:51    Post subject:  

Oh, you mean switching between soundcards in individual applications?
Once it is configured correctly they are usually just options in a menu in preferences somewhere. The only application which I am not sure about how to switch soundcards in is my browser, so that will always route audio via the default card. Players and telephony applications are easy to switch. Most of the settings like front speakers and headphones will depend on the soundcards and be accessed via retrovol or alsamixer though, not via the player preferences usually. I see there is quite a selection in Deadbeef though.

I think /etc/asound.conf is created if you run alsawizard or multiple sound card wizard. I have never done this and /etc/asound.conf does not exist in my Slacko 5.3.3 so you may be able to delete it (or move it out of /etc to somewhere like /root as a test). Setting those index numbers in alsa-base.conf and rebooting should be all you need. Check by looking in /proc/asound/modules to verify.

_________________
Oscar in England


Last edited by OscarTalks on Thu 20 Sep 2012, 14:27; edited 1 time in total
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [20 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1018s ][ Queries: 12 (0.0150s) ][ GZIP on ]