[Alsa-user] Route input channels

2021-11-10 Thread Robert Bielik
Hi,

If I have a USB soundcard with say 8 channels, how do I route channels 7+8 to a 
stereo capture device?

Regards
/R

The information in this email (including any attachments) may contain 
confidential and/or proprietary material. Any review, retransmission or use of 
this information by persons or entities other than the intended, authorized 
recipient is prohibited. If you received this email in error, please notify the 
sender and delete the material. For information regarding how Dirac handles 
personal data, please visit https://www.dirac.com/privacy-policy.

___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] USB ALSA card number

2020-11-23 Thread Robert Bielik
Setting

options snd-usb-audio index=5

in alsa-base.conf seems to do the trick, thanks!

Regards
/R

-Original Message-
From: Ralf Mardorf 
Sent: Sunday, 22 November 2020 16:10
To: alsa-user@lists.sourceforge.net
Subject: Re: [Alsa-user] USB ALSA card number

Hi,

I'm using the below /etc/modprobe.d/alsa-base.conf file.

It contains 2 instances of snd_ice1712, but just one of those cards is actually 
built-in, so no card can become hw:2.

You can also add snd_usb_audio as a placeholder.

[rocketmouse@archlinux ~]$ cat /etc/modprobe.d/alsa-base.conf # ALSA module 
ordering options snd slots=snd_hdspm,snd_ice1712,snd_ice1712

[rocketmouse@archlinux ~]$ aplay -l # USB audio interface isn't attached
 List of PLAYBACK Hardware Devices  card 0: HDSPMx579bcc [RME 
AIO_579bcc], device 0: RME AIO [RME AIO]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: EWX2496 [TerraTec EWX24/96], device 0: ICE1712 multi [ICE1712 multi]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: HDMI [HDA Intel HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: HDMI [HDA Intel HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
[rocketmouse@archlinux ~]$ aplay -l # USB audio interface is attached
 List of PLAYBACK Hardware Devices  card 0: HDSPMx579bcc [RME 
AIO_579bcc], device 0: RME AIO [RME AIO]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: EWX2496 [TerraTec EWX24/96], device 0: ICE1712 multi [ICE1712 multi]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: HDMI [HDA Intel HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: HDMI [HDA Intel HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 4: USB [Scarlett 18i20 USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
[rocketmouse@archlinux ~]$

Regards,
Ralf


___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Falsa-userdata=04%7C01%7Crobert.bielik%40dirac.com%7C5b42e1a52f8b4d317abb08d88f00d6fb%7C266f25c575d44d978f448d816a1f6a35%7C1%7C1%7C637416581073742767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000sdata=K0CzBtq7WQgdhyjI%2FvrsmkJYy%2FQ5gpcXXty0VlHRcrY%3Dreserved=0
The information in this email (including any attachments) may contain 
confidential and/or proprietary material. Any review, retransmission or use of 
this information by persons or entities other than the intended, authorized 
recipient is prohibited. If you received this email in error, please notify the 
sender and delete the material. For information regarding how Dirac handles 
personal data, please visit https://www.dirac.com/privacy-policy.

___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] USB ALSA card number

2020-11-21 Thread Robert Bielik
I have a system where I need USB attached audio devices to start numbering from 
ALSA card5 and upwards (i.e. card0 to card4 are reserved). Is this possible?

Regards
/Robert

The information in this email (including any attachments) may contain 
confidential and/or proprietary material. Any review, retransmission or use of 
this information by persons or entities other than the intended, authorized 
recipient is prohibited. If you received this email in error, please notify the 
sender and delete the material. For information regarding how Dirac handles 
personal data, please visit https://www.dirac.com/privacy-policy.

___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] PCM plugin last

2020-06-01 Thread Robert Bielik
Hi Clemens,

> The dmix plugin plays shared-memory tricks with the ring buffer and therefore 
> requires to run on top of a hw device.
> It might be possible to run dmix on a virtual loopback sound card and route 
> that one to the LADSPA plugin, but I guess using PulseAudio would be a better 
> idea.

Interesting though. Can this loopback routing be done entirely within a 
.asoundrc configuration?

Regards,
/Robert

The information in this email (including any attachments) may contain 
confidential and/or proprietary material. Any review, retransmission or use of 
this information by persons or entities other than the intended, authorized 
recipient is prohibited. If you received this email in error, please notify the 
sender and delete the material. For information regarding how Dirac handles 
personal data, please visit https://www.dirac.com/privacy-policy.

___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] PCM plugin last

2020-05-27 Thread Robert Bielik
I’d like to know if there is any way to get the following sound chain through 
ALSA:

Mediaplayer -> dmix -> LADSPA -> plughw:0,0

For my application it is crucial that the LADSPA plugin be applied AFTER dmix.

Regards
/Robert

The information in this email (including any attachments) may contain 
confidential and/or proprietary material. Any review, retransmission or use of 
this information by persons or entities other than the intended, authorized 
recipient is prohibited. If you received this email in error, please notify the 
sender and delete the material. For information regarding how Dirac handles 
personal data, please visit https://www.dirac.com/privacy-policy.
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] ALSA PCM plugin lifetime

2020-05-22 Thread Robert Bielik
On a similar note, the sample rate seems to be specified when instantiating the 
PCM plugin, but I’m not aware if frames per buffer is ?

From: Robert Bielik
Sent: Monday, 18 May 2020 10:39
To: alsa-user@lists.sourceforge.net
Subject: ALSA PCM plugin lifetime

Hi all,

I have a system setup where I need a post-processing ALSA PCM plugin. But how 
is the lifetime managed by the ALSA server? Will the plugin only be 
instantiated whilst there is an audio stream running?

Is it possible to setup an ALSA configuration that keeps the PCM plugin 
instantiated, whether or not there is any audio running? (there will be an 
external application that communicates with the plugin through unix sockets)

Regards
/Robert

The information in this email (including any attachments) may contain 
confidential and/or proprietary material. Any review, retransmission or use of 
this information by persons or entities other than the intended, authorized 
recipient is prohibited. If you received this email in error, please notify the 
sender and delete the material. For information regarding how Dirac handles 
personal data, please visit https://www.dirac.com/privacy-policy.
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] ALSA PCM plugin lifetime

