snd_hda multichannel support added

Diego Ochoa Tocachi diego.ochoat at gmail.com
Wed Jan 13 16:15:10 UTC 2010


2010/1/13 Alexander Motin <mav at freebsd.org>

> Hi.
>
> As sound(4) got multichannel support since FreeBSD 8.0, I've implemented
> multichannel (4.0, 5.1, 7.1) playback support for snd_hda(4) driver.
> MPlayer now successfully plays 4/6-channel audio streams when running
> with respective -channels option. The only thing you should configure,
> is to inform vchans about present number of speakers by something like:
> sysctl dev.pcm.0.play.vchanformat="s16le:7.1"
>
> Code was recently added to 9-CURRENT. Patch for 8-STABLE can be found
> here: http://people.freebsd.org/~mav/snd_hda.mch.patch<http://people.freebsd.org/%7Emav/snd_hda.mch.patch>
>
> Have a nice sound! :)
>
> PS: Stereo stream is no more duplicated to all connectors. If you loose
> sound, check you are using right ones. Front speakers connector is
> usually green, center/LFE - orange, rear - black, side - gray.
>
> --
> Alexander Motin
> _______________________________________________
> freebsd-multimedia at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
> To unsubscribe, send any mail to "
> freebsd-multimedia-unsubscribe at freebsd.org"
>

Hi,

I've patched but when I compile I got:

starkiller# cd /usr/src/sys/dev/sound/pci/hda/
starkiller# cat /root/snd_hda.mch.patch |patch -p1
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: hdac_private.h
|===================================================================
|--- hdac_private.h    (revision 202126)
|+++ hdac_private.h    (revision 202156)
--------------------------
Patching file hdac_private.h using Plan A...
Hunk #1 succeeded at 221.
Hunk #2 succeeded at 282.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: hdac.c
|===================================================================
|--- hdac.c    (revision 202126)
|+++ hdac.c    (revision 202156)
--------------------------
Patching file hdac.c using Plan A...
Hunk #1 succeeded at 3405 (offset -50 lines).
Hunk #2 succeeded at 3423 (offset -50 lines).
Hunk #3 succeeded at 3431 (offset -50 lines).
Hunk #4 succeeded at 3451 (offset -50 lines).
Hunk #5 succeeded at 3479 with fuzz 1 (offset -50 lines).
Hunk #6 failed at 3489.
Hunk #7 succeeded at 3568 (offset -8 lines).
Hunk #8 succeeded at 6409 (offset -58 lines).
Hunk #9 succeeded at 6470 (offset -8 lines).
Hunk #10 succeeded at 6444 (offset -58 lines).
Hunk #11 succeeded at 6510 (offset -8 lines).
Hunk #12 succeeded at 6501 (offset -58 lines).
1 out of 12 hunks failed--saving rejects to hdac.c.rej
done


starkiller# cd /usr/src/sys/modules/sound/driver/hda

starkiller# make
Warning: Object directory not changed from original
/usr/src/sys/modules/sound/driver/hda
cc -O2 -pipe -march=nocona -fno-strict-aliasing -Werror -D_KERNEL
-DKLD_MODULE -nostdinc   -I. -I@ -I@/contrib/altq -finline-limit=8000
--param inline-unit-growth=100 --param large-function-growth=1000
-fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone
-mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float
-fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
-std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline
-Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c
/usr/src/sys/modules/sound/driver/hda/../../../../dev/sound/pci/hda/hdac.c
cc1: warnings being treated as errors
/usr/src/sys/modules/sound/driver/hda/../../../../dev/sound/pci/hda/hdac.c:
In function 'hdac_channel_setfragments':
/usr/src/sys/modules/sound/driver/hda/../../../../dev/sound/pci/hda/hdac.c:3497:
warning: implicit declaration of function 'lcm'
/usr/src/sys/modules/sound/driver/hda/../../../../dev/sound/pci/hda/hdac.c:3497:
warning: nested extern declaration of 'lcm'
/usr/src/sys/modules/sound/driver/hda/../../../../dev/sound/pci/hda/hdac.c:
In function 'hdac_pcmchannel_setup':
/usr/src/sys/modules/sound/driver/hda/../../../../dev/sound/pci/hda/hdac.c:6434:
warning: implicit declaration of function 'HDA_PARAM_AUDIO_WIDGET_CAP_CC'
/usr/src/sys/modules/sound/driver/hda/../../../../dev/sound/pci/hda/hdac.c:6434:
warning: nested extern declaration of 'HDA_PARAM_AUDIO_WIDGET_CAP_CC'
*** Error code 1

Stop in /usr/src/sys/modules/sound/driver/hda.


my system:

FreeBSD starkiller 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan  5
21:11:58 UTC 2010
root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
amd64


There's something wrong that I did??

-- 
Diego Ochoa - darkbalder
Luis Pasteur 2-30 y Copernico
Telf: +593 7 4082144
Porta:   090085391
Cuenca - Ecuador


More information about the freebsd-multimedia mailing list