From nobody Wed Apr 03 11:52:07 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 4V8jlt2P49z5GfRr for ; Wed, 3 Apr 2024 11:52:10 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V8jlt1xdCz4Kwr; Wed, 3 Apr 2024 11:52:10 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712145130; 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: in-reply-to:in-reply-to:references:references; bh=LHeeajQOIpmvS7eUxljcEV9QTkFEfhGqV8dX0USiLKQ=; b=IexfhqT+kln3E6KcvsEv2Ilf85gkdDyiC1s04BhXjBgoA9BbR2FGY8S0ecz4EBl9XFqLOU EDjGnIK+FpGxHKjPGnzOUWFB70jzkdXfGusj11dudYrotVwKF1g2+drQODGp9NGMv3WszC jYtjl0pVaWM+1XOY03AK9EarJfCwXTgKL25lx/4CVO5I6q3YePBL9AhsYrpIahqkSTvl// tyGjNhQz9uMdinuJ0VDsBccVsswHuTGLqGtwfkKepyjBoZWD23rtK1WDRSCWwsTVUMOS65 EC1kzid7CARFk4SlOLtUDJgLUlIjXXl67u75hZnMUWR7JEPU6zGEnzs01RUo3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712145130; a=rsa-sha256; cv=none; b=lktpJ4S2go45Quj0LeHb8q1GCEQehzwYaDmQMKydYJnKPWEZRmsoJ7zXboa6upabYVFbr3 MOeD+nBozt+2qj+X2YoLI8YcYSxa3xHMEK61tVu1JTULKty8JYxlqkBhWhc3KPZdPOCnym p+a1RhtgO+xk9ffcdnlw/pxiU9nXzX2ptSY3vnBu7HTaoXyIMuuP8dkyoNGJrsiAQa2uNi o2HLg8ocfncenZB3Ym3g0HiRrIpFh2dvhhgaKm4iHHJd1cCenH38ozt2Gn6kPp1mCyGW3n Nw82jZkVFQLlLAA5GeyIx2wqzZqRGNGaCTuwsq9FCk6izJo7lP0enFVT1bKOhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712145130; 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: in-reply-to:in-reply-to:references:references; bh=LHeeajQOIpmvS7eUxljcEV9QTkFEfhGqV8dX0USiLKQ=; b=mAgpB9Op43a1WL2Lv3YwM+TDvHF1kq2hlZDL6fncUhxypDFtvsgKXJz8cyA1xGiXS6OMqR Ih6Cp6IElWODxDTroV2yCVssgj+L2mDVPT+8Oukcfpv5vH2N7hgpUVcA03lfcN2BUMHYfJ rtv5ag2wVeUa0n4rpVHaLh0KNPyZGwSTHQcLV8njZQNABDZFN7Rrl2nV0Z0KB5CQgKVZ6p OHnuL5w7kGO7oXcfqXZ4Xtn6/N69rLAi28UYEDoSmq9UFkd5iJ8C6jPzmqyCkuRED1MVdY STC3n3Dicy8KoA6GkU2FiFLGi/cotMlXP51obTnKSnnN5Y3uyDUMxazzH1YOgQ== Received: from aniel.nours.eu (nours.eu [176.31.115.77]) (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 did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4V8jlt0s29z15y6; Wed, 3 Apr 2024 11:52:10 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id C06F31A98C9; Wed, 3 Apr 2024 13:52:07 +0200 (CEST) Date: Wed, 3 Apr 2024 13:52:07 +0200 From: Baptiste Daroussin To: Christos Margiolis Cc: freebsd-multimedia@freebsd.org, markj@freebsd.org, jrm@freebsd.org Subject: Re: [Development report #9] Audio Stack Improvements Message-ID: References: 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 In-Reply-To: On Wed 03 Apr 13:31, Baptiste Daroussin wrote: > On Tue 02 Apr 16:14, Christos Margiolis wrote: > > Committed DEVFS_CDEVPRIV(9) patch: > > - https://cgit.freebsd.org/src/commit/?id=dc831e93bad63f9faea09f1806a7733a40bff316 > > - Updated the SNDCTL_AUDIOINFO ioctl to write /dev/dspX instead of > > /dev/dspX.Y to ai->devnode. > > - Closed https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246208 as > > accessing specific channels through device nodes is no longer > > possible. > > > > Committed asynchronous audio device detach patch: > > - https://cgit.freebsd.org/src/commit/?id=9eff58c6d52b66eb8abe7f724dabcd804a566df4 > > - Fixed a kern_poll() panic caught after applying the patch and > > hot-unplugging the audio device while jackd is running: > > https://cgit.freebsd.org/src/commit/?id=fba54d0179aabb3d94211ca80f94fe5b98ac6d3b > > - Will send call-for-testing and mail annoyed people once a snapshot > > build with the patch included is built. > > - Debugging an LOR reported in D44411, although it’s not related to the > > patch. > > > > Updates to /dev/sndstat: > > - https://cgit.freebsd.org/src/commit/?id=6d1cee1640e1c360917e483ece5ec1bde423b788 > > - https://reviews.freebsd.org/D44571 > > - https://reviews.freebsd.org/D44546 (Abandoned since it will break > > backwards compatibility and this functionality will be built into a > > new userland tool anyway.) > > > > Implementing missing OSSv4 ioctls: > > - https://reviews.freebsd.org/D44570 > > > > Minor patches: > > - https://cgit.freebsd.org/src/commit/?id=c136e6180e4762c1180d89cd2291fd9a935a721d > > - https://cgit.freebsd.org/src/commit/?id=b5e55dbf357472ffa39345b30b8b781e988a440f > > - https://cgit.freebsd.org/src/commit/?id=d46a6a77e8e14177d07e3a53f68b428e5d1cb416 > > > > Submitted a 2024Q1 report: > > https://cgit.freebsd.org/doc/commit/?id=df8f360e93a2fa210dc3a0a7aa4dae6e855a8076 > > > > This work is sponsored by the FreeBSD Foundation. > > Thanks a log for your hard work! one thing I would like to report, I had an > issue with pulseaudio with latest kernel as of today. > > On thing specific my laptop internal audio is actually uaudio which makes it > maybe a bit specific. > > I have an application which queries pulseaudio every minute to get the status of > the mixer, this application starts pulseaudio if not present. It starts it a > first time, the process run but seems to hang somehow and becomes unkillable > (even via kill -9) > > the backtraces shows: mi_switch+0xba _cv_wait+0xf8 getchns+0x9f > dsp_poll+0xc4 devfs_poll_f+0x7d kern_poll_kfds+0x3f6 kern_poll+0x9d > sys_ppoll+0x70 amd64_syscall+0x109 fast_syscall_common+0xf8 > > with a kernel from 10 days ago this wasn't happening. > > if I change the PCM_WAIT() macro to use cv_wait_sig then everything seems to be > back to normal. > > I don't know if that rings a bell or how to help you more on debugging this. > > Best regards, > Bapt Self replying to continue the list of issues: - microphone is not working anymore, while it is recognized cat /dev/sndstat Installed devices: pcm0: (play) pcm1: (play/rec) default dmesg | grep uaudio uaudio0 on uhub1 uaudio0: on usbus1 uaudio0: Play[0]: 96000 Hz, 2 ch, 24-bit S-LE PCM format, 2x4ms buffer. (selected) uaudio0: Play[0]: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x4ms buffer. uaudio0: Play[0]: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x4ms buffer. uaudio0: Record[0]: 48000 Hz, 1 ch, 16-bit S-LE PCM format, 2x4ms buffer. (selected) uaudio0: Record[0]: 44100 Hz, 1 ch, 16-bit S-LE PCM format, 2x4ms buffer. uaudio0: No MIDI sequencer. pcm1 on uaudio0 uaudio0: HID volume keys found. I tested with rec (sox program) with firefox configured to use OSS. Last bug report is the following: suspend to s3 is broken when some music is being played. Before your changes there was a end less loop of pcm_unregister waiting on pid so technically it was already broken. After your changes, I can see the firefox tab playing something being killed, and the pcm_unregister is not complaining anymore. I can see the screen being switched to vt but then nothing is printing on the screen, but I can here the fan starting spinning like crazy :( If I don't play music, suspend/resume works properly Best regards, Bapt