2020-05-18 Thread Robert Bielik
Hi all,

I have a system setup where I need a post-processing ALSA PCM plugin. But how 
is the lifetime managed by the ALSA server? Will the plugin only be 
instantiated whilst there is an audio stream running?

Is it possible to setup an ALSA configuration that keeps the PCM plugin 
instantiated, whether or not there is any audio running? (there will be an 
external application that communicates with the plugin through unix sockets)

Regards
/Robert

The information in this email (including any attachments) may contain 
confidential and/or proprietary material. Any review, retransmission or use of 
this information by persons or entities other than the intended, authorized 
recipient is prohibited. If you received this email in error, please notify the 
sender and delete the material. For information regarding how Dirac handles 
personal data, please visit https://www.dirac.com/privacy-policy.
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] List devices

2018-09-07 Thread Robert Bielik
> So I guess its a ALSA version issue ☹

ALSA version where hints work is 1.1.3 and where they don't version is 1.0.29.

/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


Re: [Alsa-user] List devices

2018-09-07 Thread Robert Bielik
> But it does not work on the target platform I'm using. Is this an ALSA version
> issue ? How can I tell which version of ALSA is used on a particular platform 
> ?

Ok, cat /proc/asound/version for Raspbian Stretch gives:
Advanced Linux Sound Architecture Driver Version k4.9.59-v7+.

Whereas on the target platform:
Advanced Linux Sound Architecture Driver Version k4.1.25.

So I guess its a ALSA version issue ☹

Regards
/R

> 
> Regards
> /Robert
> 
> > -Original Message-----
> > From: Robert Bielik 
> > Sent: den 6 september 2018 14:46
> > To: Alsa User 
> > Subject: Re: [Alsa-user] List devices
> >
> > Hi Clemens,
> >
> > Thanks for hint  I added hint description and show as follows:
> >
> > pcm.i2s_play {
> > type dmix
> > ipc_key 1024
> > ipc_key_add_uid 0
> > slave {
> > pcm {
> > type hw
> > card 1
> > }
> > rate 96000
> > format S24_3LE
> > }
> > hint.description "I2S device"
> > hint.show on
> > }
> >
> > Still it does not show up with aplay -L. The alsa.conf setting wrt hints:
> >
> > # show all name hints also for definitions without hint {} section
> > defaults.namehint.showall off
> > # show just basic name hints
> > defaults.namehint.basic on
> > # show extended name hints
> > defaults.namehint.extended off
> >
> > Anything else I need to do ?
> >
> > Regards
> > /Robert
> >
> > > -Original Message-
> > > From: Clemens Ladisch via Alsa-user 
> > > Sent: den 6 september 2018 11:34
> > > To: alsa-user@lists.sourceforge.net
> > > Subject: Re: [Alsa-user] List devices
> > >
> > > Robert Bielik wrote:
> > > > I cannot get it listed with ALSA API function snd_device_name_hint.
> > >
> > > This is undocumented; see the "hint" entries in the standard .conf files.
> > >
> > >
> > > 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
--
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] List devices

2018-09-06 Thread Robert Bielik
Hi Clemens,

Thanks for hint  I added hint description and show as follows:

pcm.i2s_play {
type dmix
ipc_key 1024
ipc_key_add_uid 0
slave {
pcm {
type hw
card 1
}
rate 96000
format S24_3LE
}
hint.description "I2S device"
hint.show on
}

Still it does not show up with aplay -L. The alsa.conf setting wrt hints:

# show all name hints also for definitions without hint {} section
defaults.namehint.showall off
# show just basic name hints
defaults.namehint.basic on
# show extended name hints
defaults.namehint.extended off

Anything else I need to do ?

