diff options
| author | 2020-03-23 14:53:51 +0000 | |
|---|---|---|
| committer | 2020-03-23 14:53:51 +0000 | |
| commit | 28e0075689f1c96fd900c7920883ed9252d9aadc (patch) | |
| tree | 78af77971b2e8f9bc5c1cd46aa122922790cec4a /sys/dev | |
| parent | Fix brightness control on machines where initial brigness unknown. (diff) | |
| download | wireguard-openbsd-28e0075689f1c96fd900c7920883ed9252d9aadc.tar.xz wireguard-openbsd-28e0075689f1c96fd900c7920883ed9252d9aadc.zip | |
If an USB audio device supports less rates for recording than for
playing, the uaudio(4) driver selected a wrong rate. Then recording
failed with "block size too large". The v1_rates field of the
parameters contains the correct intersection of valid rates. Use
it for v1 devices.
OK ratchov@
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/uaudio.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c index a176a276cd7..af77cdc4efa 100644 --- a/sys/dev/usb/uaudio.c +++ b/sys/dev/usb/uaudio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uaudio.c,v 1.149 2020/03/07 15:18:48 ratchov Exp $ */ +/* $OpenBSD: uaudio.c,v 1.150 2020/03/23 14:53:51 bluhm Exp $ */ /* * Copyright (c) 2018 Alexandre Ratchov <alex@caoua.org> * @@ -1057,7 +1057,13 @@ uaudio_clock_id(struct uaudio_softc *sc) int uaudio_getrates(struct uaudio_softc *sc, struct uaudio_params *p) { - return uaudio_alt_getrates(sc, p->palt ? p->palt : p->ralt); + switch (sc->version) { + case UAUDIO_V1: + return p->v1_rates; + case UAUDIO_V2: + return uaudio_alt_getrates(sc, p->palt ? p->palt : p->ralt); + } + return 0; } /* |
