ALSA: error setting input device format bits

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Boone777
Established Member
Posts: 17
Joined: Mon Jan 06, 2020 11:51 am
Been thanked: 3 times

ALSA: error setting input device format bits

Post by Boone777 »

Hello!
I have not been able to use ALSA in Reaper with my interface: NI Session

I can select ALSA in Reaper on a Vanilla install of any distro, then select my interface for ins and outs but when I hit apply:
ALSA: error setting input device format bits

I tried many distros currently the best for my setup is Xubuntu and also trying on the side Manjaro-RT cinnamon.

I have no problem setting things up with Cadence and use ALSA via jack, but I get some crackles after with only 1 or 2 instruments at 256 sample 5,6ms latency. Instruments are either Repro-5 from U-he (native linux) or it could be Kontakt via Linvst.
I understand these might not be optimized for Linux but on my Win7 boot on same computer I can get up to 10 heavy instruments in realtime 3,5-5 ms no problem.

Also HTOP shows high random activity for Pulseaudio or Cinnamon --replace when real-time kernel is on for both Xubuntu and Manjaro.

I'd like to try ALSA but everything I tried so far tells me my interface maybe is not supported by ALSA ?

Pulse recognise it no problem everything works in Pulseaudio.



Intel Core i7-3770 Quad-Core Processor 3.4, Nvidia Geforce GTX1050Ti, Reaper 5,99 16gig RAM, Kingdian 480gig SSD
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: ALSA: error setting input device format bits

Post by merlyn »

You're misunderstanding the Linux sound stack. This diagram might help :
ALSAJACKPyramid.png
ALSAJACKPyramid.png (40.87 KiB) Viewed 4029 times
Boone777
Established Member
Posts: 17
Joined: Mon Jan 06, 2020 11:51 am
Been thanked: 3 times

Re: ALSA: error setting input device format bits

Post by Boone777 »

Ok so I have no other option than jack or pulseaudio as a front end for alsa.
I find my realtime performance pretty ordinary in that case.
Actually it works at low latency but I get a fair amount of crackle.

But plugins are bridged I guess it's too be expected. Also U-he synths might not be optimized yet. O well....
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: ALSA: error setting input device format bits

Post by merlyn »

Eh, no you can use ALSA on its own.

It was your conclusion that your card is not supported by ALSA that wasn't correct. If you have heard any sound from your soundcard at all then your card is supported by ALSA. All sound goes through ALSA.

The error sounds like something to do with settings in Reaper. Hopefully a Reaper user could help you with that.
Boone777
Established Member
Posts: 17
Joined: Mon Jan 06, 2020 11:51 am
Been thanked: 3 times

Re: ALSA: error setting input device format bits

Post by Boone777 »

Ok now hopefully a reaperite can answer I also posted in Reaper's forum.
And yes I do have sound with pulseaudio or jack.
ubuntuuser
Established Member
Posts: 315
Joined: Mon Jan 02, 2017 9:46 am
Has thanked: 1 time
Been thanked: 5 times

Re: ALSA: error setting input device format bits

Post by ubuntuuser »

Boone777 wrote:Hello!
I have not been able to use ALSA in Reaper with my interface: NI Session

I can select ALSA in Reaper on a Vanilla install of any distro, then select my interface for ins and outs but when I hit apply:
ALSA: error setting input device format bits

I tried many distros currently the best for my setup is Xubuntu and also trying on the side Manjaro-RT cinnamon.

I have no problem setting things up with Cadence and use ALSA via jack, but I get some crackles after with only 1 or 2 instruments at 256 sample 5,6ms latency. Instruments are either Repro-5 from U-he (native linux) or it could be Kontakt via Linvst.
I understand these might not be optimized for Linux but on my Win7 boot on same computer I can get up to 10 heavy instruments in realtime 3,5-5 ms no problem.

Also HTOP shows high random activity for Pulseaudio or Cinnamon --replace when real-time kernel is on for both Xubuntu and Manjaro.

I'd like to try ALSA but everything I tried so far tells me my interface maybe is not supported by ALSA ?

Pulse recognise it no problem everything works in Pulseaudio.



