FreeBSD/src 3ecd098sys/dev/sound/midi midi.c

sound: Retire unused snd_midi->name

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit a9c3bb39bc9181b8762e67c40d00886474e9ae06)
DeltaFile
+0-1sys/dev/sound/midi/midi.c
+0-11 files

FreeBSD/src 2ded9e1sys/dev/sound/midi midiq.h

sound: Get rid of unused MIDIQ macros

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit 3f8a85a085c710f50b8bcd4efe915268882129d2)
DeltaFile
+0-2sys/dev/sound/midi/midiq.h
+0-21 files

FreeBSD/src 0c7eb49sys/dev/sound/pcm channel.c channel.h

sound: Merge chn_intr() with chn_intr_locked()

There is no scenario where chn_intr() is called with the channel lock
already held.

No functional change intended.

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

(cherry picked from commit 0794365d5d3cc93940b873553382288a2a2c88c4)
DeltaFile
+2-18sys/dev/sound/pcm/channel.c
+0-1sys/dev/sound/pcm/channel.h
+2-192 files

FreeBSD/src 76a53e1sys/dev/sound/midi mpu401.c

sound: Allocate mpu401 with M_WAITOK

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit fd1312d3629cda9691c67af6154946cd55467076)
DeltaFile
+1-4sys/dev/sound/midi/mpu401.c
+1-41 files

FreeBSD/src 982dabcsys/conf files

sys/conf/files: Fix sndstat path

Reported by:    CI
Fixes:          bafa8c951d8c ("sound: Move sndstat out of pcm/")
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit 8c7a7d7df508faa75515d4f0b8ef58c30ad4ccc9)
DeltaFile
+1-1sys/conf/files
+1-11 files

FreeBSD/src f309214sys/dev/sound/usb uaudio.c

snd_uaudio: Do not use pcm_channel->lock to protect uaudio_chan

This is a layering violation, but it also makes the control flow
confusing; snd_uaudio(4) should have its own lock to protect its
structures.

Fixes:          5cc34a83e1 ("Revert "sound: Merge chn_intr() with chn_intr_locked()"")
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54102

(cherry picked from commit c234740c9d34c2b953c6010f6a01b0aca9648c08)
DeltaFile
+12-15sys/dev/sound/usb/uaudio.c
+12-151 files

FreeBSD/src efca639sys/dev/sound/midi mpu401.c

sound: Make mpu_if definitions static

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit 3094c5e388df296f1b84579f70a5583ddc3bc26a)
DeltaFile
+3-3sys/dev/sound/midi/mpu401.c
+3-31 files

FreeBSD/src 2a8f866sys/dev/sound/midi mpu401.c mpu_if.m

sound: Retire mpu_callbackp()

It is the exact same as mpu_callback().

No functional changed intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit e3b57ceffef0158a72a7a5aedfa9df88b3a8a88b)
DeltaFile
+0-8sys/dev/sound/midi/mpu401.c
+0-6sys/dev/sound/midi/mpu_if.m
+1-1sys/dev/sound/midi/midi.c
+1-153 files

FreeBSD/src 209cfbbsys/dev/sound/midi midi.c

sound: Get rid of unused midi/midi.c defines

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit 4a2d1532e84135a50ba8414ceaafc0c3a1bfe94b)
DeltaFile
+0-13sys/dev/sound/midi/midi.c
+0-131 files

FreeBSD/src 4fc99fcsys/dev/sound/midi midi.c, sys/dev/sound/pci hdsp-pcm.c hdspe-pcm.c

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

(cherry picked from commit 792251295cdf6c3e1cbb1aa6291434539632912f)
DeltaFile
+12-25sys/dev/sound/pcm/feeder_rate.c
+6-13sys/dev/sound/pcm/buffer.c
+4-8sys/dev/sound/pci/hdsp-pcm.c
+4-8sys/dev/sound/pci/hdspe-pcm.c
+2-4sys/dev/sound/pci/envy24ht.c
+2-4sys/dev/sound/midi/midi.c
+30-6214 files not shown
+47-9520 files

FreeBSD/src 3b9a2dbsys/dev/sound sndstat.c sndstat.h, sys/dev/sound/pcm sndstat.c sound.h

sound: Move sndstat out of pcm/

Needed by follow-up patches that will add sndstat support for midi/

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

