Re: Apparent sndio issue with underruns on OpenBSD?

From: Mike Brady <mikebradydublin_at_icloud.com>
Date: Tue, 25 Feb 2020 10:21:41 +0000
Okay, so I moved to a real machine, a rather ancient Lenovo G560. If I read it correctly, the machine has “Intel 3400 HD Audio”.

Long story short – everything works perfectly.

Thanks for your guidance.
Mike

> On 24 Feb 2020, at 09:19, Mike Brady <mikebradydublin_at_icloud.com> wrote:
> 
> Thanks for the quick response. I’ll move to a real machine and report back. The original fault report came from a user on a real machine, but of course using a VM will complicate matters – I should have thought of that!
> 
> Mike
> 
>> On 24 Feb 2020, at 07:00, Alexandre Ratchov <alex_at_caoua.org <mailto:alex_at_caoua.org>> wrote:
>> 
>> On Sun, Feb 23, 2020 at 11:17:15AM +0000, Mike Brady wrote:
>>> Hi there. I'm the principal developer of Shairport Sync, an Apple
>>> AirPlay 1 "server" -- a program that accepts audio from a "client"
>>> such as iTunes and directs it to an audio output. It runs on OpenBSD
>>> and FreeBSD using the sndio system using a "backend" that takes
>>> commands and audio from Shairport Sync and directs them to the sndio
>>> subsystem. (It also runs on Linux using ALSA and others).
>>> 
>>> I am writing because while Shairport Sync works well on FreeBSD it
>>> is crashing on OpenBSD (please see
>>> https://github.com/mikebrady/shairport-sync/issues/975 <https://github.com/mikebrady/shairport-sync/issues/975>). I'm testing
>>> on an installation of OpenBSD 6.6 in a VMWare Fusion VM on an
>>> iMac. AFAIK all the software is up to date with patches, etc. The
>>> installation procedure I'm following is at
>>> https://github.com/mikebrady/shairport-sync/blob/master/OPENBSD.md <https://github.com/mikebrady/shairport-sync/blob/master/OPENBSD.md>.
>>> 
>> 
>> Thanks, I'll look more in depth in the github discussion.
>> 
>> I don't know what audio device VMware emulates (probably eap), but
>> there were many reports about broken audio in virtual machines. It
>> seems that there are subtle play/rec synchronization differences
>> between the real hardware and the emulated one which tend to break
>> sndiod.
>> 
>> If you don't care about recording, you could try to run the sndiod of
>> the OpenBSD VM with the '-m play' option and see if problems are gone.
>> For instance, run as root:
>> 
>> 	rcctl set sndiod flags -m play
>> 	rcctl restart sndiod
>> 
>> Another option would be to use a remote soundcard instead of the one
>> of the OpenBSD VM. For instance, add the '-L -' sndiod option to the
>> working system, then run the client on the OpenBSD system with the
>> following environment variable set:
>> 
>> 	AUDIODEVICE=snd_at_<ip_addr>/0
>> 
>> where <ip_addr> is the IP address of the working system. This way you
>> could test on OpenBSD without using the emulated hardware.
>> 
>> Let me know if this works.
>> 
>>> If I start shairport-sync and play a track from, say, the Music app
>>> on the iMac, everything is fine until I switch tracks. It seems
>>> (this is me guessing) that underruns occur and that they cause the
>>> sndio system to stop responding for about four seconds and then
>>> enter an error state, returning an error code of 1 for
>>> everything. When I changed the xrun behaviour to SIO_ERROR the
>>> program would immediately terminate on those occasions. I wonder if
>>> you might be able to offer any suggestions.
>> 
>> This happens when there's a hardware anomaly detected, here when the
>> driver doesn't process an audio block for more than 4 seconds. When
>> this occurs, sndiod closes the device and disconnects all clients,
>> hence the errors in the programs.
>> 
>> HTH,
>> 
>> -- Alexandre
> 
Received on Tue Feb 25 2020 - 11:21:41 CET

This archive was generated by hypermail 2.3.0 : Tue Aug 09 2022 - 16:23:48 CEST