Intel Core i7-3770 Quad-Core Processor 3.4, Nvidia Geforce GTX1050Ti, Reaper 5,99 16gig RAM, Kingdian 480gig SSD
Some distros such as Manjaro don't seem to setup realtime so you could try that, also don''t use wine-rt use wineHQ staging, winehq is the latest and greatest.


set realtime priorities

If they are not set then cpu spiking can occur with Kontakt and other plugins.


sudo edit /etc/security/limits.conf

add

@audio - rtprio 99

------

sudo edit /etc/group

change

audio:x:29:pulse

to audio:x:29:pulse,<your_username>

------------

sudo edit /etc/security/limits.d/audio.conf

@audio - rtprio 95
@audio - memlock unlimited
#@audio - nice -19
ubuntuuser
Established Member
Posts: 315
Joined: Mon Jan 02, 2017 9:46 am
Has thanked: 1 time
Been thanked: 5 times

Re: ALSA: error setting input device format bits

Post by ubuntuuser »

ALSA: error setting input device format bits

If ALSA is trying to open something as an input device and it's not then maybe that causes the error.
Last edited by ubuntuuser on Wed Jan 08, 2020 7:39 am, edited 2 times in total.
ubuntuuser
Established Member
Posts: 315
Joined: Mon Jan 02, 2017 9:46 am
Has thanked: 1 time
Been thanked: 5 times

Re: ALSA: error setting input device format bits

Post by ubuntuuser »

The Guitar Rig Session i/o is

ID 17cc 1915

Channels 2

Sample Rate 44.1, 48, 88.2, 96, 192 kHz

Bit Resolution 16, 24 Bit

Converter Cirrus Logic
Boone777
Established Member
Posts: 17
Joined: Mon Jan 06, 2020 11:51 am
Been thanked: 3 times

Re: ALSA: error setting input device format bits

Post by Boone777 »

ubuntuuser wrote:
Boone777 wrote:Hello!
I have not been able to use ALSA in Reaper with my interface: NI Session

I can select ALSA in Reaper on a Vanilla install of any distro, then select my interface for ins and outs but when I hit apply:
ALSA: error setting input device format bits

I tried many distros currently the best for my setup is Xubuntu and also trying on the side Manjaro-RT cinnamon.

I have no problem setting things up with Cadence and use ALSA via jack, but I get some crackles after with only 1 or 2 instruments at 256 sample 5,6ms latency. Instruments are either Repro-5 from U-he (native linux) or it could be Kontakt via Linvst.
I understand these might not be optimized for Linux but on my Win7 boot on same computer I can get up to 10 heavy instruments in realtime 3,5-5 ms no problem.

Also HTOP shows high random activity for Pulseaudio or Cinnamon --replace when real-time kernel is on for both Xubuntu and Manjaro.

I'd like to try ALSA but everything I tried so far tells me my interface maybe is not supported by ALSA ?

Pulse recognise it no problem everything works in Pulseaudio.



Intel Core i7-3770 Quad-Core Processor 3.4, Nvidia Geforce GTX1050Ti, Reaper 5,99 16gig RAM, Kingdian 480gig SSD
Some distros such as Manjaro don't seem to setup realtime so you could try that, also don''t use wine-rt use wineHQ staging, winehq is the latest and greatest.


set realtime priorities

If they are not set then cpu spiking can occur with Kontakt and other plugins.


sudo edit /etc/security/limits.conf

add

@audio - rtprio 99

------

sudo edit /etc/group

change

audio:x:29:pulse

to audio:x:29:pulse,<your_username>

------------

sudo edit /etc/security/limits.d/audio.conf

@audio - rtprio 95
@audio - memlock unlimited
#@audio - nice -19

Manjaro-RT does'nt set realtime ? That's weird. Is it really worth it to enter these commands it seems to break the OS the more fiddle with it.
Drumfix
Established Member
Posts: 299
Joined: Mon Jan 26, 2009 5:15 pm
Been thanked: 11 times

Re: ALSA: error setting input device format bits

Post by Drumfix »

The NI devices use the S24_3BE sample format, i.e 24 bits packed into 3 bytes in big endian byteorder, when communicating with userspace.

