All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Pikus, Fedor" <fedor_pikus@mentorg.com>
Cc: Clemens Ladisch <clemens@ladisch.de>, alsa-devel@lists.sourceforge.net
Subject: Re: USB Audio/Midiman - partial success
Date: Wed, 02 Oct 2002 15:46:32 +0200	[thread overview]
Message-ID: <s5hit0lj6mf.wl@alsa2.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.31.0209261234130.17593-100000@lorien.wv.mentorg.com>

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

At Thu, 26 Sep 2002 12:42:32 -0700 (PDT),
Fedor G. Pikus <fedorp@wv.mentorg.com> 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

[-- Attachment #2: audio-rate-fix.dif --]
[-- Type: application/octet-stream, Size: 1120 bytes --]

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)

  parent reply	other threads:[~2002-10-02 13:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.31.0209252301320.29794-100000@lorien.wv.mentorg.com>
2002-09-26  7:47 ` USB Audio/Midiman - partial success Clemens Ladisch
2002-09-26 16:08   ` Takashi Iwai
     [not found]     ` <Pine.LNX.4.31.0209261234130.17593-100000@lorien.wv.mentorg.com>
2002-10-02 13:46       ` Takashi Iwai [this message]
     [not found]         ` <Pine.LNX.4.31.0210032253120.4068-100000@lorien.wv.mentorg.com>
2002-10-04 11:34           ` Takashi Iwai
     [not found] <Pine.LNX.4.31.0209220035210.4610-100000@lorien.wv.mentorg.com>
2002-09-23  9:12 ` Clemens Ladisch
     [not found]   ` <Pine.LNX.4.31.0209232104140.18815-100000@lorien.wv.mentorg.com>
2002-09-24 14:27     ` Takashi Iwai
     [not found]       ` <Pine.LNX.4.31.0209240835370.9799-100000@lorien.wv.mentorg.com>
2002-09-24 15:50         ` Takashi Iwai
     [not found]           ` <Pine.LNX.4.31.0209241952400.28299-100000@lorien.wv.mentorg.com>
2002-09-25 10:46             ` Takashi Iwai
     [not found] <Pine.LNX.4.31.0209191923430.30429-100000@lorien.wv.mentorg.com>
2002-09-20 10:04 ` Clemens Ladisch
     [not found] <Pine.LNX.4.31.0209172023540.4425-100000@lorien.wv.mentorg.com>
2002-09-18  9:25 ` Clemens Ladisch
     [not found] <Pine.LNX.4.31.0209160838270.10583-100000@lorien.wv.mentorg.com>
2002-09-17  7:29 ` Clemens Ladisch
     [not found] <Pine.LNX.4.31.0209132140320.13642-200000@lorien.wv.mentorg.com>
2002-09-16  7:05 ` Clemens Ladisch
     [not found] <Pine.LNX.4.31.0209090841350.25400-100000@lorien.wv.mentorg.com>
2002-09-09 17:46 ` Clemens Ladisch
2002-09-09 18:30   ` Takashi Iwai
2002-09-10  8:58     ` Clemens Ladisch
2002-09-10 13:10       ` Takashi Iwai
2002-09-10 13:41         ` Patrick Shirkey
2002-09-12 15:30       ` Takashi Iwai
2002-09-12 22:34         ` Patrick Shirkey
2002-09-13  5:59         ` Patrick Shirkey
2002-09-13 11:30           ` Takashi Iwai
2002-09-13 14:30             ` Patrick Shirkey
     [not found]         ` <Pine.LNX.4.31.0209122304430.1450-100000@lorien.wv.mentorg.com>
2002-09-13 11:33           ` Takashi Iwai

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=s5hit0lj6mf.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=clemens@ladisch.de \
    --cc=fedor_pikus@mentorg.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.