From owner-freebsd-multimedia@FreeBSD.ORG Sat Jan 14 19:52:23 2012 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 975B81065673; Sat, 14 Jan 2012 19:52:23 +0000 (UTC) (envelope-from mickael.maillot@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 232ED8FC08; Sat, 14 Jan 2012 19:52:22 +0000 (UTC) Received: by qcse1 with SMTP id e1so34905qcs.13 for ; Sat, 14 Jan 2012 11:52:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=m/TbA7HWZqi1HBMXYNp+vwDc5bQP5rIXTLlNFZJkadQ=; b=IKENjV8ShSOiWsh8gTIKNeD9MR29QmC8Oak/3vGwsxKZtDmNyc3JEiBkp3tWu5ESzH FoH6/oSgHlcuFNmIZsTmiSaIE5aMRPoB4L4iKjl+TguknyrykQGVpihv6fko6uRxrK6l YL3LAV8s0mHG6rUwoBjoS40uGezo35g4Y9PIc= MIME-Version: 1.0 Received: by 10.229.77.73 with SMTP id f9mr2280339qck.76.1326570740359; Sat, 14 Jan 2012 11:52:20 -0800 (PST) Received: by 10.229.124.11 with HTTP; Sat, 14 Jan 2012 11:52:20 -0800 (PST) In-Reply-To: <4F0DE3FD.2020203@FreeBSD.org> References: <4F0DE3FD.2020203@FreeBSD.org> Date: Sat, 14 Jan 2012 20:52:20 +0100 Message-ID: From: =?ISO-8859-1?Q?Micka=EBl_Maillot?= To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-multimedia@freebsd.org, FreeBSD current Subject: Re: [RFT] Major snd_hda rewrite 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: Sat, 14 Jan 2012 19:52:23 -0000 2012/1/11 Alexander Motin > Hi. > > I would like request for testing of my work on further HDA sound driver > improvement. > > List of changes done this time: > - Huge old hdac driver was split into three independent pieces: HDA > controller driver (hdac), HDA CODEC driver (hdacc) and HDA sudio function > driver (hdaa). All drivers are completely independent and talk to each > other only via NewBus interfaces. Using more NewBus bells and whistles > allows to properly see HDA structure with standard system instruments, such > as `devinfo -v`. Biggest driver file size now is 150K, instead of 240K > before, and the code is much more clean. > - Support for multichannel recording was added. While I've never seen it > configured by default, UAA specification tells that it is possible. Now, as > specification defines, driver checks input associations for pins with > sequence numbers 14 and 15, and if found (usually) -- works as before, > mixing signals together. If it doesn't, it configures input association as > multichannel. I've found some CODECs doing strange things when configured > for multichannel recording, but I've also found successfully working > examples. > - Signal tracer was improved to look for cases where several DACs/ADCs in > CODEC can work with the same audio signal. If such case found, driver > registers additional playback/record stream (channel) for the pcm device. > Having more then one stream allows to avoid vchans use and so avoid extra > conversion to pre-configured vchan rate and sample format. Not many CODECs > allow this, especially on playback, but some do. > - New controller streams reservation mechanism was implemented. That > allows to have more pcm devices then streams supported by the controller > (usually 4 in each direction). Now it limits only number of > _simultaneously_ transferred audio streams, that is rarely reachable and > properly reported if happens. > - Codec pins and GPIO signals configuration was exported via set of > writable sysctls. Another sysctl dev.hdaa.X.reconfig allows to trigger > driver reconfiguration in run-time. The only requirement is that all pcm > devices should be closed at the moment, as they will be destroyed and > recreated. This should significantly simplify process of fixing CODEC > configuration. It should be possible now even to write GUI to do it with > few mouse clicks. > - Driver now decodes pins location and connector type names. In some > cases it allows to hint user where on the system case connectors, related > to the pcm device, are located. Number of channels supported by pcm device, > reported now (if it is not 2), should also make search easier. > - Added fix for digital mic recording on some Asus laptops/netbooks. > > That is how it may look now in dmesg: > > hdac0: mem > 0xf7ef4000-0xf7ef7fff irq 22 at device 27.0 on pci0 > hdacc0: at cad 0 on hdac0 > hdaa0: at nid 1 on hdacc0 > hdacc1: at cad 3 on hdac0 > hdaa1: at nid 1 on hdacc1 > pcm0: at nid 28,29 and 26,30,27 on > hdaa0 > pcm1: at nid 32 on hdaa0 > pcm2: at nid 6 on hdaa1 > > Patch can be found here: > http://people.freebsd.org/~**mav/hda.rewrite.patch > > Patch was generated for 10-CURRENT, but should apply to fresh 9-STABLE and > 8-STABLE branches also. > > Special thanks to iXsystems, Inc. for supporting this work. > > Comments and tests results are welcome! > > to much work for me to get it work on 8-STABLE (missing MFC of r227701, r227849 and other things) so i'll update my htpc to 9-STABLE.