History log of /src/sys/dev/sound/dummy.c (Results 1 – 25 of 39)
Revision Date Author Comments
# 79225129 02-Jan-2026 Christos Margiolis <christos@FreeBSD.org>

sound: Do not check for NULL before free()

No functional change intended.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.or

sound: Do not check for NULL before free()

No functional change intended.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54174

show more ...


# e963472e 02-Jan-2026 Christos Margiolis <christos@FreeBSD.org>

snd_dummy: Initial MIDI support

Because testing the midi/ code of sound(4) requires a physical MIDI
device, add some basic MIDI support to snd_dummy(4) so that we can test
patches to midi/ easier.

snd_dummy: Initial MIDI support

Because testing the midi/ code of sound(4) requires a physical MIDI
device, add some basic MIDI support to snd_dummy(4) so that we can test
patches to midi/ easier.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54127

show more ...


# 9d18115c 21-Nov-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Retire snd_mtx* wrappers

Do not create mutexes with snd_mtxcreate(). It doesn't provide any
value, plus it first allocates the mutex with malloc(9). Allocate
mutexes in the stack and use mtx_

sound: Retire snd_mtx* wrappers

Do not create mutexes with snd_mtxcreate(). It doesn't provide any
value, plus it first allocates the mutex with malloc(9). Allocate
mutexes in the stack and use mtx_* functions directly instead of the
snd_mtx* wrappers.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D53855

show more ...


# 78c5026a 11-Nov-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Get rid of useless sndbuf getters and setters

No functional change intended.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53528


# 364864ea 27-Oct-2025 Christos Margiolis <christos@FreeBSD.org>

snd_dummy: Round channel pointer after each write

Otherwise we go out of bounds and keep incrementing endlessly.

Sponsored by: The FreeBSD Foundation
MFC after: 4 days
Differential Revision: https:

snd_dummy: Round channel pointer after each write

Otherwise we go out of bounds and keep incrementing endlessly.

Sponsored by: The FreeBSD Foundation
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D53337

show more ...


# 2693d6c7 22-Oct-2025 Christos Margiolis <christos@FreeBSD.org>

snd_dummy: Create device alias

Sponsored by: The FreeBSD Foundation
MFC after: 4 days
Reviewed by: emaste, ziaee
Differential Revision: https://reviews.freebsd.org/D53237


# b670c9ba 11-Jun-2025 Ahmad Khalifa <vexeduxr@FreeBSD.org>

newbus: replace leftover device unit wildcards

Reviewed by: imp, jhb
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D50913


# 0432b218 29-May-2025 Christos Margiolis <christos@FreeBSD.org>

snd_dummy: Make callout stopping more robust

If the callout gets rescheduled during detach, we might access freed
pcm_channel resources in dummy_chan_io(), which will cause a panic
similar to this:

snd_dummy: Make callout stopping more robust

If the callout gets rescheduled during detach, we might access freed
pcm_channel resources in dummy_chan_io(), which will cause a panic
similar to this:

panic: ASan: Invalid access, 8-byte read at 0xfffffe00479f65d8, UMAUseAfterFree(fd)
cpuid = 1
time = 1747433047
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0xa5/frame 0xfffffe0046a8d730
kdb_backtrace() at kdb_backtrace+0xc6/frame 0xfffffe0046a8d890
vpanic() at vpanic+0x226/frame 0xfffffe0046a8da30
panic() at panic+0xb5/frame 0xfffffe0046a8db00
kasan_code_name() at kasan_code_name/frame 0xfffffe0046a8dbd0
__mtx_lock_flags() at __mtx_lock_flags+0xd3/frame 0xfffffe0046a8dcc0
chn_intr() at chn_intr+0x3d/frame 0xfffffe0046a8dce0
dummy_chan_io() at dummy_chan_io+0x9c/frame 0xfffffe0046a8dd10
softclock_call_cc() at softclock_call_cc+0x2bb/frame 0xfffffe0046a8de80
softclock_thread() at softclock_thread+0x162/frame 0xfffffe0046a8def0
fork_exit() at fork_exit+0xa3/frame 0xfffffe0046a8df30
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0046a8df30

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D50386

show more ...


# c824383b 10-Mar-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Update COPYRIGHT notices

