Dear friends

I'm trying to follow the hint given in
https://marc.info/?l=openbsd-misc&m=167456556214809&w=2:

>>I found out that I have to restart sndiod with either
>>'sndiod_flags="-m play -r 44100"' or 'sndiod_flags="-m play -r 48000"'
>>flags in /etc/rc.conf.local depending on the files I am playing,
>>and then it gets to the receiver without issues.

However, I don't succeed in changing the bit depth and sample rate -
I am at a loss what to do and would be grateful for help.

My DAC can play 44100 Hz, 48000 Hz, 88200 Hz, 96000 Hz, 192000 Hz.
No issues with ALSA in Arch Linux, and same issue with another DAC.
So I don't think it's DAC related.

What I have done so far:

---
`$ ls /dev/ | grep audioctl`
....
audioctl0
audioctl1
audioctl2
audioctl3
....

`$ dmesg | grep audio`
....
audio0 at azalia1
uaudio0 at uhub3 port 2 configuration 1 interface 1 "Resolution Audio Cantata Music Center" rev 2.00/3.11 addr 2
uaudio0: class v2, high-speed, async, channels: 2 play, 0 rec, 1 ctls
audio1 at uaudio0
....

`audio0` doesn`t work with this particular motherboard, therefore
using `audio1`.

`# rcctl set sndiod flags -f rsnd/1`

Using the default settings for bit depth and sample rate shows the
expected values:

`$ rcctl get sndiod`
....
sndiod_class=daemon
sndiod_execdir=
sndiod_flags=-f rsnd/1
sndiod_logger=
sndiod_rtable=0
sndiod_timeout=30
sndiod_user=root
....

`# audioctl -f /dev/audioctl1`
....
name=uaudio0
mode=
pause=0
active=0
nblks=2
blksz=960
rate=48000
encoding=s16le
play.channels=2
play.bytes=0
play.errors=0
record.channels=2
record.bytes=0
record.errors=0
....

The DAC displays "48kHz".

---
Changing the `sndiod` settings:

`# rcctl set sndiod flags -f rsnd/1 -m play -e s24 -r 96000`
`# rcctl restart sndiod`

`$ rcctl get sndiod`
As expected:
....
sndiod_class=daemon
sndiod_execdir=
sndiod_flags=-f rsnd/1 -m play -e s24 -r 96000
sndiod_logger=
sndiod_rtable=0
sndiod_timeout=30
sndiod_user=root`
....

`# audioctl -f /dev/audioctl1`
Not as expected: I expected "encoding=s24" and rate=96000".
....
name=uaudio0
mode=
pause=1
active=0
nblks=16
blksz=480
rate=48000
encoding=s16le
play.channels=2
play.bytes=0
play.errors=0
record.channels=2
record.bytes=0
record.errors=0
....

The DAC still displays "48kHz".

---
Neither did
`# audioctl -f /dev/audioctl1 encoding=s24 rate=96000`
change anything.

---
How can I change encoding and sample rate for sndiod? Any hints would
be much appreciated.

Many thanks and best regards

Rolf

Reply via email to