[Alsa-user] Best course of action with Audient iD14

2018-01-22 Thread Charles Mulder
Hi.

I recently bought the Audient iD14, which is a class compliant USB2 device.

I would like to use it for writing and record music. Apparently it has
great converters.

After some online searching I came across a similar question on
StackOverflow

:

*Question*
"Ubuntu lists my audio interface as Analogue Surround 4.0 when it actually
only plays in stereo. As a result, the audio plays louder in the right
channel than the left channel."

*Answer*
*"Ubuntu (Linux in general) is correct in assigning 4 outputs as there are
4 outputs on the iD14. As you and I both know, only one pair of outputs are
physically accessible. Outputs 3&4 are primarily used to send alternate
mixes to musicians and are only accessible via the Audient mixer and/or
DAW. The iD14 is class compliant in as far as it is recognised and some
audio can be heard. Unfortunately that is as far as it goes (currently) as
there is no mixer available to ALSA or Pulse etc. If you open a terminal
and run alsamixer, press F6 and select Audient iD14, it will report a
broken pipe error. ALSA (or Pulseaudio) has no way of knowing how to
allocate the outputs, so assumes all 4 detected outs are available, but
also has no way of directing signal appropriately."*

I would like to ask your help to establish what the best course of action
would be.

Should I work on trying to fix this issue with a custom .asoundrc
 file, possibly using
the multi plugin

?

If that's not possible, what would writing a ALSA USB driver specifically
for the Audient iD14 entail?

iD14 manual and specifications


I would appreciate your thoughts and insights on this.

Kind regards,
Charles Mulder



-- 
Charles Mulder
Software Engineer/Musician
mobile: +27 83 653 3698
phone: +27 27 948 2592
skype: charliemurder
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Iec958 plugin usage

2018-01-22 Thread Clemens Ladisch via Alsa-user
maruthi srinivas wrote:
> On Monday, January 22, 2018, Clemens Ladisch 
> wrote:
>> maruthi srinivas wrote:
>>> I want to use plugin to convert either way and write to a file.
>>
>> What for?  There is no standard for AES data in a file.
>>
> Aplay help lists IEC958_SUBFRAME_LE format.

That is a format used by certain hardware, but it cannot be stored in
.wav files.  (This is why the plugin is needed.)


Regards,
Clemens

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Iec958 plugin usage