Regards
/Robert

> -Original Message-
> From: Clemens Ladisch via Alsa-user 
> Sent: den 6 september 2018 11:34
> To: alsa-user@lists.sourceforge.net
> Subject: Re: [Alsa-user] List devices
> 
> Robert Bielik wrote:
> > I cannot get it listed with ALSA API function snd_device_name_hint.
> 
> This is undocumented; see the "hint" entries in the standard .conf files.
> 
> 
> 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


[Alsa-user] List devices

2018-09-06 Thread Robert Bielik
Hi,

I have a dmix plug that's connected to hw dev 1 (/etc/asound.conf):

pcm.i2s_play {
   type dmix
   ipc_key 1024
   ipc_key_add_uid 0
   slave {
   pcm {
   type hw
   card 1
   }
   rate 96000
   format S24_3LE
   }
}

I cannot get it listed with ALSA API function snd_device_name_hint. Neither 
does aplay -L list it.

But I can play to it: 

# play -D i2s_play -f S32_LE -c 2 -r 96000 /dev/urandom
Playing raw data '/dev/urandom' : Signed 32 bit Little Endian, Rate 96000 Hz, 
Stereo

I'm working on an ALSA C++ backend so in order to use the device I need to be 
able to list it, so how to ?

Regards
/Robert





--
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] Help to set up a simple sound card

2018-02-10 Thread Robert Bielik
Hmm... I was a bit too fast there...

> aplay -L
> null
> Discard all samples (playback) or generate zero samples (capture)
> pulse
> PulseAudio Sound Server

Can you try playing through pulseaudio with:

aplay -D pulse test.wav ?

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


Re: [Alsa-user] Help to set up a simple sound card

2018-02-10 Thread Robert Bielik
Yó napot kivánok! 

Take a look at https://alsa.opensrc.org/Dmix , dmix is the ALSA plugin you 
should use for this.

Regards
/Robert

> -Original Message-
> From: Csányi Pál [mailto:csanyi...@gmail.com]
> Sent: den 10 februari 2018 12:02
> To: Alsa User 
> Subject: [Alsa-user] Help to set up a simple sound card
> 
> Hi,
> 
> I am on Gentoo Linux system.
> 
> I am trying to set up my soundcard so I can listen sound from multiple
> application at once.
> 
> aplay -L
> null
> Discard all samples (playback) or generate zero samples (capture)
> pulse
> PulseAudio Sound Server
> sysdefault:CARD=PCH
> HDA Intel PCH, ALC269VB Analog
> Default Audio Device
> front:CARD=PCH,DEV=0
> HDA Intel PCH, ALC269VB Analog
> Front speakers
> surround21:CARD=PCH,DEV=0
> HDA Intel PCH, ALC269VB Analog
> 2.1 Surround output to Front and Subwoofer speakers
> surround40:CARD=PCH,DEV=0
> HDA Intel PCH, ALC269VB Analog
> 4.0 Surround output to Front and Rear speakers
> surround41:CARD=PCH,DEV=0
> HDA Intel PCH, ALC269VB Analog
> 4.1 Surround output to Front, Rear and Subwoofer speakers
> surround50:CARD=PCH,DEV=0
> HDA Intel PCH, ALC269VB Analog
> 5.0 Surround output to Front, Center and Rear speakers
> surround51:CARD=PCH,DEV=0
> HDA Intel PCH, ALC269VB Analog
> 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
> surround71:CARD=PCH,DEV=0
> HDA Intel PCH, ALC269VB Analog
> 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
> hdmi:CARD=PCH,DEV=0
> HDA Intel PCH, HDMI 0
> HDMI Audio Output
> 
> aplay --list-devices
>  List of PLAYBACK Hardware Devices 
> card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
>   Subdevices: 0/1
>   Subdevice #0: subdevice #0
> card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> 
> I am running always Firefox web browser which uses pulseaudio:
> "Since version 52, Firefox has made PulseAudio a hard requirement and
> dropped support for direct output to ALSA. To enable sound in these
> versions of Firefox enable the pulseaudio USE flag."
> 
> So when eg. I try to run this:
> aplay -D hw:0,0 test.wav
> I get this:
> aplay: main:786: audio open error: Device or resource busy
> 
> How to solve this problem?
> 
> In this case what should I put into ~/.asoundrc to can listen sound
> from multiple application at once?
> 
> --
> Best, Pali
> 
> --
> 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] Redorder cards

2018-02-03 Thread Robert Bielik
> I'm trying to reorder my soundcards on a RPi so that the I2S based cards
> always is index zero. I looked at the docs
> (https://alsa.opensrc.org/MultipleCards), which just says, "easy peasy, just
> use options snd slots=this, that". Problem is that nowhere is it documented
> WHAT "this, that" is! Is it card name ? Is it module name ? If latter, how do 
> I
> get driver name ?
> 
> Help would be appreciated.

Ok, they're module names from /proc/asound/modules. TL;DR problem I guess.

cat /proc/asound/modules gives:
0 usb_f_uac2
1 (null)

(null) is not very helpful, anyway:

options snd slots=,usb_f_uac2

seems to do the trick.

/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] Redorder cards

