Re: [RFT] Major snd_hda rewrite

From: Alexander Best <arundel_at_freebsd.org>
Date: Sat, 14 Jan 2012 13:48:42 +0000
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<mav_at_FreeBSD.org> 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.

cheers.
alex

> 
> 
> I just patched 10.0-CURRENT (amd64) r230009 against hda.rewrite2.patch. 
> All went fine so far. My box is now running again with following messages:
> 
> hdacc0: <NVidia (Unknown) HDA CODEC> at cad 0 on hdac0
> hdaa0: <NVidia (Unknown) HDA CODEC Audio Function Group> at nid 1 on hdacc0
> pcm0: <NVidia (Unknown) HDA CODEC PCM (DisplayPort 8ch)> at nid 5 on hdaa0
> hdacc1: <NVidia (Unknown) HDA CODEC> at cad 1 on hdac0
> hdaa1: <NVidia (Unknown) HDA CODEC Audio Function Group> at nid 1 on hdacc1
> pcm1: <NVidia (Unknown) HDA CODEC PCM (DisplayPort 8ch)> at nid 5 on hdaa1
> hdacc2: <NVidia (Unknown) HDA CODEC> at cad 2 on hdac0
> hdaa2: <NVidia (Unknown) HDA CODEC Audio Function Group> at nid 1 on hdacc2
> pcm2: <NVidia (Unknown) HDA CODEC PCM (DisplayPort 8ch)> at nid 5 on hdaa2
> hdacc3: <NVidia (Unknown) HDA CODEC> at cad 3 on hdac0
> hdaa3: <NVidia (Unknown) HDA CODEC Audio Function Group> at nid 1 on hdacc3
> pcm3: <NVidia (Unknown) HDA CODEC PCM (DisplayPort 8ch)> at nid 5 on hdaa3
> hdacc4: <Realtek ALC892 HDA CODEC> at cad 0 on hdac1
> hdaa4: <Realtek ALC892 HDA CODEC Audio Function Group> at nid 1 on hdacc4
> pcm4: <Realtek ALC892 HDA CODEC PCM (Rear Analog 7.1/2.0)> at nid 
> 20,22,23,21 and 24,26 on hdaa4
> pcm5: <Realtek ALC892 HDA CODEC PCM (Front Analog)> at nid 27 and 25 on 
> hdaa4
> pcm6: <Realtek ALC892 HDA CODEC PCM (Rear Digital)> at nid 30 on hdaa4
> pcm7: <Realtek ALC892 HDA CODEC PCM (Onboard Digital)> at nid 17 on hdaa4
> 
> I am using pcm4 with 5.1 surround sound and pulseaudio. All seems to 
> work fine :-)
> 
> The mainboard is an Asus M4A88TD-V EVO/USB3, the graphics card is a 
> NVidia GeForce GTS 450. The Realtek ALC892 is regocnized by the driver, 
> the NVidia HDMI sound device is not.
> 
> I am looking forward to the commit of this patch!
> 
> 
> >>After fixing that per hand I was able to make a kernel with which sound
> >>still works. Here the relevant bits from dmesg:
> >>
> >>hdac0:<NVidia (Unknown) HDA Controller> mem 0xfcffc000-0xfcffffff irq
> >>18 at device 0.1 on pci1
> >>hdac1:<ATI SB600 HDA Controller> mem 0xfe024000-0xfe027fff irq 16 at
> >>device 20.2 on pci0
> >>hdacc0:<NVidia GT21x HDA CODEC> at cad 0 on hdac0
> >>hdaa0:<NVidia GT21x HDA CODEC Audio Function Group> at nid 1 on hdacc0
> >>pcm0:<NVidia GT21x HDA CODEC PCM (DisplayPort 8ch)> at nid 5 on hdaa0
> >>hdacc1:<NVidia GT21x HDA CODEC> at cad 1 on hdac0
> >>hdaa1:<NVidia GT21x HDA CODEC Audio Function Group> at nid 1 on hdacc1
> >>pcm1:<NVidia GT21x HDA CODEC PCM (DisplayPort 8ch)> at nid 5 on hdaa1
> >>hdacc2:<NVidia GT21x HDA CODEC> at cad 2 on hdac0
> >>hdaa2:<NVidia GT21x HDA CODEC Audio Function Group> at nid 1 on hdacc2
> >>pcm2:<NVidia GT21x HDA CODEC PCM (DisplayPort 8ch)> at nid 5 on hdaa2
> >>hdacc3:<NVidia GT21x HDA CODEC> at cad 3 on hdac0
> >>hdaa3:<NVidia GT21x HDA CODEC Audio Function Group> at nid 1 on hdacc3
> >>pcm3:<NVidia GT21x HDA CODEC PCM (DisplayPort 8ch)> at nid 5 on hdaa3
> >>hdacc4:<Realtek ALC889A HDA CODEC> at cad 0 on hdac1
> >>hdaa4:<Realtek ALC889A HDA CODEC Audio Function Group> at nid 1 on hdacc4
> >>pcm4:<Realtek ALC889A HDA CODEC PCM (Rear Analog 7.1/2.0)> at nid
> >>20,22,21,23 and 24,26 on hdaa4
> >>pcm5:<Realtek ALC889A HDA CODEC PCM (Front Analog)> at nid 27 and 25
> >>on hdaa4
> >>pcm6:<Realtek ALC889A HDA CODEC PCM (Rear Digital)> at nid 30 and 31
> >>on hdaa4
> >>
> >>I particularly like that the messages now show which jack corresponds to
> >>which pcm - makes deciding which jack to use much simpler.
> >
> >Thank you for the report.
> >
> 
Received on Sat Jan 14 2012 - 12:48:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:23 UTC