## ## NPM: a replacement for pulseaudio which has been removed. Use of type "dmix" ## suggested by http://www.alsa-project.org/main/index.php/Asoundrc ## corrected by http://fedorasolved.org/Members/fenris02/pulseaudio-fixes-and-workarounds ## Make "card 4: BCD3000 [BCD3000], device 0: USB Audio [USB Audio]" be shared default ## device (e.g. for Flash/Java usage), leaving Headset hardwired for Skype usage, ## In app preferences, "hw:SB,1" hardwired for rhythmbox/smplayer/mythtv usage. ## ## Note multichannel output caused by: ## ** route_policy duplicate ## ** channels 4 ## ** pcm "surround40:CARD=BCD3000,DEV=0" ## For details see: ## http://www.gentoo-wiki.info/HOWTO_Surround_Sound ## http://alsa.opensrc.org/index.php/.asoundrc ## http://alsa.opensrc.org/index.php/Playing_stereo_on_surround_sound_setup_(Howto) ## http://alsa.opensrc.org/index.php/.asoundrc#Splitting_front_and_rear_outputs ## ... with current setup, 2 channel output will duplicate ## LF->LR RF->RR where "rear" is the heasdphone output: ## ** stereo sound (speaker-test -D default -c 4 -t wav) ## will come out on headphones and speakers. ## ** quad sound (speaker-test -D default -c 2 -t wav) ## will come out on speakers with rear-channel on ## headphones. ## pcm.!default { type plug slave.pcm "dmixer" route_policy duplicate } ## suggested by http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6271108 ## "You should use "default" device instead of "(plug)hw" device. ## This device is alias of "plughw" device by default, but users ## can change it to "dmix" device for software mixing." pcm.!plughw { type plug slave.pcm "dmixer" } # # (from aplay -l): # dmixer expects exclusive access to bcd3000 # 4 [BCD3000 ]: USB-Audio - BCD3000 # Behringer BCD3000 at usb-0000:00:12.1-3, full speed # (from aplay -L): # front:CARD=BCD3000,DEV=0 # BCD3000, USB Audio # Front speakers # surround40:CARD=BCD3000,DEV=0 # BCD3000, USB Audio # 4.0 Surround output to Front and Rear speakers # ## NB: To use the BCD3000 w/ Mixxx or for music, kill the web browser first! pcm.dmixer { type dmix ipc_key 1024 slave { pcm "surround40:CARD=BCD3000,DEV=0" channels 4 period_time 0 period_size 1024 buffer_size 4096 rate 44100 } bindings { 0 0 1 1 2 2 3 3 } } ctl.dmixer { type hw card BCD3000 } ##from http://www.mythtv.org/wiki/Configuring_Digital_Sound#Setting_up_ALSA.27s_.asoundrc.2C_Properly ## # Override the default output used by ALSA. If you do not override the ## # default, your default device is identical to the (unmixed) "analog" device ## # shown below. If you prefer mixed and/or digital output, uncomment the ## # appropriate four lines below (only one slave.pcm line). ## # ## # Note, also, that as of ALSA 1.0.9, "software" sound cards have been modified ## # such that their default "default" device is identical to the "mixed-analog" ## # device. Whether using an ALSA version before or after 1.0.9, it does no harm ## # and has no affect on performance to redefine the device (even if the ## # redefinition does not change anything). Also, by using this ALSA ## # configuration file, you once again have access to unmixed analog output using ## # the "analog" device. ## pcm.!default { ## type plug ## ## Uncomment the following to use (unmixed) "analog" by default ## # slave.pcm "analog-hw" ## ## Uncomment the following to use "mixed-analog" by default ## slave.pcm "dmix-analog" ## ## Uncomment the following to use (unmixed) "digital" by default ## # slave.pcm "digital-hw" ## ## Uncomment the following to use "mixed-digital" by default ## # slave.pcm "dmix-digital" ## } ## ## NPM: see Utilities/Settings->Setup->General ## "Audio output device" set to 'ALSA:mythtv' ## "Passthrough output device" set to 'ALSA:mythtv' (not used, see passthrough below) ## Max audio channels: stereo (don't select 5.1 as we need AC3/DTS decoder on SPDIF out) ## Upmix: Passive (not used, since not upmixing to 5.1, using generic SPDIF) ## Unchecked: Enable AC3 to SPDIF passthrough (no AC3 decoder on SPDIF out) ## Unchecked: Enable DTS to SPDIF passthrough (no DTS decoder on SPDIF out) ## ## 2010-03-08 00:20:30.272 AFD: Opened codec 0x7fa0c4ad5630, id(MPEG2VIDEO) type(Video) ## 2010-03-08 00:20:30.272 AFD: codec AC3 has 2 channels ## 2010-03-08 00:20:30.272 AFD: Opened codec 0x7fa0c46c3040, id(AC3) type(Audio) ## 2010-03-08 00:20:30.283 Opening audio device 'mythtv'. ch 2(2) sr 48000 ## 2010-03-08 00:20:30.283 Opening ALSA audio device 'mythtv'. ## pcm.!mythtv { type plug slave { pcm multi rate 48000 } ttable.0.0 1.0 ttable.1.1 1.0 ttable.0.2 1.0 ttable.1.3 1.0 } ## ## NPM: see Utilities/Settings->Music Tools->Music Settings->General Settings ## "Audio Device" set to "ALSA:mythcd" to prevent 44.1->48K SRC ## ## 2010-03-08 00:10:51.162 Opening audio device 'mythcd'. ch 2(2) sr 44100 ## 2010-03-08 00:10:51.162 Opening ALSA audio device 'mythcd'. ## ## TODO -- get rid of 'plug' and use direct since no need for SRC or sharing ## pcm.!mythcd { type plug slave { pcm multi rate 44100 } ttable.0.0 1.0 ttable.1.1 1.0 ttable.0.2 1.0 ttable.1.3 1.0 } ## # Control device (mixer, etc.) for the card ## ctl.!default { ## type hw ## card 0 ## } # Alias for (converted) analog output on the card # - This is identical to the device named "default"--which always exists and # refers to hw:0,0 (unless overridden) # - Therefore, we can specify "hw:0,0", "default", or "analog" to access analog # output on the card # - Note that as of ALSA 1.0.9, "software" sound card definitions redefine # "default" to do mixing, meaning this device is different from "default" and # allows playback while blocking other sound sources (until playback # completes). pcm.analog { type plug slave.pcm "analog-hw" } # Control device (mixer, etc.) for the card ctl.analog { type hw card SB } # Alias for (converted) mixed analog output on the card # - This will accept audio input--regardless of rate--and convert to the rate # required for the dmix plugin (in this case 48000Hz) # - Note that as of ALSA 1.0.9, "software" sound card definitions redefine # "default" to do mixing, meaning this device is identical to "default" for # "software" sound cards. pcm.mixed-analog { type plug slave.pcm "dmix-analog" } # Control device (mixer, etc.) for the card ctl.mixed-analog { type hw card SB } # Alias for (converted) digital (S/PDIF) output on the card # - This will accept audio input--regardless of rate--and convert to the rate # required for the S/PDIF hardware (in this case 48000Hz) pcm.digital { type plug slave.pcm "digital-hw" } # Control device (mixer, etc.) for the card ctl.digital { type hw card SB } # Alias for mixed (converted) digital (S/PDIF) output on the card # - This will accept audio input--regardless of rate--and convert to the rate # required for the S/PDIF hardware (in this case 48000Hz) pcm.mixed-digital { type plug slave.pcm "dmix-digital" } # Control device (mixer, etc.) for the card ctl.mixed-digital { type hw card SB } # The following devices are not useful by themselves. They require specific # rates, channels, and formats. Therefore, you probably do not want to use # them directly. Instead use of of the devices defined above. # Alias for analog output on the card # Do not use this directly--it requires specific rate, channels, and format pcm.analog-hw { type hw card SB # The default value for device is 0, so no need to specify # - Uncomment one of the below or create a new "device N" line as appropriate # for your sound card or # device 1 # device 4 } # Control device (mixer, etc.) for the card ctl.analog-hw { type hw card SB } # Alias for digital (S/PDIF) output on the card # Do not use this directly--it requires specific rate, channels, and format pcm.digital-hw { type hw card SB device 1 # - Comment out "device 1" above and uncomment one of the below or create a # new "device N" line as appropriate for your sound card or # device 2 # device 4 } # Control device (mixer, etc.) for the card ctl.digital-hw { type hw card SB } # Direct software mixing plugin for analog output on the card # Do not use this directly--it requires specific rate, channels, and format pcm.dmix-analog { type dmix ipc_key 1234 slave { pcm "analog-hw" period_time 0 period_size 1024 buffer_size 4096 rate 48000 } } # Control device (mixer, etc.) for the card ctl.dmix-analog { type hw card SB } # Direct software mixing plugin for digital (S/PDIF) output on the card # Do not use this directly--it requires specific rate, channels, and format pcm.dmix-digital { type dmix ipc_key 1235 slave { pcm "digital-hw" period_time 0 period_size 1024 buffer_size 4096 rate 48000 } } # Control device (mixer, etc.) for the card ctl.dmix-digital { type hw card SB } ## pcm.!default { ## type plug ## slave { ## pcm multi ## rate 48000 ## } ## ttable.0.0 1.0 ## ttable.1.1 1.0 ## ttable.0.2 1.0 ## ttable.1.3 1.0 ## } pcm.stereo { type plug slave { pcm multi rate 48000 } ttable.0.0 1.0 ttable.1.1 1.0 ttable.0.2 1.0 ttable.1.3 1.0 } ctl.stereo { type hw card SB } pcm.multi { type multi slaves.a.pcm "analog-hw" slaves.a.channels 2 slaves.b.pcm "digital-hw" slaves.b.channels 2 bindings.0.slave a bindings.0.channel 0 bindings.1.slave a bindings.1.channel 1 bindings.2.slave b bindings.2.channel 0 bindings.3.slave b bindings.3.channel 1 } ctl.multi { type hw card SB } ## ## Useful suggestion from http://alsa.opensrc.org/index.php/1712_.asoundrc#2005-09-18 allowing ## M66 card to be accessed as separate devices. using dshare plugin ## ( http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html#pcm_plugins_dshare ) ## PCMOUT1&2: gst123 -a alsa=66ch12 http://64.12.61.1:80/stream/1046 ## PCMOUT3&4: gst123 -a alsa=66ch34 http://64.12.61.1:80/stream/1046 ## PCMOUT5&6: gst123 -a alsa=66ch56 http://64.12.61.1:80/stream/1046 ## PCMOUT7&8: gst123 -a alsa=66ch78 http://64.12.61.1:80/stream/1046 ## SPDIFOUT : gst123 -a alsa=66spdif http://64.12.61.1:80/stream/1046 ## pcm_slave.66_slave { pcm "hw:M66,0" channels 10 rate 44100 buffer_size 256 period_size 128 } pcm.66ch12_dshare { type dshare ipc_key 18273645 slave 66_slave bindings.0 0 bindings.1 1 } pcm.66ch12 { type plug slave.pcm "66ch12_dshare" } pcm.66ch34_dshare { type dshare ipc_key 18273645 slave 66_slave bindings.0 2 bindings.1 3 } pcm.66ch34 { type plug slave.pcm "66ch34_dshare" } pcm.66ch56_dshare { type dshare ipc_key 18273645 slave 66_slave bindings.0 4 bindings.1 5 } pcm.66ch56 { type plug slave.pcm "66ch56_dshare" } pcm.66ch78_dshare { type dshare ipc_key 18273645 slave 66_slave bindings.0 6 bindings.1 7 } pcm.66ch78 { type plug slave.pcm "66ch78_dshare" } pcm.66spdif_dshare { type dshare ipc_key 18273645 slave 66_slave bindings.0 8 bindings.1 9 } pcm.66spdif { type plug slave.pcm "66spdif_dshare" } ctl.66 { type hw card M66 }