<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/tests/sys/sound, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2025-11-11T15:25:41Z</updated>
<entry>
<title>sound tests: Actually fix format strings</title>
<updated>2025-11-11T15:25:41Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2025-11-11T15:25:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fb99c0ba60dc464aab2102c4395791e151d438c6'/>
<id>urn:sha1:fb99c0ba60dc464aab2102c4395791e151d438c6</id>
<content type='text'>
Fixes:		eb95b990f8eb ("sound tests: Fix format specified for kevent.data")
</content>
</entry>
<entry>
<title>sound tests: Fix format specified for kevent.data</title>
<updated>2025-11-11T13:22:28Z</updated>
<author>
<name>Christos Margiolis</name>
<email>christos@FreeBSD.org</email>
</author>
<published>2025-11-11T13:21:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=eb95b990f8ebfb85ce6e4d7d16305746b5eddcde'/>
<id>urn:sha1:eb95b990f8ebfb85ce6e4d7d16305746b5eddcde</id>
<content type='text'>
Reported by:	CI
Fixes:		dd81b19ef236 ("sound tests: Test polling")
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
</content>
</entry>
<entry>
<title>sound tests: Fix select(2) arguments</title>
<updated>2025-11-11T12:23:58Z</updated>
<author>
<name>Christos Margiolis</name>
<email>christos@FreeBSD.org</email>
</author>
<published>2025-11-11T12:22:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=41f2ec3be93a2981e5afcc2569e6abcc64414437'/>
<id>urn:sha1:41f2ec3be93a2981e5afcc2569e6abcc64414437</id>
<content type='text'>
Fixes:		dd81b19ef236 ("sound tests: Test polling")
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
</content>
</entry>
<entry>
<title>sound tests: Test polling</title>
<updated>2025-11-11T12:04:54Z</updated>
<author>
<name>Christos Margiolis</name>
<email>christos@FreeBSD.org</email>
</author>
<published>2025-11-11T12:04:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=dd81b19ef23622d03d7c75935e11c2b2af3f4cb8'/>
<id>urn:sha1:dd81b19ef23622d03d7c75935e11c2b2af3f4cb8</id>
<content type='text'>
Co-authored by:	meka@tilda.center
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D53188
</content>
</entry>
<entry>
<title>tests/sndstat: use require.kmods property instead of ad-hoc checks</title>
<updated>2025-09-05T18:42:22Z</updated>
<author>
<name>Siva Mahadevan</name>
<email>me@svmhdvn.name</email>
</author>
<published>2025-07-21T13:25:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=74898ce961e1f4818eba500dfa3a06bc30c1d9b3'/>
<id>urn:sha1:74898ce961e1f4818eba500dfa3a06bc30c1d9b3</id>
<content type='text'>
Signed-off-by: Siva Mahadevan &lt;me@svmhdvn.name&gt;
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1780
</content>
</entry>
<entry>
<title>sound tests: Fetch HWBUF_RATE and SWBUF_RATE in sndstat_nv</title>
<updated>2025-04-26T10:06:52Z</updated>
<author>
<name>Christos Margiolis</name>
<email>christos@FreeBSD.org</email>
</author>
<published>2025-04-26T10:06:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=52a0f967dcc5b78c5f2f7e49a96e9cec56472a4f'/>
<id>urn:sha1:52a0f967dcc5b78c5f2f7e49a96e9cec56472a4f</id>
<content type='text'>
Introduced in 19ec522d6dc1 ("sound: Export hardware and software buffer
sample rate in sndstat nvlist").

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
</content>
</entry>
<entry>
<title>sound tests: Fix PVCHAN and RVCHAN fetching in sndstat_nv</title>
<updated>2025-04-26T10:06:47Z</updated>
<author>
<name>Christos Margiolis</name>
<email>christos@FreeBSD.org</email>
</author>
<published>2025-04-26T10:06:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6286b714f5e398cc2a87883d81aa087ee11ee310'/>
<id>urn:sha1:6286b714f5e398cc2a87883d81aa087ee11ee310</id>
<content type='text'>
Fixes:		0c0bb4c1401c ("sound: Make sndstat PVCHAN and RVCHAN nvlist parameters bool")
Reported by:	CI
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
</content>
</entry>
<entry>
<title>sound: Implement AFMT_FLOAT support</title>
<updated>2025-03-30T17:45:38Z</updated>
<author>
<name>Christos Margiolis</name>
<email>christos@FreeBSD.org</email>
</author>
<published>2025-03-30T17:45:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e1bbaa71d62c8681a576f9f5bedf475c7541bd35'/>
<id>urn:sha1:e1bbaa71d62c8681a576f9f5bedf475c7541bd35</id>
<content type='text'>
Even though the OSS manual [1] advises against using AFMT_FLOAT, there
are applications that expect the sound driver to support it, and might
not work properly without it.

This patch adds AFMT_F32_LE|BE (as well as AFMT_FLOAT for OSS
compatibility) in sys/soundcard.h and implements AFMT_F32_LE|BE &lt;-&gt;
AFMT_S32_LE|BE conversion functions. As a result, applications can
write/read floats to/from sound(4), but internally, because sound(4)
works with integers, we convert floating point samples to integer ones,
before doing any processing.

The reason for encoding/decoding IEEE754s manually, instead of using
fpu_kern(9), is that fpu_kern(9) is not supported by all architectures,
and also introduces significant overhead.

The IEEE754 encoding/decoding implementation has been written by Ariff
Abdullah [2].

[1] http://manuals.opensound.com/developer/AFMT_FLOAT.html
[2] https://people.freebsd.org/~ariff/utils/ieee754.c

PR:		157050, 184380, 264973, 280612, 281390
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D47638
</content>
</entry>
<entry>
<title>sound: Refactor the format conversion framework</title>
<updated>2025-03-10T20:19:15Z</updated>
<author>
<name>Christos Margiolis</name>
<email>christos@FreeBSD.org</email>
</author>
<published>2025-03-10T20:19:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=433e270f341cf660b2fe125c2e0f733073829188'/>
<id>urn:sha1:433e270f341cf660b2fe125c2e0f733073829188</id>
<content type='text'>
Merge the PCM_READ|WRITE_* macros defined in pcm/pcm.h, as well as the
intpcm_read|write_* macros defined in pcm/feeder_format.c, into six
inline functions: pcm_sample_read|write[_norm|calc](). The absence of
macro magic makes the code significantly easier to read, use and modify.

Since these functions take the input/output format as a parameter, get
rid of the read() and write() function pointers defined in struct
feed_format_info, as well as the feeder_format_read|write_op()
functions, and use the new read/write functions directly.

Sponsored by:	The FreeBSD Fondation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D47932
</content>
</entry>
<entry>
<title>sound tests: Fix downshift calculation in pcm_read_write test</title>
<updated>2025-02-18T19:37:17Z</updated>
<author>
<name>Florian Walpen</name>
<email>dev@submerge.ch</email>
</author>
<published>2025-02-18T19:35:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6672831bda883756d7f4598bb4b119f99eb1e7d2'/>
<id>urn:sha1:6672831bda883756d7f4598bb4b119f99eb1e7d2</id>
<content type='text'>
In some situations the feeders in the sound module lower the pcm sample
resolution through a downshift of the sample value. The pcm_read_write
test implements this operation with an arithmetic division to avoid
implementation defined or architecture specific behavior. Due to
different rounding, the test produced marginally different sample
values, which made the test fail on 32 bit architectures. Correct this.

Reported by:	CI
Fixes:		27ef5d48c729 ("sound: Unit test the pcm sample read and write macros")
MFC after:	1 week
Reviewed by:	christos, markj
Differential revision:	https://reviews.freebsd.org/D48926
</content>
</entry>
</feed>