Apparently reaper does not support this format.
User avatar
nikgnomicradio
Established Member
Posts: 109
Joined: Wed Feb 07, 2018 9:31 pm
Has thanked: 1 time
Been thanked: 7 times
Contact:

Re: ALSA: error setting input device format bits

Post by nikgnomicradio »

Manjaro Cinnamon is a community supported release
https://osdn.net/projects/manjaro-commu ... on/18.1.5/

Manjaro does not have RT kernel by default on any ISO
but kernel can be changed in Manjaro Settings Manager GUI

changing to RT kernel is not sufficient for low latency audio

suggest using this script to check system configuration
https://github.com/raboof/realtimeconfigquickscan
ubuntuuser
Established Member
Posts: 315
Joined: Mon Jan 02, 2017 9:46 am
Has thanked: 1 time
Been thanked: 5 times

Re: ALSA: error setting input device format bits

Post by ubuntuuser »

The 24 bit format might be need to be setup in a ~/.asoundrc file (/home/your-username/.asoundrc)


Maybe something like this below but the device number (hw:1,0) and the card number (1) may need to be altered for your device, although the usb audio device and card number will usually be 1 if it's used with the inbuilt sound which is usually device 0 and card number 0.

It assumes the audio device is hw:1 (cat /proc/asound/cards)

Jack can then be started using something like jackd --realtime -d alsa -d hw:1 -p256 -n2 -r96000

Then start Reaper or another DAW

I can't verify any of this because I don't have a Guitar Rig Session usb, so you probably need to tweak it for your device.

To get the device/card info use

cat /proc/asound/cards

aplay -l

arecord -l


More details at https://www.volkerschatz.com/noise/alsa.html


------------

pcm.!default
{
type plug
slave sl3
}

ctl.!default
{
type hw
card 1
}

# Makes the subdevices aka channel 1&2 available for alsa applications

pcm_slave.sl3
{
pcm "hw:1,0"
format S24_3BE
channels 2
rate 192000
}

----------
Last edited by ubuntuuser on Thu Jan 09, 2020 6:54 am, edited 2 times in total.
ubuntuuser
Established Member
Posts: 315
Joined: Mon Jan 02, 2017 9:46 am
Has thanked: 1 time
Been thanked: 5 times

Re: ALSA: error setting input device format bits

Post by ubuntuuser »

Also setup usb priority with rtirq

https://www.linuxmusicians.com/viewtopic.php?t=15309
Boone777
Established Member
Posts: 17
Joined: Mon Jan 06, 2020 11:51 am
Been thanked: 3 times

Re: ALSA: error setting input device format bits

Post by Boone777 »

Thanks for all your inputs. I admit it's a little confusing for me, not sure how and where to enter the commands I'll give it a shot if somebody can point to a little video it would be great.
Boone777
Established Member
Posts: 17
Joined: Mon Jan 06, 2020 11:51 am
Been thanked: 3 times

Re: ALSA: error setting input device format bits

Post by Boone777 »

ubuntuuser wrote:The 24 bit format might be need to be setup in a ~/.asoundrc file (/home/your-username/.asoundrc)


Maybe something like this below but the device number (hw:1,0) and the card number (1) may need to be altered for your device, although the usb audio device and card number will usually be 1 if it's used with the inbuilt sound which is usually device 0 and card number 0.

It assumes the audio device is hw:1 (cat /proc/asound/cards)

Jack can then be started using something like jackd --realtime -d alsa -d hw:1 -p256 -n2 -r96000

Then start Reaper or another DAW

I can't verify any of this because I don't have a Guitar Rig Session usb, so you probably need to tweak it for your device.

To get the device/card info use

cat /proc/asound/cards

aplay -l

arecord -l


More details at https://www.volkerschatz.com/noise/alsa.html


------------

pcm.!default
{
type plug
slave sl3
}

ctl.!default
{
type hw
card 1
}

# Makes the subdevices aka channel 1&2 available for alsa applications

pcm_slave.sl3
{
pcm "hw:1,0"
format S24_3BE
channels 2
rate 192000
}

----------
It works with Jack and Pulseaudio already I just want to make it work with ALSA only to avoid bridging wich I suspect is not helping latency.
But yes Reaper sees the interface as hw:0
Post Reply