From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: USB Audio/Midiman - partial success Date: Wed, 02 Oct 2002 15:46:32 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: multipart/mixed; boundary="Multipart_Wed_Oct__2_15:46:32_2002-1" Return-path: In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: "Pikus, Fedor" Cc: Clemens Ladisch , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Wed_Oct__2_15:46:32_2002-1 Content-Type: text/plain; charset=US-ASCII At Thu, 26 Sep 2002 12:42:32 -0700 (PDT), Fedor G. Pikus wrote: > > This is the right interface and altset (I was capturing with -r 96000 -f > S16_LE). Two more files from proc about this pcm: > pcm0c/sub0/hw_params > access: RW_INTERLEAVED > format: S16_LE > subformat: STD > channels: 2 > rate: 30464 (96000/1) ^^^^^^^^^^^^^^^ ah, this is the problem. could you try the attached patch? thanks, Takashi --Multipart_Wed_Oct__2_15:46:32_2002-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="audio-rate-fix.dif" Content-Transfer-Encoding: 7bit Index: alsa-kernel/usb/usbaudio.c =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/usb/usbaudio.c,v retrieving revision 1.13 diff -u -r1.13 usbaudio.c --- alsa-kernel/usb/usbaudio.c 30 Sep 2002 13:38:00 -0000 1.13 +++ alsa-kernel/usb/usbaudio.c 2 Oct 2002 13:41:50 -0000 @@ -1009,6 +1009,7 @@ } /* if endpoint has sampling rate control, set it */ if (fmt->attributes & EP_CS_ATTR_SAMPLE_RATE) { + int crate; data[0] = runtime->rate; data[1] = runtime->rate >> 8; data[2] = runtime->rate >> 16; @@ -1026,8 +1027,11 @@ dev->devnum, subs->interface, fmt->altsetting, ep); return err; } - runtime->rate = data[0] | (data[1] << 8) | (data[2] << 16); - // printk("ok, getting back rate to %d\n", runtime->rate); + crate = data[0] | (data[1] << 8) | (data[2] << 16); + if (crate != runtime->rate) { + snd_printk(KERN_WARNING, "current rate %d is different from the runtime rate %d\n", crate, runtime->rate); + // runtime->rate = crate; + } } /* always fill max packet size */ if (fmt->attributes & EP_CS_ATTR_FILL_MAX) --Multipart_Wed_Oct__2_15:46:32_2002-1-- ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf