From owner-freebsd-multimedia@FreeBSD.ORG Sat Jan 14 12:27:44 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 7BE18106564A; Sat, 14 Jan 2012 12:27:44 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id D91058FC12; Sat, 14 Jan 2012 12:27:43 +0000 (UTC) Received: by eeke53 with SMTP id e53so892349eek.13 for ; Sat, 14 Jan 2012 04:27:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=1/3W/r7jdoQqDNQDLU/FOvCoZtNornIuZo/jPb12H+A=; b=W0Jxp+Fy9fygRZbHtL2nHie+juM89WsIvGxwfbQyBI32aR5cwfI4lxFGpfSDquVODU dROn3oCAp+7c+aSfv20ycfQTMD1V3UVLjVOlojbdPw+9nakYsKPY3MWqvCf2dVbwIXMv 13Z433q2SwTHuGViWVRlJHDtowsbim9d/R11w= Received: by 10.213.28.205 with SMTP id n13mr601790ebc.97.1326544062053; Sat, 14 Jan 2012 04:27:42 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id 76sm43201328eeh.0.2012.01.14.04.27.39 (version=SSLv3 cipher=OTHER); Sat, 14 Jan 2012 04:27:40 -0800 (PST) Sender: Alexander Motin Message-ID: <4F1174B1.9050006@FreeBSD.org> Date: Sat, 14 Jan 2012 14:27:29 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111112 Thunderbird/8.0 MIME-Version: 1.0 To: Michael Schnell References: <4F0DE3FD.2020203@FreeBSD.org> <20120112121853.GC1429@procyon.xvoid.org> <4F0ED8D0.8080403@FreeBSD.org> <20120112130404.GD1429@procyon.xvoid.org> In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Yuri Pankov , 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 12:27:44 -0000 On 14.01.2012 04:10, Michael Schnell wrote: > > On Thu, 12 Jan 2012, Yuri Pankov wrote: > >> On Thu, Jan 12, 2012 at 02:57:52PM +0200, Alexander Motin wrote: >>> On 01/12/12 14:18, Yuri Pankov wrote: >>>> On Wed, Jan 11, 2012 at 09:33:17PM +0200, Alexander Motin wrote: >>>>> I would like request for testing of my work on further HDA sound >>>>> driver >>>>> improvement. >>>> [...] >>>>> 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. >>>> >>>> Patch applied cleanly to r230008 using `svn patch`. >>>> >>>> hdacc0: at cad 0 on hdac0 >>>> hdaa0: at nid 1 on hdacc0 >>>> pcm0: at nid 5 on hdaa0 >>>> hdacc1: at cad 1 on hdac0 >>>> hdaa1: at nid 1 on hdacc1 >>>> pcm1: at nid 5 on hdaa1 >>>> hdacc2: at cad 2 on hdac0 >>>> hdaa2: at nid 1 on hdacc2 >>>> pcm2: at nid 5 on hdaa2 >>>> hdacc3: at cad 3 on hdac0 >>>> hdaa3: at nid 1 on hdacc3 >>>> pcm3: at nid 5 on hdaa3 >>>> hdacc4: at cad 0 on hdac1 >>>> hdaa4: at nid 1 on hdacc4 >>>> pcm4: at nid 13 and 11 on hdaa4 >>>> pcm5: at nid 15 and 24 on hdaa4 >>>> pcm6: at nid 30 on hdaa4 >>>> >>>> pcm4 (builtin speakers) and pcm5 (headphones) seem to work fine, >>>> however >>> >>> Thank you. >>> >>>> I'm not getting anything out of pcm0-pcm3 (connected to a TV via HDMI), >>>> mplayer just pauses at the beggining, trying to cat anything to >>>> /dev/dsp{0-3}.0 gives: >>>> >>>> pcm0: chn_write(): pcm0:virtual:dsp0.vp0: play interrupt timeout, >>>> channel dead >>>> >>>> It was the same with the old driver and I'm not sure if it's (most >>>> likely) my misconfiguration or a driver problem. >>> >>> It sounds more like a driver problem. HDMI audio is still not very well >>> discovered area, and, according to ALSA reading, NVidia HDMI is also not >>> very standard. Probably I'll finally have to buy something to >>> experiment. What card do you have? >> >> It's a laptop with "nVidia Corporation GT216 [GeForce GT 230M]" (as >> identified by x11/nvidia-driver). >> >> The verbose dmesg is at: >> >> https://www.xvoid.org/stuff/spica.dmesg > > I had the same problem for some time and I was going over the code and > honestly I took some inspiration of how the linux kernel handle this and > added some quirks to the code to get it working. However, after some > time I realize that a sysctl > dev.hdac..0.polling=1 will do something similar and this also works for > me. I don't think this polling mechanism is a good idea, better would be > some interrupt for state updates but anyway, I was glad that I can here > (digital) music over my receiver with my laptop. I have an NVS 3100M > graphic card and it is connected over a (fragile) Displayport-HDMI adapter. > > I would gladly test this with Alexanders patch, but I only have an > 9.0-RELEASE and I already tried to port the patch back, but this would > take some effort. In addition this is my production system and I already > messed it up enough. ;) I also don't like polling, especially in context of new event timers that are not generating interrupts when not needed. In this patch I haven't even reimplemented polling support while rewriting that part of the code, as for several years since implementing it I haven't seen reports that it was really useful. If it is useful, I'll think of it. -- Alexander Motin