2018-02-03 Thread Robert Bielik
Hi,

I'm trying to reorder my soundcards on a RPi so that the I2S based cards always 
is index zero. I looked at the docs (https://alsa.opensrc.org/MultipleCards), 
which just says, "easy peasy, just use options snd slots=this, that". Problem 
is that nowhere is it documented WHAT "this, that" is! Is it card name ? Is it 
module name ? If latter, how do I get driver name ?

Help would be appreciated.

Regards
/Robert


--
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] splitting a 4 channel usb sound card into master and headphone

2018-02-01 Thread Robert Bielik
Would the dshare plugin do this for you ? 
http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html

Regards
/Robert

> -Original Message-
> From: Samuel Nicholas [mailto:nicholas.sam...@gmail.com]
> Sent: den 1 februari 2018 22:09
> To: alsa-user@lists.sourceforge.net
> Subject: [Alsa-user] splitting a 4 channel usb sound card into master and
> headphone
> 
> Hi,
> 
> I have a Pioneer DDJ-WeGO, 4 channel USB device that outputs stereo
> master and stereo headphone.
> I've been scouring the internet trying to find out how I can possibly
> split up the ports as it presents as a surround 4.0 device.
> 
> So far I've come up with nothing except an remapping in pulseaudio
> that is super ugly to use.
> I really would like to solve this at the lowest possible layer.
> 
> U have udev rules to discriminate the device working fine.
> 
> Is there any way to do this with alsa?
> 
> Cheers for any help,
> Samuel.
> 
> --
> 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


[Alsa-user] dmix with non-hw slave ?

2018-01-29 Thread Robert Bielik
I want to setup a system where JACK manages a low latency path for audio 
in/out, and where ALSA apps use the ALSA JACK PCM plugin 
(http://jackaudio.org/faq/routing_alsa.html)

Is it possible on the ALSA side to setup dmix to use the "jack" type plugin as 
backend ? Or will the jack plugin do the same job as dmix, i.e. mix together 
applications using the device ?

Regards
/Robert


--
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 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] 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


Re: [Alsa-user] Strange i/o problem

2018-01-16 Thread Robert Bielik
FYI, I finally got it working, by replacing the snd_pcm_wait construct with 
(pseudo code):

while (true) {
poll_result = do_poll();
if (poll_result == capture) {
   capture.getBuffer(in_buffer);
}
if (poll_result == playback)  {
   do_calbacks(in_buffer, out_buffer);
   playback.putBuffer(out_buffer);
}
}

Regards
/R

> -Original Message-
> From: Robert Bielik
> Sent: den 15 januari 2018 17:59
> To: alsa-user@lists.sourceforge.net
> Subject: RE: Strange i/o problem
> 
> Yet more info, the output of snd_pcm_hw_params_dump and
> snd_pcm_sw_params_dump (they look the same for both capture and
> playback):
> 
> ACCESS:  RW_INTERLEAVED
> FORMAT:  FLOAT_LE
> SUBFORMAT:  STD
> SAMPLE_BITS: 32
> FRAME_BITS: 64
> CHANNELS: 2
> RATE: 48000
> PERIOD_TIME: (666 667)
> PERIOD_SIZE: 32
> PERIOD_BYTES: 256
> PERIODS: 2
> BUFFER_TIME: (1333 1334)
> BUFFER_SIZE: 64
> BUFFER_BYTES: 512
> TICK_TIME: 0
> tstamp_mode: NONE
> tstamp_type: MONOTONIC
> period_step: 1
> avail_min: 32
> start_threshold: 32
> stop_threshold: 1073741824
> silence_threshold: 0
> silence_size: 1073741824
> boundary: 1073741824
> 
> > -Original Message-
> > From: Robert Bielik
> > Sent: den 15 januari 2018 17:47
> > To: Robert Bielik <robert.bie...@dirac.com>; alsa-
> u...@lists.sourceforge.net
> > Subject: RE: Strange i/o problem
> >
> > Ah, forgot to mention a couple of things, this is on a Raspberry Pi 3 with
> > Raspbian Stretch, the rendering thread is set to SCHED_RR with max
> priority,
> > the timing of the callback is typically (in microseconds):
> >
> > min, mean, max, stddev: 655, 666, 680, 1.45639
> > min, mean, max, stddev: 656, 666, 680, 1.25471
> > min, mean, max, stddev: 640, 666, 694, 1.83335
> > min, mean, max, stddev: 619, 666, 713, 2.10409
> > min, mean, max, stddev: 656, 666, 681, 1.32999
> > min, mean, max, stddev: 652, 666, 682, 1.65541
> > min, mean, max, stddev: 651, 666, 685, 1.49302
> > min, mean, max, stddev: 656, 666, 680, 1.33093
> > min, mean, max, stddev: 649, 666, 690, 1.6246
> > min, mean, max, stddev: 656, 666, 679, 1.3234
> > min, mean, max, stddev: 656, 666, 680, 1.36177
> > min, mean, max, stddev: 611, 666, 704, 1.9551
> > min, mean, max, stddev: 651, 666, 687, 1.37784
> > min, mean, max, stddev: 650, 666, 689, 1.4738
> > min, mean, max, stddev: 609, 666, 722, 2.2253
> > min, mean, max, stddev: 656, 666, 680, 1.57805
> > min, mean, max, stddev: 643, 666, 683, 1.54424
> >
> > (which to me looks more than OK)
> >
> > > -Original Message-
> > > From: Robert Bielik [mailto:robert.bie...@dirac.com]
> > > Sent: den 15 januari 2018 17:41
> > > To: alsa-user@lists.sourceforge.net
> > > Subject: [Alsa-user] Strange i/o problem
> > >
> > > I have a strange problem: I'm trying to pipe audio input -> output using a
> > I2S
> > > device @48000 Hz and 32 frames buffer size and 2 periods, to get as low a
> > > latency as possible.
> > >
> > > It works nicely if I either:
> > > 1. Use capture + playback and record capture to a wav file (sounds fine).
> > > 2. Use playback only and generate sine waves.
> > > 3. Pipe capture -> playback with a larger buffer size, such as 64.
> > >
> > > But if I have capture + playback, I get a very strange output noise akin
> > > towards heavy intermodulation distortion.
> > >
> > > The rendering thread is (pseudo code):
> > >
> > > while (true) {
> > > if(capture_active) {
> > >snd_pcm_wait(capture_handle, timeout);
> > >read_pcm_data_into_buffer(capture_handle, input_buffer);
> > > }
> > > do_callback(input_buffer, output_buffer);
> > > if (playback_active) {
> > > snd_pcm_wait(playback_handle, timeout);
> > > write_pcm_data_from_buffer(playback_handle, output_buffer);
> > > }
> > > }
> > >
> > > Any ideas what can go wrong ?
> > > /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

