[Alsa-devel] [PATCH] fix composite quirk

2003-01-22 Thread Clemens Ladisch

The first version of the composite quirk would handle the quirk for each
interface when that interface is probed by khubd, but the PCM capture
stream wouldn't get registered correcty if it was added after the PCM
device has been already registered.

This patch handles all interfaces when the first one is probed.
(This means capturing on the SC-D70 may work after all.)


Index: alsa-kernel/usb/usbaudio.c
===
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbaudio.c,v
retrieving revision 1.36
diff -u -r1.36 usbaudio.c
--- alsa-kernel/usb/usbaudio.c  21 Jan 2003 09:52:44 -  1.36
+++ alsa-kernel/usb/usbaudio.c  22 Jan 2003 07:59:01 -
@@ -1954,22 +1954,28 @@
const snd_usb_audio_quirk_t *quirk);

 /*
- * handle the quirk(s) for the current interface
+ * handle the quirks for the contained interfaces
  */
 static int create_composite_quirk(snd_usb_audio_t *chip,
  struct usb_interface *iface,
  const snd_usb_audio_quirk_t *quirk)
 {
-   struct usb_host_interface *alts = iface-altsetting[0];
-   int ifnum = get_iface_desc(alts)-bInterfaceNumber;
+   struct usb_config_descriptor *config = chip-dev-actconfig;
+   int probed_ifnum = get_iface_desc(iface-altsetting)-bInterfaceNumber;
int err;

for (quirk = quirk-data; quirk-ifnum = 0; ++quirk) {
-   if (quirk-ifnum == ifnum) {
-   err = snd_usb_create_quirk(chip, iface, quirk);
-   if (err  0)
-   return err;
-   }
+   if (quirk-ifnum = config-bNumInterfaces)
+   continue;
+   iface = config-interface[quirk-ifnum];
+   if (quirk-ifnum != probed_ifnum 
+   usb_interface_claimed(iface))
+   continue;
+   err = snd_usb_create_quirk(chip, iface, quirk);
+   if (err  0)
+   return err;
+   if (quirk-ifnum != probed_ifnum)
+   usb_driver_claim_interface(usb_audio_driver, iface, (void 
+*)-1);
}
return 0;
 }



---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



Re: [Alsa-devel] configuring for a different architecture

2003-01-22 Thread Takashi Iwai
At 21 Jan 2003 13:32:33 -0800,
Fernando Pablo Lopez-Lezcano wrote:
 
 It would be useful to have an option to force the alsa-driver configure
 script to use a target architecture for the build different from the
 architecture of the running kernel (ie: I'm running a i386 kernel but
 want to build for the same kernel, but with the i686 architecture). 
 
 Or is there a way to do that already that I have missed?

the architecture must be anyway specified in the kernel source tree.
using a different architecture in the alsa-driver configuration will
confuse the compilation, which one should be picked up actually.

please note that the kernel tree doesn't have to be identical with the
one for the running kernel.  you can use a different kernel tree via
--with-kernel option of alsa-driver's configure script.
thus, a solution is to make a mirror of kernel-tree and change
linux/autoconf.h and linux/version.h to reflect the preferred
architecture target.


ciao,

Takashi


---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



[Alsa-devel] Re: [Alsa-user] Upgrade problems -addendum

2003-01-22 Thread Takashi Iwai
(moved to alsa-devel)

At Wed, 22 Jan 2003 16:47:00 +0100,
Tais M. Hansen [EMAIL PROTECTED] wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On Wednesday 22 January 2003 15:50, Takashi Iwai wrote:
   I'm getting a bunch of errors in syslog though. I imagine it's just debug
   output and nothing serious.
  could you enable POINTER_DEBUG at the beginning of via82xx.c?
  this will print more debug lines.
  which application cause these messages?  every application?
  do you notice any drop outs during playback?
 
 I've enabled POINTER_DEBUG and logged ALSA  fail output from syslog. The 
 output is attached in two files. (gzipped)
 
 ogg123:
 I heard a short pop in the sound with each log entry pair; fail  ALSA.
 
 artsd:
 Log entries only occured when starting/resuming or suspending/killing artsd. 
 Tried playing for a while with noatun and I didn't notice any pops or other 
 anomalies.

could you test the following two patches?
with the first one, the driver will calculate the current pointer like
VIA686 does.  if this is ok, no messages will appear.

