From owner-freebsd-multimedia@FreeBSD.ORG Wed Aug 13 13:00:35 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 9666A1065673 for ; Wed, 13 Aug 2008 13:00:35 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 1BCD28FC12 for ; Wed, 13 Aug 2008 13:00:35 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A565AB.dip.t-dialin.net [84.165.101.171]) by redbull.bpaserver.net (Postfix) with ESMTP id DBCC82E168; Wed, 13 Aug 2008 14:43:26 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 4CDC814E9C7; Wed, 13 Aug 2008 14:43:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1218631404; bh=oHIEu+IGsnKr0I5bnQ6jJe6+jTDUoQGAM rcfjF1SQyU=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=3I2oSZ7L/t3nB1fUIR/U+tFu0AaIzAyvukmIrrn2w/ZH1sTlH/XSGdVP+XB/Y41/K 9v8meRBWcaoO6GdwjTtapiHS1B0ggHogphmdKejk1ii2ZHCWZfxnG52KGt/CJW+/l6F XYWlxXYkiTfaOgbvwspR02iDvhWBgYAWVSDh1MT4YKzmFF8p/Mqdti6JUo6MzTQVZxE JsyxH/RDaRb0UeWhVxiqmBnOcgdtMpONAKay6BH6ZDFgQE/BKbomqUATPqnvT4gYWj/ Xc/mtVG+eH9zTLJkR7i6CaGqe64WRklr/zVrkGXuKWKalBPxlQsUDB2bu5KtTj7ty5u VSGeYECsw== Received: (from www@localhost) by webmail.leidinger.net (8.14.2/8.13.8/Submit) id m7DChNM9048180; Wed, 13 Aug 2008 14:43:23 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Wed, 13 Aug 2008 14:43:23 +0200 Message-ID: <20080813144323.191755ysxy2w38so@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Wed, 13 Aug 2008 14:43:23 +0200 From: "Alexander Leidinger" To: "Alexander Motin" , ariff@FreeBSD.org References: <48A20E02.6070609@FreeBSD.org> In-Reply-To: <48A20E02.6070609@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.2) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: DBCC82E168.15EC1 X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-12.827, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, J_CHICKENPOX_65 0.60, MIME_QP_LONG_LINE 1.40, RDNS_DYNAMIC 0.10, TW_SN 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: freebsd-multimedia@FreeBSD.org 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: Wed, 13 Aug 2008 13:00:35 -0000 Quoting "Alexander Motin" (from Wed, 13 Aug 2008 =20 01:26:10 +0300): > Hi. > > I have made major snd_hda driver rewrite. I will be grateful for =20 > reviews and any positive or negative feedbacks. Have you already asked Ariff for a review? I've CCed him... > Here is my patches: http://people.freebsd.org/~mav/ > > For 8-CURRENT use: > http://people.freebsd.org/~mav/hda.20080812.patch I can not do a technical about this stuff, but I noticed that you use =20 comments to disable code. Please use "#if 0" instead of comments to =20 disable code. I don't cut the rest of the mail in case Ariff hasn't seen it yet. Bye, Alexander. > 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 =20 > Universal Audio Architecture (UAA) specification. UAA gives ability =20 > to avoid most of device-dependent quirks (I have removed most of) =20 > and make driver more friendly to a new hardware, more friendly to =20 > average user by using information written by system integrators and =20 > much more configurable for experienced users. UAA allows driver to =20 > get all configuration information directly from HDA codec and =20 > configure system audio devices according to it. Same time new driver =20 > allows easily override default configuration using device.hints =20 > mechanism. > > Second point of this change was to make driver multichannel. Now =20 > driver supports multiple HDA codecs per controller, multiple =20 > function groups per codec, multiple PCM devices per audio function =20 > group and multiple channels per PCM device (last will be useful if =20 > FreeBSD OSS sometimes will have multichannel support). > > To demonstrate features I can show some operation examples from my =20 > notebook. This is Acer TM6292 with very simple simple Realtek ALC268 =20 > HDA codec. > > 1. Previous driver gave me: > - stereo playback (pcm0) via built in speakers and headphones =20 > without jack sensing; > - recording device (pcm0) from external mic. Built in mic, CD and =20 > line in was dead. > > 2. New driver by default without any quirks gives me: > - stereo playback (pcm0) via built in speakers and headphones with =20 > jack sensing; > - recording device (pcm0) for built in mic (it does working!), line =20 > in and mic in; > - recording device (pcm1) for CD. CD does not working for some =20 > 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 =20 > quadro playback via built in speakers and HP out connector. cad0 =20 > here means codec with ID 0. nid20 means pin with ID 20 - HP out, =20 > seq=3D1 changes pin sequence inside association from 15 to 1 =20 > 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) =20 > for HP connector and second (pcm1) for built in speakers. Record =20 > will stay as before. Here as=3D3 changes built in speakers pin =20 > association number from 1 to 3 separating it completely from HP =20 > output. > > 5. By adding > hint.hdac.0.cad0.nid26.config=3D"as=3D1 seq=3D0 device=3D0" =20 > hint.hdac.0.cad0.nid20.config=3D"as=3D1 seq=3D15" =20 > hint.hdac.0.cad0.nid21.config=3D"as=3D3" it is possible to get two =20 > independent playback devices. First (pcm0) for playback via line in =20 > and HP out connectors with jack sensing in HP connector and line in =20 > connector auto mute. And second (pcm1) for playback via built in =20 > speakers. In this codec line in connector is reversible. String =20 > device=3D0 changes it's description from Line in to Line out forcing =20 > actual direction change. > > Driver allows to build many others usage scenarios. The main =20 > limitation factor is codec functionality. Presented ALC268 is very =20 > simple and restricted one. But I have also successfully tested it on =20 > more powerful AD1988 and there range of possible scenarios is wider =20 > while even default configuration covers all present codec =20 > 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 =20 > verbose logging. Driver prints a lot of usable information there. If =20 > you will send me problem reports add please attach that verbose boot =20 > output and `cat /dev/sndstat` output to your message. > > Thanks. > > --=20 > Alexander Motin > _______________________________________________ > freebsd-multimedia@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia > To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@freebsd.o= rg" > > --=20 An Englishman never enjoys himself, except for a noble purpose. =09=09-- A. P. Herbert http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137