Multiple output sound configuration difficulty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I like alsa sound system and as I have had many many stability trouble 
with other intermediate tools, I would not like to use those.

I want to achieve something that should be trivial but I can not get it 
working. I hava laptop and from time to time, I want to play and record 
high quality audio. For that I use Edirol's UA25 USB soundcard. I can 
configure both, inner and external soundcards to work by satisfying 
following criteria:

1. multiple applications can play and record at the same time on the devices
2. the played back signal on default is recordable on looprec input device
3. if UA25 is unplugged, the default playback must work well

Picture is here:
.-----------.
|  edirol   |--------------------------.
'-----------'                          |
                                        v
            .---------------.   .---------------.
            |  softvolume   |-->|    hw:UA25    |
            '---------------'   '---------------'

.-----------.          .---.   .---------------.
|  default  |--------->| M |-->|  hw:internal  |
'-----------'          '---'   '---------------'
                          |
                          |
                          v
.-----------.      .----------.
|  looprec  |<-----| loopback |
'-----------'      '----------'

edirol- the device name I use for playing and recording of high 
resolution audio
default- this is the old good default device when no options is 
specified for application
looprec- the device for recording of what is payed out

It would be terrific to route the sound played into default also to 
softvolume device. Then with mixer I can choose how strongly I want the 
default playback into UA25 output using the softvolume control. At the 
same time playing into edirol must be possible. And this is what I am 
unable to achieve. I have googled and tried tens of configurations and 
something does fail always.

Thanks a lot. Any help is welcome.

alsa version
~]$ rpm -qa | grep alsa
clalsadrv-2.0.0-7.fc20.x86_64
alsa-firmware-1.0.27-2.fc20.noarch
alsa-plugins-pulseaudio-1.0.27-2.fc20.x86_64
wine-alsa-1.7.35-1.fc20.x86_64
alsa-lib-devel-1.0.27.2-2.fc20.x86_64
alsa-lib-1.0.27.2-2.fc20.x86_64
alsa-tools-firmware-1.0.27-3.fc20.x86_64
alsa-lib-1.0.27.2-2.fc20.i686
alsa-plugins-pulseaudio-1.0.27-2.fc20.i686
alsa-lib-devel-1.0.27.2-2.fc20.i686
alsa-utils-1.0.27.2-4.fc20.x86_64

The asoundrc I have assembled is here. By switching the pcm.!default to 
multicard_route should acomplish it but it fails with well known "aplay: 
set_params:1204: Broken configuration for this PCM: no configurations 
available"
--------------------------------------

# EDIROL UA25 section

pcm_slave.edirol_hw {
	pcm "hw:UA25"
	format S24_LE
	channels 2
	rate 44100
}

pcm.edirol_mix {
	type dmix
	ipc_key 1945263
	slave edirol_hw
}

pcm.edirol_dsnoop {
	type dsnoop
	ipc_key 1945264
	slave edirol_hw
}

pcm.edirol_asym {
	type asym
	playback.pcm "edirol_mix"
	capture.pcm "edirol_dsnoop"
}

pcm.edirol {
	type plug
	slave.pcm "edirol_asym"
}


# DEFAULT device with loopback

pcm_slave.loopback_hw_A {
	pcm "hw:Loopback,0,0"
	rate 44100
	periods 128
	period_time 0
	period_size 1024 # must be power of 2
	buffer_size 8192
}

pcm_slave.loopback_hw_B {
	pcm "hw:Loopback,1,0"
	rate 44100
	periods 128
	period_time 0
	period_size 1024 # must be power of 2
	buffer_size 8192
}

pcm.loopback_mix {
	type dmix
	ipc_key 1025
	slave loopback_hw_A
}

pcm_slave.default_hw {
	pcm "hw:0,0"
	rate 44100
	periods 128
	period_time 0
	period_size 1024 # must be power of 2
	buffer_size 8192
}

pcm.default_mix {
	type dmix
	ipc_key 1024
	slave default_hw
}

pcm.multidev_loopdefault {
	type multi
	slaves {
		a { pcm "default_mix"; channels 2 }
		b { pcm "loopback_mix"; channels 2 }
	}
	bindings{
		0 { slave a; channel 0 }
		1 { slave a; channel 1 }
		2 { slave b; channel 0 }
		3 { slave b; channel 1 }
	}
}

pcm.multidev_route {
	type route
	slave.pcm "multidev_loopdefault"
	slave.channels 4
	ttable.0.0 1
	ttable.1.1 1
	ttable.0.2 1
	ttable.1.3 1
}


pcm.edirolink_control {
	type softvol
#	slave.pcm "edirol_mix"
	slave.pcm "edirol"
	control {
		name "UA25Link"
		card UA25
	}
}

ctl.softvol {
	type hw
	card UA25
}

pcm.multi_card {
	type multi
	slaves {
		a { pcm "multidev_route" ; channels 2 }
		b { pcm "edirolink_control"; channels 2 }
	}
	bindings{
		0 { slave a; channel 0 }
		1 { slave a; channel 1 }
		2 { slave b; channel 0 }
		3 { slave b; channel 1 }
	}
}

pcm.multicard_route {
	type route
	slave.pcm "multi_card"
	slave.channels 4
	ttable.0.0 1
	ttable.1.1 1
	ttable.0.2 1
	ttable.1.3 1
}

pcm.!default {
	type asym
	playback.pcm "multidev_route"
#	playback.pcm "multicard_route"
	capture default_hw
}

pcm.looprec_dsnoop {
	type dsnoop
	ipc_key 1026
	slave loopback_hw_B		
}

pcm.looprec {
	type plug
	slave.pcm "looprec_dsnoop"
}





-- 
Lugupidamisega >> Best regards >> Mit freundlichen Grüßen >> Saludos
   /\  Peeter Vois <tauria@xxxxxxxxx>
  /  \ tel: +372 55611689
  \||\ Tauria OÜ   <http://www.tauria.ee>
  \||\ juhatuse liige / board member
   ||  http://lnkd.in/bVwZg_J

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user




[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux