From owner-freebsd-multimedia@FreeBSD.ORG Sat Jan 14 15:24:34 2012 Return-Path: Delivered-To: freebsd-multimedia@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 59EF3106566C; Sat, 14 Jan 2012 15:24:34 +0000 (UTC) Date: Sat, 14 Jan 2012 15:24:34 +0000 From: Alexander Best To: Alexander Motin Message-ID: <20120114152434.GA39740@freebsd.org> References: <4F0DE3FD.2020203@FreeBSD.org> <20120112115220.1c32b3e2@ernst.jennejohn.org> <4F0EC17B.8040908@FreeBSD.org> <4F0ED27A.8070600@gwdg.de> <20120114134842.GA34133@freebsd.org> <4F118A98.8020608@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F118A98.8020608@FreeBSD.org> 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 15:24:34 -0000 On Sat Jan 14 12, Alexander Motin wrote: > On 01/14/12 15:48, Alexander Best wrote: > >On Thu Jan 12 12, Rainer Hurling wrote: > >>On 12.01.2012 12:18 (UTC+1), Alexander Motin wrote: > >>>On 01/12/12 12:52, Gary Jennejohn wrote: > >>>>On Wed, 11 Jan 2012 21:33:17 +0200 > >>>>Alexander Motin wrote: > >>>>>I would like request for testing of my work on further HDA sound driver > >>>>>improvement. > >>>> > >>>>[big snip] > >>>> > >>>>>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. > >>>> > >>>>The patch doesn't apply cleanly to r230008; hdac.c.rej is 15661 bytes > >>>>in size (mostly the section which deletes all the manufacturer-specific > >>>>defines at the top of the file). > >>> > >>>That is probably because of $FreeBSD$ macro resolution. Here is version > >>>with present value from 10-CURRENT SVN (sources from CVS or STABLE will > >>>need that patch line modified respectively) and some minor additional > >>>improvements like CODEC ODs and some more sysctls: > >>>http://people.freebsd.org/~mav/hda.rewrite2.patch > > > >maybe you could try silencencing these clang warnings? > > > >/usr/subversion-src/sys/dev/sound/pci/hda/hdaa.c:5707:25: warning: format > >string is not a string literal (potentially insecure) [-Wformat-security] > > snprintf(buf, buflen, chans = "4.0"); > > ^~~~~~~~~~~~~ > >/usr/subversion-src/sys/dev/sound/pci/hda/hdaa.c:5709:25: warning: format > >string is not a string literal (potentially insecure) [-Wformat-security] > > snprintf(buf, buflen, chans = "5.1"); > > ^~~~~~~~~~~~~ > >/usr/subversion-src/sys/dev/sound/pci/hda/hdaa.c:5711:25: warning: format > >string is not a string literal (potentially insecure) [-Wformat-security] > > snprintf(buf, buflen, chans = "7.1"); > > ^~~~~~~~~~~~~~ > >/usr/subversion-src/sys/dev/sound/pci/hda/hdacc.c:563:52: warning: if > >statement has empty body [-Wempty-body] > > if ((child = codec->streams[dir][stream]) != NULL); > > ^ > >4 warning generated. > > > >..i'll report how the changes interact with my system later on. > > Thank you! That variable is not even used now, so I'll just remove that > assignment. I've passed the code through the clang static analyzer at > some point, but probably I've introduced that later. thanks. :) the patch works great for me, too. dmesg -a: hdacc0: at cad 2 on hdac0 hdaa0: at nid 1 on hdacc0 pcm0: at nid 20,22,21,23 and 24,26 on hdaa0 pcm1: at nid 27 and 25 on hdaa0 pcm2: at nid 30 and 31 on hdaa0 cat /dev/sndstat: FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64) Installed devices: pcm0: on hdaa0 (1p:1v/2r:1v) default snddev flags=0x2e6 [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 0x00002108, 0x00000004 interrupts 1274, underruns 0, feed 1274, ready 0 [b:16384/8192/2|bs:16384/8192/2] channel flags=0x2108 {userland} -> feeder_mixer(0x00200010) -> {hardware} pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x1000012c, 0x00000029, pid 927 (musicpd) interrupts 0, underruns 0, feed 1859, ready 65536 [b:0/0/0|bs:65536/8192/8] channel flags=0x1000012c {userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware} [pcm0:record:dsp0.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005 interrupts 0, overruns 0, feed 0, hfree 16384, sfree 16384 [b:16384/8192/2|bs:16384/8192/2] channel flags=0x2100 {hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland} [pcm0:record:dsp0.r1]: spd 8000, fmt 0x00100008, flags 0x00000000, 0x00000000 interrupts 0, overruns 0, feed 0, hfree 65536, sfree 0 [b:65536/32768/2|bs:0/0/0] channel flags=0x0 {hardware} -> feeder_root(0x00000000) -> {userland} pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000 interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 [b:0/0/0|bs:0/0/0] channel flags=0x10000000 {hardware} -> feeder_root(0x00000000) -> {userland} pcm1: on hdaa0 (1p:1v/1r:1v) snddev flags=0x2e6 [pcm1:play:dsp1.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004 interrupts 0, underruns 0, feed 0, ready 0 [b:16384/8192/2|bs:16384/8192/2] channel flags=0x2100 {userland} -> feeder_mixer(0x00200010) -> {hardware} pcm1:play:dsp1.p0[pcm1:virtual:dsp1.vp0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000 interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0] channel flags=0x10000000 {userland} -> feeder_root(0x00000000) -> {hardware} [pcm1:record:dsp1.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005 interrupts 0, overruns 0, feed 0, hfree 16384, sfree 16384 [b:16384/8192/2|bs:16384/8192/2] channel flags=0x2100 {hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland} pcm1:record:dsp1.r0[pcm1:virtual:dsp1.vr0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000 interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 [b:0/0/0|bs:0/0/0] channel flags=0x10000000 {hardware} -> feeder_root(0x00000000) -> {userland} pcm2: on hdaa0 (1p:1v/1r:1v) snddev flags=0x2e6 [pcm2:play:dsp2.p0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000004 interrupts 0, underruns 0, feed 0, ready 0 [b:16384/8192/2|bs:16384/8192/2] channel flags=0x6100 {userland} -> feeder_mixer(0x00200010) -> {hardware} pcm2:play:dsp2.p0[pcm2:virtual:dsp2.vp0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000 interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0] channel flags=0x10000000 {userland} -> feeder_root(0x00000000) -> {hardware} [pcm2:record:dsp2.r0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000005 interrupts 0, overruns 0, feed 0, hfree 16384, sfree 16384 [b:16384/8192/2|bs:16384/8192/2] channel flags=0x6100 {hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland} pcm2:record:dsp2.r0[pcm2:virtual:dsp2.vr0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000 interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 [b:0/0/0|bs:0/0/0] channel flags=0x10000000 {hardware} -> feeder_root(0x00000000) -> {userland} cheers. alex > > -- > Alexander Motin