diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 98208ca85532..4e37da41eb8f 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1124,7 +1124,7 @@ fmtvalid(u_int32_t fmt, u_int32_t *fmtlist) int chn_reset(pcm_channel *c, u_int32_t fmt) { - int r = 0; + int hwspd, r = 0; chn_abort(c); c->flags &= CHN_F_RESET; @@ -1134,10 +1134,13 @@ chn_reset(pcm_channel *c, u_int32_t fmt) if (r) return r; if (fmt) { - c->speed = DSP_DEFAULT_SPEED; + hwspd = DSP_DEFAULT_SPEED; + RANGE(hwspd, chn_getcaps(c)->minspeed, chn_getcaps(c)->maxspeed); + c->speed = hwspd; + r = chn_setformat(c, fmt); if (r == 0) - r = chn_setspeed(c, DSP_DEFAULT_SPEED); + r = chn_setspeed(c, hwspd); if (r == 0) r = chn_setvolume(c, 100, 100); }