From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Experimental USB audio support Date: Mon, 03 Jun 2002 17:35:58 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <3CF5B58B.59E5A233@boosthardware.com> <3CF74113.46D53687@boosthardware.com> <3CF76495.927DAC4C@boosthardware.com> <3CFB0439.8E0367E7@boosthardware.com> Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: multipart/mixed; boundary="Multipart_Mon_Jun__3_17:35:58_2002-1" Return-path: In-Reply-To: <3CFB0439.8E0367E7@boosthardware.com> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Patrick Shirkey Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Mon_Jun__3_17:35:58_2002-1 Content-Type: text/plain; charset=US-ASCII At Mon, 03 Jun 2002 14:52:57 +0900, Patrick Shirkey wrote: > > Takashi Iwai wrote: > > > > At Fri, 31 May 2002 20:55:01 +0900, > > Patrick Shirkey wrote: > > > > > > Takashi Iwai wrote: > > > > > > > > now a new version is cvs. it dumps the descriptor at > > > > /proc/asound/cardX/descriptor. if the cvs servers is not sync'ed, > > > > please let me know. i'll send you a patch. > > > > > > > > > > With this patch there is *alot * more info in lsusb. Excellent work. > > > > as you already know, it's not me but the update of usb modules :) > > > > anyway, could you check again whether the driver works? > > just taking a look at the lsusb output, the device has no mixer units. > > there are only input/output terminals. > > so, don't be bothered even if you see no mixer controls. > > > > Takashi > > So far I cannot get sound out using > > cat /bin/bash > dev/dsp2 > aplay -D hw:2,0 -f cd some.wav > > both return with device does not exist or similar please apply the attached patch and build the modules with --with-debug=detect option. if a pcm is to be created, then it shouls something. or it will show an error message and the reason. sorry, i have no time today - will take a deeper look at tomorrow. btw, creation of pcm devices is independent from mixer devices. so, i'm wondering why, too... the descriptor info is necessary to build and look up pcms and controls for alsa. basically the usb descriptor includes _all_ necessary information to get the driver work. ciao, Takashi --Multipart_Mon_Jun__3_17:35:58_2002-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="usb-msg-fix.dif" Content-Transfer-Encoding: 7bit Index: alsa-driver/usb/usbaudio.c =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-driver/usb/usbaudio.c,v retrieving revision 1.5 diff -u -r1.5 usbaudio.c --- alsa-driver/usb/usbaudio.c 31 May 2002 17:00:48 -0000 1.5 +++ alsa-driver/usb/usbaudio.c 3 Jun 2002 15:31:58 -0000 @@ -1256,6 +1256,9 @@ subs->formats |= SNDRV_PCM_FMTBIT_MU_LAW; pcm_format = SNDRV_PCM_FORMAT_MU_LAW; break; + default: + snd_printk(KERN_INFO "%d:%u:%d : unsupported format type %d\n", format); + break; } if (pcm_format < 0) @@ -1513,20 +1516,20 @@ for (i = 0; i < p1[7]; i++) { j = p1[8 + i]; if (j >= config->bNumInterfaces) { - snd_printk(KERN_DEBUG "%d:%u:%d : does not exist\n", + snd_printk(KERN_ERR "%d:%u:%d : does not exist\n", dev->devnum, ctrlif, j); continue; } iface = &config->interface[j]; if (iface->altsetting[0].bInterfaceClass != USB_CLASS_AUDIO || iface->altsetting[0].bInterfaceSubClass != 2) { - snd_printk(KERN_DEBUG "non-supported interface %d\n", iface->altsetting[0].bInterfaceClass); + snd_printdd(KERN_ERR "%d:%u:%d: skipping non-supported interface %d\n", dev->devnum, ctrlif, j, iface->altsetting[0].bInterfaceClass); /* skip non-supported classes */ continue; } if (iface->num_altsetting < 2) { - snd_printk(KERN_DEBUG "%d:%u:%d : no valid interface.\n", - dev->devnum, ctrlif, j); + snd_printdd(KERN_ERR "%d:%u:%d: skipping - no valid interface.\n", + dev->devnum, ctrlif, j); continue; } if (iface->altsetting[0].bNumEndpoints > 0) { @@ -1549,11 +1552,13 @@ ep to be ep1, which seems to be the case */ if (iface->altsetting[1].endpoint[0].bEndpointAddress & USB_DIR_IN) { if (numifin < USB_MAXINTERFACES) { + snd_printdd(KERN_INFO "adding an input interface %d:%u:%j\n", dev->devnum, ctrlif, j); ifin[numifin++] = j; usb_driver_claim_interface(&usb_audio_driver, iface, (void *)-1); } } else { if (numifout < USB_MAXINTERFACES) { + snd_printdd(KERN_INFO "adding an output interface %d:%u:%j\n", dev->devnum, ctrlif, j); ifout[numifout++] = j; usb_driver_claim_interface(&usb_audio_driver, iface, (void *)-1); } --Multipart_Mon_Jun__3_17:35:58_2002-1-- _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm