From mboxrd@z Thu Jan 1 00:00:00 1970 From: Clemens Ladisch Subject: Re: Fixed sampling freq UAC2 doubt Date: Thu, 27 Jan 2011 09:14:29 +0100 Message-ID: <4D412965.7010704@ladisch.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by alsa0.perex.cz (Postfix) with ESMTP id 7AA9C103A7E for ; Thu, 27 Jan 2011 09:14:11 +0100 (CET) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Jassi Brar Cc: Takashi Iwai , alsa-devel@alsa-project.org, Daniel Mack List-Id: alsa-devel@alsa-project.org Jassi Brar wrote: > While testing my under-development generic USB Audio Class 2.0 _gadget_ driver > with ALSA's USB Audio Class driver, I came across an apparent discrepency. > Or so do I think. > > Page-98 Section 5.2.5.1.1 of 'Audio 20 final.pdf' specifies :- > [In many cases, the Clock Source Entity represents a crystal > oscillator based generator > with a single fixed frequency. In that case, the Set request is not supported.] > > Here 'not supported' means setup requests for CUR/RANGE CS_SAM_FREQ_CONTROL > should stall. Right ? Strictly speaking, "is not" (instead of "might not be") implies that the device _must_ stall. > The snd_usb_hw_params in sound/usb/pcm.c apparently attempts to do that with > disregard to Clock-Frequency-Control bitmask in bmControls field of the > Clock Source Descriptor. > > The confusion is, subs->cur_rate is initialized only if snd_usb_init_sample_rate > succeeds. Which does SET control tranfer, albeit with the supported frequency. > Couldn't a fixed sampling freq UAC2 compliant device refuse to work in > that case, thereby failing any attempt to use the USB card? Yes, it will fail. This is a bug in the driver. Regards, Clemens