Only set the sample rate if the USB audio channel reports

that it supports the frequency control request.

MFC after:	7 days
Approved by:	thompsa (mentor)
This commit is contained in:
Hans Petter Selasky 2011-04-20 19:41:08 +00:00
parent 8e15d1e490
commit aca2249d54
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220900

View file

@ -1360,11 +1360,10 @@ uaudio_chan_init(struct uaudio_softc *sc, struct snd_dbuf *b,
sc->sc_mixer_iface_index);
/*
* If just one sampling rate is supported,
* no need to call "uaudio_set_speed()".
* Roland SD-90 freezes by a SAMPLING_FREQ_CONTROL request.
* Only set the sample rate if the channel reports that it
* supports the frequency control.
*/
if (ch->p_asf1d->bSamFreqType != 1) {
if (ch->p_sed->bmAttributes & UA_SED_FREQ_CONTROL) {
if (uaudio_set_speed(sc->sc_udev, endpoint, ch->sample_rate)) {
/*
* If the endpoint is adaptive setting the speed may