(cherry picked from commit bafa8c951d8cfaec75e774af03d7ab6fadb448b9)
DeltaFile
+1,458-0sys/dev/sound/sndstat.c
+0-1,456sys/dev/sound/pcm/sndstat.c
+37-0sys/dev/sound/sndstat.h
+0-4sys/dev/sound/pcm/sound.h
+2-1sys/modules/sound/sound/Makefile
+1-0sys/dev/sound/pcm/sound.c
+1,498-1,4616 files

FreeBSD/src 0ed90f4sys/dev/sound/midi midi.c

sound: Improve snd_midi->{in,out}q allocation

Currently we lock and allocate the buffers with M_NOWAIT, without
checking if the return value of malloc(). This is not necessary as
subsequent check below will eventually check that. However, for
correctness, allocate the buffers with M_WAITOK (there is no reason not
to) and lock afterwards.

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

(cherry picked from commit b9db6c21287311b9e861893c065289d987a75804)
DeltaFile
+9-17sys/dev/sound/midi/midi.c
+9-171 files

FreeBSD/src 60d9333sys/dev/sound/midi midiq.h

sound: Retire MIDIQ_DEBUG

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit 3b9e776498a7e3e96c1a351fdd561f25803718df)
DeltaFile
+0-17sys/dev/sound/midi/midiq.h
+0-171 files

FreeBSD/src 1cebe00sys/dev/sound sndstat.c sndstat.h, sys/dev/sound/pcm sound.c

sound: Take device type into account in sndstat

sndstat will be extended to work with MIDI devices as well, so separate
functionality based on the device type.

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

(cherry picked from commit 2aa16666e2fa5c98be8d330cd0c32c9dc3801ba7)
DeltaFile
+40-44sys/dev/sound/sndstat.c
+6-1sys/dev/sound/sndstat.h
+1-1sys/dev/sound/pcm/sound.c
+47-463 files

FreeBSD/src 7b86ef4sys/dev/sound/midi midi.c

sound: Remove dead if-statement

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit d2baf9301be3093c5f53a7ce1de858a0c690cd07)
DeltaFile
+0-1sys/dev/sound/midi/midi.c
+0-11 files

FreeBSD/src 8c005f3sys/dev/sound/midi midi.c

sound: Merge midi_destroy() with midi_uninit()

Also always call MPU_UNINIT(). It does not make sense not to if we are
deallocating everything.

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

(cherry picked from commit d912ea5879cd6b1042671ae3986d496c63be4d49)
DeltaFile
+14-43sys/dev/sound/midi/midi.c
+14-431 files

FreeBSD/src 9ad643fsys/dev/sound dummy.c, sys/modules/sound/driver/dummy Makefile

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

(cherry picked from commit e963472ef8533fb39b581e746cdc2ddc7447dca2)
DeltaFile
+47-0sys/dev/sound/dummy.c
+1-1sys/modules/sound/driver/dummy/Makefile
+48-12 files

FreeBSD/src 177ea29sys/dev/sound/midi midi.c

sound: Retire snd_midi->busy

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit d54c782fde63d3b17433551da0b7ec94bc2a5ed4)
DeltaFile
+7-24sys/dev/sound/midi/midi.c
+7-241 files

FreeBSD/src 3e04a08sys/dev/sound/midi midi.c midi.h

sound: Retire midi_devs and mstat_lock

Nowadays midi_devs only has two uses:

1. To verify in midi_init() if a given device unit exists, as well as to
   calculate the next device unit. Instead, make sure we always get a
   unique unit and channel number using unr(9).
2. To keep track of all midi devices, so that it can destroy them all at
   once in midi_sysuninit(). However, since we stopped building midi as
   a kernel module, there is no reason to do that, simply let the
   drivers tear down the devices themselves.

Also retire mstat_lock since it's only used to protect midi_devs.

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

(cherry picked from commit c508be8ca9578ef6e3e4b31de1baca8038c0e0ae)
DeltaFile
+24-106sys/dev/sound/midi/midi.c
+1-6sys/dev/sound/midi/midi.h
+1-1sys/dev/sound/midi/mpu401.c
+26-1133 files

FreeBSD/src b11224dsys/dev/sound/midi midi.c

sound: Retire MIDI_DEBUG

Better logging will be implemented.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit c288595c4eac14616f94c5b7eb84aad2eeeffc1f)
DeltaFile
+1-39sys/dev/sound/midi/midi.c
+1-391 files

FreeBSD/src 5d794b0sys/dev/sound/midi midi.h midi.c

sound: Update midi/midi.* LICENSE

