ALSA default device - changing it

So...
I have three ways to output audio from my system.
- Laptop speakers / pluggable analog device (both work as same device, if something is plugged in, hardware automatically turns off the speakers, as in most laptops)
- HDMI audio
- Bluetooth audio
I'd like to have a simple (K.I.S.S.) way to
a) change the output source or
b) set the prority (order) and let the system automatically choose which output to use.
In case of B if no bluetooth audio device is found then try HDMI if that fails too then use speakers/analog output.
I'm not sure if it's even possible to recognize if HDMI is plugged or not...
In case of A some kind of control panel / applet would be nice.

Cdh wrote:
Have you tried asoundconf?
http://aur.archlinux.org/packages.php?ID=23382
asoundconf list
asoundconf set-default-card <one from the list>
It changes the ~/.asoundrc to include ~/.asoundrc.asoundconf and then sets the default card in ~/.asoundrc.asoundconf
But as this is plain alsa it will only affect newly started programs and maybe newly started audio output actions.
Thanks. I think that is a good solution anyways. I think I'll create menu items or something to have it "clickable".
Cdh wrote:When using pulseaudio you could use pavucontrol to change output streams from one device to the other on the fly.
My experiences with Pulseaudio are far from K.I.S.S..

Similar Messages

  • ALSA: Setting default device (Not card, but device)

    This seems to be a riddle that nobody can solve;
    - The system only has one card by the name of 'Intel'
    - That card is the regular 6 3.5mm jack soundcard.
    - I have a mic plugged into the red microphone plug
    - I open up Audacity and go to preferences, there are two microphone plugs, 'hw:0,0' and 'hw:0,2'
    - I have no idea where 0,0 is and it doesnt make any sound, I plugged the mic into every plug on the board and nothing records.
    - i can set Audacity to use 0,2 and then it will record my voice just fine
    When I open up xfce's mixer I see that there are two mic plugs:
    Apparently "Front Mic" is the device that is hw:0,0 right now/
    Now when I play Savage2 I don't have an option to choose the device, I can choose the soundcard but that doesn't help. How do I set the default Device so that the game uses hw:0,2 in push-to-talk?

    from the alsa archwiki:
    "Setting the default Microphone/Capture Device
    Some applications (Pidgin, Adobe Flash) do not provide an option to change the capture device. It becomes an issue if your microphone is on a separate device (i.e. USB webcam or microphone) than your internal sound card. To change only the default capture device, leaving the default playback device as is, you can modify your ~/.asoundrc file to include the following:
    pcm.usb
        type hw
        card U0x46d0x81d
    pcm.!default
        type asym
        playback.pcm
            type plug
            slave.pcm "dmix"
        capture.pcm
            type plug
            slave.pcm "usb"
    Replace "U0x46d0x81d" with your capture device's card name in ALSA. You can use 'arecord -L' to list all the capture devices detected by ALSA."
    EDIT: maybe i didn't read your post well enough.. im just guessing here but maybe you can replace card U0x46d0x81d with
    device name_of_device..
    maybe..
    Last edited by test1000 (2010-10-24 17:06:36)

  • Setting the default ALSA Sound Device, wiki methods not working?

    Hi!
    I want to set my default audio device different from the current one, namely different from my default laptop analog output.
    My laptop has two outputs, analog and HDMI, however, IF it is connected I want my default audio output to be my USB Dac.
    aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: PCH [HDA Intel PCH], device 0: CX20590 Analog [CX20590 Analog]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: U0x262a0x10e1 [USB Device 0x262a:0x10e1], device 0: USB Audio [USB Audio]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: U0x262a0x10e1 [USB Device 0x262a:0x10e1], device 1: USB Audio [USB Audio #1]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    alternatively, it is also okay for the default to be set at boot time, as i shutdown my laptop when changing setups.
    i tried the method with an alsa-base.conf file in /etc/modprobe.d/ and also the /etc/asound.conf file.
    with the alsa-base.conf file, I get error msgs when executing even aplay -l, while the asound.conf method gives me:
    speaker-test 1.0.27.2
    Playback device is default
    Stream parameters are 48000Hz, S16_LE, 1 channels
    Using 16 octaves of pink noise
    ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card
    Playback open error: -19,No such device
    my asound.conf:
    pcm.!default {
    type plug
    slave.pcm {
    @func getenv
    vars [ ALSAPCM ]
    default "hw:0x262a:0x10e1"
    has anybody an idea on how to possibly fix this?
    thanks a lot !

    Thanks for the link you posted.
    Unfortunately, i don't really get the advice posted there...
    I figured out one thing by myself though, in my asound config the name of my DAC was wrong, I missed an 'U' in the front.
    Still, I am not sure why i even have to do any config at all, really. Or maybe my expected behaviour is not the default.
    I think of it like that: always use my laptop output as default, however: IF i plug in another audio device, it's got to have a reason why i plugged it, so change the default to the newly plugged in device.
    Is there a way to do that?
    ps. eg now it got somehow f'd up and i have TWO default devices. no idea how it did that/how that's possible.
    aplay -L:
    null
    Discard all samples (playback) or generate zero samples (capture)
    pulse
    PulseAudio Sound Server
    sysdefault:CARD=PCH
    HDA Intel PCH, CX20590 Analog
    Default Audio Device
    front:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    Front speakers
    surround40:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    4.0 Surround output to Front and Rear speakers
    surround41:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
    surround50:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    5.0 Surround output to Front, Center and Rear speakers
    surround51:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    surround71:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
    hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
    hdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    HDMI Audio Output
    hdmi:CARD=PCH,DEV=2
    HDA Intel PCH, HDMI 2
    HDMI Audio Output
    sysdefault:CARD=Audio
    SA9023 USB Audio, USB Audio
    Default Audio Device
    front:CARD=Audio,DEV=0
    SA9023 USB Audio, USB Audio
    Front speakers
    surround40:CARD=Audio,DEV=0
    SA9023 USB Audio, USB Audio
    4.0 Surround output to Front and Rear speakers
    surround41:CARD=Audio,DEV=0
    SA9023 USB Audio, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
    surround50:CARD=Audio,DEV=0
    SA9023 USB Audio, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
    surround51:CARD=Audio,DEV=0
    SA9023 USB Audio, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    surround71:CARD=Audio,DEV=0
    SA9023 USB Audio, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
    iec958:CARD=Audio,DEV=0
    SA9023 USB Audio, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
    therefore, mpd cannot play, neither can anything else besides apps which let you specify audio devices on the fly...
    Last edited by replax (2013-11-15 23:02:40)

  • Changing phone button template on default device profile?

    I have a default device profile for 7941 that is currently using a phone button template that is one line. What is the impact of changing that to two-line phone button template? Can this be done live, on the fly?

    so if i change the default device profile for my 7941's, nothing will happen to the phones until they are reset?

  • HT204380 How to set my iPad as a default device while my iPhone and iPad share a same email address?

    How to set my iPad as a default device while my iPhone and iPad share a same email address?

    Shiv1611 wrote:
    Though i am still gona try using the same Itunes. Will same Itunes support two apple ids.
    That depends on what you mean. If you mean two iTunes Store accounts, no. Only one Apple ID can be logged into the iTunes Store at a time and if automatic download, iTunes Match or re-downloading of content is used the ID can not be changed for 90 days.
    Shiv1611 wrote:
    So i guess if i solve my goof up on creating different apple IDs and setting her phone as a new one .. according to you that shall do the trick.
    But i have a question here in that case what happens to all the applications that have been purchased on my Id ? Wont i be needing them to be purchased/downloaded again in the new id?
    If you previously had been using the same Apple ID for iTunes Store purchases for both of you there is no reason to change what you've been doing. If this is your wife's first iPhone, and you want to share the iTunes Store account just don't use the new Apple ID you created. As long as there are no purchases on it there's nothing to worry about.

  • Audio Problems when setting default device

    Everytime I try to set my headphones as the default sound device, my computer won't allow me to. I even tried to troubleshoot it, and it came up with the resolution of setting my headphones as the default device, but it failed to due to an error.
    It only occurs whenever I use the program Mumble, as I am a gamer and I use it to communicate with my fellow gamers. So whenever I fire up the program, all other sound except what comes from it, goes to my speakers. I don't know if this has to do with the program Mumble itself, or the fact that I LITERALLY cannot change my default device. Please help?

    What version of Windows are you using? 
    Also, could you please give me the exact model number of your notebook?
    You can use the following document if you need assistance in finding it.
    http://h10025.www1.hp.com/ewfrf/wc/document?tmp_renderType=findModel&cc=us&dlc=en&docname=c00033108&...
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • Default device type configuration of controlfile autobackup ?

    1. configure controlfile autobackup format for device type disk to 'E:\oracle\oradata\oid\bk\%F';
    2. backup current controlfile;
    rman first use default device type ORA_DISK_1 and backup the file at "E:\ORACLE\ORA92\DATABASE\0AEU5OQL_1_1" (windows 2000)
    then backup file at "E:\ORACLE\ORADATA\OID\BK\C-804947643-20030807-00"
    when i backup database , rman can backup the controlfile at "E:\ORACLE\ORADATA\OID\BK\"
    when i backup controlfile manully , why rman first backup it at the default device ??
    thanks:)

    One more cogent point for auto backup on will always get automized backup whenever you made any physical structural change in yours database ,whenver you make any physical structural changes in yours database it goes to be highlight in control file,auto backup on will take this new highlighted control file backup at the spot,needn't to take control file backup after any structural changes It will be backed up itself in yours FRA (Flash recovery area).
    Khurram

  • Qemu-kvm: default devices and qcow2 overlays

    I'm considering migrating a critical VM from VBox to qemu-kvm.  I've already played around with qemu a bit, but I have two questions I can't find answers to.
    The first is about the default devices that are 'created' when using a basic qemu command (such as qemu <qemu_image>).  I'd like to find out exactly what would be the commands to create those devices to help me create an optimal VM for my needs.  But I can't find any information about what's created, much less how it would be created manually.  The qemu monitor command info <subcommand> doesn't help much here, not least because I can't figure out how to page the output or send it to a file.
    Second, I have several VMs which have three or more discrete 'states' as far as the contents of the virtual HDD.  IOW, I install the OS, shutdown, and take a snapshot.  Then I install some s/w, shutdown, and take another ss.  Then I revert to the first ss, install some other s/w, shutdown, and take a third ss.  Rinse, repeat.  I'm only interested in the contents of the virtual HDD, 'differencing images' in VBox terms I think.  The hardware config does not change, and I take snapshots when shutdown, so I'm not looking to duplicate h/w config save or 'state save' features of VBox snapshots.  Are qcow2 and the associated 'overlays' the right tool for this job?
    Thanks.
    Last edited by alphaniner (2012-12-13 19:52:25)

    As I understand it, host:bus.addr is an alternative to host:vendor_id:product_id. So if I wanted to pass both of these thumb drives:
    $ lsusb
    Bus 001 Device 002: ID 1e3d:2093 Chipsbank Microelectronics Co., Ltd CBM209x Flash Drive (OEM)
    Bus 001 Device 003: ID 1e3d:2093 Chipsbank Microelectronics Co., Ltd CBM209x Flash Drive (OEM)
    I would use host:001.002 and host:001.003 . Note I said would use, because I've never tried it.
    And usb_add is a qemu monitor command. See sections 3.4 and 3.5 of the doc you linked for info on the monitor.
    All this being said, I don't use libvirt stuff so I don't know if it has the capability to specify USB devices by bus.addr or whether or not it enables the monitor.

  • Make headphones default device for all sounds

    HP Pavilion p7-1240 Desktop PC
    Running Windows 7
    I just got this computer within the last month. Ever since I got it I've been having trouble with my sound. I will be playing a game or watching a video and the song randomly routes from my headphones to the speakers and then back. Also when I get a call in Skype, all the other sounds route to my speakers instead of my headphones. I tried disabling the speakers, and it just won't play sound at all instead of routing it to the headphones. I tried making my headphones the default device, but when I choose this option nothing happens. I also tried changing settings in Skype but that does not help.

    Hello Nightfeathers,
    It seems like your headphones are losing connection to computer and thus the sound is being rerouted since it can't find the headphones (temporarily).
    Does the sound ever go the other way? Like does it play on your speakers and then route to your headphones back to the speakers?
    To me it sounds like
    It does this
    Headphones --> Speakers --> Headphones
    However it doesn't do this
    Speakers --> Headphones --> Speakers
    Please clarify.
    What kind of Headphones are you using? Are they USB headphones or are they connected to the audio port on the computer? Have you tried using the other (e.g. if you are using headphones plugged into the audio port instead try using USB headphones to see if the problem replicates)
    If I have helped you in any way click the Kudos button to say Thanks.
    The community works together, click Accept as Solution on the post that solves your issue for other members of the community to benefit from the solution.
    - Friendship is magical.

  • Using Lifechat 3000 for listening to Audio with making it the default device

    Hello,
    I realize that in order to listen to Audio with the LifeChat 3000, I am looking for a way not to set it as a default device. It doesn't make sense to me to remove the speakers as my default sound device when I want to hear music with headphones.
    thanks, AG

    Hi AG,
    According to your problem description, I suppose that the issue should be caused by the hardware itself or the conflicts between device driver and some third-party software.
    First test your Lifechat Lx-3000 Microphone on another Windows computer to check whether the same issue exists.
    you may refer to the following suggestion:
    Remove and reinstall Lifechat device
    1). Go to Start-> Control Panel (Classic View) -> System icon, and click Device Manager on the left.
    2). Expand the Universal Serial Bus controllers
    3). See if the first or second entry is "Lifechat Lx-3000 Microphone ".
    4). Right-click on Lifechat Lx-3000 Microphone and select Uninstall.
    5). Unplug and plug the Lifechat Lx-3000 Microphone onto the computer.
    6). In the Device Manager, click the Scan for hardware changes button on the toolbar and let it scan your computer.
    7). When the system finds the new device, it will request to install the right driver.
    Note: If the wizard prompts for some driver Setup file, please download and install the latest driver for Lifechat Lx-3000 Microphone (3.57M)
    Hope it helps.
    Regards,
    Blair Deng
    Blair Deng
    TechNet Community Support

  • Midi/browser playback problem with Audigy 2 platinum (Cannot set Default Device for some reas

    Currently I'm having problems playing back mid files in Mediaplayer and various other default programs. I can play midifiles in Winamp by setting it to the proper Directsound device. However in control panel/sound setup (MIDI music Playback), It only lists the MIDI Out Devices instead of the playback one and is defaulted on BLANK when I enter it. I have a feeling this is the main problem.
    DX Diag plays back the midi fine. I have tried reinstalling the latest drivers and the drivers from the disc with no luck at all. Also the default language has been stuck on Japanese as well. I have no idea why it started doing this but it seems to also affect any sound playback in my web browsers since I don't even get sound from any Flash files or Google video.Message Edited by zoglog on 06-23-2006 :38 PMMessage Edited by zoglog on 06-23-2006 :38 PM

    Ok, well I did a clean sweep and clean reinstall of the drivers that fixed my language problem. However I cannot get the proper "Midi music playback" Default Device. Whenever I change it to something it reverts it to a blank no matter how many times I change it or uncheck "Use only default devices"
    It does the exact same thing for "Voice playback"
    I'm not sure if this is related but I don't get any sound from any web-browser Shockwave flash files.
    This is really starting to get fustrating. Any help input would be greatly appreciated. I think the worst part about this is I know the midi works, it just won't let me assign the device....
    Oh yeah, also even if I set the "place volume icon in taskbar" option in the sound and devices properties it wll not show. Not sure if this is related...Message Edited by zoglog on 06-23-2006 :44 PM

  • TS3694 My Ipod is not recognized by Itunes with my Windows 8 PC. Works fine with Windows 7 PC. Device sync test says "No device found". Already performed all of the Ipod device troubleshooting including reload Itunes, stop start Ipod device, changed drive

    Need help? Some of my Ipods are not recognized by Itunes with my Windows 8 PC. (Ipod Nano 4th gen  and Ipod Nano 6th gen), but on my Windows 7 PC, they work fine.  My Ipod 3rd gen and Ipod shuffle work both on Windows 8 and 7 PC's.  On the non-working Ipods, the  Device sync test says "No device found". Already performed all of the Ipod device troubleshooting including reload Itunes, stop start Ipod device, changed drive letter...
    any help is appreciated. Chris4sail

    Hello there, chris4sail.
    The following Knowledge Base article offers up some great step-by-step instructions on troubleshooting your iPod not being recognized in iTunes:
    iPod not recognized in My Computer and in iTunes for Windows
    http://support.apple.com/kb/ts1369
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Can no longer set non-default device with QT 7

    In Quicktime 6, I could choose a specific device to play through. I use this feature to play iTunes through a second soundcard and out to my stereo. I leave my default device set to the system soundcard where I have just headphones hooked up. This way no system beeps or sounds come through the stereo.
    Now with Quicktime 7, I can no longer do this. Can anyone suggest a workaround? Why on earth would Apple remove this feature that was working before?

    Is there an answer to this dilemma yet? I run an htpc with multiple sound cards, and I definitely need to get this working. I hate to have to go back down to a previous version, if that is possible. Thanks.

  • Is it possible to open photo in the default device photo viewer application ?

    Is it possible to open photo with the default
    device photo viewer ?

    Thanks for your quick reply. I think I have tried but I cannot.
    There are no any options to let you choose "rename" in Windows 7 if you connect the iphone via USB
    I have tried to rename the photo directly in iPhone Explorer but it will make the photo cannot be read in iphone and just got nothing to show on its screen until I rename it into the previos name again then the picture will show properly.
    May be it can but I do not know how to rename them in Windows 7, could you please show me step by step?

  • Default Device Admin (Tacacs+)

    ACS 5.1
    Default Device Admin
    Identity:
    Single Result (internal list and AD1)
    Group Mapping:
    Rule1:(anyone in AD/Administrators=Group/AdminGroup)
    Default: Standard user
    Authorization:
    Rule1: (anyone in Group/AdminGroup, permit all commands)
    Default: Deny All Commands
    Here's my situation:
    User1 (AD/Administrator)
    UserBob (NOT in AD/Administrator)
    User1 Logs into a switch, types "enable" is asked to authenticate again, and can then run all commands (this is what i'm looking for, though i dislike the second login)
    UserBob Logs into a switch, types "enable" is asked to authenticate again, but gets error "% Error in Authentication" (i do not want UserBob to even be able to log into the switch to begin with)
    So my question is:
    How do i keep UserBob from being able to log into the switch?
    How do I get User1 to enter level 15 (Switch# instead of Switch>) automatically without being prompted to enter their password a second time after typing "enable"?
    As i understand it, "Default Device Admin" is different than "Default Network Access" which i liken to "logging into switches" vs. "authenticating against VPN server or Wireless" respectively.  So i should be able to restrict users from logging into switches, but still allow them to authenticate for access to things like VPN, so i don't think what i'm asking above will keep me from being able to do that.
    Ideas?

    Hello
    Q1 : How do i keep UserBob from being able to log into the switch?
         Configure NAR [network access restriction] and restrict the user to "not-to" access switch.
    Q2 : How do I get User1 to enter level 15 (Switch# instead of Switch>)  automatically without being prompted to enter their password a second  time after typing "enable"?
         You need to configure exec authorization on switch and push "privlege level = 15" to make User1 fall on switch# mode.
    The command on switch will be :
         aaa authorization exec default group tacacs local
    Let me know if it helps.
    thanks
    Devashree

Maybe you are looking for

  • Installing Windows 7 on iMac via external superdrive resultes in "No bootable device-insert boot disck an dpress any key".

    I previously had Windows 7 on my Mac, but removed it after returning from deployment because it had a virus that I could not remove.  The only way to remove was to insert a CD/DVD with the anti-virus on, but in my absence, the optical drive was not c

  • F.O.A Orange UK Iphone 4 Users

    Hi all Been using my iphone for a few days and I am absolutely in love with it, best phone I have used since the nokia n95... anyways, to any orange uk users what I like to know is, how much bars of signal do you get on average with your iphone? I am

  • Customer Loyalty Rewards?

    Has anyone been with Verizon since 1992 without lapse in service?  I have been and to this date I seem to be still be treated like any person off the street.  It's funny just going way back I had an analog phone just after the "Brick" to the flip pho

  • Error with SQL Server 2000 and Tomcat 4.1.12

    I'm using a JDBC Datasource with Tomcat 4.1.12 as follows. Server.xml snippet: <Resource name="jdbc/indemand" scope="Shareable" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/indemand"> <parameter> <name>validationQuery</name> <value>select

  • Time Machine backup in real time?

    I'm about to get a new Mac Mini for my girlfriend and thought about getting an additional external hard drive for Time Machine backups. I have never used Time Machine and the help topics/manuals seem to indicate you can only backup every hour. Can yo