From nobody Tue Apr 16 14:51:35 2024 X-Original-To: freebsd-multimedia@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VJn723Kg3z5H0n9 for ; Tue, 16 Apr 2024 14:51:42 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VJn704mq0z4LbY; Tue, 16 Apr 2024 14:51:40 +0000 (UTC) (envelope-from christos@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=margiolis.net header.s=mail header.b=lhFJRuzn; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=freebsd.org (policy=none); spf=softfail (mx1.freebsd.org: 95.179.159.8 is neither permitted nor denied by domain of christos@freebsd.org) smtp.mailfrom=christos@freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=mail; bh=nnba/BkrnJSneFp tnLDhlywI/TyJ9E5UQkidpfE/Eiw=; h=subject:cc:to:from:date; d=margiolis.net; b=lhFJRuznT3OeQ7R88O0OMJ79cW8A9rCsqHDuYw1BL7DHuBNOlhk 7Vfsmu+/3mR+GvCZUcTTt7JFCvXygJKc7ktscPYYuU6PJBL4Q20lxvkXpVSfgTOrngb82n xWT0v7AP0Gpi7i6oSaeTXcjnvqHAO/c42F4y0xe2DCZwPvRJ1c= Received: from tpad ( [212.191.80.214]) by margiolis.net (OpenSMTPD) with ESMTPSA id e96b81c3 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Tue, 16 Apr 2024 14:51:35 +0000 (UTC) Date: Tue, 16 Apr 2024 16:51:35 +0200 From: Christos Margiolis To: status-updates@freebsdfoundation.org Cc: freebsd-multimedia@freebsd.org, markj@freebsd.org, jrm@freebsd.org, bapt@freebsd.org Subject: [Development report #10] Audio Stack Improvements Message-ID: <275juoafogyoy5u27ngh7cqwrpw6mxa7iryb5xeorwxr4ftjny@nlac6iunjvnh> List-Id: Multimedia discussions List-Archive: https://lists.freebsd.org/archives/freebsd-multimedia List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-multimedia@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.70 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; R_DKIM_ALLOW(-0.20)[margiolis.net:s=mail]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : No valid SPF, DKIM not aligned (relaxed),none]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; FREEFALL_USER(0.00)[christos]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US]; RCVD_TLS_ALL(0.00)[]; MLMMJ_DEST(0.00)[freebsd-multimedia@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; R_SPF_SOFTFAIL(0.00)[~all:c]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[margiolis.net:+] X-Rspamd-Queue-Id: 4VJn704mq0z4LbY The first part of the week was spent doing some more debugging with bapt@ (he experienced issues I could not reproduce on my machine). Focused mostly on the DEVFS_CDEVPRIV(9) and asynchronous device detach patches, in order to get them re-committed. Re-committed DEVFS_CDEVPRIV(9) patch: - https://cgit.freebsd.org/src/commit/?id=e8c0d15a64fadb4a330f2da7244becaac161bb70 - Apparently the patch introduced a regression where where dsp_[get|set]_flags() would fetch the flags of the wrong softc, resulting in generally strange behavior if the machine had more than 1 audio device attached (EBUSY's from dsp_open() etc). Eventually got rid of dsp_[get|set]_flags() altogether as they are no longer needed and used pcm_[get|set]_flags() directly. Re-committed asynchronous device detach patch: - https://cgit.freebsd.org/src/commit/?id=44e128fe9d92c1a544b801cb56e907a66ef34691 - Notified frustrated people: - https://www.davidschlachter.com/misc/freebsd-usb-audio - https://randomnixfix.wordpress.com/2021/10/23/why-the-freebsd-desktop-and-my-linux-rant/ - https://forums.freebsd.org/threads/forcing-off-the-computer-endlessly-waiting-for-sound-application-to-exit-at-sleep-suspend-time.80412/ - https://forums.freebsd.org/threads/not-entering-sleep-state-due-to-audio.82597/ - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194727 - https://forums.freebsd.org/threads/anyone-here-uses-teams-on-freebsd.87150/page-2#post-651363 - https://forums.freebsd.org/threads/freebsd-screen-shots.8877/page-89#post-651637 - Sent wider call-for-testing on hackers@ and multimedia@: https://lists.freebsd.org/archives/freebsd-multimedia/2024-April/002306.html - Replied to feedback in the forums, IRC and mailing lists. - Closed duplicates of PR194727 and left it open until changes are MFC’d and we are sure it works properly. Applied to co-mentor a GSOC project with Allan Jude. MFC’d some patches to stable/14. Opened a PR regarding filemon(4) crashing when building with KASAN enabled: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278319 Spent some time researching the LOR in sound(4): https://reviews.freebsd.org/P637 - Found a reference that might be relevant to the bug: https://wiki.freebsd.org/RyanBeasley/Notes/snd_locking Reviewed: - https://reviews.freebsd.org/D44777 - https://reviews.freebsd.org/D44778 Minor patches: - https://cgit.freebsd.org/src/commit/?id=4f854658c5d6ca98c822491991052574d948617d - https://cgit.freebsd.org/src/commit/?id=068c675ca7aec11d3546c3f908e842a7eca2ccae Christos