--
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] Strange i/o problem

2018-01-15 Thread Robert Bielik
Yet more info, the output of snd_pcm_hw_params_dump and snd_pcm_sw_params_dump 
(they look the same for both capture and playback):

ACCESS:  RW_INTERLEAVED
FORMAT:  FLOAT_LE
SUBFORMAT:  STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: 48000
PERIOD_TIME: (666 667)
PERIOD_SIZE: 32
PERIOD_BYTES: 256
PERIODS: 2
BUFFER_TIME: (1333 1334)
BUFFER_SIZE: 64
BUFFER_BYTES: 512
TICK_TIME: 0
tstamp_mode: NONE
tstamp_type: MONOTONIC
period_step: 1
avail_min: 32
start_threshold: 32
stop_threshold: 1073741824
silence_threshold: 0
silence_size: 1073741824
boundary: 1073741824

> -Original Message-
> From: Robert Bielik
> Sent: den 15 januari 2018 17:47
> To: Robert Bielik <robert.bie...@dirac.com>; alsa-user@lists.sourceforge.net
> Subject: RE: Strange i/o problem
> 
> Ah, forgot to mention a couple of things, this is on a Raspberry Pi 3 with
> Raspbian Stretch, the rendering thread is set to SCHED_RR with max priority,
> the timing of the callback is typically (in microseconds):
> 
> min, mean, max, stddev: 655, 666, 680, 1.45639
> min, mean, max, stddev: 656, 666, 680, 1.25471
> min, mean, max, stddev: 640, 666, 694, 1.83335
> min, mean, max, stddev: 619, 666, 713, 2.10409
> min, mean, max, stddev: 656, 666, 681, 1.32999
> min, mean, max, stddev: 652, 666, 682, 1.65541
> min, mean, max, stddev: 651, 666, 685, 1.49302
> min, mean, max, stddev: 656, 666, 680, 1.33093
> min, mean, max, stddev: 649, 666, 690, 1.6246
> min, mean, max, stddev: 656, 666, 679, 1.3234
> min, mean, max, stddev: 656, 666, 680, 1.36177
> min, mean, max, stddev: 611, 666, 704, 1.9551
> min, mean, max, stddev: 651, 666, 687, 1.37784
> min, mean, max, stddev: 650, 666, 689, 1.4738
> min, mean, max, stddev: 609, 666, 722, 2.2253
> min, mean, max, stddev: 656, 666, 680, 1.57805
> min, mean, max, stddev: 643, 666, 683, 1.54424
> 
> (which to me looks more than OK)
> 
> > -Original Message-
> > From: Robert Bielik [mailto:robert.bie...@dirac.com]
> > Sent: den 15 januari 2018 17:41
> > To: alsa-user@lists.sourceforge.net
> > Subject: [Alsa-user] Strange i/o problem
> >
> > I have a strange problem: I'm trying to pipe audio input -> output using a
> I2S
> > device @48000 Hz and 32 frames buffer size and 2 periods, to get as low a
> > latency as possible.
> >
> > It works nicely if I either:
> > 1. Use capture + playback and record capture to a wav file (sounds fine).
> > 2. Use playback only and generate sine waves.
> > 3. Pipe capture -> playback with a larger buffer size, such as 64.
> >
> > But if I have capture + playback, I get a very strange output noise akin
> > towards heavy intermodulation distortion.
> >
> > The rendering thread is (pseudo code):
> >
> > while (true) {
> > if(capture_active) {
> >snd_pcm_wait(capture_handle, timeout);
> >read_pcm_data_into_buffer(capture_handle, input_buffer);
> > }
> > do_callback(input_buffer, output_buffer);
> > if (playback_active) {
> > snd_pcm_wait(playback_handle, timeout);
> > write_pcm_data_from_buffer(playback_handle, output_buffer);
> > }
> > }
> >
> > Any ideas what can go wrong ?
> > /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

