diff options
author | Christos Margiolis <christos@FreeBSD.org> | 2024-02-12 11:05:47 +0000 |
---|---|---|
committer | Christos Margiolis <christos@FreeBSD.org> | 2024-02-12 11:07:50 +0000 |
commit | f60e99f45e8197de2bc0970c7dd7f87148fdaf30 (patch) | |
tree | 8c25726b99cf4a66a2f4194176e3a30033179287 | |
parent | 883b8ed582eb3e9e98c62c471228ff3c3a25377d (diff) | |
download | src-f60e99f45e8197de2bc0970c7dd7f87148fdaf30.tar.gz src-f60e99f45e8197de2bc0970c7dd7f87148fdaf30.zip |
snd_uaudio: mark selected configurations
snd_uaudio(4) selects the first maching rate/channel/bit/format/buffer
configuration for use during attach, even though it will print the rest
of the supported configurations detected. To make this clear, mark the
selected playback and recording configurations with a "selected" string.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D43766
-rw-r--r-- | sys/dev/sound/usb/uaudio.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index eb4b676d5e7d..26d95bf3ee9f 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -1051,11 +1051,12 @@ uaudio_attach(device_t dev) for (x = 0; x != sc->sc_play_chan[i].num_alt; x++) { device_printf(dev, "Play[%u]: %d Hz, %d ch, %s format, " - "2x%dms buffer.\n", i, + "2x%dms buffer.%s\n", i, sc->sc_play_chan[i].usb_alt[x].sample_rate, sc->sc_play_chan[i].usb_alt[x].channels, sc->sc_play_chan[i].usb_alt[x].p_fmt->description, - uaudio_buffer_ms); + uaudio_buffer_ms, + (x == 0) ? " (selected)" : ""); } } if (i == 0) @@ -1081,11 +1082,12 @@ uaudio_attach(device_t dev) for (x = 0; x != sc->sc_rec_chan[i].num_alt; x++) { device_printf(dev, "Record[%u]: %d Hz, %d ch, %s format, " - "2x%dms buffer.\n", i, + "2x%dms buffer.%s\n", i, sc->sc_rec_chan[i].usb_alt[x].sample_rate, sc->sc_rec_chan[i].usb_alt[x].channels, sc->sc_rec_chan[i].usb_alt[x].p_fmt->description, - uaudio_buffer_ms); + uaudio_buffer_ms, + (x == 0) ? " (selected)" : ""); } } if (i == 0) |