the second one is to force to increase the index.  you'll see debug
messages, anyway, if POINTER_DEBUG is defined.


Takashi



via-pointer-test.dif
Description: Binary data


via-pointer-test2.dif
Description: Binary data


[Alsa-devel] ES1968 problem

2003-01-22 Thread Tapio Kelloniemi
Hi

I quickly checked open bugs from SourceForge and noticed that this one was
reported, though more than a year ago. I'm not sure it is open, but it
seems so, SourceForge is not Lynx friendly.

The problem is this: When recording (2 or more channels, only 2 are
supported by card) with my cursed, integrated ESS
Maestro-2E card I get regularly short clicks on the left channel. Right
chanel is OK. If recording in mono, I get clicks too. When using OSS
emulation, recording produces only garbage, at least when using SOX. I have
a laptop computer and only plug for a microphone, though it seems that this
problem doesn't have anything to do with it. Changing mixer settings
doesn't change anything. When I used real OSS, there was no problem.

I would like to know, if it is possible to get rid of this problem. Also,
if it will be fixed or if anybody is interested?

Thanks!

-- 
Tapio



---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



[Alsa-devel] alsa-lib resamping error

2003-01-22 Thread Paul Davis
if you try to play a 22.05kHz stream on hardware that supports 32kHz
and 44.1kHz but not 22.05kHz, alsa-lib's plughw layer chooses to use
32kHz and resamples. this seems like an error to me: it would be much
better to choose 44.1kHz and do simple integer resampling. that is:
the search for the best rate should first try integer multiples and
divisors of the desired rate, not the closest rate.

--p


---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



Re: [Alsa-devel] hdsp multiface pci.

2003-01-22 Thread Paul Davis
This would explain why snd_hdsp works (i.e. you can playback and
record through the default I/O), although amixer doesn't do anything:
the driver doesn't have to set up any default connections, because
those are part of the FPGA reset state.  I would be surprised if

actually, the driver does have to set up default connections, which
are zero gain for every possible routing unless the line_outs_monitor
option is set to a non-zero value. in that case, all h/w input streams
and all s/w playback streams are routed at unity gain to the two line
out channels, with stereo assignment following an odd-left,
even-right mapping.

as i've told mark independently, the hdsp-9652 has different register
assignments for the mixer, and until recently i did not have that
information from rme. the hdsp-9652 effectively has no mixer at this
time on linux.

--p


---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



Re: [Alsa-devel] hdsp multiface pci.

2003-01-22 Thread Roger Williams
 Paul Davis [EMAIL PROTECTED] writes:

   This would explain why snd_hdsp works (i.e. you can playback and
   record through the default I/O), although amixer doesn't do
   anything: the driver doesn't have to set up any default
   connections, because those are part of the FPGA reset state...

   actually, the driver does have to set up default connections,
   which are zero gain for every possible routing...

Yes, I understand that that's what the driver is _supposed_ to do.
That's how it works on my HDSP PCI and Cardbus systems.  But isn't it
true that the current driver doesn't actually set up any of those
zero-gain connections for the HDSP 9652?

This is the only point that I was trying to make to Mark -- the
default unity-gain connections (i.e. playback - H/W output) that he
has been using are FPGA configuration defaults, not explicitly set up
by the driver.

-- 
Roger Williams [EMAIL PROTECTED]
Qux Tool  Die, Middleborough, Massachusetts
// Omne tulit punctum qui misquit utile dulci //


---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



RE: [Alsa-devel] hdsp multiface pci.

2003-01-22 Thread Mark Knecht


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Roger
 Williams
 Sent: Wednesday, January 22, 2003 10:31 AM
 To: Paul Davis
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [Alsa-devel] hdsp multiface pci.


  Paul Davis [EMAIL PROTECTED] writes:

This would explain why snd_hdsp works (i.e. you can playback and
record through the default I/O), although amixer doesn't do
anything: the driver doesn't have to set up any default
connections, because those are part of the FPGA reset state...

actually, the driver does have to set up default connections,
which are zero gain for every possible routing...

 Yes, I understand that that's what the driver is _supposed_ to do.
 That's how it works on my HDSP PCI and Cardbus systems.  But isn't it
 true that the current driver doesn't actually set up any of those
 zero-gain connections for the HDSP 9652?

 This is the only point that I was trying to make to Mark -- the
 default unity-gain connections (i.e. playback - H/W output) that he
 has been using are FPGA configuration defaults, not explicitly set up
 by the driver.