--
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] Strange i/o problem

2018-01-15 Thread Robert Bielik
Ah, forgot to mention a couple of things, this is on a Raspberry Pi 3 with 
Raspbian Stretch, the rendering thread is set to SCHED_RR with max priority, 
the timing of the callback is typically (in microseconds):

min, mean, max, stddev: 655, 666, 680, 1.45639
min, mean, max, stddev: 656, 666, 680, 1.25471
min, mean, max, stddev: 640, 666, 694, 1.83335
min, mean, max, stddev: 619, 666, 713, 2.10409
min, mean, max, stddev: 656, 666, 681, 1.32999
min, mean, max, stddev: 652, 666, 682, 1.65541
min, mean, max, stddev: 651, 666, 685, 1.49302
min, mean, max, stddev: 656, 666, 680, 1.33093
min, mean, max, stddev: 649, 666, 690, 1.6246
min, mean, max, stddev: 656, 666, 679, 1.3234
min, mean, max, stddev: 656, 666, 680, 1.36177
min, mean, max, stddev: 611, 666, 704, 1.9551
min, mean, max, stddev: 651, 666, 687, 1.37784
min, mean, max, stddev: 650, 666, 689, 1.4738
min, mean, max, stddev: 609, 666, 722, 2.2253
min, mean, max, stddev: 656, 666, 680, 1.57805
min, mean, max, stddev: 643, 666, 683, 1.54424

(which to me looks more than OK)

> -Original Message-
> From: Robert Bielik [mailto:robert.bie...@dirac.com]
> Sent: den 15 januari 2018 17:41
> To: alsa-user@lists.sourceforge.net
> Subject: [Alsa-user] Strange i/o problem
> 
> I have a strange problem: I'm trying to pipe audio input -> output using a I2S
> device @48000 Hz and 32 frames buffer size and 2 periods, to get as low a
> latency as possible.
> 
> It works nicely if I either:
> 1. Use capture + playback and record capture to a wav file (sounds fine).
> 2. Use playback only and generate sine waves.
> 3. Pipe capture -> playback with a larger buffer size, such as 64.
> 
> But if I have capture + playback, I get a very strange output noise akin
> towards heavy intermodulation distortion.
> 
> The rendering thread is (pseudo code):
> 
> while (true) {
> if(capture_active) {
>snd_pcm_wait(capture_handle, timeout);
>read_pcm_data_into_buffer(capture_handle, input_buffer);
> }
> do_callback(input_buffer, output_buffer);
> if (playback_active) {
> snd_pcm_wait(playback_handle, timeout);
> write_pcm_data_from_buffer(playback_handle, output_buffer);
> }
> }
> 
> Any ideas what can go wrong ?
> /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

--
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] Strange i/o problem

2018-01-15 Thread Robert Bielik
I have a strange problem: I'm trying to pipe audio input -> output using a I2S 
device @48000 Hz and 32 frames buffer size and 2 periods, to get as low a 
latency as possible.

It works nicely if I either:
1. Use capture + playback and record capture to a wav file (sounds fine).
2. Use playback only and generate sine waves.
3. Pipe capture -> playback with a larger buffer size, such as 64.

But if I have capture + playback, I get a very strange output noise akin 
towards heavy intermodulation distortion.

The rendering thread is (pseudo code):

while (true) {
if(capture_active) {
   snd_pcm_wait(capture_handle, timeout);
   read_pcm_data_into_buffer(capture_handle, input_buffer);
}
do_callback(input_buffer, output_buffer);
if (playback_active) {
snd_pcm_wait(playback_handle, timeout);
write_pcm_data_from_buffer(playback_handle, output_buffer);
}
}

Any ideas what can go wrong ?
/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


Re: [Alsa-user] List pcms

2018-01-08 Thread Robert Bielik
Ok, hehe... found the problem, I was running gdbserver as root so it was the 
wrong .asoundrc I changed...

