Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Torstein Hegge <hegge@resisty.net>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH v4] ALSA: usb: Work around CM6631 sample rate change bug
Date: Fri, 22 Mar 2013 16:32:19 +0100	[thread overview]
Message-ID: <514C7983.40904@ladisch.de> (raw)
In-Reply-To: <20130319214531.GD7539@pvv.ntnu.no>

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

  reply	other threads:[~2013-03-22 15:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19 21:45 [PATCH v4] ALSA: usb: Work around CM6631 sample rate change bug Torstein Hegge
2013-03-22 15:32 ` Clemens Ladisch [this message]
2013-03-24 20:46   ` Torstein Hegge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=514C7983.40904@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=hegge@resisty.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox