[alsa-devel] [PATCH v4] ALSA: usb: Work around CM6631 sample rate change bug

Clemens Ladisch clemens at ladisch.de
Fri Mar 22 16:32:19 CET 2013


Torstein Hegge wrote:
> +	if ((err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR,
> +				   USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN,
> +				   UAC2_CS_CONTROL_SAM_FREQ << 8,
> +				   snd_usb_ctrl_intf(chip) | (clock << 8),
> +				   data, sizeof(data))) < 0) {
> +		snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq (v2)\n",
> +			   dev->devnum, iface, fmt->altsetting);
> +		return err;
> +	}

This code requires that all devices allow reading the sample rate.

When you cannot read the current rate, just assume it needs to be set.


Regards,
Clemens


More information about the Alsa-devel mailing list