> -Original Message-
> From: Robert Bielik [mailto:robert.bie...@dirac.com]
> Sent: den 8 januari 2018 10:30
> To: alsa-user@lists.sourceforge.net
> Subject: [Alsa-user] List pcms
> 
> I've come across an odd behavior: If I add a dummy pcm in .asoundrc :
> 
> pcm.dummy {
> type plug
> slave.pcm "plughw:0,0"
> }
> 
> I can see it listed with aplay -L.
> 
> However, my own code, which uses the same exact mechanism as aplay
> does (snd_device_name_hint) does NOT list the dummy device.
> 
> Ideas?
> /Rob
> 
> 
> --
> 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


[Alsa-user] List pcms

2018-01-08 Thread Robert Bielik
I've come across an odd behavior: If I add a dummy pcm in .asoundrc :

pcm.dummy {
type plug
slave.pcm "plughw:0,0"
}

I can see it listed with aplay -L.

However, my own code, which uses the same exact mechanism as aplay does 
(snd_device_name_hint) does NOT list the dummy device. 

Ideas?
/Rob


--
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] Problems opening devices

2018-01-07 Thread Robert Bielik
Hi Clemens,

Hah, you're quite correct, I handle error conditions by throwing exceptions, 
and I think those cases are indeed induced by opening the device, but not 
releasing it properly. Using exception safe coding, it now seems to work a lot 
better 

Thanks!
/Robert

> -Original Message-
> From: Clemens Ladisch via Alsa-user [mailto:alsa-user@lists.sourceforge.net]
> Sent: den 7 januari 2018 12:25
> To: alsa-user@lists.sourceforge.net
> Subject: Re: [Alsa-user] Problems opening devices
> 
> Robert Bielik wrote:
> > After this I try snd_pcm_open on the IDs, most of which I get -EBUSY.
> 
> Did you actually close the device from the previous try?
> 
> Check in /proc/asound/cardX/pcm0p/sub0/status if the device is opened.
> 
> 
> 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] Problems opening devices

2018-01-07 Thread Robert Bielik
Mind you, this works nicely:

> aplay -D default:CARD=MOXF6MOXF8 test.wav

So I guess I must be doing something wrong ☹

/R

> -Original Message-
> From: Robert Bielik [mailto:robert.bie...@dirac.com]
> Sent: den 7 januari 2018 10:16
> To: alsa-user@lists.sourceforge.net
> Subject: [Alsa-user] Problems opening devices
> 
> Hi all,
> 
> I am implementing an ALSA backend for an in-house cross-platform C++
> audio framework, but I have serious problems doing ALSA. My hardware is a
> Raspberry Pi 3 running Raspbian Stretch, having an I2S soundcard as the main
> card. I enumerate the PCM devices with the snd_device_name_hint API, and
> I can get f.i. device id's like:
> 
> ID: null
> ID: default:CARD=audioinjectorpi
> ID: sysdefault:CARD=audioinjectorpi
> ID: dmix:CARD=audioinjectorpi,DEV=0
> ID: dsnoop:CARD=audioinjectorpi,DEV=0
> ID: hw:CARD=audioinjectorpi,DEV=0
> ID: plughw:CARD=audioinjectorpi,DEV=0
> ID: default:CARD=MOXF6MOXF8
> ID: sysdefault:CARD=MOXF6MOXF8
> ID: front:CARD=MOXF6MOXF8,DEV=0
> ID: surround21:CARD=MOXF6MOXF8,DEV=0
> ID: surround40:CARD=MOXF6MOXF8,DEV=0
> ID: surround41:CARD=MOXF6MOXF8,DEV=0
> ID: surround50:CARD=MOXF6MOXF8,DEV=0
> ID: surround51:CARD=MOXF6MOXF8,DEV=0
> ID: surround71:CARD=MOXF6MOXF8,DEV=0
> ID: iec958:CARD=MOXF6MOXF8,DEV=0
> ID: dmix:CARD=MOXF6MOXF8,DEV=0
> ID: dsnoop:CARD=MOXF6MOXF8,DEV=0
> ID: hw:CARD=MOXF6MOXF8,DEV=0
> ID: plughw:CARD=MOXF6MOXF8,DEV=0
> 
> These are the results from snd_device_name_get_hint(..., "NAME") (the
> audioinjectorpi is the I2S device, MOXF is an USB device)
> 
> After this I try snd_pcm_open on the IDs, most of which I get -EBUSY.
> 
> Why is this ? There are no other applications using the devices. F.i. I cannot
> open the "default:CARD=MOXF6MOXF8" device, using that exact string as id
> to snd_pcm_open, I get -EBUSY every time.
> 
> Regards
> /Robert
> 
> 
> --
> 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


[Alsa-user] Problems opening devices

2018-01-07 Thread Robert Bielik
Hi all,

I am implementing an ALSA backend for an in-house cross-platform C++ audio 
framework, but I have serious problems doing ALSA. My hardware is a Raspberry 
Pi 3 running Raspbian Stretch, having an I2S soundcard as the main card. I 
enumerate the PCM devices with the snd_device_name_hint API, and I can get f.i. 
device id's like:

