How do I choose which soundcard ALSA uses?

Hello I am having a problem that ALSA uses the wrong soundcard, does alsa-utils or any others package provide a tool which I can make ALSA use the right soundcard?

I spent weeks trying to find the best solution to this problem, and it's very simple. 
Just put this in your .asoundrc:
defaults.pcm.card 0
defaults.ctl.card 0
Change the number to whatever you want, and you can find them out with "aplay -l".  And only use numbers.
Using this method, you can change the default sound card on a per-user basis, after boot time, without having to edit anything as root.
I wrote a script that can do it for you, and handles volume control too:
#!/bin/sh
config=~/.asoundrc
choose () {
echo Choose a card:
aplay -l
read card
echo Choose a control:
amixer -c $card scontrols
read control
echo "#" $control > $config
echo defaults.pcm.card $card >> $config
echo defaults.ctl.card $card >> $config
control=(`cat .asoundrc`)
control=${control[1]}
case $1 in
up) amixer -q set $control 5%+ ;;
down) amixer -q set $control 5%- ;;
mute) amixer -q set $control toggle ;;
*) choose ;;
esac
Last edited by Odysseus (2009-04-28 20:58:47)

Similar Messages

  • How does LabView choose which core to use in a multi-core system

    I have to share my multi-core processor with another application.  When this other application runs, it consumes 100% of one of the cores on the system for several seconds.  I am worried about this other application blocking part of my control code, resulting in delayed control signals and possible loss of control. 
    1.  When one core is completely occupied, will LabVIEW put all operations into the other core? (I am guessing this is yes)
    2.  If an operation is occurring on a core that is subsequently 100% subscribed, will LabVIEW move the operation to another core?  Does LabVIEW (or XP) prevent the other application from stalling operations already in progress? 
    The operations I am most concerned with are for the Multifunction DAQ and serial port calls.   
    I am working on a good sized (>100 vi) control system application in LabVIEW 8.2.1.  It is running on Windows XP.   

    1. Yes, Windows will allocate LabVIEW to an open thread on the unused core.
    2. Again, yes, Windows will check for available threads and move LabVIEW to any that are open, it doesn't matter what core that is.
    You can also force LabVIEW code, or parts of it, to run on a specific processor using the timed loop structure. You can find help for setting that up here.
    Chris Van Horn
    Applications Engineer

  • How to choose which one to use when using handoff if one has more than one phone with different network

    I am using 2 iPhone with 2 different network. How to choose which phone to use when making a call.

    Are you confirming your POP account is selected as the sending email account before the message is sent?
    And regardless if the email is a new email or is replying to or forwarding an email received by the POP account and cofirming the POP acconut is selected as the sending email account, the message is sent by the Gmail account?
    All message sent by the POP account are sent by the Gmail account?
    If so, delete the Gmail account from your iPad and test if a message sent with your POP account which will be the only email account available with the iPad's Mail app is recieved from your POP account/address.
    If not, something else is wrong or on play that has nothing to do with the iPad.

  • How to find out which keywords were used to create a smart album?

    Hi,
    I actually have 2 questions;
    a) Short of scrolling down my very long list of password on the HUD - is there an elegant way to do it - How to find out which passwords were used to create an existing smart album? It's a recurring challenge for me.\ 'cause I like using smart albums, but once in a while need to check or chane the passwords.
    b) With annoying regularity when I try to get to this forum and choose Aperture, I get the following message - in pink, no less: It appears you're not allowed to view what you requested. You might contact your administrator if you think this is a mistake.
    Any clues?
    Thanks guys,
    Raphael
    <Edited by Host>

    b) With annoying regularity when I try to get to this forum and choose Aperture, I get the following message - in pink, no less: It appears you're not allowed to view what you requested. You might contact your administrator if you think this is a mistake.
    Any clues?
    Raphael,
    that message may occur for four reasons at least:
    Most frequently, when you are using an outdated link to a post that no longer exists, for example from an email notofication. Sometimes our community host will remove posts, that are in violation of the terms of use: see:
    Apple Support Communities Terms of Use
    Or you are using the edit button or a bookmark to an "Edit" window, after the fifteen minutes allowed for editing are up.
    Or you want to view a page in a restricted section of the ASC - soem perta are only open for members of level 6 or higher.
    Or it is one  of the unexplained problems with the forum software right now.
    a) Short of scrolling down my very long list of password on the HUD - is there an elegant way to do it - How to find out which passwords were used to create an existing smart album? It's a recurring challenge for me.\ 'cause I like using smart albums, but once in a while need to check or chane the passwords.
    I really like Kirby's suggestion with the IPTC rule Keyword is. This is very useful for smart albums global to the library.
    Frequently a different approach helps for my smart albums. Many of my smart albums are local to projects or folders.  In this case the smart HUD will only show those keywords that have been used for the images in the selection. So if I only have tagged the images with the keywords "birds" and "slideshow", the smart settings HUD will only show these two keywords and the list is very short.
    My Keywords HUD, is organized hierarchically; this way I can collapse large sections at once, and it is easier to focus on the keywords needed for a specific task.
    I use the search field in HUD a lot, to filter the set of keywords shown.

  • How does ISE choose which IP to put in URL redirect response?

    Hello,
    does anyone know how does ISE choose which IP to put in URL redirect response if it has more than one interface with an IP address and all interfaces are enabled in the portal configuration?
    I have a single ISE 1.3 PSN with all four interfaces configured, enabled, each on unique VLAN, and each with unique IP address.
    In the CWA portal configuration, all four interfaces are enabled.
    Wired clients connect to NAD, NAD sends RADIUS request to ISE, ISE responds with a RADIUS response including the URL-Redirect parameter which specifies the web redirect URL. ISE configuration uses "ip:port" in the URL. 
    My question is how does ISE choose which of its four interfaces to put in this URL? Is it always the same interface that RADIUS packets were received on? Or does it always choose the first portal enabled interface? Or is there another logic? Configurable or unconfigurable?
    Thanks!

    ISE uses the first interface enabled for that portal, so if want to use a specific interface, then only enable that interface.  If interface is GE0, then default behavior is to redirect with ip value set to node's FQDN.  If interface other than GE0, then default behavior is to return the IP address of the associated interface. 
    Aliases can be configured for each interface using the CLI 'ip host' command to associate a hostname/FQDN to the IP address of a given interface.  When configured, ISE will return that value rather than IP address in redirect.  This is critical if want to avoid certificate trust warning on connecting clients.
    Be sure that certificate assigned to interface includes the correct FQDN or optionally wilcard value in the CN or SAN fields to avoid cert warnings.

  • When sending from a mobile app, how can I choose which of my computers to open the document on?

    I have a laptop and a desktop computer connected to creative cloud. How can I choose which machine to open up a document from my iOS app? I don't want it to open on both overtime I send something from my iOS device.

    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • How do I choose which space should "Reminders" open in?

    I was reading the support page (http://support.apple.com/kb/PH11158?viewlocale=en_US) to learn how to choose which spaces to use with particular apps. But what is said at the suport page doesn't applies to the app "Reminders".
    Someone can teach me how to set up "reminders" to open on the second desktop spaces?

    go to Desktop 2

  • How do I choose which exchange account a contact gets added?

    I have 2 Gmail accounts set up as Exchange accounts on my iPhone.
    How do I choose what account to use when I create a new contact? I know with calendars, I am able to select which calendar account I use.

    If the laptop is operating correctly, it should automatically switch to pick up the stronger signal from the closer AirPort.
    Try turning off the wireless on the laptop, then turning it back on to see if it will pick up the stronger signal from the closer device.  You will likely find that you will need to do this with iOS devices like the iPhone and iPad as well.
    Unfortunately, there is no way to designate which device connects to which.

  • How do I choose which programme files open in?

    Before I upgraded to Snow Leopard I could double clic on an image in Quark and it would open in the programme that created it (eg photoshop or illustrator) in order to amend or change.
    Now when I do that everything opens in Preview - how do I choose which programme files open in?

    You can right click on a file icon to open a contextual menu to pick an "open with" option.
    You can change the default open with app via the Get Info window in Finder. It also has a "change all" option that will open all of the same file extensions using the app of your choice.

  • How to find out which users are using SharePoint Designer to make changes in SharePoint 2010 site?

    Hi there,
    How to find out which users are using SharePoint Designer to make changes in SharePoint 2010 site?
    Thanks.

    You need to enable auditing on SharePoint server and it will let you know, if someone makes any critical changes for the same.
    Please walk through this informative KB to enable auditing on SharePoint :https://support.office.com/en-za/article/Configure-audit-settings-for-a-site-collection-f5a346d0-ee0f-4412-a5e6-d9b5abaa1012
    Here is one more resource :
    https://support.office.com/en-in/article/View-audit-log-reports-4293e8d5-4e7d-4201-b8ac-c8e63a100131
    Moreover, if you wish to audit such critical changes automatically, you may consider on this comprehensive application (http://www.sharepointauditing.com/) that helps to track every changes on SharePoint into
    real time and provides the captured data at granular level.

  • When I delete a duplicate song, how do I choose which file to keep?

    When I delete a duplicate song, how do I choose which file to keep?

    What is reappearing is just the list entry with the indication that it is available for download - it's not taking up any space on your computer. You can remove it by control- or right-clicking it and choosing 'delete'.
    The recent changes in iTunes have confused a lot of people. Here is a summary of the situation:
    Only the most recent episode shows when you first subscribe. In the default  'My Podcasts' view click 'Old episodes' to show earlier episodes, click 'Done' to hide them or 'Add all' to keep them there and also add them to List view.
    Alternatively, in 'List' view control- or right-click on the name of the podcast or the episode and choose 'Show old episodes' to reveal all the previous episodes.
    In both views you can now delete both downloaded or un-downloaded episodes from both views by control- or right-clicking on the name of the episode.
    In both views each episode now has a blue circle to the left showing it as unplayed. Each episode can be double-clicked to be played as a stream without downloading it first (so you don't have to wait for it to download fully). Click the cloud icon at right to download it (as you will have to to sync it to an iPod). Note that if you click the cloud icon to the right of the title of the podcast itself, rather than an episode, you will initiate a download of all episodes.

  • Several contacts have the same email address. How can I choose which contact name appears on the address line in Mail?

    Several contacts have the same email address. How can I choose which contact name appears on the address line in Mail?

    you can't really, but you might be able to filter them by message content into folders for each, or color them with tags

  • How can I know which file is using by the self-service workflow?

    Dear all:
    In my directory, there are two HRSSA.wft and How can I know which source is using by the workflow of the self-service ?
    my environment is oracle 11.5.9 | self-service 4.1 | workflow builder 2.6
    Thanks
    regards
    Terry

    One way would be to download the HRSSA workflow to a wft file (using the WFLOAD utility - see MOS Doc 578248.1), then comparing this downloaded wft file with the two files you have (using a utility such as diff in Unix). The comparison that reports no differences will identify the wft that was uploaded into the database.
    HTH
    Srini

  • How do you choose which photos from Aperture for Apple TV screen saver?

    How do you choose which photos from Aperture for Apple TV screen saver?

    How do you choose which photos from Aperture for Apple TV screen saver?

  • How do I choose which items appear when I open my Imac for the day?

    How do I choose which items appear on the screen when I open my Imac (intel) for the day, after shutting down the night before? Thank you. ArmandL

    There are two ways. Mt Lion and Lion have a feature that launches all programs that were running when you logged out or shut down. You can toggle this feature on and off when you shutdown/log out. Or you can set up login items in your user settings which will automatically launch any program you set there. To do this launch System Preferences, select Users and Groups and click on the Login Items but near the top part of the dialog. Click on the + button to add programs you want to be launched when you login or start up the computer.

Maybe you are looking for

  • Adobe Acrobat 9 Pro will not download to my computer

    My main computer crashed and I am trying to install Adobe Acrobat 9 Pro to my new computer.  I keep getting an error message Error 1305.  Error reading from file D:\Adobe Acrobat 9 Pro\Data1.cab   I purchased the program about 3 years ago.  Being a $

  • Blackbery newest release 10.2.1.2102(2141)

    Curious how long we will wait for Verizon to send out newest release as show in title. 2102 (2141) has been out for days for some carriers.

  • Best Way to Free Up Space

    I have an external hard drive with several hundred gigs available, and my computer itself only has 1 or 2. I want to open up some space but I don't know what files I should move. I still want to be able to use it without the hard drive, so like nothi

  • Canon 7D footage, EXIF/metadata

    Doing a test project in PP6 (currently a FCP7 user) and want to make sure there are no special tricks to importing Canon DSLR footage, other than just importing the H.264 files. I'm used to keeping the entire DCIM folder structure in FCP for transcod

  • I need an agent to deactivate my products

    My computer has been sent for reparations and the motherboard has been changed twice. The products cannot be deactivated as the old computers no longer exist. I need an agent to deactivate my products but the option to start a chat is greyed out.