Yes, and I think I understood that this was probably what was happening as
our conversation progressed. When I made that statement it was a bit earlier
on, if I remember correctly, and I was explaining my 'vision' of what I
thought was going on. That should not be confused with the trusth! ;-)

It makes perfect sense that the RME card itself has some default
connections.

Thanks,
Mark



---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



[Alsa-devel] Re: [Alsa-user] Upgrade problems -addendum

2003-01-22 Thread Tais M. Hansen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wednesday 22 January 2003 17:23, Takashi Iwai wrote:
 could you test the following two patches?
 with the first one, the driver will calculate the current pointer like
 VIA686 does.  if this is ok, no messages will appear.

The first patch makes artsd freeze the computer for about 10-20 seconds and 
then aborts with a cpu overload message. ogg123 sometimes plays noise when 
starting while speeding through the ogg-file, sometimes it plays normally. 
Only ogg123 generated output in syslog which I've attached in 
alsa-ogg123-syslog-p1.txt.gz.


 the second one is to force to increase the index.  you'll see debug
 messages, anyway, if POINTER_DEBUG is defined.

First, removing first patch and applying the second patch. Ogg123 freezes when 
started with no sound and a lot of errors. Ctrl-C is caught after about 10 
secs. Syslog output is attached in alsa-ogg123-syslog-p2.txt.gz. Artsd starts 
but keep looping a short random piece of noise. No sound can be played/heard 
when played. Killing artsd produces the output attached in 
alsa-artsd-syslog-p2.txt.gz.

Applying both patches. Ogg123 and artsd behaves like when only the first patch 
was applied. I let ogg123 run a little longer and noticed that sometimes 
about half a second noise where played. Syslog errors from using ogg123 this 
time is attached in alsa-ogg123-syslog-p1+p2.txt.gz.

Note: POINTER_DEBUG was defined and the initial patch you sent was applied 
throughout the test.

- -- 
Regards,
Tais M. Hansen
OSD

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.0 (GNU/Linux)

iQIVAwUBPi8464IvLOJqwYc4AQK1Rg//d/KK5N09con1WpRHybusmLzQgCyAJes7
ZacJuyVjC3ZufbvaXWFrDtfP/H5FJp4CnZ0f2wOLj16vrgL5huszWLLUYdUrIGIg
J+HmUlEUydACBO55csHIX9L6LbIPJtlrUHI5JDGTkQ2Tkq3fLnmsgrhjt4FuikDa
mP+sX82Fqduiz5yaOmK9I5f5T8R+hkX/F0TkT/nBUDnZODKPGDwfe2NXvECXLS8i
p0cWyx4GZWZ3CrOghDz1+sqFNg3x3Emf+iX9VcF4a56RLUcDRoTkoLLyOyG2oXHs
HeyPjJValZRZ5K/O9R9XVRFqAqS7haI0lPykIb3QVekTa31D7cU/sWgyrG6/g2RB
Z7EViUL1hVa8hIgOQsSzfMHneu3CDQxaayXsYr6waNiu/jx2+ieRemQDq6nCJuSd
v+30YvOO5hJ4f3f5ix/PtG3Wq6B5mpPhtNWVzW/10V4jkB/3rjBiY4WSuDi4QX/8
WZz4J5tm9sxlwTu/es353FVxstvP9r5I8aB+82ontsEiSljrLrgWeiTiiY6Ucf30
lo3mUDmIz8Puif0d/3zOw9M2fu/szzSsyJimaJ61s/+slS2olUH+jE7FnKOoRmBt
tI4MvSxdW0W+j0U5VrlRP7YbsGN+ebRn3DzQ4Q7pyd6Fkk0+sagHEFsrRuMyifKg
pxf42L/p8YA=
=s6sT
-END PGP SIGNATURE-



alsa-ogg123-syslog-p1.txt.gz
Description: GNU Zip compressed data


alsa-artsd-syslog-p2.txt.gz
Description: GNU Zip compressed data


alsa-ogg123-syslog-p2.txt.gz
Description: GNU Zip compressed data


alsa-ogg123-syslog-p1+p2.txt.gz
Description: GNU Zip compressed data