Date: Wed, 13 Aug 2008 14:43:23 +0200 From: "Alexander Leidinger" <Alexander@Leidinger.net> To: "Alexander Motin" <mav@FreeBSD.org>, ariff@FreeBSD.org Cc: freebsd-multimedia@FreeBSD.org Subject: Re: RFC: massive snd_hda driver update to better conform UAA specification Message-ID: <20080813144323.191755ysxy2w38so@webmail.leidinger.net> In-Reply-To: <48A20E02.6070609@FreeBSD.org> References: <48A20E02.6070609@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting "Alexander Motin" <mav@FreeBSD.org> (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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080813144323.191755ysxy2w38so>