Only to files I've currently made significant contributions to.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week


# 5bd08172 26-Nov-2024 Christos Margiolis <christos@FreeBSD.org>

snd_dummy: Fix callout(9) races

Use callout_init_mtx(9) to associate the callback with the driver's
lock. Also make sure the callout is stopped properly during detach.

While here, introduce a dummy

snd_dummy: Fix callout(9) races

Use callout_init_mtx(9) to associate the callback with the driver's
lock. Also make sure the callout is stopped properly during detach.

While here, introduce a dummy_active() function to know when it's
appropriate to stop or not reschedule the callout.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D47459

show more ...


# 516a9c02 03-Nov-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Make device registration more intuitive

The way a sound driver currently registers to sound(4) is using the
following sequence of function calls:

1. pcm_register() to initialize snddev_info.

sound: Make device registration more intuitive

The way a sound driver currently registers to sound(4) is using the
following sequence of function calls:

1. pcm_register() to initialize snddev_info.
2. pcm_addchan() calls to create the device's primary channels.
3. pcm_setstatus() to do the final setup.

While using 3 different functions in a specific order might not be very
elegant, this pattern cannot be easily avoided. However, pcm_register()
and pcm_setstatus() are especially confusing, since one would
intuitively expect:

1. pcm_register() to actually do the registration, as opposed to a basic
initialization.
2. pcm_setstatus() to, as the name suggests, set some kind of status, as
opposed to finalizing the registration.

This patch renames pcm_register() to pcm_init(), and pcm_setstatus() to
pcm_register(). Drivers are modified accordingly.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D47325

show more ...


# e42c8267 18-Oct-2024 Christos Margiolis <christos@FreeBSD.org>

snd_dummy: Drain callout during detach

If we do not enter dummy_chan_trigger() before detaching, we'll get a
use-after-free since the callout(9) callback might be called after
having been detached.

snd_dummy: Drain callout during detach

If we do not enter dummy_chan_trigger() before detaching, we'll get a
use-after-free since the callout(9) callback might be called after
having been detached.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, markj, emaste
Differential Revision: https://reviews.freebsd.org/D46715

show more ...


# c15c9315 27-Jul-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Implement dummy driver

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D45967


# 79225129 02-Jan-2026 Christos Margiolis <christos@FreeBSD.org>

sound: Do not check for NULL before free()

No functional change intended.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.or

sound: Do not check for NULL before free()

No functional change intended.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54174

show more ...


# e963472e 02-Jan-2026 Christos Margiolis <christos@FreeBSD.org>

snd_dummy: Initial MIDI support

Because testing the midi/ code of sound(4) requires a physical MIDI
device, add some basic MIDI support to snd_dummy(4) so that we can test
patches to midi/ easier.

snd_dummy: Initial MIDI support

Because testing the midi/ code of sound(4) requires a physical MIDI
device, add some basic MIDI support to snd_dummy(4) so that we can test
patches to midi/ easier.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54127

show more ...


# 9d18115c 21-Nov-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Retire snd_mtx* wrappers

Do not create mutexes with snd_mtxcreate(). It doesn't provide any
value, plus it first allocates the mutex with malloc(9). Allocate
mutexes in the stack and use mtx_

sound: Retire snd_mtx* wrappers

Do not create mutexes with snd_mtxcreate(). It doesn't provide any
value, plus it first allocates the mutex with malloc(9). Allocate
mutexes in the stack and use mtx_* functions directly instead of the
snd_mtx* wrappers.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D53855

show more ...


# 78c5026a 11-Nov-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Get rid of useless sndbuf getters and setters

No functional change intended.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53528


# 364864ea 27-Oct-2025 Christos Margiolis <christos@FreeBSD.org>

snd_dummy: Round channel pointer after each write

Otherwise we go out of bounds and keep incrementing endlessly.

Sponsored by: The FreeBSD Foundation
MFC after: 4 days
Differential Revision: https:

snd_dummy: Round channel pointer after each write

Otherwise we go out of bounds and keep incrementing endlessly.

Sponsored by: The FreeBSD Foundation
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D53337

show more ...


# 2693d6c7 22-Oct-2025 Christos Margiolis <christos@FreeBSD.org>

snd_dummy: Create device alias

