DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 23rd December 2021
Nikolaos Nikolaos is offline
Port Guard
 
Join Date: Feb 2018
Posts: 12
Default MPD, USB DAC and raw audio device configuration

For over a decade I'd been running Linux (Debian based Voyage Linux) on a PC Engines ALIX boards as a silent and headless MPD server for my 2 channel audiophile setup. USB UAC2 drivers came to Linux first, and I was able to use 24 bit 192Khz DACs without issue.

Yesterday I installed OpenBSD 7.0 on and APU2 without issue; installed MPD, pointed it to my NFS music share and was able to use 2 of my USB DACS without issues via sndio: an Ayre QB-9 24bit/192Khz (UAC2) and a NAD D 3020 24bit/96Khz (UAC1).

MPD output section:

audio_output {
type "sndio"
name "USB Audio"
# device "rsnd/0"
mixer_type "disabled"
}

MPD is running as a normal user: user "nick"
No group: #group "nogroup"

This works fine via sndio, but resamples all audio to 48Khz; the display on the Ayre (which shows sample rates) confirms as such.

When I enable device "rsnd/0" mpd will fail and complain that sndio cannot open output. As per Alexandre Ratchov, using "rsnd/0" should work:

"This is the Linux equivalent of bypassing sndiod. This will avoid
resampling and format conversions. The OpenBSD syntax is:

device "rsnd/0"
mixer_type "disabled"

From dmesg"
assuming the device shows in dmesg as "audio0 at ..."audio0 detached
uaudio0 detached
uaudio0 at uhub0 port 4 configuration 1 interface 1 "Ayre Acoustics Ayre USB Interface" rev 2.00/1.74 addr 2
uaudio0: class v2, high-speed, async, channels: 2 play, 0 rec, 0 ctls
audio0 at uaudio0
ugen0 at uhub0 port 4 configuration 1 "Ayre Acoustics Ayre USB Interface" rev 2.00/1.74 addr 2


I fell like I'm missing something real simple. Any ideas? I've looked high and low on Google for a similar configuration to no avail.
Reply With Quote
  #2   (View Single Post)  
Old 23rd December 2021
Nikolaos Nikolaos is offline
Port Guard
 
Join Date: Feb 2018
Posts: 12
Default

I forgot to add that the APU2 has no on board audio, so there should not be any conflicts with other devices.
Reply With Quote
  #3   (View Single Post)  
Old 23rd December 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Raw devices won't be available to an unprivileged user, per sndio(7). And, according to sndiod(8):
Code:
     Resampling is low quality; down-sampling especially should be avoided
     when recording.

     Processing is done using 16-bit arithmetic, thus samples with more than
     16 bits are rounded.  16 bits (i.e. 97dB dynamic) are largely enough for
     most applications though.  Processing precision can be increased to
     24-bit at compilation time though.
Reply With Quote
  #4   (View Single Post)  
Old 23rd December 2021
Nikolaos Nikolaos is offline
Port Guard
 
Join Date: Feb 2018
Posts: 12
Default

Quote:
Originally Posted by jggimi View Post
Raw devices won't be available to an unprivileged user, per sndio(7). And, according to sndiod(8):
Code:
     Resampling is low quality; down-sampling especially should be avoided
     when recording.

     Processing is done using 16-bit arithmetic, thus samples with more than
     16 bits are rounded.  16 bits (i.e. 97dB dynamic) are largely enough for
     most applications though.  Processing precision can be increased to
     24-bit at compilation time though.
Thank you for the reply. I experimented with running MPD as root with the raw device enabled and was able to get audio out of the Ayre DAC *but* the volume was very attenuated. Curiously, no audio with 16 bit 44.1Khz files. I could play 96Khz and 192Khz files, but as mentioned earlier, with very low volume.

Perhaps I'm better off installing Diet Pi on the APU2 for the time being until sndio matures.
Reply With Quote
  #5   (View Single Post)  
Old 23rd December 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

You might also consider bringing this to the misc@ mailing list where someone with more sndio experience is going to be available.
Reply With Quote
  #6   (View Single Post)  
Old 24th December 2021
Nikolaos Nikolaos is offline
Port Guard
 
Join Date: Feb 2018
Posts: 12
Default

Quote:
Originally Posted by jggimi View Post
You might also consider bringing this to the misc@ mailing list where someone with more sndio experience is going to be available.
jggimi, thank you. I've got some info to share from Alexandre Rachtov (USB Audio driver developer) concerning this:

"Funny, few days ago I sent a diff on tech@ to switch sndiod to 24-bit
precision.

With this change, you can try:

sndiod_flags="-e 24 -r 192000"

and you'll get bit-perfect quality for 192kHz files. 96kHz files will
be resampled but given the huge filtering margin we've at 192kHz,
quality will be preserved."

With Linux and Alsa, using the mpd flag, device "hw:0,0" passes audio at native bit rates and sampling rates unmolested to the DAC without resampling. It would be nice to see sndio mimic this behaviour.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mount_ext2fs: /dev/sd1i on /mnt: specified device does not match mounted device Zielonykid123 OpenBSD General 4 26th November 2021 01:18 PM
no audio. invicta OpenBSD General 10 27th July 2021 11:03 AM
Network configuration for a USB broadband device PapaParrot OpenBSD General 50 16th April 2018 08:28 PM
azalia Intel SCH HD Audio strange audio issues tehsean OpenBSD General 3 26th August 2012 12:21 AM
identifying device associated with USB device? spiderpig OpenBSD General 2 7th July 2008 05:18 AM


All times are GMT. The time now is 03:51 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick