From nobody Tue Nov 05 16:09:08 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 4XjYDn2FRJz5cGl7 for ; Tue, 05 Nov 2024 16:09:13 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XjYDn1Zhbz40s8; Tue, 5 Nov 2024 16:09:13 +0000 (UTC) (envelope-from christos@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730822953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4zDMp/SJ6qzLlLl+B+NWmHaMxn4lIlWcpDPu+gjtAtY=; b=SiPw90eFJgMgbbrrRsSFY2S4Up0UrxvUOLKPfEjgGSV92cG9KEK+4iKUdiWHZYaw5uFZE8 5c+7mJcZObAQIrvacgICx7t42Qt25fBEIciN50UbEqqA7A3aUqN0b3UXWBLSh0c+JfiXOQ 3ka9/huzwHKz5+uLDwjo1QWtFP3vMYLXqjVa4PwSARCo5lDk33OledOsmUgzRLePKExSAz 7Y5JAB7WsaTpjveiSEbPDDiO+kAVRqyzaqUTuaTEa020jit74lCSgaot43Q7O8qF3Vz6dG zRdWxZDe89t2c25MseFSzfNgGebFbV6t1+KaJwMzEA0R7Xz5NKo4fe9cvOUa1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730822953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=4zDMp/SJ6qzLlLl+B+NWmHaMxn4lIlWcpDPu+gjtAtY=; b=aybr8KNezGe21UqY1deB/pZM3jlRM8GFbVAjBRONh2Qce3YqCeJXZ63NwvLih5vfq3tfJd 3iU2B4kEC/pzkXkcPL8o8aUwVFsjqgBzpMbPs3rY2/biz2SEWfP5OL9VkKZzIrNzXne6K9 BlmGjbGUreKeIWPNqSrFf8rDtir5Q6iphgmbp5qY//zmRPtq1U6g7818C16wpH8u2wokGR tQu+QWxDmGII48kivYaW11M2TavvQlYWxEeLPx5enmTVC7uwv3p4ykCTichkVa7gqwmlZZ fjh8DJzvgT75w7dhBYfJOnDT5mCHVrVvpoF5wdBBYuPzc9HJXg04O4NmEixE8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730822953; a=rsa-sha256; cv=none; b=dzlL4dTVXwbsfkuKkeEg+rKi/b+2yIC1941dKPqqgzH4Up0NZsfNWfRk9FtN07SUrG+0kn JpKVxNlDGDN9Cffz3Wxe/YCaGo0E6UVIAuvGne9Bc5vsKA3LAGpfytCVkKpwt+EBil+gYj Rh4EQi0pS2MhVxUb0u3pBRbh+LOvBiQ0Vi5r46N2dIlS4l0d58SD1bIofEDCcEy2TE4z34 DzIge/XcPj87dnUr4CTXIsjIKzeDrtyOIVt+/UXMM9HbHR3CO5LUiMAyw5gGV82lMemeD+ j7e5mDtpOCWXFQmpgpNcVlaxQx4s1wt/pOex88JGV+CgqIHLGuEpQm3awx34FA== 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) (Authenticated sender: christos/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XjYDm3xcxz1PrW; Tue, 5 Nov 2024 16:09:12 +0000 (UTC) (envelope-from christos@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=mail; bh=4zDMp/SJ6qzLlLl +B+NWmHaMxn4lIlWcpDPu+gjtAtY=; h=subject:cc:to:from:date; d=margiolis.net; b=DEIeKjgMYKd7eBfsyT9mMDbRb11Lia57UbKzPIkwkA/8rgFakQc HrsMgoFSPVM1gjFhDrZt/kyNy0THBZSzV6bgK0YPIZk/p2c/dl+IoITKzlvyPZWMhpA8R6 8ma4sA6pJml+hA7Ey48VjqIYDhvSX1p4YJ3i/MWj3k27w/OrWQ= Received: from tpad (public-gprs241489.centertel.pl [31.60.90.146]) by margiolis.net (OpenSMTPD) with ESMTPSA id 747046f5 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Tue, 5 Nov 2024 16:09:09 +0000 (UTC) Date: Tue, 5 Nov 2024 17:09:08 +0100 From: Christos Margiolis To: status-updates@freebsdfoundation.org Cc: freebsd-multimedia@freebsd.org, markj@freebsd.org, jrm@freebsd.org, emaste@freebsd.org Subject: [Development report #23] Audio Stack Improvements Message-ID: 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 MFC’d mididump(1) to stable/14, with some subsequent patches squashed all into the main commit: https://cgit.freebsd.org/src/commit/?h=stable/14&id=7224e9f2d4af666550d93cf565db22b1f577f593 sound: Call DSP_REGISTERED before PCM_DETACHING https://cgit.freebsd.org/src/commit/?id=9693241188aa6882166b091d9006f9d0affeda7e sound: Use DSP_REGISTERED in dsp_clone(): https://cgit.freebsd.org/src/commit/?id=bb5e3ac1a7b71480a50fc0c813c916a3d058336c sound: Change PCMDIR_* numbering: https://cgit.freebsd.org/src/commit/?id=a4111e9dc7225618fa8d2af64d866cf0b0aebd56 sound: Untangle dsp_cdevs[] and dsp_unit2name() confusion: https://cgit.freebsd.org/src/commit/?id=802c78f5194e4524faa30ea57adbf00f28fc72c6 sound: Remove redundant refcount checks in vchan_setnew(): https://cgit.freebsd.org/src/commit/?id=43c0b593c2c3b2c07009c031a0e7e8190a45b31a sound: Retire channel refcount: https://cgit.freebsd.org/src/commit/?id=9a6cf27583ffc13bb0a7c5be0704ba0d2f3b834d sound: Retire pcm_veto_load: https://cgit.freebsd.org/src/commit/?id=98cd27c8e13418fa517a02844641f390f9389987 sound: Move sysctl and /dev/dspX creation to pcm_setstatus(): https://cgit.freebsd.org/src/commit/?id=66f3eb14e955d3917f817ff346d33d839679c2cf sound: Move sndstat_register() call to pcm_setstatus(): https://cgit.freebsd.org/src/commit/?id=181a31d8349088cbcead8dcbff8d62ee8af6c913 sound: Remove early SD_F_SIMPLEX and SD_F_AUTOVCHAN assignments: https://cgit.freebsd.org/src/commit/?id=3a7d40c692622cc614a3839491c345d945f474fe sound: Make device registration more intuitive: https://cgit.freebsd.org/src/commit/?id=516a9c0212b003e1da0c6f4476dbe4f3f431606c sound: Remove unused pcm_channel->data fields: https://cgit.freebsd.org/src/commit/?id=829951f857b73faaf28cbfcf09e861668692d8a1 Tested and reviewed Mark’s fixes to PR 282268: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282268 https://cgit.freebsd.org/src/commit/?id=b5149b265346c55994c7ebaab2a6a6fd1bd6fe5e https://cgit.freebsd.org/src/commit/?id=9b2f2fbfcbc51f77e96a41e62b1c06a8ccd4ca15 Also reviewed: https://cgit.freebsd.org/src/commit/?id=f0bc751d6fb4f7fe46fdaa1486b0ae20b04bb544 https://cgit.freebsd.org/src/commit/?id=c22be0b181e954a4cc00ed4f5c7df974f3061c3c https://reviews.freebsd.org/D47330 https://reviews.freebsd.org/D47412 https://reviews.freebsd.org/D47399 0mp@’s new patches. Bug triaging. Watched Liam Girdwood’s from Intel presentation on Sound Open Firmware: https://www.youtube.com/watch?v=vwDoEumA1Mo Once I have a better grasp on SOF, I am considering emailing him and a few other people, to provide some guidance on how to port it to FreeBSD. There is quite a lot of code and different components involved. Fixed most hot-unload panics. Currently have 3 patches written and doing extensive testing to catch more (if any) and submit the patches for review. Almost all the bugs boiled down to races, either in sound(4), or snd_dummy(4) which is my main testing driver. Worked on the chn_sleep() panic and exchanged some emails with Mark, Peter Holm, and Doug Moore. Will submit a patch ASAP. Bumped into some midi/ code and confirmed my belief that it’s a …mess, and quite antiquated. Spent some time working on my already existing plans to improve it. Lurked the forum to find and solve more bugs and problems. This work is sponsored by the FreeBSD Foundation. Christos