ID: null
ID: default:CARD=audioinjectorpi
ID: sysdefault:CARD=audioinjectorpi
ID: dmix:CARD=audioinjectorpi,DEV=0
ID: dsnoop:CARD=audioinjectorpi,DEV=0
ID: hw:CARD=audioinjectorpi,DEV=0
ID: plughw:CARD=audioinjectorpi,DEV=0
ID: default:CARD=MOXF6MOXF8
ID: sysdefault:CARD=MOXF6MOXF8
ID: front:CARD=MOXF6MOXF8,DEV=0
ID: surround21:CARD=MOXF6MOXF8,DEV=0
ID: surround40:CARD=MOXF6MOXF8,DEV=0
ID: surround41:CARD=MOXF6MOXF8,DEV=0
ID: surround50:CARD=MOXF6MOXF8,DEV=0
ID: surround51:CARD=MOXF6MOXF8,DEV=0
ID: surround71:CARD=MOXF6MOXF8,DEV=0
ID: iec958:CARD=MOXF6MOXF8,DEV=0
ID: dmix:CARD=MOXF6MOXF8,DEV=0
ID: dsnoop:CARD=MOXF6MOXF8,DEV=0
ID: hw:CARD=MOXF6MOXF8,DEV=0
ID: plughw:CARD=MOXF6MOXF8,DEV=0

These are the results from snd_device_name_get_hint(..., "NAME") (the 
audioinjectorpi is the I2S device, MOXF is an USB device)

After this I try snd_pcm_open on the IDs, most of which I get -EBUSY.

Why is this ? There are no other applications using the devices. F.i. I cannot 
open the "default:CARD=MOXF6MOXF8" device, using that exact string as id to 
snd_pcm_open, I get -EBUSY every time.

Regards
/Robert


--
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] LV2 wrapper

2017-08-01 Thread Robert Bielik
I've used the ALSA LADSPA PCM plugin, and it works nicely. However, I'd like to 
use LV2 plugins aswell. Is there such a project active somewhere ?

Rgrds
/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


Re: [Alsa-user] Route input to output with minimal latency

2017-07-21 Thread Robert Bielik
Dear Clemens,

Thank you so much for the alsaloop tip, I just ran it with:

> chrt -rr 70 alsaloop -f S32_LE -C plughw:0 -P plug:ladspa -l 48

And it works perfectly, exactly what I needed! 

Regards
/Robert

> -Original Message-
> From: Robert Bielik [mailto:robert.bie...@dirac.com]
> Sent: den 21 juli 2017 11:32
> To: Clemens Ladisch <clem...@ladisch.de>; alsa-user@lists.sourceforge.net
> Subject: Re: [Alsa-user] Route input to output with minimal latency
> 
> Hello Clemens,
> 
> > Otherwise, you have to do the capture and playback in software.  See
> > the alsaloop tool.  What latency you can reach depends on how much
> > other applications and drivers interfere with the scheduling; on the
> > Pi, typical culprits are WiFi, ethernet, or USB.
> > Also see <https://wiki.linuxaudio.org/wiki/raspberrypi>.
> 
> Thanks, I'll look at alsaloop tool. For further info, I am using an I2S sound 
> card
> (http://www.audioinjector.net/rpi-hat) , and have setup an ALSA device to
> route playback.pcm through a LADSPA plugin, so all DSP will reside in the
> plugin, thus I only need to route ALSA input to output in the application 
> 
> Regards
> /Robert
> --
> 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] Route input to output with minimal latency

2017-07-21 Thread Robert Bielik
Hello Clemens,

> Otherwise, you have to do the capture and playback in software.  See the
> alsaloop tool.  What latency you can reach depends on how much other
> applications and drivers interfere with the scheduling; on the Pi, typical
> culprits are WiFi, ethernet, or USB.
> Also see .

Thanks, I'll look at alsaloop tool. For further info, I am using an I2S sound 
card (http://www.audioinjector.net/rpi-hat) , and have setup an ALSA device to 
route playback.pcm through a LADSPA plugin, so all DSP will reside in the 
plugin, thus I only need to route ALSA input to output in the application 

Regards
/Robert
--
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] Route input to output with minimal latency

2017-07-20 Thread Robert Bielik
Hi all,

I want to route input to output with minimal possible latency, this will run on 
a Raspberry Pi, and the latency should be < 1 ms.

I was thinking... if the ALSA capture and playback device is mmapped to the 
same buffer area, this should be dealt with automatically. Is this possible ?

Regards
/Robert


--
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] LADSPA ALSA plugin

2017-07-19 Thread Robert Bielik
Hi all,

Started experimenting using LADSPA plugins with the ALSA LADSPA PCM plugin, and 
it works nicely. However, it seems only the PCM interface is exposed from the 
plugin.

Question is if there is a way to expose the LADSPA plugin parameters directly 
to alsamixer ?

Regards
/Rob

--
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