Spsonsored by:  The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit fb945a50e2649c9a1c3a9b38ffb84f53e37abd0a)
DeltaFile
+4-0sys/dev/sound/midi/midi.h
+4-0sys/dev/sound/midi/midi.c
+8-02 files

FreeBSD/src e4f2146sys/dev/sound/midi midi.c

sound: Rename midi_cdevsw name to "midi"

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit d6121f7b508bf889359e116da1efab08f848e129)
DeltaFile
+2-2sys/dev/sound/midi/midi.c
+2-21 files

FreeBSD/src 99ed1fcsys/dev/sound/midi midi.c

sound: Retire snd_midi->qlock

snd_midi->qlock is used to protect snd_midi->{in,out}q. However, apart
from the numerous LORs present already in the code, there is no reason
not to use snd_midi->lock, as we do for the rest of the structure

Started by:     https://github.com/freebsd/freebsd-src/pull/1902
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    dev_nicolas-provost.fr
Differential Revision:  https://reviews.freebsd.org/D54129

(cherry picked from commit 4cc78f5dd7c2e82571ced6e23fa22d48c6cd1697)
DeltaFile
+22-38sys/dev/sound/midi/midi.c
+22-381 files

FreeBSD/src 7154f9dsys/dev/sound/midi midi.c

sound: Stop building midi as a module

There is no reason for this. The midi functions are used by drivers
on-demand anyway. Use SYSINIT(9) instead to do the appropriate
(de-)initilizations.

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

(cherry picked from commit 45bb10e0ed5a0b87adcae33635400b5bc36337ec)
DeltaFile
+7-37sys/dev/sound/midi/midi.c
+7-371 files

FreeBSD/src ed61d50sys/dev/sound/pci/hda hdac.c

snd_hda: Default to 256 when corb/rirb is invalid

PR:             289284
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D54339

(cherry picked from commit 2455db44ef088797d113397f863d46c50e77134f)
DeltaFile
+10-4sys/dev/sound/pci/hda/hdac.c
+10-41 files

FreeBSD/src 6511bb5sys/dev/sound/pci atiixp.c, sys/dev/sound/pcm feeder_rate.c feeder_eq.c

sound: Get rid of unnecessary breaks

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit 21a2aa785d7d7610b3e90e028ae782893d8c095a)
DeltaFile
+0-7sys/dev/sound/pcm/feeder_rate.c
+0-2sys/dev/sound/pcm/feeder_eq.c
+0-1sys/dev/sound/pcm/feeder_format.c
+0-1sys/dev/sound/pci/atiixp.c
+0-1sys/dev/sound/pcm/feeder_volume.c
+0-1sys/dev/sound/pcm/mixer.c
+0-136 files

FreeBSD/src 4b01d92sys/dev/sound/pcm feeder.h

sound: Retire unused pcm_feeder->align

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit 6002ce537b6a0e524da1a60ccd70493d8cd59b9b)
DeltaFile
+0-2sys/dev/sound/pcm/feeder.h
+0-21 files

FreeBSD/src 2985cbasys/dev/sound/pcm feeder.h

sound: Update pcm/feeder.h LICENSE

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit 2b088823df5b0f28c3839bf381c9517b7b0d60c0)
DeltaFile
+4-0sys/dev/sound/pcm/feeder.h
+4-01 files

FreeBSD/src 353a529sys/dev/sound/pcm sndstat.c feeder_volume.c

sound: Retire pcm_feeder->desc_static

Not sure what the value of this was.

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

(cherry picked from commit 84976625da387a266f01b0a566aab447426609f7)
DeltaFile
+18-18sys/dev/sound/pcm/sndstat.c
+7-7sys/dev/sound/pcm/feeder_volume.c
+7-7sys/dev/sound/pcm/feeder_format.c
+5-5sys/dev/sound/pcm/feeder_mixer.c
+5-5sys/dev/sound/pcm/feeder_eq.c
+4-5sys/dev/sound/pcm/feeder_matrix.c
+46-474 files not shown
+54-5610 files

FreeBSD/src 0a5535dcontrib/netbsd-tests/usr.bin/grep t_grep.sh d_color_d.out, usr.bin/grep/tests Makefile

grep: add testcase to test color when matches is greater than MAX_MATCHES

Reviewed by: imp, kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/1442
DeltaFile
+6-0contrib/netbsd-tests/usr.bin/grep/t_grep.sh
+1-0contrib/netbsd-tests/usr.bin/grep/d_color_d.out
+1-0usr.bin/grep/tests/Makefile
+8-03 files