From owner-freebsd-multimedia@FreeBSD.ORG Thu Aug 14 17:08:09 2008 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 431721065678 for ; Thu, 14 Aug 2008 17:08:09 +0000 (UTC) (envelope-from eculp@encontacto.net) Received: from ns2.bafirst.com (72-12-2-19.static.networktel.net [72.12.2.19]) by mx1.freebsd.org (Postfix) with ESMTP id 010478FC0C for ; Thu, 14 Aug 2008 17:08:08 +0000 (UTC) (envelope-from eculp@encontacto.net) Received: from HOME.encontacto.net ([189.190.8.164]) by ns2.bafirst.com with esmtp; Thu, 14 Aug 2008 12:08:06 -0500 id 000D544B.48A46676.0000ED90 Received: from localhost (localhost [127.0.0.1]) (uid 80) by HOME.encontacto.net with local; Thu, 14 Aug 2008 12:08:04 -0500 id 0004AC1D.48A46674.0000CC34 Received: from 172.16.0.7 (172.16.0.7 [172.16.0.7]) by econet.encontacto.net (Horde Framework) with HTTP; Thu, 14 Aug 2008 12:08:04 -0500 Message-ID: <20080814120804.58926z73nlr9d9oo@econet.encontacto.net> Date: Thu, 14 Aug 2008 12:08:04 -0500 From: eculp To: freebsd-multimedia@freebsd.org References: <48A20E02.6070609@FreeBSD.org> <1218665493.1899.4.camel@wombat.2hip.net> In-Reply-To: <1218665493.1899.4.camel@wombat.2hip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (5.0-cvs) X-Remote-Browser: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.16) Gecko/20080803 Firefox/2.0.0.16 X-IMP-Server: 189.190.8.164 X-Originating-IP: 201.155.7.3 X-Originating-User: eculp@encontacto.net Subject: Re: RFC: massive snd_hda driver update to better conform UAA specification 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: Thu, 14 Aug 2008 17:08:09 -0000 Quoting Robert Noland : > On Wed, 2008-08-13 at 01:26 +0300, Alexander Motin wrote: >> Hi. >> >> I have made major snd_hda driver rewrite. I will be grateful for reviews >> and any positive or negative feedbacks. >> >> Here is my patches: http://people.freebsd.org/~mav/ >> >> For 8-CURRENT use: >> http://people.freebsd.org/~mav/hda.20080812.patch Yesterday I found time to test the patch and I am blown away. =20 Everything sound related COMPLETELY works for the first time since I =20 bought this Acer Aspire 5520-5679. Connecting my headset EVEN blocks =20 the speakers. That has never worked. FANTASTIC. THANKS for your =20 work. I have even added the patch to my script for building and =20 installing world and kernel in FreeBSD current 8 automatically until =20 it is commited. I would appreciate someone posting on the list when =20 that happens. The following is general info on my sound card with the patch applied. hdac0: mem =20 0xd0880000-0xd0883fff irq 21 at device 7.0 on pci0 hdac0: DMA Coherency: Uncacheable / vendor=3D0x10de hdac0: Reserved 0x4000 bytes for rid 0x10 type 3 at 0xd0880000 hdac0: [MPSAFE] hdac0: [ITHREAD] hdac0: hdac_dma_alloc: size=3D1024 -> roundsz=3D1024 hdac0: hdac_dma_alloc: size=3D2048 -> roundsz=3D2048 hdac0@pci0:0:7:0: class=3D0x040300 card=3D0x01261025 chip=3D0x055c10de= =20 rev=3D0xa1 hdr=3D0x00 vendor =3D 'Nvidia Corp' class =3D multimedia # cat /dev/sndstat FreeBSD Audio Driver (newpcm: 32bit 2007061600/i386) Installed devices: pcm0: at hdac0 cad 0 kld snd_hda =20 [20080812_0000] [GIANT] (1p:1v/1r:1v channels duplex default) pcm1: at hdac0 cad 0 kld snd_hda =20 [20080812_0000] [MPSAFE] (1p:1v/1r:1v channels duplex) Mixer vol is currently set to 100:100 Mixer pcm is currently set to 100:100 Mixer speaker is currently set to 100:100 Mixer line is currently set to 100:100 Mixer mic is currently set to 50:50 Mixer rec is currently set to 100:100 Mixer ogain is currently set to 80:80 Mixer monitor is currently set to 100:100 Thanks again. ed > > Nice work, applied to -CURRENT on my Dell D630 with no apparent > regressions. I'll attach the verbose dmesg. It seems that I now have a > monitor device which looks like it is the built in mic. > > wombat% mixer > Mixer vol is currently set to 75:75 > Mixer pcm is currently set to 75:75 > Mixer speaker is currently set to 75:75 > Mixer rec is currently set to 0:0 > Mixer monitor is currently set to 75:75 > > robert. > >> For 7-STABLE try (I have no place to test it, but it builds): >> http://people.freebsd.org/~mav/hda.7.20080812.patch >> >> The main point of this change was to make driver conforming Universal >> Audio Architecture (UAA) specification. UAA gives ability to avoid most >> of device-dependent quirks (I have removed most of) and make driver more >> friendly to a new hardware, more friendly to average user by using >> information written by system integrators and much more configurable for >> experienced users. UAA allows driver to get all configuration >> information directly from HDA codec and configure system audio devices >> according to it. Same time new driver allows easily override default >> configuration using device.hints mechanism. >> >> Second point of this change was to make driver multichannel. Now driver >> supports multiple HDA codecs per controller, multiple function groups >> per codec, multiple PCM devices per audio function group and multiple >> channels per PCM device (last will be useful if FreeBSD OSS sometimes >> will have multichannel support). >> >> To demonstrate features I can show some operation examples from my >> notebook. This is Acer TM6292 with very simple simple Realtek ALC268 HDA >> codec. >> >> 1. Previous driver gave me: >> - stereo playback (pcm0) via built in speakers and headphones without >> jack sensing; >> - recording device (pcm0) from external mic. Built in mic, CD and line >> in was dead. >> >> 2. New driver by default without any quirks gives me: >> - stereo playback (pcm0) via built in speakers and headphones with >> jack sensing; >> - recording device (pcm0) for built in mic (it does working!), line in >> and mic in; >> - recording device (pcm1) for CD. CD does not working for some unknown >> reason, I think it may be just not implemented in hardware. >> >> 3. By adding to the loader.conf string >> hint.hdac.0.cad0.nid20.config=3D"seq=3D1" >> it will be possible (when OSS will have multichannel support) to get >> quadro playback via built in speakers and HP out connector. cad0 here >> means codec with ID 0. nid20 means pin with ID 20 - HP out, seq=3D1 >> changes pin sequence inside association from 15 to 1 effectively >> disabling redirection making HP out independent. >> >> 4. By adding >> hint.hdac.0.cad0.nid20.config=3D"seq=3D1" >> hint.hdac.0.cad0.nid21.config=3D"as=3D3 seq=3D1" >> it is possible to get two independent playback devices. One (pcm0) for >> HP connector and second (pcm1) for built in speakers. Record will stay >> as before. Here as=3D3 changes built in speakers pin association number >> from 1 to 3 separating it completely from HP output. >> >> 5. By adding >> hint.hdac.0.cad0.nid26.config=3D"as=3D1 seq=3D0 device=3D0" >> >> hint.hdac.0.cad0.nid20.config=3D"as=3D1 seq=3D15" >> >> hint.hdac.0.cad0.nid21.config=3D"as=3D3" >> >> it is possible to get two independent playback devices. First (pcm0) for >> playback via line in and HP out connectors with jack sensing in HP >> connector and line in connector auto mute. And second (pcm1) for >> playback via built in speakers. In this codec line in connector is >> reversible. String device=3D0 changes it's description from Line in to >> Line out forcing actual direction change. >> >> Driver allows to build many others usage scenarios. The main limitation >> factor is codec functionality. Presented ALC268 is very simple and >> restricted one. But I have also successfully tested it on more powerful >> AD1988 and there range of possible scenarios is wider while even default >> configuration covers all present codec functionality. >> >> More information about UAA you can find at: >> http://www.microsoft.com/whdc/device/audio/default.mspx >> >> If you will have any questions/problems boot your system with verbose >> logging. Driver prints a lot of usable information there. If you will >> send me problem reports add please attach that verbose boot output and >> `cat /dev/sndstat` output to your message. >> >> Thanks. >> >> -- >> Alexander Motin >> _______________________________________________ >> freebsd-multimedia@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia >> To unsubscribe, send any mail to =20 >> "freebsd-multimedia-unsubscribe@freebsd.org" >