From owner-freebsd-multimedia@FreeBSD.ORG Mon Apr 18 08:09:10 2005 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DE0516A4CE for ; Mon, 18 Apr 2005 08:09:10 +0000 (GMT) Received: from ylpvm43.prodigy.net (ylpvm43-ext.prodigy.net [207.115.57.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0ADA143D5D for ; Mon, 18 Apr 2005 08:09:10 +0000 (GMT) (envelope-from julian@elischer.org) Received: from pimout2-ext.prodigy.net (pimout2-ext.prodigy.net [207.115.63.101])j3I89BlA014879 for ; Mon, 18 Apr 2005 04:09:11 -0400 X-ORBL: [68.124.205.128] Received: from [192.168.2.2] (adsl-68-124-205-128.dsl.snfc21.pacbell.net [68.124.205.128])j3I894cU267296; Mon, 18 Apr 2005 04:09:08 -0400 Message-ID: <42636B1C.3090402@elischer.org> Date: Mon, 18 Apr 2005 01:09:00 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050214 X-Accept-Language: en, hu MIME-Version: 1.0 To: Mathew Kanner References: <20050417172014.GM2178@cnd.mcgill.ca> In-Reply-To: <20050417172014.GM2178@cnd.mcgill.ca> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-multimedia@freebsd.org Subject: Re: please test uaudio capabilities patch X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2005 08:09:10 -0000 Mathew Kanner wrote: > Hi All, > The following patch changes the driver to probe the > capabilities. With this patch I can run mplayer with a non-native > speed or format and the internal soft-mixer will get the right > chain. Without the patch, I get stuck and I have to disconnect. > > I'm going to commit this soon. This is is against HEAD post my > commit to de-dma the driver. > > --Mat > > the code removed below was added by me yesterday to allow my usb microphone to work. it no longer works with this patch. uaudio0: Logitech product 0x08b1, rev 1.10/0.00, addr 2 uaudio0: audio rev 1.00 pcm1: on uaudio0 jules# cat /dev/sndstat FreeBSD Audio Driver (newpcm) Installed devices: pcm0: port 0x1400-0x14ff irq 5 at device 8.0 on pci0 (4p/1r/0v channels duplex default) pcm1: kld snd_uaudio (mixer only) jules# yesterday (without your change) it created and audio1.0 device which I could record from (though I think the format was wrong as it sounded bad) today it fails to make any device.. note.. the device has only input endpoints and configs.. it's a microphone it has an audio 'mixer' interface as well but that seems to have been found. > @@ -76,20 +72,6 @@ > ch->dir = dir; > > pa_dev = device_get_parent(sc->sc_dev); > - /* Create ua_playfmt[] & ua_recfmt[] */ > - uaudio_query_formats(pa_dev, (u_int32_t *)&ua_playfmt, (u_int32_t *)&ua_recfmt); > - if (dir == PCMDIR_PLAY) { > - if (ua_playfmt[0] == 0) { > - printf("play channel supported format list invalid\n"); > - return NULL; > - } > - } else { > - if (ua_recfmt[0] == 0) { > - printf("record channel supported format list invalid\n"); > - return NULL; > - } > - > - } > > ch->buf = malloc(sc->bufsz, M_DEVBUF, M_NOWAIT); > if (ch->buf == NULL) > @@ -133,6 +115,9 @@