VectorLinux

The nuts and bolts => Multimedia & Games => Topic started by: Herpy on December 17, 2011, 09:28:21 am

Title: alsa mixer help, how do I keep usb desktop mic from default
Post by: Herpy on December 17, 2011, 09:28:21 am
Hi vectorians! I installed this neat little distro to my cpu but I have a small little issue. Whenever I boot into Vector with my usb mic pluged in, no sound cause alsa mixer is a derp and bumps it up to default sound card which would not be an issue maybe if it was a usb headset but no it's a desktop mic. So I have to unplug it and reboot then plug it back in to prevent alsa mixer from bumping it as default.

My question is, how do I prevent alsa mixer from bumping my usb mic to default?
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: stretchedthin on December 17, 2011, 10:52:41 am
I've got three different things on the subject.

1. This tutorial here http://www.opensourcebistro.com/blog1/?p=111 (http://www.opensourcebistro.com/blog1/?p=111)
really this was first published here in the How to section.
http://forum.vectorlinux.com/index.php?topic=4888.msg32619#msg32619 (http://forum.vectorlinux.com/index.php?topic=4888.msg32619#msg32619)

2. Here is another method
http://www.youtube.com/watch?v=TsgOFHCJAUE (http://www.youtube.com/watch?v=TsgOFHCJAUE)

3. This one is kind of a cop-out, but instead of shutting down the computer at the end of the day, simply suspend it instead.  This way the good settings are preserved and you get immediate start up time to boot.
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: stretchedthin on December 17, 2011, 11:10:30 am
Also if you are willing to help me test an application I made to help with the problem then download vDefsound from gslapt.  It is a little utility I made that will detect if a usb device has been made the default sound card and pop up a window allowing you to change the selection.

Please if you do test it, I'd appreciate the feed back.
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: stretchedthin on January 04, 2012, 01:23:16 am
@herpy
What solution finaly worked for you?
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: Herpy on January 04, 2012, 07:19:43 pm
@herpy
What solution finaly worked for you?
easy, I unplug it before booting it up, then plug it in afterwards.
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: stretchedthin on January 04, 2012, 11:28:49 pm
That works.  ;D

But if you have the time please give the package vDefsound from gslapt a try.
Would be interested in finding out if it works for you.

Should just be a matter of installing vDefsound with gslapt, but if it does not start at boot up, download yad as well.
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: Pita on January 07, 2012, 04:51:17 pm
Also if you are willing to help me test an application I made to help with the problem then download vDefsound from gslapt.  It is a little utility I made that will detect if a usb device has been made the default sound card and pop up a window allowing you to change the selection.

Please if you do test it, I'd appreciate the feed back.


Tested it. The first command says "rm ~/.asoundrc", however, in VL7-LIGHT there is no such file.
Therefore vDefsound aborted:

$ vDefsound
rm: cannot remove `/home/peter/.asoundrc': No such file or directory
exiting

I did not run alsamixer yet. Will check later.
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: Herpy on January 25, 2012, 09:32:45 am
That works.  ;D

But if you have the time please give the package vDefsound from gslapt a try.
Would be interested in finding out if it works for you.

Should just be a matter of installing vDefsound with gslapt, but if it does not start at boot up, download yad as well.
vDefsound works!!!! Nice find Ken!
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: stretchedthin on January 25, 2012, 11:24:41 am
That works.  ;D

But if you have the time please give the package vDefsound from gslapt a try.
Would be interested in finding out if it works for you.

Should just be a matter of installing vDefsound with gslapt, but if it does not start at boot up, download yad as well.
vDefsound works!!!! Nice find Ken!

I didn't just find it, I wrote it.  So if you find any bugs I may be able to squash, let me know.

Quote
$ vDefsound
rm: cannot remove `/home/peter/.asoundrc': No such file or directory
exiting

vDefsound should not exit on this error.  It outputs the message if the file is not there but the script should continue.
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: Herpy on January 26, 2012, 12:49:49 pm
That works.  ;D

But if you have the time please give the package vDefsound from gslapt a try.
Would be interested in finding out if it works for you.

Should just be a matter of installing vDefsound with gslapt, but if it does not start at boot up, download yad as well.
vDefsound works!!!! Nice find Ken!

I didn't just find it, I wrote it.  So if you find any bugs I may be able to squash, let me know.

Quote
$ vDefsound
rm: cannot remove `/home/peter/.asoundrc': No such file or directory
exiting

vDefsound should not exit on this error.  It outputs the message if the file is not there but the script should continue.

Skype randomly loses sound and it says audio playback problem
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: stretchedthin on January 26, 2012, 09:59:35 pm
Herpy, was this fixed by the solution you had in your other post?
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: Herpy on January 26, 2012, 10:05:06 pm
Herpy, was this fixed by the solution you had in your other post?
Yes, it seems to be in order. Will keep you posted if I run into more problems.
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: Herpy on February 07, 2012, 12:21:16 pm
Herpy, was this fixed by the solution you had in your other post?
Yep found a bug, it will only play one peice of audio at a time. Causing me to refresh. Big issue for me so see if you can work that bug out.
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: stretchedthin on February 07, 2012, 03:49:20 pm
ok, thanks Herpy.  See what I can do.
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: sledgehammer on April 29, 2012, 04:01:51 pm
My Logitech usb headset works fine on twinkle and linphone, and on google voice, but when I play a youtube video, sound defaults to the laptop speakers. I tried vDefsound and it errors out, as follows:

Quote
johwhi:$ vDefsound
rm: cannot remove `/home/johwhi/.asoundrc': No such file or directory
exiting
vector:/~

Suggestions?
Title: Re: alsa mixer help, how do I keep usb desktop mic from default
Post by: stretchedthin on April 29, 2012, 05:14:32 pm
My Logitech usb headset works fine on twinkle and linphone, and on google voice, but when I play a youtube video, sound defaults to the laptop speakers. I tried vDefsound and it errors out, as follows:

Quote
johwhi:$ vDefsound
rm: cannot remove `/home/johwhi/.asoundrc': No such file or directory
exiting
vector:/~

Suggestions?

vDefsound will produce that error, but it should not error out.  If it does not exist it creates it after that error.
vDefsound works to a degree, but because it creates the .asoundrc file in userspace some applications ignore it and you will still have the same problem.

I made vDefsound based on the information found here. http://www.alsa-project.org
/main/index.php/Asoundrc (http://www.alsa-project.org/main/index.php/Asoundrc)

I'm in the middle of a project for my work now, but I will look into what can be done using a file controling routing to the right sound device in /etc/asound.conf

If anyone has time to play with this sooner, please do.  It would be nice to come up with a solution that can be built in to the next release of VL.