From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 13 00:07:47 2007 Return-Path: X-Original-To: freebsd-multimedia@freebsd.org Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 025CA16A402 for ; Tue, 13 Mar 2007 00:07:47 +0000 (UTC) (envelope-from billington.chris@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by mx1.freebsd.org (Postfix) with ESMTP id 8E89C13C4BB for ; Tue, 13 Mar 2007 00:07:46 +0000 (UTC) (envelope-from billington.chris@gmail.com) Received: by nf-out-0910.google.com with SMTP id k27so2126850nfc for ; Mon, 12 Mar 2007 17:07:45 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=e38iZcGJWJmyRAV6bgZcQm9evnUaTHqpf4U19GIdQibX++S9r1oCX4eFBqiMd5WtXVC4ZUona0B7ROff7yseZqmLS1TiVUskUbbEwfrQ5b+y3kPIri07P084NGlMQeHmC12pJDumFdPNdj7XF0kGTcLZ0VEv6QVV0QCJwZWnkP8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ndyT5hnF5g3NOpSssggpgFvoqnB9wgDWR9mu3XuorUCKpZY1Z5V34d5c0iJ1l0Vlos4tkOFG0xTVFPZCaj1Z8+HGdwYQT1eiWhOTd0GFK43wboTdEEzSV6wpHh7+01YyhL56+RYaYjs+yIBOajmFLW02eg7bUfkEOFw9hVRiCBE= Received: by 10.114.153.18 with SMTP id a18mr2167732wae.1173744464182; Mon, 12 Mar 2007 17:07:44 -0700 (PDT) Received: by 10.115.17.6 with HTTP; Mon, 12 Mar 2007 17:07:44 -0700 (PDT) Message-ID: <6d0bead20703121707u395188ebh67bc7df843bf0a5b@mail.gmail.com> Date: Tue, 13 Mar 2007 01:07:44 +0100 From: "Chris Billington" To: freebsd-multimedia@freebsd.org In-Reply-To: <6d0bead20703110610y60a4ba9fl69a7e566535bb294@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6d0bead20703110610y60a4ba9fl69a7e566535bb294@mail.gmail.com> Subject: Re: Mic boost (igain) for uaudio X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2007 00:07:47 -0000 On 3/11/07, Chris Billington wrote: > Hi, > > I use a USB audio device (phone handset) for VOIP on 6.2-stable. > > The audio from the USB device is really low level- correspondents can > hardly hear me. > > The uaudio0 device appears as /dev/dsp1.0, /dev/dsp1.1, etc: > > /dev/dsp1.0 /dev/dsp1.2 /dev/dsp1.4 > /dev/dsp1.1 /dev/dsp1.3 /dev/dsp1.5 > > dmesg|grep pcm: > > dmesg|grep pcm > timer: 0x000100ef therm: 0x00010000 err: 0x0001000f pcm: 0x00010000 > pcm0: port 0xe000-0xe0ff,0xe400-0xe43f mem > 0xffe3fc00-0xffe3fdff,0xffe3f800-0xffe3f8ff irq 17 at device 30.2 on > pci0 > pcm0: Reserved 0x200 bytes for rid 0x18 type 3 at 0xffe3fc00 > pcm0: Reserved 0x100 bytes for rid 0x1c type 3 at 0xffe3f800 > pcm0: [MPSAFE] > pcm0: > pcm0: Codec features 5 bit master volume, no 3D Stereo Enhancement > pcm0: Primary codec extended features reserved 1, center DAC, surround > DAC, LFE DAC, reserved 5 > pcm0: ac97 codec dac ready count: 0 > pcm0: sndbuf_setmap 1e469000, 4000; 0xd4f49000 -> 1e469000 > pcm0: sndbuf_setmap 1e45f000, 4000; 0xd4f4d000 -> 1e45f000 > pcm0: measured ac97 link rate at 47997 Hz, will use 48000 Hz > pcm1: on uaudio0 > pcm1: using a default buffer size of 16384 bytes > > # cat /dev/sndstat > FreeBSD Audio Driver (newpcm) > Installed devices: > pcm0: at io 0xffe3fc00, 0xffe3f800 irq 17 bufsz > 16384 kld snd_ich (1p/1r/4v channels duplex default) > pcm1: at ? kld snd_uaudio (1p/1r/4v channels duplex) > > > For the onboard audio I can set mic boost on (I think, looking at ac97.c) bu > # mixer -f /dev/dsp0 igain 100 > Setting the mixer igain from 100:100 to 100:100. > > However for the /dev/dsp1 I get: > > # mixer -f /dev/dsp1 igain 100 > mixer: unknown device: igain > usage: mixer [-f device] [-s | -S] [dev [+|-][voll[:[+|-]volr]] ... > mixer [-f device] [-s | -S] recsrc ... > mixer [-f device] [-s | -S] {^|+|-|=}rec rdev ... > devices: pcm, mic > rec devices: > > The usb audio device appears to mixer (and kmixer, etc) as two output > channels pcm and mic. > > Is there any way to add igain (20dB mic boost) for USB audio? > > regards > Chris > To answer my own question, probably no, since there is no such channel on uaudio like there is in ac97. I made a small patch to the Twinkle SIP phone app to add 20dB of gain to the mic channel before it goes to the codec, and audio quality is now fine. Chris