2018-01-22 Thread maruthi srinivas
On Monday, January 22, 2018, Clemens Ladisch 
wrote:
> (please don't top-post)
>
> maruthi srinivas wrote:
>> By AES, i mean AES standard as in:
>> https://en.m.wikipedia.org/wiki/AES3
>
>
> The on-the-wire format has the premable, which does not correspond to any
> correctly-encoded bit value, so you cannot talk about bits here.
I have little knowledge on IEC958/AES.
I see plugin has functions to encode and decode. I thought those serve the
purpose. Plugin says it converts linear pcm to iec958 and iec958 to linear
pcm. I didnt understand exactly what plugin does.

>
>> I want to use plugin to convert either way and write to a file.
>
> What for?  There is no standard for AES data in a file.
>
Aplay help lists IEC958_SUBFRAME_LE format.

Regards,
MS
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Iec958 plugin usage

2018-01-22 Thread Clemens Ladisch via Alsa-user
(please don't top-post)

maruthi srinivas wrote:
> By AES, i mean AES standard as in:
> https://en.m.wikipedia.org/wiki/AES3

This is a hardware standard; it does not define the format of samples in
memory.

> This will add 4bit before and 4 bit after pcm sample.it seems iec958 plugin
> adds those 8bits to encode pcm to iec958/AES standard and does reverse to
> decode to pcm. Is my understanding correct ?

The on-the-wire format has the premable, which does not correspond to any
correctly-encoded bit value, so you cannot talk about bits here.

> I want to use plugin to convert either way and write to a file.

What for?  There is no standard for AES data in a file.


Regards,
Clemens

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Iec958 plugin usage

2018-01-22 Thread maruthi srinivas
Hi Clemens,

By AES, i mean AES standard as in:
https://en.m.wikipedia.org/wiki/AES3

This will add 4bit before and 4 bit after pcm sample.it seems iec958 plugin
adds those 8bits to encode pcm to iec958/AES standard and does reverse to
decode to pcm. Is my understanding correct ?  I want to use plugin to
convert either way and write to a file.

Regards,
MS

On Monday, January 22, 2018, Clemens Ladisch via Alsa-user <
alsa-user@lists.sourceforge.net> wrote:
> maruthi srinivas wrote:
>> Iam trying to convert pcm (from wav file) to AES and vice versa.
>
> What exactly do you mean with "AES"?
>
>> I found a alsa plugin iec958. Will that plugin does do what I want
>> to achieve ?
>
> The iec958 creates an IEC958 bit stream, which is required for S/PDIF
> on some very old C-Media cards.
>
> This plugin is useless if you have any other hardware.
>
>
> Regards,
> Clemens
>
>
--
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Alsa-user mailing list
> Alsa-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-user
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Dmix problem

2018-01-22 Thread Robert Bielik
> > is there some ALSA plugin that can coalesce buffering ? Meaning that
> > the plugin can take f.i. larger period_size than what the dmix device
> > is working with ?
> 
> What problem would that solve?

Not sure. It would allow clients connecting to that device to have a more 
relaxed callback scheduling, and maybe not needing to be run with RR 
scheduling. Just a thought.

Regards
/R

> 
> 
> Regards,
> Clemens
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Alsa-user mailing list
> Alsa-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-user

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Dmix problem

2018-01-22 Thread Clemens Ladisch via Alsa-user
Robert Bielik wrote:
> is there some ALSA plugin that can coalesce buffering ? Meaning that
> the plugin can take f.i. larger period_size than what the dmix device
> is working with ?

What problem would that solve?


Regards,
Clemens

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Dmix problem

2018-01-22 Thread Robert Bielik
Hi Clemens,

> >> Is there any other plugin doing the same thing as dmix... but working ?
> 
> Yes, dmix with a larger buffer size (i.e., more periods).

Hmm. Yes. I've tried running aplay with "chrt --rr 99" and it got way more 
stable, even at as low a settings as 64 frames (period_size) + 2 periods. 

I can work with this, although it feels a bit unsafe having everything 
connected to the dmix device running with a RR scheduler (with max priority).

> The dmix plugin does not do sample rate conversion, i.e., each client
> connecting to it is forced to use the dmix rate.  (If you wanted to, it would
> be possible to put a "plug" or "rate" plugin on top of it.)

On that note, is there some ALSA plugin that can coalesce buffering ? Meaning 
that the plugin can take f.i. larger period_size than what the dmix device is 
working with ? 

Regards
/Robert

> 
> 
> Regards,
> Clemens
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Alsa-user mailing list
> Alsa-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-user

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Iec958 plugin usage

2018-01-22 Thread Clemens Ladisch via Alsa-user
maruthi srinivas wrote:
> Iam trying to convert pcm (from wav file) to AES and vice versa.

What exactly do you mean with "AES"?

> I found a alsa plugin iec958. Will that plugin does do what I want
> to achieve ?

The iec958 creates an IEC958 bit stream, which is required for S/PDIF
on some very old C-Media cards.

This plugin is useless if you have any other hardware.


Regards,
Clemens

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Dmix problem

2018-01-22 Thread Clemens Ladisch via Alsa-user
Robert Bielik wrote:
>> Is there any other plugin doing the same thing as dmix... but working ?

Yes, dmix with a larger buffer size (i.e., more periods).

> I'd need a mixing plugin that does not do sample rate conversion, i.e. each
> client connecting to it should be forced to use the mix plugs sample rate.

The dmix plugin does not do sample rate conversion, i.e., each client
connecting to it is forced to use the dmix rate.  (If you wanted to, it would
be possible to put a "plug" or "rate" plugin on top of it.)


Regards,
Clemens

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Iec958 plugin usage

2018-01-22 Thread maruthi srinivas
Hi,

Iam trying to convert pcm (from wav file) to AES and vice versa. I found a
alsa plugin iec958. Will that plugin does do what I want to achieve ?

I tried writing a alsa conf file for that, but it's giving errors when
tried through aplay by giving plugin virtual device as argument to aplay.

Please help how to use iec958 plugin.

Regards,
MS
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Dmix problem

2018-01-22 Thread Robert Bielik
> The reason is that for my project I need to have as low a latency as possible 
> in
> the dmix chain. Is there any other plugin doing the same thing as dmix... but
> working ? 

More specifically, I'd need a mixing plugin that does not do sample rate 
conversion, i.e. each client connecting to it should be forced to use the mix 
plugs sample rate. I think the problem I have is related to SRC.

/R
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Dmix problem

2018-01-22 Thread Robert Bielik
Hi, I'm using the audioinjector octocard on a R Pi 3, and I have a problem 
where the system default dmix (dmix:0,0) plays just fine (via aplay), but my 
own defined dmix device occasionally stops streaming with a xrun condition:

Status(R/W):
  state   : RUNNING
  trigger_time: 13953.124684
  tstamp  : 13953.143017
  delay   : -40232
  avail   : 2109
  avail_max   : 2109
aplay: xrun:1624: read/write error, state = RUNNING

Granted, the default dmix has a period size of 1024 and 16 periods, but my own 
device has only 2 periods:

pcm.octomix {
type dmix
ipc_key 321456 # any unique value
ipc_key_add_uid true
slave {
pcm "hw:0"
format S32_LE
rate 48000
channels 8
period_time 0
period_size 1024
periods 2
}
}

The reason is that for my project I need to have as low a latency as possible 
in the dmix chain. Is there any other plugin doing the same thing as dmix... 
but working ? 

Regards
/R
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user