Re: [Alsa-user] Multi and Format

2016-12-08 Thread Clemens Ladisch
Ed Stark wrote:
> I cannot seem to get the linear to work after a multi, even if after a multi 
> -> rate -> linear -> slave.

The "plug" plugin combines all needed automatic conversions; replace
"rate->linear" with "plug".

> Anything that I do that specifies a format after the multi

... is a secret.


Regards,
Clemens

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Multi and Format

2016-12-07 Thread Ed Stark
Clemens

Many thanks for the input, however I cannot seem to get the linear to work 
after a multi, even if after a multi -> rate -> linear -> slave.

Anything that I do that specifies a format after the multi seems to fail.

Is there another way you could recommend maybe instead of using the multi for 
sample copying?

Regards

Ed Stark


> On 7 Dec 2016, at 12:03, Clemens Ladisch  wrote:
> 
> Ed Stark wrote:
>> To combine the analogue and the digital I am using a multi, but cannot
>> specify different formats for the slaves when using a multi. Ideally
>> I want to set the analogue at 32bit and force the digital to 24bit
> 
> A single PCM device uses a single format.  The multi plugin just copies
> samples, so its slave devices must use the same format.
> 
> However, you can use the linear plugin to automatically convert the
> sample format between itself and its slave.
> 
> 
> Regards,
> Clemens


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Multi and Format

2016-12-07 Thread Clemens Ladisch
Ed Stark wrote:
> To combine the analogue and the digital I am using a multi, but cannot
> specify different formats for the slaves when using a multi. Ideally
> I want to set the analogue at 32bit and force the digital to 24bit

A single PCM device uses a single format.  The multi plugin just copies
samples, so its slave devices must use the same format.

However, you can use the linear plugin to automatically convert the
sample format between itself and its slave.


Regards,
Clemens

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Multi and Format

2016-12-06 Thread Ed Stark
We are designing a new USB sound card that combines analogue and digital 
outputs using the USB 2.0 audio driver. 

The incoming audio stream can be 32bit 44.1 to 192

To combine the analogue and the digital I am using a multi, but cannot specify 
different formats for the slaves when using a multi. Ideally I want to set the 
analogue at 32bit and force the digital to 24bit

This all seems to be working ok without the format being specified, however I 
would like to know if anyone knows a way to fix the format for each output when 
using a multi? 

Any suggestions would be greatly appreciated.


#/etc/asound.conf

pcm.player1 {
type softvol
slave.pcm "player1v"
control.name "p1.m"
control.card 0
resolution   2
}

pcm.player1v {
type softvol
slave {
pcm "player1mix"
}
control {
name "p1.v"
card  0
}
}

pcm.player1mix {
type plug
slave.pcm {
type multi
slaves {
a { pcm "analog1r" channels 2 }
b { pcm "digital1r" channels 2 }
}
bindings [
{ slave a channel 0 }
{ slave a channel 1 }
{ slave b channel 0 }
{ slave b channel 1 }
]
}
ttable [
[ 1 0 1 0 ]
[ 0 1 0 1 ]
]
}

pcm.analog1r {
type rate
slave analog1s
}

pcm_slave.analog1s {
pcm "hw:0,0"
rate 48000
}

pcm.digital1r {
type rate
slave digital1s
}

pcm_slave.digital1s {
 pcm "hw:0,1"
 rate 192000
}





Ed Stark--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user