Sponsored by: The FreeBSD Foundation
MFC after: 4 days
Reviewed by: emaste, ziaee
Differential Revision: https://reviews.freebsd.org/D53237


# b670c9ba 11-Jun-2025 Ahmad Khalifa <vexeduxr@FreeBSD.org>

newbus: replace leftover device unit wildcards

Reviewed by: imp, jhb
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D50913


# 0432b218 29-May-2025 Christos Margiolis <christos@FreeBSD.org>

snd_dummy: Make callout stopping more robust

If the callout gets rescheduled during detach, we might access freed
pcm_channel resources in dummy_chan_io(), which will cause a panic
similar to this:

snd_dummy: Make callout stopping more robust

If the callout gets rescheduled during detach, we might access freed
pcm_channel resources in dummy_chan_io(), which will cause a panic
similar to this:

panic: ASan: Invalid access, 8-byte read at 0xfffffe00479f65d8, UMAUseAfterFree(fd)
cpuid = 1
time = 1747433047
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0xa5/frame 0xfffffe0046a8d730
kdb_backtrace() at kdb_backtrace+0xc6/frame 0xfffffe0046a8d890
vpanic() at vpanic+0x226/frame 0xfffffe0046a8da30
panic() at panic+0xb5/frame 0xfffffe0046a8db00
kasan_code_name() at kasan_code_name/frame 0xfffffe0046a8dbd0
__mtx_lock_flags() at __mtx_lock_flags+0xd3/frame 0xfffffe0046a8dcc0
chn_intr() at chn_intr+0x3d/frame 0xfffffe0046a8dce0
dummy_chan_io() at dummy_chan_io+0x9c/frame 0xfffffe0046a8dd10
softclock_call_cc() at softclock_call_cc+0x2bb/frame 0xfffffe0046a8de80
softclock_thread() at softclock_thread+0x162/frame 0xfffffe0046a8def0
fork_exit() at fork_exit+0xa3/frame 0xfffffe0046a8df30
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0046a8df30

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D50386

show more ...


# c824383b 10-Mar-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Update COPYRIGHT notices

Only to files I've currently made significant contributions to.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week


# 5bd08172 26-Nov-2024 Christos Margiolis <christos@FreeBSD.org>

snd_dummy: Fix callout(9) races

Use callout_init_mtx(9) to associate the callback with the driver's
lock. Also make sure the callout is stopped properly during detach.

While here, introduce a dummy

snd_dummy: Fix callout(9) races

Use callout_init_mtx(9) to associate the callback with the driver's
lock. Also make sure the callout is stopped properly during detach.

While here, introduce a dummy_active() function to know when it's
appropriate to stop or not reschedule the callout.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D47459

show more ...


# 516a9c02 03-Nov-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Make device registration more intuitive

The way a sound driver currently registers to sound(4) is using the
following sequence of function calls:

1. pcm_register() to initialize snddev_info.

sound: Make device registration more intuitive

The way a sound driver currently registers to sound(4) is using the
following sequence of function calls:

1. pcm_register() to initialize snddev_info.
2. pcm_addchan() calls to create the device's primary channels.
3. pcm_setstatus() to do the final setup.

While using 3 different functions in a specific order might not be very
elegant, this pattern cannot be easily avoided. However, pcm_register()
and pcm_setstatus() are especially confusing, since one would
intuitively expect:

1. pcm_register() to actually do the registration, as opposed to a basic
initialization.
2. pcm_setstatus() to, as the name suggests, set some kind of status, as
opposed to finalizing the registration.

This patch renames pcm_register() to pcm_init(), and pcm_setstatus() to
pcm_register(). Drivers are modified accordingly.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D47325

show more ...


# e42c8267 18-Oct-2024 Christos Margiolis <christos@FreeBSD.org>

snd_dummy: Drain callout during detach

If we do not enter dummy_chan_trigger() before detaching, we'll get a
use-after-free since the callout(9) callback might be called after
having been detached.

snd_dummy: Drain callout during detach

If we do not enter dummy_chan_trigger() before detaching, we'll get a
use-after-free since the callout(9) callback might be called after
having been detached.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, markj, emaste
Differential Revision: https://reviews.freebsd.org/D46715

show more ...


12