From owner-freebsd-multimedia@FreeBSD.ORG Thu Jan 12 11:11:59 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 EB491106566B; Thu, 12 Jan 2012 11:11:59 +0000 (UTC) (envelope-from mickael.maillot@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8C9B58FC0A; Thu, 12 Jan 2012 11:11:58 +0000 (UTC) Received: by qabj34 with SMTP id j34so265457qab.13 for ; Thu, 12 Jan 2012 03:11:58 -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=E8YRtad4dtbhr0HEaZZ6tFE2FcCPFL+yOMA6j0gMrKA=; b=DXvT14DkiPhw77hjK7RKex9qbYaERzXKhDIRCYyEhzqEk1goz8n+MskJTOGJzTxIXB 2GhhSueFWcZ/wZx3J6S2CEjnwJ5XAWnIEvegZyBXL+oGe843yUZ5eyAcN8eDXakLzc1b KdI7fVilM0kLzy/Xzozn809FBje1ClQG3TCSE= MIME-Version: 1.0 Received: by 10.224.214.201 with SMTP id hb9mr4528904qab.86.1326365115840; Thu, 12 Jan 2012 02:45:15 -0800 (PST) Received: by 10.229.124.11 with HTTP; Thu, 12 Jan 2012 02:45:15 -0800 (PST) In-Reply-To: <4F0DE3FD.2020203@FreeBSD.org> References: <4F0DE3FD.2020203@FreeBSD.org> Date: Thu, 12 Jan 2012 11:45:15 +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: Thu, 12 Jan 2012 11:12:00 -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! > > Hi, first thank for your work ! i'll try the patch this week end. DisplayPort 8ch : does it mean that we now support 8 channel PCM over DisplayPort and HDMI ? i need this feature for DTS-HDMA and TrueHD with XBMC.