Re: [gentoo-user] Switch between sound cards?
Grant, On the previous machine where I gave you the modules.d/alsa file I use the onboard sound chip for most sound but my main card is a 26 input, 26 output RME HDSP 9652 card. On my wife's machine, and out MythTV backend server, we use the intel-hda oinboard sound chip for most audio but we also have an external usb sound card that converts from USB to TOS link which I use to drive our home theater receiver. I'm putting the alsa file at the end of this post. Note that on this machine when we want to play audio using Aqualung through the onboard device this is the command in the Gnome launcher: /usr/bin/aqualung -o alsa -d hw:0,0 while if we want to play through the USB device we use this: /usr/bin/aqualung -o alsa -d hw:1,0 Not sure why you'd be having trouble. We use this technique on Aqualung, mplayer, xine and MythTV. The basic idea works once you get it under control. Good luck, Mark Hi Mark, Sorry for the delay in writing back. I've been out of town. I thought this over and what I need is to send all audio to the USB card if it is present, otherwise to the internal card. The only exception is twinkle (voip) should always deal with the internal card. Luckily twinkle has internal settings for that. I can't get alsa to fall back to the internal card if USB isn't present. Can that be done with a single config in alsa, or do I need to change configs to change cards or use pulseaudio? alias snd-card-0 snd-usb-audio options snd-usb-audio index=0 alias snd-card-1 snd-hda-intel options snd-hda-intel index=1 options snd-hda-intel model=acer alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1 alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss options snd cards_limit=2 - Grant -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] Switch between sound cards?
On Sun, Feb 24, 2008 at 9:44 AM, Grant [EMAIL PROTECTED] wrote: I have a USB sound card and an internal sound card in my laptop. Is there a way to switch between them while the system is booted? Is module loading/unloading via modprobe the best way to do it? - Grant -- gentoo-user@lists.gentoo.org mailing list Grant, As Florian suggested you might want to check out PulseAudio in the proaudio overlay. I think it has some capability to switch the destination of application audio more or less on the fly. I haven't used it but it sounds interesting. http://proaudio.tuxfamily.org/wiki/index.php?title=PulseAudio Cheers, Mark -- gentoo-user@lists.gentoo.org mailing list
[gentoo-user] Switch between sound cards?
I have a USB sound card and an internal sound card in my laptop. Is there a way to switch between them while the system is booted? Is module loading/unloading via modprobe the best way to do it? - Grant -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] Switch between sound cards?
On Sun, Feb 24, 2008 at 9:44 AM, Grant [EMAIL PROTECTED] wrote: I have a USB sound card and an internal sound card in my laptop. Is there a way to switch between them while the system is booted? Is module loading/unloading via modprobe the best way to do it? - Grant -- gentoo-user@lists.gentoo.org mailing list Why switch between them when you can use them both at the same time as hw:0 and hw:1? - Mark [EMAIL PROTECTED] ~ $ cat /etc/modules.d/alsa # Alsa 0.9.X kernel modules' configuration file. # $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.4 2004/11/16 01:31:22 eradicator Exp $ # ALSA portion alias char-major-116 snd # OSS/Free portion alias char-major-14 soundcore ## ALSA portion alias snd-card-0 snd-intel8x0 options snd-intel8x0 index=0 alias snd-card-1 snd-hdsp options snd-hdsp index=1 ## OSS/Free portion alias sound-slot-0 snd-card-0 # OSS/Free portion - card #1 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss # Set this to the correct number of cards. options snd cards_limit=2 [EMAIL PROTECTED] ~ $ -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] Switch between sound cards?
I have a USB sound card and an internal sound card in my laptop. Is there a way to switch between them while the system is booted? Is module loading/unloading via modprobe the best way to do it? - Grant -- gentoo-user@lists.gentoo.org mailing list Why switch between them when you can use them both at the same time as hw:0 and hw:1? Thanks Mark. After studying your config, here is mine: alias snd-card-0 snd-hda-intel options snd-hda-intel index=1 options snd-hda-intel model=acer alias snd-card-1 snd-usb-audio options snd-usb-audio index=0 alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1 alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss options snd cards_limit=2 I get sound from the USB card but not from the internal card (snd-hda-intel). How can I tell the system to turn off the USB card and turn on the internal card? - Grant # Alsa 0.9.X kernel modules' configuration file. # $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.4 2004/11/16 01:31:22 eradicator Exp $ # ALSA portion alias char-major-116 snd # OSS/Free portion alias char-major-14 soundcore ## ALSA portion alias snd-card-0 snd-intel8x0 options snd-intel8x0 index=0 alias snd-card-1 snd-hdsp options snd-hdsp index=1 ## OSS/Free portion alias sound-slot-0 snd-card-0 # OSS/Free portion - card #1 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss # Set this to the correct number of cards. options snd cards_limit=2 [EMAIL PROTECTED] ~ $ -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] Switch between sound cards?
On Sun, 2008-02-24 at 11:34 -0800, Grant wrote: I have a USB sound card and an internal sound card in my laptop. Is there a way to switch between them while the system is booted? Is module loading/unloading via modprobe the best way to do it? - Grant -- gentoo-user@lists.gentoo.org mailing list Why switch between them when you can use them both at the same time as hw:0 and hw:1? Thanks Mark. After studying your config, here is mine: alias snd-card-0 snd-hda-intel options snd-hda-intel index=1 options snd-hda-intel model=acer alias snd-card-1 snd-usb-audio options snd-usb-audio index=0 alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1 alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss options snd cards_limit=2 I get sound from the USB card but not from the internal card (snd-hda-intel). How can I tell the system to turn off the USB card and turn on the internal card? - Grant You might want to take a look at the new pulseaudio daemon. I don't use it but as far as I know it's perfect for complex setups like yours. Think of it as a (transparent, if necessary) layer between your software and alsa. It should be easier to reconfigure than alsa. You could use it (or the older the older jack daemon) to send audio to both devices. signature.asc Description: This is a digitally signed message part
Re: [gentoo-user] Switch between sound cards?
I have a USB sound card and an internal sound card in my laptop. Is there a way to switch between them while the system is booted? Is module loading/unloading via modprobe the best way to do it? - Grant -- gentoo-user@lists.gentoo.org mailing list Why switch between them when you can use them both at the same time as hw:0 and hw:1? Thanks Mark. After studying your config, here is mine: alias snd-card-0 snd-hda-intel options snd-hda-intel index=1 options snd-hda-intel model=acer alias snd-card-1 snd-usb-audio options snd-usb-audio index=0 alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1 alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss options snd cards_limit=2 I get sound from the USB card but not from the internal card (snd-hda-intel). How can I tell the system to turn off the USB card and turn on the internal card? - Grant You might want to take a look at the new pulseaudio daemon. I don't use it but as far as I know it's perfect for complex setups like yours. Think of it as a (transparent, if necessary) layer between your software and alsa. It should be easier to reconfigure than alsa. You could use it (or the older the older jack daemon) to send audio to both devices. Alright, but it seems like ALSA has some native support for multiple cards. Does anyone have more than one sound card and the ability to switch between them in native ALSA? - Grant -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] Switch between sound cards?
Grant, If you want to do a complete switch then you would change your USB card to index 0 and restart Als which would make the USB card the default since card 0 is always the default for Alsa. On the other hand, if you wanted to just leave the onboard card as default and send audio from a specific application to the USB card you would tell the application to use hw:1 explicity, either in the command line when you start the app or in an application's config file. On my system I let all my web/browest audio go to the onboard sound card but I send all my CD audio directly to my good card using Aqualung and configuring it from the command line. (Actually in my launcher.) to the best of my knowledge there has never been a way to simply switch sound cards on the fly in Alsa. I've requested this sometime back but the developers haven't shown any interest. Hope this helps, Mark On Sun, Feb 24, 2008 at 11:34 AM, Grant [EMAIL PROTECTED] wrote: I have a USB sound card and an internal sound card in my laptop. Is there a way to switch between them while the system is booted? Is module loading/unloading via modprobe the best way to do it? - Grant -- gentoo-user@lists.gentoo.org mailing list Why switch between them when you can use them both at the same time as hw:0 and hw:1? Thanks Mark. After studying your config, here is mine: alias snd-card-0 snd-hda-intel options snd-hda-intel index=1 options snd-hda-intel model=acer alias snd-card-1 snd-usb-audio options snd-usb-audio index=0 alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1 alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss options snd cards_limit=2 I get sound from the USB card but not from the internal card (snd-hda-intel). How can I tell the system to turn off the USB card and turn on the internal card? - Grant # Alsa 0.9.X kernel modules' configuration file. # $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.4 2004/11/16 01:31:22 eradicator Exp $ # ALSA portion alias char-major-116 snd # OSS/Free portion alias char-major-14 soundcore ## ALSA portion alias snd-card-0 snd-intel8x0 options snd-intel8x0 index=0 alias snd-card-1 snd-hdsp options snd-hdsp index=1 ## OSS/Free portion alias sound-slot-0 snd-card-0 # OSS/Free portion - card #1 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss # Set this to the correct number of cards. options snd cards_limit=2 [EMAIL PROTECTED] ~ $ -- gentoo-user@lists.gentoo.org mailing list -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] Switch between sound cards?
Grant, If you want to do a complete switch then you would change your USB card to index 0 and restart Als which would make the USB card the default since card 0 is always the default for Alsa. On the other hand, if you wanted to just leave the onboard card as default and send audio from a specific application to the USB card you would tell the application to use hw:1 explicity, either in the command line when you start the app or in an application's config file. On my system I let all my web/browest audio go to the onboard sound card but I send all my CD audio directly to my good card using Aqualung and configuring it from the command line. (Actually in my launcher.) to the best of my knowledge there has never been a way to simply switch sound cards on the fly in Alsa. I've requested this sometime back but the developers haven't shown any interest. Hope this helps, Mark Hi Mark, Changing the index and restarting alsasound would be a great switching method but I can't get that to work. No matter which one I set to index=0 and which to index=1 the sound always comes out of the USB card. BTW, what sound card are you using? Here's mine, it's great: http://diyparadise.com/shop/index.php?main_page=product_infocPath=2products_id=82 - Grant I have a USB sound card and an internal sound card in my laptop. Is there a way to switch between them while the system is booted? Is module loading/unloading via modprobe the best way to do it? - Grant -- gentoo-user@lists.gentoo.org mailing list Why switch between them when you can use them both at the same time as hw:0 and hw:1? Thanks Mark. After studying your config, here is mine: alias snd-card-0 snd-hda-intel options snd-hda-intel index=1 options snd-hda-intel model=acer alias snd-card-1 snd-usb-audio options snd-usb-audio index=0 alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1 alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss options snd cards_limit=2 I get sound from the USB card but not from the internal card (snd-hda-intel). How can I tell the system to turn off the USB card and turn on the internal card? - Grant # Alsa 0.9.X kernel modules' configuration file. # $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.4 2004/11/16 01:31:22 eradicator Exp $ # ALSA portion alias char-major-116 snd # OSS/Free portion alias char-major-14 soundcore ## ALSA portion alias snd-card-0 snd-intel8x0 options snd-intel8x0 index=0 alias snd-card-1 snd-hdsp options snd-hdsp index=1 ## OSS/Free portion alias sound-slot-0 snd-card-0 # OSS/Free portion - card #1 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss # Set this to the correct number of cards. options snd cards_limit=2 -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] Switch between sound cards?
On Sun, Feb 24, 2008 at 3:21 PM, Grant [EMAIL PROTECTED] wrote: Grant, If you want to do a complete switch then you would change your USB card to index 0 and restart Als which would make the USB card the default since card 0 is always the default for Alsa. On the other hand, if you wanted to just leave the onboard card as default and send audio from a specific application to the USB card you would tell the application to use hw:1 explicity, either in the command line when you start the app or in an application's config file. On my system I let all my web/browest audio go to the onboard sound card but I send all my CD audio directly to my good card using Aqualung and configuring it from the command line. (Actually in my launcher.) to the best of my knowledge there has never been a way to simply switch sound cards on the fly in Alsa. I've requested this sometime back but the developers haven't shown any interest. Hope this helps, Mark Hi Mark, Changing the index and restarting alsasound would be a great switching method but I can't get that to work. No matter which one I set to index=0 and which to index=1 the sound always comes out of the USB card. BTW, what sound card are you using? Here's mine, it's great: http://diyparadise.com/shop/index.php?main_page=product_infocPath=2products_id=82 - Grant I have a USB sound card and an internal sound card in my laptop. Is there a way to switch between them while the system is booted? Is module loading/unloading via modprobe the best way to do it? - Grant -- Grant, On the previous machine where I gave you the modules.d/alsa file I use the onboard sound chip for most sound but my main card is a 26 input, 26 output RME HDSP 9652 card. On my wife's machine, and out MythTV backend server, we use the intel-hda oinboard sound chip for most audio but we also have an external usb sound card that converts from USB to TOS link which I use to drive our home theater receiver. I'm putting the alsa file at the end of this post. Note that on this machine when we want to play audio using Aqualung through the onboard device this is the command in the Gnome launcher: /usr/bin/aqualung -o alsa -d hw:0,0 while if we want to play through the USB device we use this: /usr/bin/aqualung -o alsa -d hw:1,0 Not sure why you'd be having trouble. We use this technique on Aqualung, mplayer, xine and MythTV. The basic idea works once you get it under control. Good luck, Mark [EMAIL PROTECTED] ~ $ cat /etc/modules.d/alsa # Alsa 0.9.X kernel modules' configuration file. # $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.4 2004/11/16 01:31:22 eradicator Exp $ # ALSA portion alias char-major-116 snd # OSS/Free portion alias char-major-14 soundcore ## ## IMPORTANT: ## You need to customise this section for your specific sound card(s) ## and then run `update-modules' command. ## Read alsa-driver's INSTALL file in /usr/share/doc for more info. ## ## ALSA portion alias snd-card-0 snd-intel8x0 options snd-intel8x0 index=0 alias snd-card-1 snd-usb-audio options snd-usb-audio index=1 ## OSS/Free portion alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1 ## # OSS/Free portion - card #1 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss ## OSS/Free portion - card #2 alias sound-service-1-0 snd-mixer-oss alias sound-service-1-3 snd-pcm-oss alias sound-service-1-12 snd-pcm-oss alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss # Set this to the correct number of cards. options snd cards_limit=2 [EMAIL PROTECTED] ~ $ -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] Switch between sound cards?
On Sun, Feb 24, 2008 at 3:45 PM, Grant [EMAIL PROTECTED] wrote: I have a USB sound card and an internal sound card in my laptop. Is there a way to switch between them while the system is booted? Is module loading/unloading via modprobe the best way to do it? - Grant -- gentoo-user@lists.gentoo.org mailing list Why switch between them when you can use them both at the same time as hw:0 and hw:1? Thanks Mark. After studying your config, here is mine: alias snd-card-0 snd-hda-intel options snd-hda-intel index=1 options snd-hda-intel model=acer alias snd-card-1 snd-usb-audio options snd-usb-audio index=0 alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1 alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss options snd cards_limit=2 I get sound from the USB card but not from the internal card (snd-hda-intel). How can I tell the system to turn off the USB card and turn on the internal card? - Grant You might want to take a look at the new pulseaudio daemon. I don't use it but as far as I know it's perfect for complex setups like yours. Think of it as a (transparent, if necessary) layer between your software and alsa. It should be easier to reconfigure than alsa. You could use it (or the older the older jack daemon) to send audio to both devices. Alright, but it seems like ALSA has some native support for multiple cards. Does anyone have more than one sound card and the ability to switch between them in native ALSA? I did a lot of search sometime back to get this solved... my blog entry on this is at the following link. http://defectivecompass.wordpress.com/2007/12/05/alsa-configuration/ I would also recommend you to take a look a pulseaudio (I have an entry for that on my blog as well). Hot switching of audio streams between devices is really cool! _r