git: 3402d474ceb8 - main - snd_uaudio: Remove unused sc_sndstat sbuf
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 06 Jul 2024 18:24:07 UTC
The branch main has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=3402d474ceb8541d07689bad6960f90739129997
commit 3402d474ceb8541d07689bad6960f90739129997
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2024-07-06 18:22:26 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2024-07-06 18:22:26 +0000
snd_uaudio: Remove unused sc_sndstat sbuf
This information is also printed to dmesg(8) on attach.
Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D45771
---
sys/dev/sound/usb/uaudio.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c
index d47eb86ed271..c202ac581119 100644
--- a/sys/dev/sound/usb/uaudio.c
+++ b/sys/dev/sound/usb/uaudio.c
@@ -368,7 +368,6 @@ struct uaudio_softc_child {
};
struct uaudio_softc {
- struct sbuf sc_sndstat;
struct sndcard_func sc_sndcard_func;
struct uaudio_chan sc_rec_chan[UAUDIO_MAX_CHILD];
struct uaudio_chan sc_play_chan[UAUDIO_MAX_CHILD];
@@ -391,7 +390,6 @@ struct uaudio_softc {
uint8_t sc_mixer_iface_index;
uint8_t sc_mixer_iface_no;
uint8_t sc_mixer_chan;
- uint8_t sc_sndstat_valid:1;
uint8_t sc_uq_audio_swap_lr:1;
uint8_t sc_uq_au_inp_async:1;
uint8_t sc_uq_au_no_xu:1;
@@ -1293,8 +1291,6 @@ uaudio_detach(device_t dev)
if (bus_generic_detach(dev) != 0) {
DPRINTF("detach failed!\n");
}
- sbuf_delete(&sc->sc_sndstat);
- sc->sc_sndstat_valid = 0;
umidi_detach(dev);
@@ -2149,15 +2145,6 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, struct usb_device *udev,
if (rate > chan->pcm_cap.maxspeed || chan->pcm_cap.maxspeed == 0)
chan->pcm_cap.maxspeed = rate;
- if (sc->sc_sndstat_valid != 0) {
- sbuf_printf(&sc->sc_sndstat, "\n\t"
- "mode %d.%d:(%s) %dch, %dbit, %s, %dHz",
- curidx, alt_index,
- (ep_dir == UE_DIR_IN) ? "input" : "output",
- channels, p_fmt->bPrecision,
- p_fmt->description, rate);
- }
-
next_ep:
sed.v1 = NULL;
ed1 = NULL;
@@ -2230,9 +2217,6 @@ uaudio_chan_fill_info(struct uaudio_softc *sc, struct usb_device *udev)
if (channels == 0)
channels = channels_max;
- if (sbuf_new(&sc->sc_sndstat, NULL, 4096, SBUF_AUTOEXTEND))
- sc->sc_sndstat_valid = 1;
-
/* try to search for a valid config */
for (x = channels; x; x--) {
@@ -2263,8 +2247,6 @@ uaudio_chan_fill_info(struct uaudio_softc *sc, struct usb_device *udev)
if (x == (channels + 1))
x--;
}
- if (sc->sc_sndstat_valid)
- sbuf_finish(&sc->sc_sndstat);
}
static void