problems setting usb sound card as default

Using applications, configuring, problems
Post Reply
Message
Author
alphamale
Posts: 18
Joined: Mon 28 Nov 2011, 18:54

problems setting usb sound card as default

#1 Post by alphamale »

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.

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#2 Post by OscarTalks »

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
Image

alphamale
Posts: 18
Joined: Mon 28 Nov 2011, 18:54

only one module is loaded

#3 Post by alphamale »

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

wow
Posts: 1052
Joined: Fri 30 Jun 2006, 00:18
Location: Peru

#4 Post by wow »

Edit/Create the $HOME/.asoundrc file: http://alsa.opensrc.org/FAQ026
[url=http://www.puppylinux.com][img]http://i.imgur.com/M4OyHe1.gif[/img][/url]

alphamale
Posts: 18
Joined: Mon 28 Nov 2011, 18:54

partial success

#5 Post by alphamale »

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

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#6 Post by npierce »

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

alphamale
Posts: 18
Joined: Mon 28 Nov 2011, 18:54

#7 Post by alphamale »

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

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#8 Post by OscarTalks »

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
Image

alphamale
Posts: 18
Joined: Mon 28 Nov 2011, 18:54

#9 Post by alphamale »

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.

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#10 Post by npierce »

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: Select all

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

Code: Select all

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.)

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#11 Post by OscarTalks »

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
Image

alphamale
Posts: 18
Joined: Mon 28 Nov 2011, 18:54

#12 Post by alphamale »

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.

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#13 Post by OscarTalks »

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
Image

alphamale
Posts: 18
Joined: Mon 28 Nov 2011, 18:54

#14 Post by alphamale »

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

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#15 Post by OscarTalks »

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.
Last edited by OscarTalks on Thu 20 Sep 2012, 18:27, edited 1 time in total.
Oscar in England
Image

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#16 Post by npierce »

alphamale wrote: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.
Did your USB card not appear in alsamixer's F6 menu?

Did retrovol work after changing its sound card to default?

Anyway, thanks for trying that out. Without a second sound card I can't properly test stuff, so I'll stop making untested suggestions. OscarTalks seems to have experience with this sort of thing and can give you better advice.

It is unfortunate that when retrovol is configured for hw:1, it won't even run if there is no card 1, so you can't easily reconfigure it for hw:0. That's why I hoped that configuring it for default would work, since it will run when configured for default, even if the card specified as pcm default in /etc/asound.conf is missing. Of course, you can hand edit the /root/.retrovolrc or write a script to choose between two different .retrovolrc files, but (like you say) there should be an easier way.

alphamale
Posts: 18
Joined: Mon 28 Nov 2011, 18:54

#17 Post by alphamale »

switching index values in alsa-base did nto work.

as soon as i set retrovol to default, with the usb sound card not plugged in, it crashes, and i can't run retrovol again until i plug in the usb card.

the problem here is really the particular sound card i'm using. it was designed to only work when it is set as the default sound card. so i'm stuck having it as the default.

it won't show up in alsamixer when the default is set to internal sound card.

i'm sticking with the current set up which allows me to use both sound cards, just not the internal sound card headphone.

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#18 Post by OscarTalks »

The reason why Retrovol is crashing is because (once you set the index numbers) Retrovol needs to be set to hw:0 as it was originally (not hw:1 or default).

The mobo card is hw:0 now and is always present (and is the default) so Retrovol won't crash fingers crossed.

I would be surprised if a USB card effectively "insists" on being made the default. If it is detected I would expect it to show up in alsamixer as card 1. You may not be able to plug and play though, maybe a reboot is needed to load the module.
Oscar in England
Image

alphamale
Posts: 18
Joined: Mon 28 Nov 2011, 18:54

#19 Post by alphamale »

if i set retrovol to default or hw:o where the intel card is the default then i can't use the usb card.

the dragonfly needs to be set as the default audio card.

User avatar
Smithy
Posts: 1151
Joined: Mon 12 Dec 2011, 11:17

#20 Post by Smithy »

It's great that Puppy will provide enough juice for that DAC headphone amp.

Maybe if a developer has time to look at how $icrosoft deals with multimedia, because if you flip over to a different card in windows it just does it dynamically.

Is there any particular reason that you don't just stick with your superior Audioquest for default sound?

Don't know whether Jack and Wineasio might help you.

Post Reply