From owner-freebsd-multimedia@FreeBSD.ORG Sun Jan 9 00:35:03 2011 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 437F61065672; Sun, 9 Jan 2011 00:35:03 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id B74C88FC0A; Sun, 9 Jan 2011 00:35:02 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 4C5861E000E8; Sun, 9 Jan 2011 01:35:01 +0100 (CET) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.4/8.14.3) with ESMTP id p090Y6dc095515; Sun, 9 Jan 2011 01:34:06 +0100 (CET) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.4/8.14.3/Submit) id p090Y5wG095514; Sun, 9 Jan 2011 01:34:05 +0100 (CET) (envelope-from nox) From: Juergen Lock Date: Sun, 9 Jan 2011 01:34:05 +0100 To: freebsd-multimedia@FreeBSD.org Message-ID: <20110109003405.GA95330@triton8.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: lme@FreeBSD.org, Alexander Leidinger , freebsd-ports@FreeBSD.org Subject: Final (I hope) Call for testing: vdr ports (watch/record/stream tv) 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: Sun, 09 Jan 2011 00:35:03 -0000 Call for testing - vdr 1.7.16 with a bunch of plugins: http://people.freebsd.org/~nox/dvb/vdrdevel-CFT-20110108a.shar [Main news: - Finally added back the missing locales to plugin ports so non-native speakers may get some more local language in vdr (you can set the osd language under Setup -> OSD - not everything has been translated still tho.) - Now added the upnp/dlna plugin port to the combined shar after committing the bugfix patches it needs to the devel/upnp port - the plugin is still alpha and if you want to test it the remaining notes in my original thread still apply: http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-January/011531.html - Changed xineliboutput to always build with opengl and libvdpau, opengl still uses more cpu than xv for me here with video-ati and vdpau I still cannot test myself, it is also likely the ffmpeg port needs to be built with the vdpau knob on for it to work. - Changed the /var/cache/vdr-* dirs to more standard /var/cache/vdr/{infosatepg,upnp,vtx} (vtx is for osdteletext) and patched those as defaults into the relevant plugins so you no longer need to pass them as plugin parameters explicitly. - Added the example vdr xine keymap to the xineliboutput plugin port as PORTEXAMPLES so it (usually) will end up here: /usr/local/share/examples/vdr_plugin_xineliboutput/xine/keymap - Patched the actual config dir into the vdr(1) manpage (usually /usr/local/etc/vdr/ - thanx to Torfinn Ingolfsen for noticing.) For details see below.] Hi! So what is vdr? It's something like a luxury settop box/pvr on a pc to receive/watch/record/stream digital tv channels with epg (electronic program guide), timers, client/server networking, webinterface etc pp. So if you have a FreeBSD (or Linux, but that's not covered here :) server you can add one or more dvb/atsc tuner(s) connected to a satellite dish, cable tv or just a dvb-t antenna (or receive iptv streams without a tuner if your isp provides those tho I don't know if anyone tested `real' iptv on FreeBSD yet), browse/search epg, set timers for automated or manual recordings, and watch the streams/recordings elsewhere on your lan. Or if you have a FreeBSD desktop you can also connect a tuner there and do it all on one box - or just run a vdr client like vdr-sxfe (installed by the multimedia/vdr-plugin-xineliboutput port) or a client vdr instance using the streamdev-client plugin connected to a (possibly Linux) vdr server elsewhere on your lan. So if your isp doesn't provide iptv, https://secure.wikimedia.org/wikipedia/en/wiki/IPTV (german info page: http://www.iptv-anbieter.info/ ) then you'll need a dvb tuner (or atsc, tho I have no idea if anyone tested that on FreeBSD yet) with corresponding v4l/dvb (`v4b') drivers, in most cases that means an usb tuner supported by the webcamd port: http://www.freshports.org/multimedia/webcamd And finally, if you want to compare vdr to other existing ports, it's a bit like mythtv - only most Linux users _I_ know prefer vdr over mythtv. :) (and vdr also doesn't use a rdbms so you don't have to worry about mysql etc.) ----snip---previous-notes-with-minor-updates:------- I started with jpulz' vdr 1.7.14 patches: (now updated to 1.7.16) ftp://ftp.frm2.tum.de/pub/jpulz/VDR/ ftp://ftp.frm2.tum.de/pub/jpulz/pictures/ and made q&d ports of those and of a few more plugins and two webinterfaces so I can now use FreeBSD as a pc dvb-s2 dvr: http://people.freebsd.org/~nox/dvb/vdrdevel-CFT-20110108a.shar I still don't know if/when I'll be able finish these to make them commit-ready (or even port all of the other plugins that people might want to use), if anyone wants to take over from here or at least help they are most welcome... Note: vdr 1.7.16 is the development branch so expect bugs! (I mostly used it because the stable branch (1.6) doesn't support dvb-s2...) FreeBSD notes: 0. See my earlier threads on the freebsd-multimedia list about webcamd and the usb dvb-s2 and dvb-t tuners I tested; the relevant webcamd ports and frieds have been updated now so you _should_ be able to just use those. (dvb-c or atsc(?) tuners should also work as long as webcamd supports them and there aren't other bugs.) Links to the more important posts are also here: http://people.freebsd.org/~nox/dvb/ 1. Before you start installing these ports add the vdr user and group to /usr/ports/UIDs: vdr:*:988:988::0:0:vdr user:/nonexistent:/usr/sbin/nologin and to /usr/ports/GIDs: vdr:*:988: (you don't have to use 988, I just didn't want the id to conflict with new ports being committed too quickly...), and then either mount an extra fs with enough space for the recordings on /video or create a video dir elsewhere where there is space, symlink it to /video and make it writable for vdr. (or if you do have one big / then you can create the dir on there too ofc, I just disabled the mkdir in the port to avoid inadvertently filling up ppl's small / fs.) Or if you don't like a symlink you can also add your video dir as -v to vdr's startup args, see below. 2. I now have rc.d scripts for vdr and vdradmin-am but even if you use those you still need to add plugins and their options similar to this to your /etc/rc.conf: ---snip---- # vdr vdr_flags="'-Pxineliboutput --local=none --remote=127.1:37890' \ -Pskinenigmang -Pfemon -Posdpip \ '-Posdteletext --cache-system=packed --max-cache=128' \ -Pstreamdev-server '-Plive -i127.1' -Pepgsearch -Pcontrol \ -Pinfosatepg -Piptv '-Pupnp -i lo0'" ---snip---- look in the README.s of the individual plugin ports for any needed options. (should get installed below /usr/local/share/doc/vdr*) And if you want vdr to start at boot (instead of just manually by doing: /usr/local/etc/rc.d/vdr onestart ) you need to set: vdr_enable="YES" too of course. And for vdradmin_am its: vdradmind_enable="YES" If you want to start vdr manually in the foreground instead you need to be root (or the vdr user but vdr also drops to the vdr uid itself if started as root), and then run it like: vdr '-Pxineliboutput --local=none --remote=127.1:37890' -Pskinenigmang -Pfemon -Posdpip '-Posdteletext --cache-system=packed --max-cache=128' -Pstreamdev-server '-Plive -i127.1' -Pepgsearch -Pcontrol -Pinfosatepg -Piptv '-Pupnp -i lo0' 2a.I now also have a multimedia/vdr-plugins metaport that allows you to select and install the plugins you want (and vdr itself as a dependency), so you don't have to install numerous vdr/plugin ports individually. 3. Of all the video output methods only xineliboutput and streamdev seem to work (and the vdr-live webinterface browser streaming which also uses streamdev), jpulz also has patches for softdevice so I made a port for that too but it only gave me a black screen... streamdev doesn't have an osd so you probably want xineliboutput at least for the first setup. I was unable to test xineliboutput's vdpau support since I no longer have nvidia (and miwi's issues with the nvidia blob on amd64 don't exactly encourage me to try it again soon...) - on the radeon here using xorg 7.4's video-ati driver with xv xineliboutput via vdr-sxfe, vdr-sxfe --video=xv --hotkeys --audio=oss xvdr://127.0.0.1:37890 (vdr-sxfe gets installed by the xineliboutput plugin port) as well as all other players I tested that knew the xvdr protocol (xineliboutput with osd) can now indeed play h264 hd channels on this PhenomII box after the ffmpeg updates a few months ago, with the only exception of kaffeine that still has issues with h264 1080i streams when deinterlacing is enabled: xine "xvdr://127.0.0.1#nocache" kaffeine "xvdr+tcp://127.0.0.1:37890" /usr/local/kde4/bin/kaffeine "xvdr+tcp://127.0.0.1:37890" (kaffeine also has no provision for vdr keyboard control...) You can now also run vdr-sxfe with --hud tho that didn't really work for me (probably needs compositing which I yet have to test.) --video opengl and vdpau support is now also in the build but as I said vdpau I cannot test myself and it may need the ffmpeg port to be built with the vdpau knob on too which is still off by default. Btw I use software volume control with xineliboutput (Setup -> Plugins -> xineliboutput -> Volume control in the osd) because selecting `hardware' there doesn't work so well with snd(4)'s volume-per-channel feature (hint.pcm.X.vpc, which also in fact is software) that I want to keep enabled for other apps... And in case you didn't know about this snd(4) feature you can read more here: http://people.freebsd.org/~ariff/SOUND_4.TXT.html You can also use other players like mplayer or totem/gstreamer (incluing the totem browser plugin invoked by the vdr-live webinterface), only those don't know the xvdr protocol and thus wont display an osd: mplayer -mc 10 -cache 8192 -demuxer lavf http://127.0.0.1:37890/ totem http://127.0.0.1:37890/ (or using streamdev: mplayer -mc 10 -cache 8192 -demuxer lavf http://127.0.0.1:3000/302 totem http://127.0.0.1:3000/302 - channel 302 is arte hd in my channels.conf.) 3a.And if you want to try out the xbmc port that recently has been committed with live tv via vdr you can do that too even tho it is not the pvr-testing2 branch, you just won't get the fast channel switching etc you'd get via the vnsi protocol (that I also ported the plugin for but couldn't test it) - watching live channels and recordings done by vdr (possibly scheduled via webinterface) is still possible. Just make sure you run vdr with the streamdev-server plugin enabled and that it is listening on the vdr-to-vdr server port (thats 2004 and is disabled by default, see in the osd under Setup -> Plugins -> streamdev-server.) Then in xbmc you can add vdr streamdev as a video source either via the gui or manually by putting something like this in ~/.xbmc/userdata/mediasources.xml: vtp://127.0.0.1:2004/ Note you'll have to add the /video dir to xbmc seperately via the filesystem if you want to be able to watch recordings (or test the upnp plugin with xbmc but that is still alpha and at least atm also cannot stream h264 recordings.) 4. I have no idea if the lirc support works on FreeBSD, and the uhid(4) remote plugin support (see that port's pkg-descr) is highly experimental - as well as webcamd not yet supporting dvb tuner remotes unless they already appear as uhid(4)/ukbd(4) without webcamd's help - so you probably will at least initially want to use keyboard control. I have included an example remote.conf for vdr-sxfe and the multimedia/vdr-plugin-control plugin that you can access by telnet (default port is 2002), I have put the menu button on the tab and insert keys and OK on the return key, see /usr/local/etc/vdr/remote.conf for the full keybindings list. (If you start vdr in the foreground and keep that shell open you should be able to use that for keyboard control also, the control plugin just gives you an osd too over telnet.) And if you use xine xine "xvdr://127.0.0.1#nocache" instead of vdr-sxfe vdr-sxfe --video=xv --hotkeys --audio=oss xvdr://127.0.0.1:37890 you probably want to use a ~/.xine/keymap that includes vdr controls, I've put mine here: http://people.freebsd.org/~nox/dvb/xine/keymap and the xineliboutput plugin port now also installs it under: /usr/local/share/examples/vdr_plugin_xineliboutput/xine/keymap Oh and the webinterfaces have point-and-click remotes too but those are pretty clunky to use... 5. The example channels.conf is the one that comes with the vdr sources, its for Astra 19.2E and a little outdated (also doesn't have hd channels yet), if you receive something else and don't want to go hunting for a suitable channels.conf on the web you can use the multimedia/w_scan port. Remember to use -o7 for vdr 1.7.x, see the w_scan homepage and w_scan's -h and -H usage messages for options and examples: http://wirbel.htpc-forum.de/w_scan/index_en.html (the w_scan start script hasn't been ported to FreeBSD yet.) Also note you probably will only need to use w_scan once initially, this vdr version by default should look for new transponders itself when it does its epg scan during idle times unles you disable that feature. And if you install the iptv plugin and want to test it with some internet streams if your isp dosn't provide `real' iptv (or you just want to be able to press `r'ecord while watching web streams like nasatv), you can merge example /usr/local/etc/vdr/channels.conf entries from here: /usr/local/share/examples/vdr_plugin_iptv/channels.conf.iptv (I don't have `real' iptv here so that's all I can test. Also don't expect 100% performance with these examples, live transcoding streams to mpeg-ts that vdr expects still is kinda fragile and sometimes needs to be manually restarted by e.g. hitting OK (return) in the channel list (c) before it works, and startup is usually slow too... Transcoding uses vlc with those examples, you can see vlc's messages if you start vdr in the foreground instead of via the rc.d script as explained above. Also see /usr/local/etc/vdr/plugins/iptv and /usr/local/etc/vdr/plugins/iptv/vlcinput and the plugin homepage: http://www.saunalahti.fi/~rahrenbe/vdr/iptv/ for configurations. And there seems to be a `feature' that sometimes causes vdr to start receiving streams without anyone watching/recording just because the iptv plugin is enabled...) 5. I ported two webinterfaces because I only learned about vdr-live later which seems to be faster and uses fewer resources meaning you could probably turn a pretty wimpy box into a vdr server as long as you keep the actual watching (especially of h264 hd) to a faster box connected over the network. The vdr-plugin-live webinterface by default listens on port 8008: http://127.1:8008/ Default login/pw is admin/live as also mentioned in: /usr/local/share/doc/vdr_plugin_live/README vdradmin_am listens on 8001: http://127.1:8001/ Default login/pw for that is vdr/vdr. And the streamdev plugin has a (simple) webinterface too if you point a browser at it: (instead of a player) http://127.1:3000/ 6. I may have forgot some other manual installation steps, if you notice something just post a followup... Most of vdr's own configuration including plugins should be available in the osd under `Setup', some things like allowed hosts/subnets for network plugins need to be manually configured under /usr/local/etc/vdr/plugins tho. And here are some links about vdr and the plugins and webinterfaces I made ports for: 0. vdr 1.7.16: http://www.tvdr.de/ http://www.linuxtv.org/vdrwiki/index.php/Main_Page 1. xineliboutput-1.0.5 cvs snapshot from 20101019: http://sourceforge.net/projects/xineliboutput/ http://www.linuxtv.org/vdrwiki/index.php/Xineliboutput-plugin 2. streamdev-0.5.0 cvs snapshot from 20100426: http://streamdev.vdr-developer.org/ http://www.linuxtv.org/vdrwiki/index.php/Streamdev-plugin 3. live-0.2.0s20101122 git snapshot: http://live.vdr-developer.org/ 4. live also depends on cxxtools and tntnet which I also had to port: http://www.tntnet.org/cxxtools.html http://www.tntnet.org/index.html 5. epgsearch-0.9.25.beta17: http://winni.vdr-developer.org/epgsearch/index_eng.html http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin 6. femon-1.7.7: http://www.saunalahti.fi/~rahrenbe/vdr/femon/ http://www.linuxtv.org/vdrwiki/index.php/Femon-plugin 7. osdpip-0.1.0: http://projects.vdr-developer.org/projects/show/plg-osdpip http://www.linuxtv.org/vdrwiki/index.php/Osdpip-plugin 8. osdteletext-0.9.0: http://projects.vdr-developer.org/projects/show/plg-osdteletext http://www.linuxtv.org/vdrwiki/index.php/Osdteletext-plugin 9. skinenigmang-0.1.1: http://andreas.vdr-developer.org/enigmang/index.html http://www.vdr-wiki.de/wiki/index.php/Skinenigmang-plugin (sorry for de in the second link but at least there are pics...) 10. softdevice 0.5.0 cvs snapshot from 20100414: http://softdevice.berlios.de/ http://www.linuxtv.org/vdrwiki/index.php/Softdevice-plugin 11. control-0.0.2a-45yavdr1 with ubuntu yavdr patches: (and a patch by me to fix a segfault on vdr exit) http://ricomp.de/vdr/down_en.html http://www.linuxtv.org/vdrwiki/index.php/Control-plugin 12. vdradmin_am-3.6.7: http://andreas.vdr-developer.org/vdradmin-am/ 13. infosatepg-0.0.11: http://projects.vdr-developer.org/projects/show/plg-infosatepg http://vdr-wiki.de/wiki/index.php/Infosatepg-plugin My post including notes about how I got it receiving and using the infosat epg data quickly: http://lists.freebsd.org/pipermail/freebsd-multimedia/2010-July/011158.html 14. remote-0.4.0: (with experimental FreeBSD uhid(4) support, some notes are in the port's pkg-descr) http://escape-edv.de/endriss/vdr http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin 15. iptv-0.4.2: http://www.saunalahti.fi/~rahrenbe/vdr/iptv/ 16. vnsiserver-0.0.2s20100808.0952: http://www.vdr-wiki.de/wiki/index.php/Vnsi-server-plugin http://www.vdr-portal.de/board/thread.php?threadid=95292 (sorry about the german but as I said this is only useful with the xbmc pvr-testing2 branch anyway and its untested too.) 17. upnp-0.0.2a2 with a few bugfixes done by me: http://upnp.vdr-developer.org/ http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-January/011531.html TODO: - The ports still could use quite some cleanup work, also to make upgrading them or adding new plugins easier. - Submit the rest of the non-hacky FreeBSD patches back to the individual upstream maintainers (that should be pretty much all of the patches for *.[ch] source files, only Makefile/configure scripts patches less so.) - Someone(tm) may want to write a `real' step-by-step guide how to get a FreeBSD vdr going... (preferably someone who has never used vdr before to make sure important stuff I never think about isn't left out.) Enjoy, :) Juergen From owner-freebsd-multimedia@FreeBSD.ORG Sun Jan 9 04:35:05 2011 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 6B904106566C for ; Sun, 9 Jan 2011 04:35:05 +0000 (UTC) (envelope-from giffunip@tutopia.com) Received: from nm20.bullet.mail.sp2.yahoo.com (nm20.bullet.mail.sp2.yahoo.com [98.139.91.90]) by mx1.freebsd.org (Postfix) with SMTP id 497F78FC1C for ; Sun, 9 Jan 2011 04:35:05 +0000 (UTC) Received: from [98.139.91.70] by nm20.bullet.mail.sp2.yahoo.com with NNFMP; 09 Jan 2011 04:22:47 -0000 Received: from [98.139.91.17] by tm10.bullet.mail.sp2.yahoo.com with NNFMP; 09 Jan 2011 04:22:47 -0000 Received: from [127.0.0.1] by omp1017.mail.sp2.yahoo.com with NNFMP; 09 Jan 2011 04:22:47 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 25080.82863.bm@omp1017.mail.sp2.yahoo.com Received: (qmail 46707 invoked by uid 60001); 9 Jan 2011 04:22:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1294546966; bh=ZnuI9luT5kHTizqzvK3rxPJgFz1v9IDbAMGF658sqPo=; h=Message-ID:X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=LP30E7CpRgDBfl+A/qB1CCj6daWypmm6N+V9t3o5jhVDbhNCg66/AQpl57sr0lxrRtpw/dj01jLx3cZsKDEyDsXOUxwZBkKM/ZnerieLO4vC2r4EngRe9WKzYNOAPq8l6O2kckkk8cUhmVb+tBkE08rnj55AG8TDAyZyjXKd/RI= Message-ID: <516790.37995.qm@web113503.mail.gq1.yahoo.com> X-YMail-OSG: QiIX4zsVM1lyjBZ8XLRiwcDB1wIBduo2Rv7LnFYJWlJJ0Es GIB7HzHt3jc4ll_4SYSnnAbbyifEtbbN.LVZzUwFjBzSsH3MnxmlldnUYn_T 0pYmdXBcTtEmA34us.1l8rtdxCANRap4W8mZcb51iuP4cQuGfxvUNE_Qm7OM upNvDfgfllLcwP00gbWiaZsMF8kp0oWy8zBRbmfKp6fk6w7FKwGYTKtk_zdC _pTeMx.ESIcXRrdWOGeIT6sohT9.MT1MXzS5lfia6tbManMkES2JvlV7SVfW 3Y4QMc.8I_BmfCxqW0Qm5I4VJULswz2mkOYR8EIvQJ6ZdvTqz2XANvGIgksR tgB2TqKnwgw3_.LR3rzHhTWORei6sqod2CXfWsMYReLkdMHbFa27HsY8fzEj WjMib6tlnYR3bSA-- Received: from [190.157.140.248] by web113503.mail.gq1.yahoo.com via HTTP; Sat, 08 Jan 2011 20:22:46 PST X-RocketYMMF: giffunip X-Mailer: YahooMailClassic/11.4.20 YahooMailWebService/0.8.107.285259 Date: Sat, 8 Jan 2011 20:22:46 -0800 (PST) From: "Pedro F. Giffuni" To: freebsd-multimedia@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Subject: Anyone working on replacing the GPL'd sound headers? X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: giffunip@tutopia.com List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2011 04:35:05 -0000 Hello; I've been looking at what is required to get rid of the few GPL'd headers in the sound system: emu10k1-alsa.h Can be replaced by emuxkireg.h and emuxkivar.h from NetBSD. csaimg.h Is very similar to cs461x_dsp.h from OSS. maestro3_*.h This look more related to the oss_allegro files in OSS' attic. I am giving a try on the emu10k1-alsa header but maybe someone with better knowledge of the code and/or the affected cards will beat me to it :). cheers, Pedro. From owner-freebsd-multimedia@FreeBSD.ORG Sun Jan 9 14:26:21 2011 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 3FD5C106564A for ; Sun, 9 Jan 2011 14:26:21 +0000 (UTC) (envelope-from mickael.maillot@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id EAEAE8FC13 for ; Sun, 9 Jan 2011 14:26:20 +0000 (UTC) Received: by qyk8 with SMTP id 8so634409qyk.13 for ; Sun, 09 Jan 2011 06:26:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=WJDZpd9YwUOaYM35Oqmvv8tHYnqH4b4OnPyqWR9DSvo=; b=dZjv1zwv6GI53ZX4nw6RCbEJTaWVKjCfwIHDzmugaKu8ysYoMtZR+BK3bSD5TQ6v62 et2r8CdhzWTJkK7hhP8EHFTSoEPtJj2QiY5xO8xruiqgYwf3V4Z1g512ET116610XcCY rOJO0WqfyJVflBVLnGIUmf8APqXyNI1msfeKY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=MMrX6cPYyDNzg+4Q+E4PC9+wxYVmhLGBd+RzcZX6bPxx1Ej6Kp7X8YeO0glHkUP9xF NrVYHfD+egGx3L39yoXZCWyusc5tAcXAqpwgqAlluPI+mEAb3OhjrrUVYHC8TBwDgTah nr94Vb7kT69ZxQwtBx/iggwFyHedLpZhdN0NU= MIME-Version: 1.0 Received: by 10.229.215.147 with SMTP id he19mr429061qcb.79.1294583178485; Sun, 09 Jan 2011 06:26:18 -0800 (PST) Received: by 10.229.52.130 with HTTP; Sun, 9 Jan 2011 06:26:18 -0800 (PST) In-Reply-To: <86oc7rcwe4.fsf@gmail.com> References: <86wrmfcwo2.fsf@gmail.com> <86oc7rcwe4.fsf@gmail.com> Date: Sun, 9 Jan 2011 15:26:18 +0100 Message-ID: From: =?ISO-8859-1?Q?Micka=EBl_Maillot?= To: Anonymous Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-multimedia@freebsd.org Subject: Re: XBMC crash with vaapi vdpau 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: Sun, 09 Jan 2011 14:26:21 -0000 Hi, i recompiled libva & vdpau-video WITH_DEBUG but no more usefull information in bt: (gdb) bt #0 0x0000000812e14349 in __vaDriverInit_0_31 () from /usr/local/lib/va/nvidia_drv_video.so #1 0x0000000812e11794 in __vaDriverInit_0_31 () from /usr/local/lib/va/nvidia_drv_video.so #2 0x0000000812e119a7 in __vaDriverInit_0_31 () from /usr/local/lib/va/nvidia_drv_video.so #3 0x0000000812e11ad2 in __vaDriverInit_0_31 () from /usr/local/lib/va/nvidia_drv_video.so #4 0x0000000801344b63 in vaCopySurfaceGLX () from /usr/local/lib/libva-glx= .so.1 #5 0x000000080134315f in vaCopySurfaceGLX () from /usr/local/lib/libva-glx= .so.1 #6 0x0000000000b38179 in CLinuxRendererGL::UploadVAAPITexture (this=3D0x811dd0800, index=3DVariable "index" is not available. ) at LinuxRendererGL.cpp:2348 #7 0x0000000000b399dc in CLinuxRendererGL::Render (this=3D0x811dd0800, flags=3DVariable "flags" is not available. ) at LinuxRendererGL.cpp:1118 #8 0x0000000000b35856 in CLinuxRendererGL::RenderUpdate (this=3D0x811dd0800, clear=3Dtrue, flags=3D0, alpha=3D255) at LinuxRendererGL.cpp:606 #9 0x0000000000b2fa95 in CXBMCRenderManager::PresentSingle (this=3D0x1297d20) at RenderManager.cpp:479 #10 0x0000000000b3070f in CXBMCRenderManager::Present (this=3D0x1297d20) at RenderManager.cpp:463 #11 0x000000000071097b in CApplication::RenderNoPresent (this=3D0x1298ee0) at Application.cpp:1791 #12 0x000000000070a567 in CApplication::Render (this=3D0x1298ee0) at Application.cpp:2048 #13 0x00000000009f83ab in CXBApplicationEx::Run (this=3D0x1298ee0) at XBApplicationEx.cpp:138 #14 0x00000000009f8988 in main (argc=3D1, argv=3D0x7fffffffe870) at xbmc.cp= p:172 it crash when i want to read a 1080p mkv file which run fine with VDPAU. vainfo run fine: libva: libva version 0.31.1 Xlib: extension "XFree86-DRI" missing on display ":0.0". libva: va_getDriverName() returns 0 libva: Trying to open /usr/local/lib/va/nvidia_drv_video.so libva: va_openDriver() returns 0 vainfo: VA API version: 0.31 vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.3.pre4 vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointVLD VAProfileH264High : VAEntrypointVLD VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD but vatest_10 and 11 failed: *** vatest_10: Create and destroy buffers libva: libva version 0.31.1 Xlib: extension "XFree86-DRI" missing on display ":0.0". libva: va_getDriverName() returns 0 libva: Trying to open /usr/local/lib/va/nvidia_drv_video.so libva: va_openDriver() returns 0 Assertion failed: (VA_STATUS_SUCCESS =3D=3D va_status), function test, file test_10.c, line 112. *** vatest_11: Map and unmap buffers libva: libva version 0.31.1 Xlib: extension "XFree86-DRI" missing on display ":0.0". libva: va_getDriverName() returns 0 libva: Trying to open /usr/local/lib/va/nvidia_drv_video.so libva: va_openDriver() returns 0 --- vaCreateBuffer created buffer 04000000 of type 0 --- vaCreateBuffer created buffer 04000001 of type 1 --- vaCreateBuffer created buffer 04000002 of type 2 Assertion failed: (VA_STATUS_SUCCESS =3D=3D va_status), function test, file test_11.c, line 129. 2011/1/8 Anonymous : > Anonymous writes: > >> Micka=EBl Maillot writes: >> >>> Hi, >>> >>> i just tried the VAAPI / VDPAU option in XBMC (trunk) but i can't play >>> video without crash and i don't know what can i do: >>> >>> (gdb) bt >>> #0 =A00x0000000812e0e079 in __vaDriverInit_0_31_1_sds () from >>> /usr/local/lib/va/nvidia_drv_video.so >>> #1 =A00x0000000812e0cd8b in __vaDriverInit_0_31_1_sds () from >>> /usr/local/lib/va/nvidia_drv_video.so >> >> Does vainfo crash too? > > Not sure but vdpau-video may crash if you have an nvidia card that > doesn't support VDPAU features, e.g. > > =A0http://forums.freebsd.org/showthread.php?t=3D16366 > From owner-freebsd-multimedia@FreeBSD.ORG Sun Jan 9 20:34:15 2011 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 ADF37106564A for ; Sun, 9 Jan 2011 20:34:15 +0000 (UTC) (envelope-from gallatin@gmail.com) Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com [209.85.218.54]) by mx1.freebsd.org (Postfix) with ESMTP id 661E08FC19 for ; Sun, 9 Jan 2011 20:34:15 +0000 (UTC) Received: by yie19 with SMTP id 19so5526945yie.13 for ; Sun, 09 Jan 2011 12:34:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ifREZ5I6WB14T9coGcs2fgsWeVxL7FdRjzW6zDxx9kY=; b=FyDMxYLQ1eMKbMWs0XU6GO+Ubq3wwBSBYzuXXvODi1r7uVUcFyb6GQbQentOFpaAge B5Jl16EznnG25eA9o6hTgpFmSl0JG4tHn5rbv5HBfZ7AMX1BcCBOo4z9yA61CMAaaKdE +Hk6H2mog1OJ8giBVNKfAMlJ1S6UOW49lJ5U4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=AECnCTocTPm3koreVifcmRcJeemIi+xm+W/0sHkmEbDEH7Cd59pdZOJhc08h9WygOM DA7Yt2RCU5MFNkvrMkRJ+wOa0xAJGw/ztwNDFrNw426ppxunRYI5O+Xk/cNzqBq8ZGNy T6yWOyhXZtzknKqbEphHIsYqXvvR6ScV4p7no= MIME-Version: 1.0 Received: by 10.100.57.15 with SMTP id f15mr3748886ana.228.1294605253641; Sun, 09 Jan 2011 12:34:13 -0800 (PST) Received: by 10.100.248.15 with HTTP; Sun, 9 Jan 2011 12:34:13 -0800 (PST) In-Reply-To: <201101082130.05180.hselasky@c2i.net> References: <201101082130.05180.hselasky@c2i.net> Date: Sun, 9 Jan 2011 15:34:13 -0500 Message-ID: From: Andrew Gallatin To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-multimedia@freebsd.org Subject: Re: em28xx? 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: Sun, 09 Jan 2011 20:34:15 -0000 On Sat, Jan 8, 2011 at 3:30 PM, Hans Petter Selasky wrot= e: > On Saturday 08 January 2011 20:49:59 Andrew Gallatin wrote: >> On Sat, Jan 8, 2011 at 2:11 PM, Andrew Gallatin wro= te: >> > (see appended output). =A0Has anybody tried =A0this before? =A0What ar= e the >> > general steps for porting a driver? >> >> So I hacked on it for a while (see attached dirty patch) and I've got > > Try the attached patch. Thanks, but it didn't work. I think that (part) of the problem is that the dev it is using is not the one you're initializing. It is using sc->ui->dev. I tried an analogous patch to initialize that dev, and it got me much, much further along: @@ -403,7 +403,10 @@ return (-ENOMEM); } ui =3D p_dev->bsd_iface_start + i; + ui->dev.driver_static.name =3D "webcamd"; + ui->dev.driver =3D &ui->dev.driver_static; + printf("sc =3D %p\n", sc); sc->udrv =3D udrv; sc->p_dev =3D p_dev; sc->ui =3D ui; The device now attaches the analog part, but I don't have digital yet (which is what I want/need). The problem I have now is that dvb_init() is stuck trying to acquire a mute= x. I don't suppose we have WITNESS for the linux code ;) Drew (gdb) thread apply all bt Thread 8 (Thread 801008200 (LWP 100261)): #0 0x0000000800cebcfc in poll () from /lib/libc.so.7 #1 0x0000000800a307fe in poll () from /lib/libthr.so.3 #2 0x000000080081d63d in libusb20_dev_wait_process () from /usr/lib/libusb= .so.2 #3 0x0000000000407a66 in usb_exec (arg=3DVariable "arg" is not available. ) at /usr/home/gallatin/tmp/webcamd-0.1.18/kernel/linux_usb.c:185 #4 0x0000000800a2e2be in pthread_getprio () from /lib/libthr.so.3 #5 0x0000000000000000 in ?? () Error accessing memory address 0x7fffff3fb000: Bad address. Thread 5 (Thread 801007c00 (LWP 100260)): #0 0x0000000800a34d1c in pthread_kill () from /lib/libthr.so.3 #1 0x0000000800a37103 in pthread_cond_signal () from /lib/libthr.so.3 #2 0x0000000000403716 in __wait_event (q=3D0x7575e0) at /usr/home/gallatin/tmp/webcamd-0.1.18/kernel/linux_thread.c:168 #3 0x00000000004781d5 in pvr2_context_thread_func (foo=3DVariable "foo" is not available. ) at /usr/home/gallatin/tmp/webcamd-0.1.18/v4l-dvb/linux/drivers/media/vide= o/pvrusb2/pvrusb2-context.c:174 #4 0x000000000040387f in kthread_wrapper (arg=3D0x801010060) at /usr/home/gallatin/tmp/webcamd-0.1.18/kernel/linux_thread.c:443 #5 0x0000000800a2e2be in pthread_getprio () from /lib/libthr.so.3 #6 0x0000000000000000 in ?? () Error accessing memory address 0x7fffff7fd000: Bad address. Thread 4 (Thread 801007900 (LWP 100259)): #0 0x0000000800d2ff6c in nanosleep () from /lib/libc.so.7 #1 0x0000000800d2fd25 in usleep () from /lib/libc.so.7 #2 0x0000000800a30268 in usleep () from /lib/libthr.so.3 #3 0x0000000000406212 in timer_exec (arg=3DVariable "arg" is not available= . ) at /usr/home/gallatin/tmp/webcamd-0.1.18/kernel/linux_timer.c:141 #4 0x0000000800a2e2be in pthread_getprio () from /lib/libthr.so.3 #5 0x0000000000000000 in ?? () Error accessing memory address 0x7fffff9fe000: Bad address. Thread 3 (Thread 801007600 (LWP 100258)): #0 0x0000000800a34d1c in pthread_kill () from /lib/libthr.so.3 #1 0x0000000800a37103 in pthread_cond_signal () from /lib/libthr.so.3 #2 0x0000000000405e3c in work_exec (arg=3DVariable "arg" is not available. ) at /usr/home/gallatin/tmp/webcamd-0.1.18/kernel/linux_task.c:111 #3 0x0000000800a2e2be in pthread_getprio () from /lib/libthr.so.3 #4 0x0000000000000000 in ?? () Error accessing memory address 0x7fffffbff000: Bad address. Thread 2 (Thread 801007300 (LWP 100255)): #0 0x0000000800a34d1c in pthread_kill () from /lib/libthr.so.3 #1 0x0000000800a37103 in pthread_cond_signal () from /lib/libthr.so.3 #2 0x0000000000403695 in down (sem=3D0x801208b60) at /usr/home/gallatin/tmp/webcamd-0.1.18/kernel/linux_thread.c:307 #3 0x000000000046ef27 in dvb_init (dev=3D0x801208600) at /usr/home/gallatin/tmp/webcamd-0.1.18/v4l-dvb/linux/drivers/media/video/em2= 8xx/em28xx-dvb.c:502 #4 0x000000000046e963 in em28xx_init_extension (dev=3D0x801208600) at /usr/home/gallatin/tmp/webcamd-0.1.18/v4l-dvb/linux/drivers/media/video/em2= 8xx/em28xx-core.c:1230 #5 0x000000000046ca77 in em28xx_usb_probe (interface=3D0x8011c54b0, id=3D0x6d4488) at /usr/home/gallatin/tmp/webcamd-0.1.18/v4l-dvb/linux/drivers/media/video/em2= 8xx/em28xx-cards.c:2979 #6 0x000000000040853c in usb_linux_probe_p (p_bus=3D0x758e10, p_addr=3D0x758e14, p_index=3D0x758e18) at /usr/home/gallatin/tmp/webcamd-0.1.18/kernel/linux_usb.c:418 #7 0x00000000004f056f in main (argc=3D-5712, argv=3D0x7fffffffead0) at webcamd.c:482 (gdb) frame 3 #3 0x000000000046ef27 in dvb_init (dev=3D0x801208600) at /usr/home/gallatin/tmp/webcamd-0.1.18/v4l-dvb/linux/drivers/media/video/em2= 8xx/em28xx-dvb.c:502 502 mutex_lock(&dev->lock); (gdb) p dev $5 =3D (struct em28xx *) 0x801208600 (gdb) p *dev $6 =3D {name =3D "em28xx #0", '\0' , model =3D 76, devno = =3D 0, chip_id =3D CHIP_ID_EM2870, v4l2_dev =3D {dev =3D 0x8011c54b0, subdevs = =3D {next =3D 0x801208638, prev =3D 0x801208638}, lock =3D , name =3D "webcamd ", '\0' , notify =3D 0}, board =3D {name =3D 0x5890c8 "KWorld PlusTV 340U or UB435-Q (ATSC)", vchannels =3D 0, tuner_type =3D 4, tuner_addr =3D 0, tda9887_conf =3D 0, dvb_gpio =3D 0x6d49f0, suspend_gpio =3D 0x0, tuner_gpio =3D 0x6d4580, mute_gpio =3D 0x0, is_em2800 =3D 0, has_msp34xx =3D 0, mts_firmware =3D 0, max_range_640_480 =3D 0, has_dvb =3D 1, has_snapshot_button =3D 0, is_webcam =3D 0, valid =3D 0, has_ir_i2c =3D 0, xclk =3D 39 '\'', i2c_speed= =3D 64 '@', radio_addr =3D 0 '\0', tvaudio_addr =3D 0, decoder =3D EM28XX_NODECODER, adecoder =3D EM28XX_NOADECODER, input =3D {{type =3D 0, vmux =3D 0, amux =3D EM28XX_AMUX_VIDEO, aout =3D EM28XX_AOUT_PCM_MIC_PCM, gpio =3D 0x0}, {type =3D 0, vmux =3D 0, amux =3D EM28XX_AMUX_VIDEO, aout =3D EM28XX_AOUT_PCM_MIC_PCM, gpio =3D 0x0}, {type =3D 0, vmux =3D 0, amux =3D EM28XX_AMUX_VIDEO, aout =3D EM28XX_AOUT_PCM_MIC_PCM, gpio =3D 0x0}, {type =3D 0, vmux =3D 0, amux =3D EM28XX_AMUX_VIDEO, aout =3D EM28XX_AOUT_PCM_MIC_PCM, gpio =3D 0x0}}, radio =3D {type =3D 0, vmux =3D 0, amux =3D EM28XX_AMUX_VIDEO, aout =3D EM28XX_AOUT_PCM_MIC_PCM, gpio =3D 0x0}, ir_codes =3D 0x0}, em28xx_sensor =3D EM28XX_NOSENSOR, sensor_xres =3D 0, sensor_yres =3D 0, sensor_xtal =3D 0, progressive =3D 0, vinmode =3D 16, vinctl =3D 17, has_audio_class =3D 0, has_alsa_audio =3D 0, format =3D 0x6d4ca0, ir =3D 0x0, wait_after_write =3D 0, devlist =3D {next =3D 0x6d4a90, prev =3D 0x6d4a90}, i2s_speed =3D 0, audio_mode =3D { ac97 =3D EM28XX_NO_AC97, ac97_feat =3D 0, ac97_vendor_id =3D 0, has_audio =3D 0, i2s_3rates =3D 0, i2s_5rates =3D 0}, tuner_type =3D 4, tuner_addr =3D 0, tda9887_conf =3D 0, i2c_adap =3D { owner =3D 0x0, id =3D 65567, class =3D 0, algo =3D 0x6d4c60, algo_data = =3D 0x801208600, level =3D 0 '\0', bus_lock =3D {sem =3D {value =3D 1}}, timeou= t =3D 1000, retries =3D 0, dev =3D {minor =3D 0, busnum =3D 0, kobj =3D , refcount =3D {refcount =3D {counter =3D 1}}, release =3D 0, driver =3D 0x0, parent =3D 0x8011c4b00, driver_data =3D 0x801208630, fops =3D 0x0, cdev =3D 0x0, class =3D 0x0, driver_static =3D {name =3D 0x0, owner =3D 0x0}, devt = =3D 0, name =3D "i2c-129", '\0' , bus_name =3D '\0' , bus_id =3D '\0' }, nr =3D 129, name =3D "em28xx #0"= , '\0' , dev_released =3D {done =3D 0, wait =3D {sleep_ref = =3D 0, sleep_count =3D 0}}}, i2c_client =3D { flags =3D 0, addr =3D 80, name =3D "em28xx internal\000\000\000\000", adapter =3D 0x8012087a8, driver =3D 0x0, dev =3D {minor =3D 0, busnum =3D 0= , kobj =3D , refcount =3D { refcount =3D {counter =3D 0}}, release =3D 0, driver =3D 0x0, paren= t =3D 0x0, driver_data =3D 0x0, fops =3D 0x0, cdev =3D 0x0, class =3D 0x0, driver_static =3D {name =3D 0x0, owner =3D 0x0}, devt =3D 0, name =3D '\0' , bus_name =3D '\0' , bus_id =3D '\0' }, irq =3D 0, detected =3D {next =3D 0x0, prev =3D 0x0}}, users =3D 0, vdev =3D 0x80124a180, norm =3D 255, ctl_freq =3D 0, ctl_input =3D 0, ctl_ainput =3D 0, ctl_aoutput =3D 1, mute =3D 1, volume =3D 31, width =3D 7= 20, height =3D 576, hscale =3D 0, vscale =3D 0, interlaced =3D 1, video_bytesread =3D 0, hash =3D 680043282, i2c_hash =3D= 0, adev =3D {name =3D '\0' , transfer_buffer =3D {0x0, 0x0, 0x0, 0x0, 0x0}, urb =3D {0x0, 0x0, 0x0, 0x0, 0x0}, udev =3D 0x0, capture_transfer_done =3D 0, capture_pcm_substream =3D 0x0, hwptr_done_capture =3D 0, sndcard =3D 0x0, users =3D 0, capture_stream =3D STREAM_OFF, slock =3D }, state =3D 0, io =3D IO_NONE, capture_type =3D 0, vbi_read =3D 0, cur_field =3D 0 '\0', vbi_width =3D 720, vbi_height = =3D 18, request_module_wk =3D {entry =3D { tqe_next =3D 0x0, tqe_prev =3D 0x0}, func =3D 0}, lock =3D {sem =3D {= value =3D 0}}, ctrl_urb_lock =3D {sem =3D {value =3D 1}}, inqueue =3D {next =3D 0= x0, prev =3D 0x0}, outqueue =3D {next =3D 0x0, prev =3D 0x0}, open =3D {sleep_ref =3D 0, sleep_count =3D 0}, wait_fram= e =3D {sleep_ref =3D 0, sleep_count =3D 0}, wait_stream =3D {sleep_ref =3D 0, sleep_count =3D 0}, vbi_dev =3D 0x0, radio_dev =3D 0x0, resources =3D 0, eedata =3D "\032=EBg\225\200\033@=A3=C0\023k\020j\"\000\000\000\000\004W\= 000\r\000\000\000\000\000\000\000\000\000\000D\000\000\000=F0\020\001\000\0= 00\000\000\000[\034=C0\000\000\000 @ \200\002 \001\001", '\0' , "\"\003U\000S\000B\000 \0002\0008\0007\0000\000 \000D\000e\000v\000i\000c\000e", '\0' , vidq =3D {active =3D {next =3D 0x801208cb8, prev =3D 0x801208cb8}, queued =3D {next =3D 0x801208cc8, prev =3D 0x801208cc8}, wq =3D {sleep_ref =3D 0, sleep_count =3D 0}, pos =3D 0}, vbiq= =3D {active =3D {next =3D 0x801208ce8, prev =3D 0x801208ce8}, queued =3D {next =3D 0x801208cf8, prev =3D 0x801208cf8}, wq =3D {sleep_ref =3D 0, sleep_count =3D 0}, pos =3D 0}, isoc_ctl =3D {max_pkt_size =3D 0, num_bufs =3D 0, urb =3D 0x0, transfer_buffer =3D 0x0, cmd =3D 0 '\0', pos =3D 0, size =3D 0, pktsize= =3D 0, field =3D 0, tmp_buf =3D 0, tmp_buf_len =3D 0, vid_buf =3D 0x0, vbi_buf = =3D 0x0, nfields =3D 0, isoc_copy =3D 0}, slock =3D , udev =3D 0x8011c4b00, alt =3D 6, max_pkt_siz= e =3D 2892, num_alt =3D 8, alt_max_pkt_size =3D 0x801164b00, urb =3D {0x0, 0x= 0, 0x0, 0x0, 0x0}, transfer_buffer =3D {0x0, 0x0, 0x0, 0x0, 0x0}, urb_buf =3D '\0' , em28xx_write_regs =3D 0x46d4c0 , em28xx_read_reg =3D 0x46d960 , em28xx_read_reg_req_len =3D 0x46d740 , em28xx_write_regs_req =3D 0x46d320 , em28xx_read_reg_req =3D 0x46d930 , mode =3D EM28XX_SUSPEND, reg_gpo_num =3D 4, reg_gpio_num =3D 8, reg_gpo = =3D 0 '\0', reg_gpio =3D 16 '\020', snapshot_button_path =3D '\0' , sbutton_input_dev =3D 0x0, sbutton_query_work =3D {work =3D {entry =3D {tqe_next =3D 0x0, tqe_prev = =3D 0x0}, func =3D 0}, timer =3D {entry =3D {tqe_next =3D 0x0, tqe_prev =3D 0x0= }, function =3D 0, expires =3D 0, data =3D 0}}, dvb =3D 0x80101f700} (gdb) p dev->lock $7 =3D {sem =3D {value =3D 0}} Thanks, Drew From owner-freebsd-multimedia@FreeBSD.ORG Sun Jan 9 20:51:44 2011 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 117A4106564A for ; Sun, 9 Jan 2011 20:51:44 +0000 (UTC) (envelope-from gallatin@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id BC40F8FC16 for ; Sun, 9 Jan 2011 20:51:43 +0000 (UTC) Received: by gyf3 with SMTP id 3so7695324gyf.13 for ; Sun, 09 Jan 2011 12:51:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=ftGbZcYgGx1bKbno05PXrYGdwNa9xmY1mzveM4SZff8=; b=gdFDSVvMHflfN21DIqHzN9H+lpmPai8AECqrAvvEzDwLeHJmRGW7/BYsEww7aiq1ym jpXnkmrj36LYgZaAGpSi7AkClElxob7U5Gz4VQ+tpsuCA4CnVDZgg01PXT+nsjIJgoV+ 3Ijk885bb6DKzdAekg7GPaKEdluFJgFWc+JbU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=eLQ0miuObKajyyPGNmduwI7CwaH6kiZOxnq8zAbNdfzgoZ2FeaJxAA1XCaw8bqBHQo VyGyqD6qPeJMHjoy2IVWt/scQuoqaJKfM3a2qtR8OWKigPrlH1CB7y5eQDiOc2MxJPUQ WNkDNKlqezubP8WGrVHK2sbpVv2PAIw6XNBmA= MIME-Version: 1.0 Received: by 10.100.57.15 with SMTP id f15mr3753944ana.228.1294606302762; Sun, 09 Jan 2011 12:51:42 -0800 (PST) Received: by 10.100.248.15 with HTTP; Sun, 9 Jan 2011 12:51:42 -0800 (PST) In-Reply-To: References: <201101082130.05180.hselasky@c2i.net> Date: Sun, 9 Jan 2011 15:51:42 -0500 Message-ID: From: Andrew Gallatin To: Hans Petter Selasky Content-Type: multipart/mixed; boundary=0016e6509cb8ccd5a304997004fb Cc: freebsd-multimedia@freebsd.org Subject: Re: em28xx? 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: Sun, 09 Jan 2011 20:51:44 -0000 --0016e6509cb8ccd5a304997004fb Content-Type: text/plain; charset=ISO-8859-1 Ahah! Apparently linux mutexes are recursive! The driver holds dev->mutex and tries to lock it again. If I comment out the outer level of taking/releasing the mutex (attached) then the driver fully attaches. I guess a better patch would be to make the mutexes in your shim layer recursive as well. At any rate, I now see: em28xx: New device @ 480 Mbps (1b80:a340, interface 0, class 0) em28xx #0: chip ID is em2870 em28xx #0: i2c eeprom 00: 1a eb 67 95 80 1b 40 a3 c0 13 6b 10 6a 22 00 00 em28xx #0: i2c eeprom 10: 00 00 04 57 00 0d 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom 20: 44 00 00 00 f0 10 01 00 00 00 00 00 5b 1c c0 00 em28xx #0: i2c eeprom 30: 00 00 20 40 20 80 02 20 01 01 00 00 00 00 00 00 em28xx #0: i2c eeprom 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom 60: 00 00 00 00 00 00 00 00 00 00 22 03 55 00 53 00 em28xx #0: i2c eeprom 70: 42 00 20 00 32 00 38 00 37 00 30 00 20 00 44 00 em28xx #0: i2c eeprom 80: 65 00 76 00 69 00 63 00 65 00 00 00 00 00 00 00 em28xx #0: i2c eeprom 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: EEPROM ID= 0x9567eb1a, EEPROM hash = 0x2888a312 em28xx #0: EEPROM info: em28xx #0: No audio on board. em28xx #0: 500mA max power em28xx #0: Table at 0x04, strings=0x226a, 0x0000, 0x0000 em28xx #0: Identified as KWorld PlusTV 340U or UB435-Q (ATSC) (card=76) em28xx #0: v4l2 driver version 0.1.2 em28xx #0: V4L2 video device registered as video0 tda18271 129-0060: creating new instance TDA18271HD/C1 detected @ 129-0060 DVB: registering new adapter (em28xx #0) DVB: registering adapter 0 frontend 0 (LG Electronics LGDT3304 VSB/QAM Frontend)... em28xx #0: Successfully loaded em28xx-dvb Creating /dev/video0 Creating /dev/dvb/adapter0/demux0 Creating /dev/dvb/adapter0/dvr0 Creating /dev/dvb/adapter0/frontend0 Hurray!! Drew --0016e6509cb8ccd5a304997004fb Content-Type: text/x-patch; charset=US-ASCII; name="recursion.diff" Content-Disposition: attachment; filename="recursion.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_giqf3wkb0 LS0tIC91c3IvcG9ydHMvbXVsdGltZWRpYS93ZWJjYW1kL3dvcmsvd2ViY2FtZC0wLjEuMTgvdjRs LWR2Yi9saW51eC9kcml2ZXJzL21lZGlhL3ZpZGVvL2VtMjh4eC9lbTI4eHgtY2FyZHMuYwkyMDEw LTA3LTAxIDIzOjM4OjU0LjAwMDAwMDAwMCAtMDQwMAorKysgdjRsLWR2Yi9saW51eC9kcml2ZXJz L21lZGlhL3ZpZGVvL2VtMjh4eC9lbTI4eHgtY2FyZHMuYwkyMDExLTAxLTA5IDE1OjQ4OjQ1LjY1 Nzg1MTQ5MCAtMDUwMApAQCAtMzE2NCw3ICszMTY0LDcgQEAgc3RhdGljIGludCBlbTI4eHhfdXNi X3Byb2JlKHN0cnVjdCB1c2JfaQogCiAJLyogYWxsb2NhdGUgZGV2aWNlIHN0cnVjdCAqLwogCW11 dGV4X2luaXQoJmRldi0+bG9jayk7Ci0JbXV0ZXhfbG9jaygmZGV2LT5sb2NrKTsKKy8vCW11dGV4 X2xvY2soJmRldi0+bG9jayk7CiAJcmV0dmFsID0gZW0yOHh4X2luaXRfZGV2KCZkZXYsIHVkZXYs IGludGVyZmFjZSwgbnIpOwogCWlmIChyZXR2YWwpIHsKIAkJZW0yOHh4X2RldnVzZWQgJj0gfigx PDxkZXYtPmRldm5vKTsKQEAgLTMxODEsNyArMzE4MSw3IEBAIHN0YXRpYyBpbnQgZW0yOHh4X3Vz Yl9wcm9iZShzdHJ1Y3QgdXNiX2kKIAkvKiBTaG91bGQgYmUgdGhlIGxhc3QgdGhpbmcgdG8gZG8s IHRvIGF2b2lkIG5ld2VyIHVkZXYncyB0bwogCSAgIG9wZW4gdGhlIGRldmljZSBiZWZvcmUgZnVs bHkgaW5pdGlhbGl6aW5nIGl0CiAJICovCi0JbXV0ZXhfdW5sb2NrKCZkZXYtPmxvY2spOworLy8J bXV0ZXhfdW5sb2NrKCZkZXYtPmxvY2spOwogCiAJcmV0dXJuIDA7CiAK --0016e6509cb8ccd5a304997004fb-- From owner-freebsd-multimedia@FreeBSD.ORG Sun Jan 9 21:34:21 2011 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 7216E106564A for ; Sun, 9 Jan 2011 21:34:21 +0000 (UTC) (envelope-from gallatin@gmail.com) Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com [209.85.218.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2CE308FC0A for ; Sun, 9 Jan 2011 21:34:20 +0000 (UTC) Received: by yie19 with SMTP id 19so5537136yie.13 for ; Sun, 09 Jan 2011 13:34:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=kLm4F13p3jwMxGnZTmWkLvrimr+ec1gRvhZTENge0yI=; b=YSHfrcjOa5qmDDbjOLmiTOlcd0vUxrdVmX+Bt24h2e9gsef4cSxHo9xFiHQyO7zxUR okdiFr1NvZjfNsBFTX88LwnfNukJfDa5Qw13owHPZatOmBHRi9r2HxqKNGIM2jhiYhm7 5Bqylrn4g33mYbNTaIjrtlAYr4Bk/EYLE/gRo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=W6uRV8KKoiwv3V39c6JuvF/HlUdzFPvBuIoJTb4jr0KfpaHJPOEuaIiGL6AFUlaA4G 9dVesv8TdG34S4DNHybjhesHI3KChKRs70tLipDff9IDvYtZEjmNvQevMBlSg4KKe+wS CvX+wJBwLM9sPiiXAMXw+zIxO1Rq6j3+fL5ag= MIME-Version: 1.0 Received: by 10.100.144.11 with SMTP id r11mr2265909and.24.1294608860096; Sun, 09 Jan 2011 13:34:20 -0800 (PST) Received: by 10.100.248.15 with HTTP; Sun, 9 Jan 2011 13:34:20 -0800 (PST) In-Reply-To: References: <201101082130.05180.hselasky@c2i.net> Date: Sun, 9 Jan 2011 16:34:20 -0500 Message-ID: From: Andrew Gallatin To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-multimedia@freebsd.org Subject: Re: em28xx? 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: Sun, 09 Jan 2011 21:34:21 -0000 On Sun, Jan 9, 2011 at 3:51 PM, Andrew Gallatin wrote: > em28xx #0: Successfully loaded em28xx-dvb > Creating /dev/video0 > Creating /dev/dvb/adapter0/demux0 > Creating /dev/dvb/adapter0/dvr0 > Creating /dev/dvb/adapter0/frontend0 A quick test with a natively compiled azap / test_dvr from dvb-utils shows the tuner to be working fine. Now I just need to figure out what kind of shims I need to get 32-bit linux binaries working. Drew From owner-freebsd-multimedia@FreeBSD.ORG Sun Jan 9 23:06:47 2011 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 1143C106566C for ; Sun, 9 Jan 2011 23:06:47 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.c2i.net [212.247.154.2]) by mx1.freebsd.org (Postfix) with ESMTP id 80E348FC1F for ; Sun, 9 Jan 2011 23:06:45 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=A4HDTGXxjEDC1UuJ6rl8GMp0zaXu4XgXPL1dbujgs48= c=1 sm=1 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=pGLkceISAAAA:8 a=1U79rD324bslPVlkRg8A:9 a=7ydVjfaT5MREgcaLS9lNPgXb9KAA:4 a=wPNLvfGTeEIA:10 a=MSl-tDqOz04A:10 a=wo85w1ik_p9o9fWPiB0A:9 a=_nIARXP8L0Hqwm97pUsA:7 a=HXv4ktPYsN0mYM4Y1Ww3qXgEAqwA:4 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 72631261; Mon, 10 Jan 2011 00:06:44 +0100 From: Hans Petter Selasky To: Andrew Gallatin Date: Mon, 10 Jan 2011 00:06:46 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-PRERELEASE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_H+jKNwXBcVOqEsx" Message-Id: <201101100006.47252.hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org Subject: Re: em28xx? 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: Sun, 09 Jan 2011 23:06:47 -0000 --Boundary-00=_H+jKNwXBcVOqEsx Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit On Sunday 09 January 2011 22:34:20 Andrew Gallatin wrote: > On Sun, Jan 9, 2011 at 3:51 PM, Andrew Gallatin wrote: > > em28xx #0: Successfully loaded em28xx-dvb > > Creating /dev/video0 > > Creating /dev/dvb/adapter0/demux0 > > Creating /dev/dvb/adapter0/dvr0 > > Creating /dev/dvb/adapter0/frontend0 > > A quick test with a natively compiled azap / test_dvr from dvb-utils > shows the tuner to be working fine. Now I just need to figure out > what kind of shims I need to get 32-bit linux binaries working. > > Drew Could you try the attached patch for the recursive locking problem? --HPS --Boundary-00=_H+jKNwXBcVOqEsx Content-Type: text/x-patch; charset="iso-8859-1"; name="webcamd_recursive_locking.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="webcamd_recursive_locking.patch" Index: kernel/linux_thread.c =================================================================== --- kernel/linux_thread.c (revision 1679) +++ kernel/linux_thread.c (working copy) @@ -262,6 +262,7 @@ { memset(sem, 0, sizeof(*sem)); sem->value = value; + sem->owner = MUTEX_NO_OWNER; } void @@ -396,8 +397,8 @@ } struct funcdata { - threadfn_t * volatile func; - void * volatile data; + threadfn_t *volatile func; + void *volatile data; }; struct thread_wrapper { @@ -408,6 +409,7 @@ thread_kill(int dummy) { struct thread_wrapper *pw; + pw = pthread_getspecific(wrapper_key); if (pw != NULL) pw->stopping = 1; @@ -417,6 +419,7 @@ thread_got_stopping(void) { struct thread_wrapper *pw; + pw = pthread_getspecific(wrapper_key); if (pw != NULL) { if (pw->stopping) @@ -476,7 +479,6 @@ free(fd); return (ERR_PTR(-ENOMEM)); } - pthread_mutex_lock(&atomic_mutex); while (fd->func != NULL) pthread_cond_wait(&sema_cond, &atomic_mutex); @@ -574,3 +576,35 @@ { } + +void +mutex_lock(struct mutex *m) +{ + pthread_t self; + + self = pthread_self(); + + atomic_lock(); + /* check for recursive locking first */ + if (m->sem.owner == self) { + m->sem.value--; + } else { + down(&m->sem); + m->sem.owner = self; + } + atomic_unlock(); +} + +void +mutex_unlock(struct mutex *m) +{ + atomic_lock(); + up(&m->sem); + if (m->sem.value > 0) { + /* clear owner variable */ + m->sem.owner = MUTEX_NO_OWNER; + /* guard against double unlock */ + m->sem.value = 1; + } + atomic_unlock(); +} Index: kernel/linux_thread.h =================================================================== --- kernel/linux_thread.h (revision 1680) +++ kernel/linux_thread.h (working copy) @@ -26,6 +26,8 @@ #ifndef _LINUX_THREAD_H_ #define _LINUX_THREAD_H_ +#define MUTEX_NO_OWNER ((pthread_t)-1UL) + typedef struct task_struct { const char *comm; } task_struct_t; @@ -45,9 +47,10 @@ typedef struct semaphore { int32_t value; + pthread_t owner; } semaphore_t; -#define DEFINE_MUTEX(n) struct mutex n = { .sem.value = 1 }; +#define DEFINE_MUTEX(n) struct mutex n = { .sem.value = 1, .sem.owner = MUTEX_NO_OWNER, }; struct mutex { struct semaphore sem; }; @@ -157,11 +160,12 @@ int down_read_trylock(struct semaphore *sem); void poll_wait(struct file *filp, wait_queue_head_t *wq, poll_table * p); +void mutex_lock(struct mutex *m); +void mutex_unlock(struct mutex *m); + #define mutex_init(m) sema_init(&(m)->sem, 1) #define mutex_destroy(m) sema_uninit(&(m)->sem) -#define mutex_lock(m) down(&(m)->sem) -#define mutex_unlock(m) up(&(m)->sem) -#define mutex_lock_interruptible(m) (down(&(m)->sem),0) +#define mutex_lock_interruptible(m) (mutex_lock(m),0) #define init_MUTEX(s) sema_init(s,1) #define init_MUTEX_LOCKED(s) sema_init(s, 0) --Boundary-00=_H+jKNwXBcVOqEsx-- From owner-freebsd-multimedia@FreeBSD.ORG Mon Jan 10 00:42:31 2011 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 73046106564A for ; Mon, 10 Jan 2011 00:42:31 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 240818FC12 for ; Mon, 10 Jan 2011 00:42:30 +0000 (UTC) Received: by vws9 with SMTP id 9so7799271vws.13 for ; Sun, 09 Jan 2011 16:42:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:message-id:user-agent:mime-version:content-type :content-transfer-encoding; bh=nq/dgd6MtZc9R/43cwnpXnqE5+SEB1XK/RTBs9zFPvY=; b=f8W6wkaC+U8L7RUJwNI5cQKLLosU57KKumNJs0NSGHXJ2unhkGS7pejpm4tGe3ZTdx ZXLHk/tgpzvhjPY8mX93RaIG3o248FoY3zzInyHos6xodC7T1LWZy32jYvhAgB3pBOwc 4j4hCSZ/U1gqfjWdHN0K3CLHUkHLs0GJ2LORs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version:content-type:content-transfer-encoding; b=UFdrZZxwyrfRZmI1HRT81zMg2X52L4VgWjSBMBi94aI+XKwXtGZBghD8HGwaAcvqm7 Cgkz+bYaYEhgH9Iy5YZhc9c9fz7RmS8k2baDOcc53xSZg2Gq/+udF9VIWpdZzTl5OiCs tMvtdP5aZXtBm08UgQyvn+aKSqlyGN4MZoxWk= Received: by 10.220.180.67 with SMTP id bt3mr8025866vcb.227.1294620149862; Sun, 09 Jan 2011 16:42:29 -0800 (PST) Received: from localhost (anonymizer2.torservers.net [174.36.199.200]) by mx.google.com with ESMTPS id p8sm6203873vcr.42.2011.01.09.16.42.27 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 16:42:28 -0800 (PST) From: Anonymous To: =?utf-8?Q?Micka=C3=ABl?= Maillot References: <86wrmfcwo2.fsf@gmail.com> <86oc7rcwe4.fsf@gmail.com> Date: Mon, 10 Jan 2011 03:42:22 +0300 Message-ID: <864o9h8u8h.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-multimedia@freebsd.org Subject: Re: XBMC crash with vaapi vdpau 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: Mon, 10 Jan 2011 00:42:31 -0000 Micka=C3=ABl Maillot writes: > i recompiled libva & vdpau-video WITH_DEBUG > but no more usefull information in bt: > (gdb) bt > #0 0x0000000812e14349 in __vaDriverInit_0_31 () from > /usr/local/lib/va/nvidia_drv_video.so > #1 0x0000000812e11794 in __vaDriverInit_0_31 () from > /usr/local/lib/va/nvidia_drv_video.so > #2 0x0000000812e119a7 in __vaDriverInit_0_31 () from > /usr/local/lib/va/nvidia_drv_video.so > #3 0x0000000812e11ad2 in __vaDriverInit_0_31 () from > /usr/local/lib/va/nvidia_drv_video.so > #4 0x0000000801344b63 in vaCopySurfaceGLX () from /usr/local/lib/libva-g= lx.so.1 > #5 0x000000080134315f in vaCopySurfaceGLX () from /usr/local/lib/libva-g= lx.so.1 libva/vdpau-video are still compiled without symbols since you've likely ignored the note about empty STRIP in my previous message. Try $ make install WITH_DEBUG=3D STRIP=3D DEBUG_FLAGS=3D'-O0 -ggdb3' FYI, I have a different crash in vdpau-video driver. Core was generated by `xbmc.bin'. Program terminated with signal 11, Segmentation fault. #0 0x000000080d04d6ce in gl_vdpau_bind_surface (s=3D0x0) at utils_glx.c:= 1437 1437 if (s->is_bound) (gdb) i thr * 9 Thread 80dc07400 (LWP 100736/initial thread) 0x000000080d04d6ce in g= l_vdpau_bind_surface (s=3D0x0) at utils_glx.c:1437 8 Thread 80410b800 (LWP 101992/xbmc.bin) 0x000000080aae961c in select = () at select.S:3 7 Thread 80410b000 (LWP 101993/xbmc.bin) 0x000000080aa8acac in poll ()= at poll.S:3 6 Thread 80410ac00 (LWP 101994/xbmc.bin) 0x000000080aae961c in select = () at select.S:3 5 Thread 80410a800 (LWP 101995/xbmc.bin) 0x000000080aacef7c in nanosle= ep () at nanosleep.S:3 4 Thread 80410e400 (LWP 101996/xbmc.bin) 0x000000080ba924ec in _umtx_o= p_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:37 3 Thread 804108000 (LWP 101997/xbmc.bin) 0x000000080aacef7c in nanosle= ep () at nanosleep.S:3 2 Thread 80410a400 (LWP 101998/xbmc.bin) 0x000000080aae961c in select = () at select.S:3 1 Thread 804108c00 (LWP 101386/xbmc.bin) 0x000000080aae961c in select = () at select.S:3 (gdb) bt #0 0x000000080d04d6ce in gl_vdpau_bind_surface (s=3D0x0) at utils_glx.c:= 1437 #1 0x000000080d04aca7 in begin_render_glx_surface (driver_data=3D0x814c1= 5d00, obj_glx_surface=3D0x814c16c48) at vdpau_video_glx.c:619 #2 0x000000080d04af4d in copy_glx_surface (driver_data=3D0x814c15d00, ob= j_glx_surface=3D0x814c16c48, obj_surface=3D0x814c16250, flags=3D32) at vdpa= u_video_glx.c:740 #3 0x000000080d04b086 in vdpau_CopySurfaceGLX (ctx=3D0x814fe91c0, gl_sur= face=3D0x814c16c48, surface=3D50331649, flags=3D32) at vdpau_video_glx.c:785 #4 0x000000080ce335a0 in vaCopySurfaceGLX_impl_driver (ctx=3D0x814fe91c0= , gl_surface=3D0x814c16c48, surface=3D50331649, flags=3D32) at va_glx_impl.= c:842 #5 0x000000080ce31c6b in vaCopySurfaceGLX (dpy=3D0x814c61080, gl_surface= =3D0x814c16c48, surface=3D50331649, flags=3D32) at va_glx.c:163 #6 0x0000000000ad2e8f in CLinuxRendererGL::UploadVAAPITexture (this=3D0x= 814e80600, index=3D0) at LinuxRendererGL.cpp:2433 #7 0x0000000000ad24fe in CLinuxRendererGL::Render (this=3D0x814e80600, f= lags=3D, renderBuffer=3D0) at LinuxRendererGL.cpp:1283 #8 0x0000000000acdcfe in CLinuxRendererGL::RenderUpdate (this=3D0x814e80= 600, clear=3Dfalse, flags=3D64, alpha=3D) at LinuxRend= ererGL.cpp:835 #9 0x0000000000acc327 in CXBMCRenderManager::RenderUpdate (this=3D0x1317= d08, clear=3Dfalse, flags=3D0, alpha=3D255) at RenderManager.cpp:254 #10 0x0000000000b55cc7 in CGUIVideoControl::Render (this=3D0x81346ed80) a= t GUIVideoControl.cpp:61 #11 0x0000000000afae27 in CGUIControl::DoRender (this=3D0x81346ed80, curr= entTime=3D) at GUIControl.cpp:147 #12 0x0000000000b0d59b in CGUIControlGroup::Render (this=3D0x813635b00) a= t GUIControlGroup.cpp:114 #13 0x0000000000b5775d in CGUIWindow::Render (this=3D0x813635b00) at GUIW= indow.cpp:329 #14 0x0000000000b62b13 in CGUIWindowManager::Render (this=3D0x131cd80) at= GUIWindowManager.cpp:509 #15 0x000000000071a13b in CApplication::RenderNoPresent (this=3D0x1318158= ) at Application.cpp:1809 #16 0x000000000070e979 in CApplication::Render (this=3D0x1318158) at Appl= ication.cpp:2046 #17 0x00000000009a68c1 in CXBApplicationEx::Run (this=3D0x1318158) at XBA= pplicationEx.cpp:138 #18 0x00000000009a706c in main (argc=3D2, argv=3D0x7ffffffedf38) at xbmc.= cpp:174 However, my ports tree is littered with hacks, some are XBMC related[1] and some are not. Apps break often. So, it's probably local but $ mplayer -vo vaapi:gl -va vaapi works fine which implies that VA/GLX should, too. And XBMC doesn't crash with VDPAU_VIDEO_GL_INTEROP=3D0 or LIBVA_DRIVER_NAME=3Ddummy. [1] python27 + build hacks for xbmc port - http://pastebin.com/RdgTW8QS > it crash when i want to read a 1080p mkv file which run fine with VDPAU. > > vainfo run fine: > libva: libva version 0.31.1 > Xlib: extension "XFree86-DRI" missing on display ":0.0". > libva: va_getDriverName() returns 0 > libva: Trying to open /usr/local/lib/va/nvidia_drv_video.so > libva: va_openDriver() returns 0 > vainfo: VA API version: 0.31 > vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for > VA-API - 0.7.3.pre4 > vainfo: Supported profile and entrypoints > VAProfileMPEG2Simple : VAEntrypointVLD > VAProfileMPEG2Main : VAEntrypointVLD > VAProfileH264Main : VAEntrypointVLD > VAProfileH264High : VAEntrypointVLD > VAProfileVC1Simple : VAEntrypointVLD > VAProfileVC1Main : VAEntrypointVLD > VAProfileVC1Advanced : VAEntrypointVLD Just a guess but since vdpau-video may crash on cards that don't support VDPAU features it may as well crash on "certain" resolutions, too, e.g. VDPAU FEATURES NOTE 1 (from nvidia-driver about feature set "B") GPUs with this note may not support H.264 streams with the following widt= hs: 49, 54, 59, 64, 113, 118, 123, 128 macroblocks (769-784, 849-864, 929-944, 1009-1024, 1793-1808, 1873-1888, 1953-1968, 2033-2048 pixels). Not that I know what card you have nor the video resolution of the tested file. So... - can you play the file with VDPAU but without falling back[1], e.g. to software decoder? - can you play the file with VAAPI in anything else, e.g. mplayer[2], vlc? - does running with VDPAU_VIDEO_DEBUG=3D1 produce any debug messages besides nvidia-driver version? [1] XBMC plays video fine with LIBVA_DRIVER_NAME=3Ddummy unlike mplayer and= vlc [2] vaapi hack for mplayer port - http://pastebin.com/A1tcNZM0 > but vatest_10 and 11 failed: > *** vatest_10: Create and destroy buffers > libva: libva version 0.31.1 > Xlib: extension "XFree86-DRI" missing on display ":0.0". > libva: va_getDriverName() returns 0 > libva: Trying to open /usr/local/lib/va/nvidia_drv_video.so > libva: va_openDriver() returns 0 > Assertion failed: (VA_STATUS_SUCCESS =3D=3D va_status), function test, > file test_10.c, line 112. > *** vatest_11: Map and unmap buffers > libva: libva version 0.31.1 > Xlib: extension "XFree86-DRI" missing on display ":0.0". > libva: va_getDriverName() returns 0 > libva: Trying to open /usr/local/lib/va/nvidia_drv_video.so > libva: va_openDriver() returns 0 > --- vaCreateBuffer created buffer 04000000 of type 0 > --- vaCreateBuffer created buffer 04000001 of type 1 > --- vaCreateBuffer created buffer 04000002 of type 2 > Assertion failed: (VA_STATUS_SUCCESS =3D=3D va_status), function test, > file test_11.c, line 129. They do fail on my card (0x0622), too. And asserts are disabled unless you compile WITH_DEBUG. From owner-freebsd-multimedia@FreeBSD.ORG Mon Jan 10 11:07:06 2011 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 C77911065696 for ; Mon, 10 Jan 2011 11:07:06 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B52B88FC26 for ; Mon, 10 Jan 2011 11:07:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p0AB76rb001822 for ; Mon, 10 Jan 2011 11:07:06 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0AB76Jb001816 for freebsd-multimedia@FreeBSD.org; Mon, 10 Jan 2011 11:07:06 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 10 Jan 2011 11:07:06 GMT Message-Id: <201101101107.p0AB76Jb001816@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-multimedia@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-multimedia@FreeBSD.org 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: Mon, 10 Jan 2011 11:07:06 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/152622 multimedia [pcm] uaudio recording problem o kern/152500 multimedia [hdac] play interrupt timeout, channel dead o kern/152378 multimedia [sound][patch] Update snd_envy24ht to be MPSAFE and us o ports/151203 multimedia Fixed syntax in libfame.m4 file in multimedia/libfame o ports/150502 multimedia multimedia/gpac-libgpac 0.4.5_4,1 fails to compile on o kern/150284 multimedia [snd_hda] No gain with Audio o kern/149943 multimedia [pcm]: CS4236 audio problem o ports/149765 multimedia [PATCH] audio/faac: improve build patches o kern/148741 multimedia [sound] Headphones are deaf (do not work) on Lenovo Th o kern/147504 multimedia [oss] [panic] panic: dev_pager_getpage: map function r p kern/147466 multimedia [snd_hda] [patch] Thinkpad t510, codecs not recognized o kern/146031 multimedia [snd_hda] race condition when kldunload snd_hda sound o kern/144659 multimedia [pcm] The distortion of the sound playback of music at o kern/143505 multimedia [pcm] FreeBSD 8.0-RELEASE (x64) won't make sound card o kern/141826 multimedia [snd_hda] load of snd_hda module fails o kern/140591 multimedia [PATCH][sound] No sound output on lineout/headphone ja o kern/140453 multimedia [sound] No sound inside Virtualbox on 50% volume o kern/137589 multimedia [snd_uaudio] snd_uaudio.ko (USB audio driver) doesn't o kern/134767 multimedia [sound] [snd_hda] [regression] Sigmatel STAC9205X no s o kern/132848 multimedia [sound] [snd_emu10kx] driver problem with card init, s o kern/132511 multimedia [sound] [snd_hda] Probing ALC888 codec on ASRock K10N7 o kern/129604 multimedia [sound] Sound stops with error: pcm0:virtual:dsp0.vp0: o kern/127131 multimedia [bktr] /usr/src/sys/dev/bktr/bktr_os.c, line 469: wron s kern/125756 multimedia [sound] [patch] cannot detect soft-modem on HDA bus o kern/124319 multimedia [sound] [snd_emu10k1] [regression] Cannot record from o kern/122086 multimedia [sound] maestro sound driver is working, but mixer ini p kern/121156 multimedia [sound] [patch] Turn on inverted external amplifier se o kern/120857 multimedia [sound] [snd_emu10k1] snd_emu10k1 driver issues a warn o kern/120780 multimedia [sound] [snd_hda] snd_hda doesn't work on Dell Latitut o kern/119973 multimedia [sound] [snd_maestro] [regression] snd_maestro only wo o kern/119931 multimedia [sound] No sound card detected on ASUS "K8V-X SE R2.00 o kern/119759 multimedia [sound] [snd_emu10k1] [regression] Can not record anyt f kern/115666 multimedia [sound] Microphone does not work o kern/115300 multimedia [sound] [snd_hda] [regression] snd_hda(4) fails to att o kern/114760 multimedia [sound] [snd_cmi] snd_cmi driver causing sporadic syst o kern/111767 multimedia [sound] ATI SB450 High Definition Audio Controller sou o kern/107516 multimedia [sound] [snd_emu10k1] - skips, clicks and lag after a o kern/107051 multimedia [sound] only 2 channels output works for the ALC850 (o o kern/104874 multimedia [sound] [snd_emu10k1] kldload snd_emu10k1 hangs system o kern/104626 multimedia [sound] FreeBSD 6.2 does not support SoundBlaster Audi o kern/101417 multimedia [sound] 4-speakers output not possible on Asus A8V-Del o kern/100859 multimedia [sound] [snd_ich] snd_ich broken on GIGABYTE 915 syste o kern/98752 multimedia [sound] Intel ich6 82801 FB - on Packard Bell A8810 la o kern/98504 multimedia [sound] Sound is distorted with SB Live 5.1 o kern/98496 multimedia [sound] [snd_ich] some functions don't work in my soun o kern/97609 multimedia [sound] Load Sound Module - VIA8233 - fails o kern/97535 multimedia [sound] [snd_mss] doesn't work in 6.0-RELEASE and abov o kern/96538 multimedia [sound] emu10k1-driver inverts channels o kern/95086 multimedia [sound] uaudio line in problem with sbdm lx o kern/94279 multimedia [sound] [snd_neomagic] snd_neomagic crashes on FreeBSD o kern/93986 multimedia [sound] Acer TravelMate 4652LMi pcm0 channel dead o kern/92512 multimedia [sound] distorted mono output with emu10k1 o kern/87782 multimedia [sound] snd_t4dwave and pcm0:record:0: record interrup s kern/83697 multimedia [sound] [snd_mss] [patch] support, docs added for full o kern/82043 multimedia [sound] snd_emu10k1 - mixer does not work. o kern/81146 multimedia [sound] Sound isn't working AT ALL for Sis7012 onboard o kern/80632 multimedia [sound] pcm driver missing support for CMI8738 auxilla o kern/79912 multimedia [sound] sound broken for 2 VIA chipsets: interrupt sto o kern/79905 multimedia [sound] sis7018 sound module problem o kern/79678 multimedia [sound] sound works except recording from any source o conf/75137 multimedia [sound] add snd_* modules support to /etc/rc.d/mixer f kern/72995 multimedia [sound] Intel ICH2 (82801BA) - sound nearly inaudible o kern/63204 multimedia [sound] /dev/mixer broken with ESS Maestro-2E (still o o kern/60677 multimedia [sound] [patch] No reaction of volume controy key on I s kern/60599 multimedia [bktr] [partial patch] No sound for ATI TV Wonder (ste o kern/37600 multimedia [sound] [partial patch] t4dwave drive doesn't record. o kern/23546 multimedia [sound] [snd_csa] [patch] csa DMA-interrupt problem 67 problems total. From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 11 01:45:07 2011 Return-Path: Delivered-To: freebsd-multimedia@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1F21106564A; Tue, 11 Jan 2011 01:45:07 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D85AA8FC0A; Tue, 11 Jan 2011 01:45:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p0B1j6RK000375; Tue, 11 Jan 2011 01:45:06 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0B1j6Ur000371; Tue, 11 Jan 2011 01:45:06 GMT (envelope-from linimon) Date: Tue, 11 Jan 2011 01:45:06 GMT Message-Id: <201101110145.p0B1j6Ur000371@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org, freebsd-multimedia@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: ports/153846: graphics/libcaca 0.99.beta17 - Hidden dependency on Xlib.h 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: Tue, 11 Jan 2011 01:45:08 -0000 Old Synopsis: libcaca 0.99.beta17 - Hidden dependency on Xlib.h New Synopsis: graphics/libcaca 0.99.beta17 - Hidden dependency on Xlib.h Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-multimedia Responsible-Changed-By: linimon Responsible-Changed-When: Tue Jan 11 01:44:29 UTC 2011 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=153846 From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 11 08:47:46 2011 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 E7515106566B for ; Tue, 11 Jan 2011 08:47:46 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.c2i.net [212.247.154.162]) by mx1.freebsd.org (Postfix) with ESMTP id 4CF188FC0A for ; Tue, 11 Jan 2011 08:47:45 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=uKwGHVgX/XpzFB6WQV71hE8vVR+wz8PlNBntNPh/OpQ= c=1 sm=1 a=4vW0rCAk17MA:10 a=Q9fys5e9bTEA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=UAxoutJAh8-kMWsHnrEA:9 a=hseoWgufk9lwcqrPBXHe--iwBWgA:4 a=PUjeQqilurYA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe06.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 72140784; Tue, 11 Jan 2011 09:47:43 +0100 From: Hans Petter Selasky To: "J.R. Oldroyd" Date: Tue, 11 Jan 2011 09:47:46 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <20091204223126.00005392@unknown> <201001081650.14189.hselasky@c2i.net> <20100108114130.1cfe88c5@shibato.opal.com> In-Reply-To: <20100108114130.1cfe88c5@shibato.opal.com> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201101110947.46399.hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org, emulation@freebsd.org, Alexander Leidinger Subject: Re: FYI: v4l-linuxulator support in FreeBSD-current now 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: Tue, 11 Jan 2011 08:47:47 -0000 Hi, I've received the following patch for my cuse4bsd module. Could this be included in the kernel's linux.ko ? This patch allows for linux DVB applications running under FreeBSD linux emulation. --HPS Index: cuse4bsd_kmod.c =================================================================== --- cuse4bsd_kmod.c (revision 1700) +++ cuse4bsd_kmod.c (working copy) @@ -1689,3 +1689,49 @@ return (0); } + + +#include +#if defined (__amd64__) +#include +#include +#else +#include +#include +#endif + +#include +MODULE_DEPEND(cuse4bsd, linux, 1, 1, 1); + +#define DVB_LINUX_IOCTL_MIN 0x6f00 +#define DVB_LINUX_IOCTL_MAX 0x6fff + + +static linux_ioctl_function_t cuse4bsd_linux_ioctl; +static struct linux_ioctl_handler cuse4bsd_linux_handler = + {cuse4bsd_linux_ioctl, DVB_LINUX_IOCTL_MIN, DVB_LINUX_IOCTL_MAX}; + +SYSINIT (cuse4bsd_linux_register, SI_SUB_KLD, SI_ORDER_MIDDLE, + linux_ioctl_register_handler, &cuse4bsd_linux_handler); +SYSUNINIT(cuse4bsd_linux_unregister, SI_SUB_KLD, SI_ORDER_MIDDLE, + linux_ioctl_unregister_handler, &cuse4bsd_linux_handler); + +static int +cuse4bsd_linux_ioctl(struct thread *td, struct linux_ioctl_args *args) +{ + unsigned long cmd; + + /* swap the read/write bits, due to differences in bsd & linux ioctls*/ + cmd = (unsigned long)args->cmd; + if (cmd & (0x40 << 24)) { + cmd &= 0xffffff; + cmd |= (0x80 << 24); + } else if (cmd & (0x80 << 24)) { + cmd &= 0xffffff; + cmd |= (0x40 << 24); + } + args->cmd = (l_uint)cmd; + + /* Pass the ioctl off to our standard handler, now that its valid */ + return(ioctl(td, (struct ioctl_args *)args)); +} From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 11 12:19:27 2011 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 C1A6A1065670; Tue, 11 Jan 2011 12:19:27 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id 20A378FC08; Tue, 11 Jan 2011 12:19:26 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=47jFoQlQiPaXYvJJRPLdRbboc2AFRw6czTf8DabKp4c= c=1 sm=1 a=4vW0rCAk17MA:10 a=IkcTkHD0fZMA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=8kQB0OdkAAAA:8 a=amRkz5gaQd-j6O2Y_mkA:9 a=P-Y9WNw2l90DsZERKSQIGpoiiA4A:4 a=QEXdDO2ut3YA:10 a=9aOQ2cSd83gA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 72654993; Tue, 11 Jan 2011 13:19:24 +0100 From: Hans Petter Selasky To: Alexander Leidinger Date: Tue, 11 Jan 2011 13:19:28 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <20091204223126.00005392@unknown> <201101110947.46399.hselasky@c2i.net> <20110111131153.48321lqz8kxrsetc@webmail.leidinger.net> In-Reply-To: <20110111131153.48321lqz8kxrsetc@webmail.leidinger.net> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201101111319.28219.hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org, emulation@freebsd.org, "J.R. Oldroyd" Subject: Re: FYI: v4l-linuxulator support in FreeBSD-current now 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: Tue, 11 Jan 2011 12:19:27 -0000 On Tuesday 11 January 2011 13:11:53 Alexander Leidinger wrote: > Quoting Hans Petter Selasky (from Tue, 11 Jan 2011 > > 09:47:46 +0100): > > Hi, > > > > I've received the following patch for my cuse4bsd module. Could this be > > From Andrew Gallatin (gallatin@)? Yes, that is correct. > > > included in the kernel's linux.ko ? This patch allows for linux DVB > > applications running under FreeBSD linux emulation. > > Yes, but I would prefer the person who submitted it could test it > before it is committed. > > Semi-OT: Are you sure the MODULE_DEPEND is not necessary for your > module and should be included? The patch is tested according to Andrew Gallatin, but as far as I understand it does not belong in cuse4bsd_kmod.c. It belongs in "sys/compat/linux/linux_ioctl.c". --HPS From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 11 12:27:41 2011 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 3EA831065672 for ; Tue, 11 Jan 2011 12:27:41 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id C1A9D8FC13 for ; Tue, 11 Jan 2011 12:27:40 +0000 (UTC) Received: from outgoing.leidinger.net (p57B3B1C7.dip.t-dialin.net [87.179.177.199]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 120A7844012; Tue, 11 Jan 2011 13:12:27 +0100 (CET) Received: from webmail.leidinger.net (unknown [IPv6:fd73:10c7:2053:1::2:102]) by outgoing.leidinger.net (Postfix) with ESMTP id C688E28B0; Tue, 11 Jan 2011 13:12:18 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id p0BCBriX095767; Tue, 11 Jan 2011 13:11:53 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Tue, 11 Jan 2011 13:11:53 +0100 Message-ID: <20110111131153.48321lqz8kxrsetc@webmail.leidinger.net> Date: Tue, 11 Jan 2011 13:11:53 +0100 From: Alexander Leidinger To: Hans Petter Selasky References: <20091204223126.00005392@unknown> <201001081650.14189.hselasky@c2i.net> <20100108114130.1cfe88c5@shibato.opal.com> <201101110947.46399.hselasky@c2i.net> In-Reply-To: <201101110947.46399.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 120A7844012.A807B X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=2.474, required 6, autolearn=disabled, J_CHICKENPOX_43 0.60, J_CHICKENPOX_52 0.60, RDNS_NONE 1.27) X-EBL-MailScanner-SpamScore: ss X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1295352748.28226@Dl+Jyo7m2AleW6J2evAyVA X-EBL-Spam-Status: No Cc: freebsd-multimedia@freebsd.org, emulation@freebsd.org, "J.R. Oldroyd" Subject: Re: FYI: v4l-linuxulator support in FreeBSD-current now 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: Tue, 11 Jan 2011 12:27:41 -0000 Quoting Hans Petter Selasky (from Tue, 11 Jan 2011 09:47:46 +0100): > Hi, > > I've received the following patch for my cuse4bsd module. Could this be From Andrew Gallatin (gallatin@)? > included in the kernel's linux.ko ? This patch allows for linux DVB > applications running under FreeBSD linux emulation. Yes, but I would prefer the person who submitted it could test it before it is committed. Semi-OT: Are you sure the MODULE_DEPEND is not necessary for your module and should be included? Bye, Alexander. > --HPS > > Index: cuse4bsd_kmod.c > =================================================================== > --- cuse4bsd_kmod.c (revision 1700) > +++ cuse4bsd_kmod.c (working copy) > @@ -1689,3 +1689,49 @@ > > return (0); > } > + > + > +#include > +#if defined (__amd64__) > +#include > +#include > +#else > +#include > +#include > +#endif > + > +#include > +MODULE_DEPEND(cuse4bsd, linux, 1, 1, 1); > + > +#define DVB_LINUX_IOCTL_MIN 0x6f00 > +#define DVB_LINUX_IOCTL_MAX 0x6fff > + > + > +static linux_ioctl_function_t cuse4bsd_linux_ioctl; > +static struct linux_ioctl_handler cuse4bsd_linux_handler = > + {cuse4bsd_linux_ioctl, DVB_LINUX_IOCTL_MIN, DVB_LINUX_IOCTL_MAX}; > + > +SYSINIT (cuse4bsd_linux_register, SI_SUB_KLD, SI_ORDER_MIDDLE, > + linux_ioctl_register_handler, &cuse4bsd_linux_handler); > +SYSUNINIT(cuse4bsd_linux_unregister, SI_SUB_KLD, SI_ORDER_MIDDLE, > + linux_ioctl_unregister_handler, &cuse4bsd_linux_handler); > + > +static int > +cuse4bsd_linux_ioctl(struct thread *td, struct linux_ioctl_args *args) > +{ > + unsigned long cmd; > + > + /* swap the read/write bits, due to differences in bsd & linux ioctls*/ > + cmd = (unsigned long)args->cmd; > + if (cmd & (0x40 << 24)) { > + cmd &= 0xffffff; > + cmd |= (0x80 << 24); > + } else if (cmd & (0x80 << 24)) { > + cmd &= 0xffffff; > + cmd |= (0x40 << 24); > + } > + args->cmd = (l_uint)cmd; > + > + /* Pass the ioctl off to our standard handler, now that its valid */ > + return(ioctl(td, (struct ioctl_args *)args)); > +} > > -- Seems this guy showed up at a party, and all of his friends jumped for Joy. But she sidestepped, and they missed. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 11 12:37:17 2011 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 4D9CD106566C; Tue, 11 Jan 2011 12:37:17 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id F20348FC14; Tue, 11 Jan 2011 12:37:16 +0000 (UTC) Received: from outgoing.leidinger.net (p57B3B1C7.dip.t-dialin.net [87.179.177.199]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 30767844012; Tue, 11 Jan 2011 13:37:13 +0100 (CET) Received: from webmail.leidinger.net (unknown [IPv6:fd73:10c7:2053:1::2:102]) by outgoing.leidinger.net (Postfix) with ESMTP id 212F428B3; Tue, 11 Jan 2011 13:37:10 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id p0BCasYG001393; Tue, 11 Jan 2011 13:36:54 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Tue, 11 Jan 2011 13:36:54 +0100 Message-ID: <20110111133654.183753dk3w69k9og@webmail.leidinger.net> Date: Tue, 11 Jan 2011 13:36:54 +0100 From: Alexander Leidinger To: Hans Petter Selasky References: <20091204223126.00005392@unknown> <201101110947.46399.hselasky@c2i.net> <20110111131153.48321lqz8kxrsetc@webmail.leidinger.net> <201101111319.28219.hselasky@c2i.net> In-Reply-To: <201101111319.28219.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 30767844012.A6B5A X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=1.874, required 6, autolearn=disabled, J_CHICKENPOX_43 0.60, RDNS_NONE 1.27) X-EBL-MailScanner-SpamScore: s X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1295354233.83304@Sl4HVMO5fS9FNzxtpiP36Q X-EBL-Spam-Status: No Cc: freebsd-multimedia@freebsd.org, emulation@freebsd.org, "J.R. Oldroyd" Subject: Re: FYI: v4l-linuxulator support in FreeBSD-current now 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: Tue, 11 Jan 2011 12:37:17 -0000 Quoting Hans Petter Selasky (from Tue, 11 Jan 2011 13:19:28 +0100): > On Tuesday 11 January 2011 13:11:53 Alexander Leidinger wrote: >> Quoting Hans Petter Selasky (from Tue, 11 Jan 2011 >> >> 09:47:46 +0100): >> > Hi, >> > >> > I've received the following patch for my cuse4bsd module. Could this be >> >> From Andrew Gallatin (gallatin@)? > > Yes, that is correct. I'll contact him, and I think he can commit this himself. Bye, Alexander. -- You auto buy now. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 11 14:59:20 2011 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 250B3106564A; Tue, 11 Jan 2011 14:59:20 +0000 (UTC) (envelope-from fbsd@opal.com) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) by mx1.freebsd.org (Postfix) with ESMTP id CD1B98FC22; Tue, 11 Jan 2011 14:59:19 +0000 (UTC) Received: from pool-141-154-232-8.bos.east.verizon.net ([141.154.232.8] helo=homobox.opal.com) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1PcfB0-0003MF-95; Tue, 11 Jan 2011 14:26:22 +0000 Received: from opal.com (localhost [IPv6:::1]) (authenticated bits=0) by homobox.opal.com (8.14.4/8.14.4) with ESMTP id p0BEQFUN063166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Jan 2011 09:26:15 -0500 (EST) (envelope-from fbsd@opal.com) Received: from shibato.opal.com ([2001:5c0:1100:f103:221:63ff:fe5a:c9a7] helo=shibato.opal.com) with IPv6:587 by opal.com; 11 Jan 2011 09:26:15 -0500 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 141.154.232.8 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18B28qZ/R6JW2r8Y8v6GAs+ Date: Tue, 11 Jan 2011 09:26:09 -0500 From: "J.R. Oldroyd" To: Hans Petter Selasky Message-ID: <20110111092609.7bf82016@shibato.opal.com> In-Reply-To: <201101110947.46399.hselasky@c2i.net> References: <20091204223126.00005392@unknown> <201001081650.14189.hselasky@c2i.net> <20100108114130.1cfe88c5@shibato.opal.com> <201101110947.46399.hselasky@c2i.net> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/YhisAVz+wRfmBxJsPoke_AO"; protocol="application/pgp-signature" Cc: freebsd-multimedia@freebsd.org, emulation@freebsd.org, Alexander Leidinger Subject: Re: FYI: v4l-linuxulator support in FreeBSD-current now 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: Tue, 11 Jan 2011 14:59:20 -0000 --Sig_/YhisAVz+wRfmBxJsPoke_AO Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 11 Jan 2011 09:47:46 +0100, Hans Petter Selasky = wrote: > > Hi, >=20 > I've received the following patch for my cuse4bsd module. Could this be=20 > included in the kernel's linux.ko ? This patch allows for linux DVB=20 > applications running under FreeBSD linux emulation. >=20 > --HPS >=20 > Index: cuse4bsd_kmod.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- cuse4bsd_kmod.c (revision 1700) > +++ cuse4bsd_kmod.c (working copy) > @@ -1689,3 +1689,49 @@ > =20 > return (0); > } > + > + > +#include > +#if defined (__amd64__) > +#include > +#include > +#else > +#include > +#include > +#endif > + > +#include > +MODULE_DEPEND(cuse4bsd, linux, 1, 1, 1); > + > +#define DVB_LINUX_IOCTL_MIN 0x6f00 > +#define DVB_LINUX_IOCTL_MAX 0x6fff > + > + > +static linux_ioctl_function_t cuse4bsd_linux_ioctl; > +static struct linux_ioctl_handler cuse4bsd_linux_handler =3D=20 > + {cuse4bsd_linux_ioctl, DVB_LINUX_IOCTL_MIN, DVB_LINUX_IOCTL_MAX}; > + > +SYSINIT (cuse4bsd_linux_register, SI_SUB_KLD, SI_ORDER_MIDDLE,=20 > + linux_ioctl_register_handler, &cuse4bsd_linux_handler); > +SYSUNINIT(cuse4bsd_linux_unregister, SI_SUB_KLD, SI_ORDER_MIDDLE,=20 > + linux_ioctl_unregister_handler, &cuse4bsd_linux_handler); > + > +static int > +cuse4bsd_linux_ioctl(struct thread *td, struct linux_ioctl_args *args) > +{ > + unsigned long cmd; > + > + /* swap the read/write bits, due to differences in bsd & linux ioctls*/ > + cmd =3D (unsigned long)args->cmd; > + if (cmd & (0x40 << 24)) { > + cmd &=3D 0xffffff; > + cmd |=3D (0x80 << 24); > + } else if (cmd & (0x80 << 24)) { > + cmd &=3D 0xffffff; > + cmd |=3D (0x40 << 24); > + } > + args->cmd =3D (l_uint)cmd; > + =20 > + /* Pass the ioctl off to our standard handler, now that its valid */ > + return(ioctl(td, (struct ioctl_args *)args)); > +} This patch merely flips the cmd bits. I'm not familiar with the Linux DVB ioctls... is it really the case that none of the data structures have 32/64-bit architecture dependent field sizes? Great if that's the case, but if not, we need to do data structure conversions here too, as we did for V4L. -jr --Sig_/YhisAVz+wRfmBxJsPoke_AO Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAk0saIIACgkQls33urr0k4nb5gCgo3c7uYK0K6p9dOTMPGq89skW SI4AoKZQg86SORlN9iskjoYl8oG09LHG =p6F8 -----END PGP SIGNATURE----- --Sig_/YhisAVz+wRfmBxJsPoke_AO-- From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 11 15:17:58 2011 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 78C701065674 for ; Tue, 11 Jan 2011 15:17:58 +0000 (UTC) (envelope-from gallatin@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1BD168FC14 for ; Tue, 11 Jan 2011 15:17:57 +0000 (UTC) Received: by yxh35 with SMTP id 35so8573477yxh.13 for ; Tue, 11 Jan 2011 07:17:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=GmIz+DK+IUG2zjk/SsKFK0688461cBFd7AdvW74ekY8=; b=exCoQgjBU8KIZDDqN7oU+oWjejG+zehTdWGc5sFYOtTDGm2uf6po7bwX/MxJluVdus VLHufeHnXTTx8VM6UxPZ9yrYt7YVyVGyvybAuSp2p8e9yZJE5dVzmpRz3g3IkEImg9bg 5l/LseoaugLrHxsXHBiKwl267oJNmH0ULmFbI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=s+/kfeogGqygIlTB4fzO/KRsPvUz9aRZxc5B7/yHUGvRNKo/g7S2F8yEIzHIMxhhvX r0wwLcH3Oz178g3AmtD5Vt5ux3usJGGIEyy4w6f2VSdJXsRSDoBA5LmmaIYCkRCVLJv1 lZPJbv75QTDIF2EePlyG5v13GWjv9LPtWks2I= MIME-Version: 1.0 Received: by 10.100.144.11 with SMTP id r11mr3583002and.24.1294759077329; Tue, 11 Jan 2011 07:17:57 -0800 (PST) Received: by 10.100.248.15 with HTTP; Tue, 11 Jan 2011 07:17:57 -0800 (PST) In-Reply-To: <20110111092609.7bf82016@shibato.opal.com> References: <20091204223126.00005392@unknown> <201001081650.14189.hselasky@c2i.net> <20100108114130.1cfe88c5@shibato.opal.com> <201101110947.46399.hselasky@c2i.net> <20110111092609.7bf82016@shibato.opal.com> Date: Tue, 11 Jan 2011 10:17:57 -0500 Message-ID: From: Andrew Gallatin To: "J.R. Oldroyd" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-multimedia@freebsd.org, emulation@freebsd.org, Alexander Leidinger Subject: Re: FYI: v4l-linuxulator support in FreeBSD-current now 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: Tue, 11 Jan 2011 15:17:58 -0000 On Tue, Jan 11, 2011 at 9:26 AM, J.R. Oldroyd wrote: > This patch merely flips the cmd bits. > > I'm not familiar with the Linux DVB ioctls... is it really the case > that none of the data structures have 32/64-bit architecture dependent > field sizes? =A0Great if that's the case, but if not, we need to do > data structure conversions here too, as we did for V4L. I looked for a compat_ioctl for DVB, but came up with nothing. From a 2.6.37 kernel: $ pwd /usr/src/kernels/linux-2.6.37/drivers/media $ find . -name '*.c' | xargs grep compat_ioctl ./video/v4l2-dev.c: .compat_ioctl =3D v4l2_compat_ioctl32, ./video/v4l2-compat-ioctl32.c: printk(KERN_INFO "compat_ioctl32: unexpected VIDIOC_FMT type %d\n", ./video/v4l2-compat-ioctl32.c: printk(KERN_INFO "compat_ioctl32: unexpected VIDIOC_FMT type %d\n", ./video/v4l2-compat-ioctl32.c:long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) ./video/v4l2-compat-ioctl32.c: printk(KERN_WARNING "compat_ioctl32= : " ./video/v4l2-compat-ioctl32.c:EXPORT_SYMBOL_GPL(v4l2_compat_ioctl32); ./IR/ir-lirc-codec.c: .compat_ioctl =3D ir_lirc_ioctl, ./IR/lirc_dev.c: .compat_ioctl =3D lirc_dev_fop_ioctl, Also, the DVB ioctls I've looked at seem to be explictly sized (no "long" used, u32 or u64 everywhere). I tested the patch last night on amd64. I was able to successfully run ia32 linux azap, dvbtraffic and test_dvr utils to tune a channel, find the active PIDs, and record the stream to a file. Drew From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 11 15:41:37 2011 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 98A971065670; Tue, 11 Jan 2011 15:41:37 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 478DC8FC16; Tue, 11 Jan 2011 15:41:37 +0000 (UTC) Received: from outgoing.leidinger.net (p57B3B1C7.dip.t-dialin.net [87.179.177.199]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id F4207844012; Tue, 11 Jan 2011 16:41:32 +0100 (CET) Received: from webmail.leidinger.net (unknown [IPv6:fd73:10c7:2053:1::2:102]) by outgoing.leidinger.net (Postfix) with ESMTP id 2678228C9; Tue, 11 Jan 2011 16:41:30 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id p0BFfEKt084419; Tue, 11 Jan 2011 16:41:14 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Tue, 11 Jan 2011 16:41:14 +0100 Message-ID: <20110111164114.19105rvus8aj7jk8@webmail.leidinger.net> Date: Tue, 11 Jan 2011 16:41:14 +0100 From: Alexander Leidinger To: "J.R. Oldroyd" References: <20091204223126.00005392@unknown> <201001081650.14189.hselasky@c2i.net> <20100108114130.1cfe88c5@shibato.opal.com> <201101110947.46399.hselasky@c2i.net> <20110111092609.7bf82016@shibato.opal.com> In-Reply-To: <20110111092609.7bf82016@shibato.opal.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: F4207844012.A8BCF X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=1.274, required 6, autolearn=disabled, RDNS_NONE 1.27) X-EBL-MailScanner-SpamScore: s X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1295365294.41814@vm86KFd6CdRGpUlcxi9q8Q X-EBL-Spam-Status: No Cc: freebsd-multimedia@freebsd.org, emulation@freebsd.org Subject: Re: FYI: v4l-linuxulator support in FreeBSD-current now 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: Tue, 11 Jan 2011 15:41:37 -0000 Quoting "J.R. Oldroyd" (from Tue, 11 Jan 2011 09:26:09 -0500): > This patch merely flips the cmd bits. As Andrew is doing this on amd64 (and casting to a l_XXX type), it could be that he is flipping the data into the visible range and then cutting it down to 32 bit. > I'm not familiar with the Linux DVB ioctls... is it really the case > that none of the data structures have 32/64-bit architecture dependent > field sizes? Great if that's the case, but if not, we need to do > data structure conversions here too, as we did for V4L. I am already in the process of discussing this with Andrew. I do not think the details are important so far for emulation@, but if someone wants to participate in the discussion... Bye, Alexander. Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 11 16:10:31 2011 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 04F771065670 for ; Tue, 11 Jan 2011 16:10:31 +0000 (UTC) (envelope-from giffunip@tutopia.com) Received: from nm8-vm0.bullet.mail.sp2.yahoo.com (nm8-vm0.bullet.mail.sp2.yahoo.com [98.139.91.194]) by mx1.freebsd.org (Postfix) with SMTP id D56178FC23 for ; Tue, 11 Jan 2011 16:10:30 +0000 (UTC) Received: from [98.139.91.69] by nm8.bullet.mail.sp2.yahoo.com with NNFMP; 11 Jan 2011 16:10:30 -0000 Received: from [98.139.91.59] by tm9.bullet.mail.sp2.yahoo.com with NNFMP; 11 Jan 2011 16:10:30 -0000 Received: from [127.0.0.1] by omp1059.mail.sp2.yahoo.com with NNFMP; 11 Jan 2011 16:10:30 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 313280.87175.bm@omp1059.mail.sp2.yahoo.com Received: (qmail 47090 invoked by uid 60001); 11 Jan 2011 16:10:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1294762229; bh=cUmjD8+mf0IPcgzd+O0eMzRx1lbTlJqkGoam3QIRMZw=; h=Message-ID:X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=UZEwq0ZKGTlge1raSwONmlp2EME6udeR2vGpx4AAuRhAKNHGRDFm53LP2azPQzq+iz7tvo4S+0ZBqv+2/8rl4JsDBQyzVj86Lsea2GKDzTnRGKxhLzwFTivNDnlYmwUQDRGRc7B6C0HrhRs1GrQDTBp7vhiivn4uODX6o8pSkCM= Message-ID: <494773.40631.qm@web113520.mail.gq1.yahoo.com> X-YMail-OSG: O4UtGZUVM1mgMlSu90RbymOA_UNlON74ryIAyR3I192Pccn aVCkVCzAIimFWt_Xz8S9vF6O_tipKLDhJWbh.fEbW9HBNGJFT82_3Yz_iw0c pC9q0tlPE_wH5zSuH.LNCy8_V.YJHBD8owiZ3Z0WsD4_ScJWsuuR4E1ANiBl 3MfiUaH3vU1kDMaUS1fp9qr9YwGoIldLg52zjOdnai8C.hfzEMj7ZhSbZunl FOmaP.XN.gBrxmKQ27Nm60UDYo3VV6Yc2dgseQTz7Ifhzs6ZLfSRfg4kX_OQ MQg0bwCgHfgXZeGNWImIJ8psrwM4NvFrd8T6RFKOvfcPhjk_WdGzx8zpW4G2 1Yxid6fFM1K_xs.Q8xygIG2luFCh7in7i9vPNu5w0Y4foVbs38MmzkNv19eA jjOhFLHuveThdKQ-- Received: from [190.157.140.248] by web113520.mail.gq1.yahoo.com via HTTP; Tue, 11 Jan 2011 08:10:29 PST X-RocketYMMF: giffunip X-Mailer: YahooMailClassic/11.4.20 YahooMailWebService/0.8.107.285259 Date: Tue, 11 Jan 2011 08:10:29 -0800 (PST) From: "Pedro F. Giffuni" To: freebsd-multimedia@freeBSD.org In-Reply-To: <20110109115357.GB30387@pluto.vnode.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Subject: Re: Anyone working on replacing the GPL'd sound headers? X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: giffunip@tutopia.com List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jan 2011 16:10:31 -0000 Hi again; I have submitted my effort to replace emu10k1-alsa.h as PR 153901. This makes the emu10k1 GPL free and also uses NetBSD's header on emu10kx (which remains GPL'd due to the p16v and p17v headers). The maestro3 and csa drivers are very easy to "clean" as the headers are clearly based on those available in ports/audio/oss (look in the attic if you want to help) under a BSD license. Pedro. From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 11 18:41:25 2011 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 B54C21065670; Tue, 11 Jan 2011 18:41:25 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id C357B8FC0C; Tue, 11 Jan 2011 18:41:24 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 6172D1E00CCE; Tue, 11 Jan 2011 19:41:23 +0100 (CET) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.4/8.14.3) with ESMTP id p0BIdb4u039413; Tue, 11 Jan 2011 19:39:37 +0100 (CET) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.4/8.14.3/Submit) id p0BIdbix039412; Tue, 11 Jan 2011 19:39:37 +0100 (CET) (envelope-from nox) From: Juergen Lock Date: Tue, 11 Jan 2011 19:39:37 +0100 To: "\"J.R. Oldroyd\"" Message-ID: <20110111183937.GA36761@triton8.kn-bremen.de> References: <20091204223126.00005392@unknown> <201001081650.14189.hselasky@c2i.net> <20100108114130.1cfe88c5@shibato.opal.com> <201101110947.46399.hselasky@c2i.net> <20110111092609.7bf82016@shibato.opal.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110111092609.7bf82016@shibato.opal.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-multimedia@freebsd.org, emulation@freebsd.org, freebsd-emulation@freebsd.org, Alexander Leidinger Subject: Re: FYI: v4l-linuxulator support in FreeBSD-current now 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: Tue, 11 Jan 2011 18:41:25 -0000 On Tue, Jan 11, 2011 at 09:26:09AM -0500, "J.R. Oldroyd" wrote: > On Tue, 11 Jan 2011 09:47:46 +0100, Hans Petter Selasky wrote: > > > > Hi, > > > > I've received the following patch for my cuse4bsd module. Could this be > > included in the kernel's linux.ko ? This patch allows for linux DVB > > applications running under FreeBSD linux emulation. > > > > --HPS > > > > Index: cuse4bsd_kmod.c > > =================================================================== > > --- cuse4bsd_kmod.c (revision 1700) > > +++ cuse4bsd_kmod.c (working copy) > > @@ -1689,3 +1689,49 @@ > > > > return (0); > > } > > + > > + > > +#include > > +#if defined (__amd64__) > > +#include > > +#include > > +#else > > +#include > > +#include > > +#endif > > + > > +#include > > +MODULE_DEPEND(cuse4bsd, linux, 1, 1, 1); > > + > > +#define DVB_LINUX_IOCTL_MIN 0x6f00 > > +#define DVB_LINUX_IOCTL_MAX 0x6fff > > + > > + > > +static linux_ioctl_function_t cuse4bsd_linux_ioctl; > > +static struct linux_ioctl_handler cuse4bsd_linux_handler = > > + {cuse4bsd_linux_ioctl, DVB_LINUX_IOCTL_MIN, DVB_LINUX_IOCTL_MAX}; > > + > > +SYSINIT (cuse4bsd_linux_register, SI_SUB_KLD, SI_ORDER_MIDDLE, > > + linux_ioctl_register_handler, &cuse4bsd_linux_handler); > > +SYSUNINIT(cuse4bsd_linux_unregister, SI_SUB_KLD, SI_ORDER_MIDDLE, > > + linux_ioctl_unregister_handler, &cuse4bsd_linux_handler); > > + > > +static int > > +cuse4bsd_linux_ioctl(struct thread *td, struct linux_ioctl_args *args) > > +{ > > + unsigned long cmd; > > + > > + /* swap the read/write bits, due to differences in bsd & linux ioctls*/ > > + cmd = (unsigned long)args->cmd; > > + if (cmd & (0x40 << 24)) { > > + cmd &= 0xffffff; > > + cmd |= (0x80 << 24); > > + } else if (cmd & (0x80 << 24)) { > > + cmd &= 0xffffff; > > + cmd |= (0x40 << 24); > > + } > > + args->cmd = (l_uint)cmd; > > + > > + /* Pass the ioctl off to our standard handler, now that its valid */ > > + return(ioctl(td, (struct ioctl_args *)args)); > > +} > > This patch merely flips the cmd bits. > > I'm not familiar with the Linux DVB ioctls... is it really the case > that none of the data structures have 32/64-bit architecture dependent > field sizes? Great if that's the case, but if not, we need to do > data structure conversions here too, as we did for V4L. Yes we do, but after looking at the headers a bit it looks like it'll only be needed for FE_SET_PROPERTY, FE_GET_PROPERTY (unless I was being blind again; the latter also needs to be fixed from _IOR to _IOW before passing it on as we also had to do in our version of /usr/local/include/linux/dvb/frontend.h - see this thread for details: http://lists.freebsd.org/pipermail/freebsd-multimedia/2010-April/010958.html ), and conversions would be needed for some other structs that I _think_ are only used with full-feature tuner cards with internal mpeg2 decoders which I'm pretty sure don't exist as usb versions anyway so in that case we probably can get away by just ignoring them for now. (Tho I'd say we should treat them as errors insted of passing them thru wrong, I'm talking about ones in osd.h and video.h.) And FE_[GS]ET_PROPERTY I think are part of the `new' dvb api that was introduced when adding support for dvb-s2, which would also explain why the naive patch appeared to work: whatever app(s) were used to test it probably were just still using the `old' dvb api. (Well, or the tests were only done on i386. :) HTH, Juergen From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 11 20:18:01 2011 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 463F21065672; Tue, 11 Jan 2011 20:18:01 +0000 (UTC) (envelope-from gallatin@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id C49FE8FC23; Tue, 11 Jan 2011 20:18:00 +0000 (UTC) Received: by gxk8 with SMTP id 8so8642283gxk.13 for ; Tue, 11 Jan 2011 12:18:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=VoYVBI5a0wfj+8FeeI6v4IrtNoRNZFshMPAN0L3OR2s=; b=sHIUNmh19P2HnoIGH/gibNy4q+VTFHkL4cejYYJLf8TG9CyoCw7YBJVnDoksw4oK96 zBRibKwnJwFGfTa04k+u7UVAScHhTmmnTEzQGadhfVHobGXYVPNt6NuZiLwrTqRx34Mx 8lLTQW98rLwmpftSUKNo4Ou3TJvdTRcIbz9Xw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Au8EGjoLE0GLGXkIZd9oX32P7otdUTjQ2lBAgStNTHQcRe9M1gonyBK189GWLlKm43 M5UF0PJa3aPH/P/ZyGc74GCfd2v/ReSk26tI6pvD/Hshz1VrOY+v9lG+7Id4xHDGmSNB bjvxQC912qVLNycrvWIpx2YqhFDcpkHFPzsFo= MIME-Version: 1.0 Received: by 10.100.140.10 with SMTP id n10mr35344and.126.1294777079941; Tue, 11 Jan 2011 12:17:59 -0800 (PST) Received: by 10.100.248.15 with HTTP; Tue, 11 Jan 2011 12:17:59 -0800 (PST) In-Reply-To: <20110111183937.GA36761@triton8.kn-bremen.de> References: <20091204223126.00005392@unknown> <201001081650.14189.hselasky@c2i.net> <20100108114130.1cfe88c5@shibato.opal.com> <201101110947.46399.hselasky@c2i.net> <20110111092609.7bf82016@shibato.opal.com> <20110111183937.GA36761@triton8.kn-bremen.de> Date: Tue, 11 Jan 2011 15:17:59 -0500 Message-ID: From: Andrew Gallatin To: Juergen Lock Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-multimedia@freebsd.org, emulation@freebsd.org, freebsd-emulation@freebsd.org, "\"J.R. Oldroyd\"" , Alexander Leidinger Subject: Re: FYI: v4l-linuxulator support in FreeBSD-current now 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: Tue, 11 Jan 2011 20:18:01 -0000 On Tue, Jan 11, 2011 at 1:39 PM, Juergen Lock wrot= e: > =A0And FE_[GS]ET_PROPERTY I think are part of the `new' dvb api that > was introduced when adding support for dvb-s2, which would also > explain why the naive patch appeared to work: =A0whatever app(s) were > used to test it probably were just still using the `old' dvb api. > (Well, or the tests were only done on i386. :) Test was done with just azap, dvbtraffic, and test_dvr on amd64.. Drew From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 11 21:09:17 2011 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 E84DC106567A; Tue, 11 Jan 2011 21:09:17 +0000 (UTC) (envelope-from fbsd@opal.com) Received: from mho-01-ewr.mailhop.org (mho-01-ewr.mailhop.org [204.13.248.71]) by mx1.freebsd.org (Postfix) with ESMTP id A8F698FC12; Tue, 11 Jan 2011 21:09:17 +0000 (UTC) Received: from pool-141-154-232-8.bos.east.verizon.net ([141.154.232.8] helo=homobox.opal.com) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1PclSu-000LFs-JO; Tue, 11 Jan 2011 21:09:17 +0000 Received: from opal.com (localhost [IPv6:::1]) (authenticated bits=0) by homobox.opal.com (8.14.4/8.14.4) with ESMTP id p0BL9B4x066116 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Jan 2011 16:09:11 -0500 (EST) (envelope-from fbsd@opal.com) Received: from shibato.opal.com ([2001:5c0:1100:f103:221:63ff:fe5a:c9a7] helo=shibato.opal.com) with IPv6:587 by opal.com; 11 Jan 2011 16:09:11 -0500 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 141.154.232.8 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19qrDuCUZ3unZQdnEj8wEjf Date: Tue, 11 Jan 2011 16:09:07 -0500 From: "J.R. Oldroyd" To: Andrew Gallatin Message-ID: <20110111160907.454c74d7@shibato.opal.com> In-Reply-To: References: <20091204223126.00005392@unknown> <201001081650.14189.hselasky@c2i.net> <20100108114130.1cfe88c5@shibato.opal.com> <201101110947.46399.hselasky@c2i.net> <20110111092609.7bf82016@shibato.opal.com> <20110111183937.GA36761@triton8.kn-bremen.de> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/W4R7V1QbhiR=lnfRH/uvidz"; protocol="application/pgp-signature" Cc: freebsd-multimedia@freebsd.org, emulation@freebsd.org, freebsd-emulation@freebsd.org, Juergen Lock , Alexander Leidinger Subject: Re: FYI: v4l-linuxulator support in FreeBSD-current now 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: Tue, 11 Jan 2011 21:09:18 -0000 --Sig_/W4R7V1QbhiR=lnfRH/uvidz Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 11 Jan 2011 15:17:59 -0500, Andrew Gallatin wr= ote: > > On Tue, Jan 11, 2011 at 1:39 PM, Juergen Lock wr= ote: >=20 > > =C2=A0And FE_[GS]ET_PROPERTY I think are part of the `new' dvb api that > > was introduced when adding support for dvb-s2, which would also > > explain why the naive patch appeared to work: =C2=A0whatever app(s) were > > used to test it probably were just still using the `old' dvb api. > > (Well, or the tests were only done on i386. :) >=20 > Test was done with just azap, dvbtraffic, and test_dvr on amd64.. >=20 > Drew At issue is not if the simple patch works for a few apps. At issue is whether or not FreeBSD should code defensively to protect against possible problems in the future. When I did the V4L shim, my initial test app (Skype) also worked without much of the structure conversion code. I was asked to write additional structure conversion code anyway, because it is the correct way to handle such data when the field sizes are not defined. The good news is that the conversion code is not complex. One copy in function and one copy out function that hande those data types whose length may vary is needed for each such structure. The bad news is, as I understand it, that DVB is tied closely to V4L2, so it may be necessary to implement a complete set of conversion code for all V4L2 functions, too. Is this the case? I'm not sure. On the other hand, if it is working acceptably now, we could just add the simpler patch and punt any conversion code until/if something is found to not work properly, later. -jr --Sig_/W4R7V1QbhiR=lnfRH/uvidz Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEUEARECAAYFAk0sxvMACgkQls33urr0k4lJgQCXTELX/LtEOyoEn15raj0Oc9dw 5gCfSfykYJ0u0MSNq3H0XFxAKTkqxqI= =lEEA -----END PGP SIGNATURE----- --Sig_/W4R7V1QbhiR=lnfRH/uvidz-- From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 11 22:23:00 2011 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 4C6581065670; Tue, 11 Jan 2011 22:23:00 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id D1A598FC15; Tue, 11 Jan 2011 22:22:59 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 767761E00075; Tue, 11 Jan 2011 23:22:58 +0100 (CET) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.4/8.14.3) with ESMTP id p0BMKtc6045623; Tue, 11 Jan 2011 23:20:55 +0100 (CET) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.4/8.14.3/Submit) id p0BMKtdV045622; Tue, 11 Jan 2011 23:20:55 +0100 (CET) (envelope-from nox) From: Juergen Lock Date: Tue, 11 Jan 2011 23:20:55 +0100 To: "J.R. Oldroyd" Message-ID: <20110111222055.GA44727@triton8.kn-bremen.de> References: <20091204223126.00005392@unknown> <201001081650.14189.hselasky@c2i.net> <20100108114130.1cfe88c5@shibato.opal.com> <201101110947.46399.hselasky@c2i.net> <20110111092609.7bf82016@shibato.opal.com> <20110111183937.GA36761@triton8.kn-bremen.de> <20110111160907.454c74d7@shibato.opal.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20110111160907.454c74d7@shibato.opal.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: emulation@freebsd.org, Juergen Lock , freebsd-multimedia@freebsd.org, freebsd-emulation@freebsd.org, Alexander Leidinger Subject: Re: FYI: v4l-linuxulator support in FreeBSD-current now 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: Tue, 11 Jan 2011 22:23:00 -0000 On Tue, Jan 11, 2011 at 04:09:07PM -0500, J.R. Oldroyd wrote: > On Tue, 11 Jan 2011 15:17:59 -0500, Andrew Gallatin wrote: > > > > On Tue, Jan 11, 2011 at 1:39 PM, Juergen Lock wrote: > > > > >  And FE_[GS]ET_PROPERTY I think are part of the `new' dvb api that > > > was introduced when adding support for dvb-s2, which would also > > > explain why the naive patch appeared to work:  whatever app(s) were > > > used to test it probably were just still using the `old' dvb api. > > > (Well, or the tests were only done on i386. :) > > > > Test was done with just azap, dvbtraffic, and test_dvr on amd64.. > > Yeah those don't use the `new' api I'd say. > > Drew > > At issue is not if the simple patch works for a few apps. At issue > is whether or not FreeBSD should code defensively to protect against > possible problems in the future. > > When I did the V4L shim, my initial test app (Skype) also worked without > much of the structure conversion code. I was asked to write additional > structure conversion code anyway, because it is the correct way to > handle such data when the field sizes are not defined. > > The good news is that the conversion code is not complex. One copy > in function and one copy out function that hande those data types whose > length may vary is needed for each such structure. > Yeah and in this case (FE_[GS]ET_PROPERTY) it is only two structures, tho one of them is an array. (struct dtv_properties and struct dtv_property, and the pointer in struct dtv_property is called reserved2 i.e. its unused.) > The bad news is, as I understand it, that DVB is tied closely to V4L2, > so it may be necessary to implement a complete set of conversion code > for all V4L2 functions, too. Is this the case? I'm not sure. > Isnt v4l2 still about /dev/video*? The dvb api is only about /dev/dvb/adapter*/* and pretty independent... Afaik. > On the other hand, if it is working acceptably now, we could just add > the simpler patch and punt any conversion code until/if something is > found to not work properly, later. At least things that want to be able to use dvb-s2 need the `new' dvb api and thus will have problems. (I know and have here at least the kde4 version of kaffeine, w_scan, szap_s2, and vdr, tho of course I use them natively.) Oh and mythtv I'm pretty sure knows dvb-s2 too. But anyway if you want to merge this version as it is now you want it at least to return errors for the ioctls it doesn't translate, or only do that on amd64. (Or maybe I'll look at this over the weekend myself but I can't promise anything... :) Cheers, Juergen From owner-freebsd-multimedia@FreeBSD.ORG Wed Jan 12 10:09:21 2011 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 8B442106566B; Wed, 12 Jan 2011 10:09:21 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 385538FC17; Wed, 12 Jan 2011 10:09:20 +0000 (UTC) Received: from outgoing.leidinger.net (p57B3B3B3.dip.t-dialin.net [87.179.179.179]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id B7005844012; Wed, 12 Jan 2011 11:09:16 +0100 (CET) Received: from webmail.leidinger.net (unknown [IPv6:fd73:10c7:2053:1::2:102]) by outgoing.leidinger.net (Postfix) with ESMTP id C77A62970; Wed, 12 Jan 2011 11:09:11 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id p0CA8elx086681; Wed, 12 Jan 2011 11:08:40 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Wed, 12 Jan 2011 11:08:40 +0100 Message-ID: <20110112110840.157527pfroeph9xc@webmail.leidinger.net> Date: Wed, 12 Jan 2011 11:08:40 +0100 From: Alexander Leidinger To: Juergen Lock References: <20091204223126.00005392@unknown> <201001081650.14189.hselasky@c2i.net> <20100108114130.1cfe88c5@shibato.opal.com> <201101110947.46399.hselasky@c2i.net> <20110111092609.7bf82016@shibato.opal.com> <20110111183937.GA36761@triton8.kn-bremen.de> <20110111160907.454c74d7@shibato.opal.com> <20110111222055.GA44727@triton8.kn-bremen.de> In-Reply-To: <20110111222055.GA44727@triton8.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: B7005844012.A6656 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=1.274, required 6, autolearn=disabled, RDNS_NONE 1.27) X-EBL-MailScanner-SpamScore: s X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1295431757.15079@u/4XfiFb5x2/HaavlGS5ew X-EBL-Spam-Status: No Cc: freebsd-multimedia@freebsd.org, emulation@freebsd.org, "J.R. Oldroyd" Subject: Re: FYI: v4l-linuxulator support in FreeBSD-current now 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: Wed, 12 Jan 2011 10:09:21 -0000 Quoting Juergen Lock (from Tue, 11 Jan 2011 23:20:55 +0100): > But anyway if you want to merge this version as it is now you want > it at least to return errors for the ioctls it doesn't translate, > or only do that on amd64. > > (Or maybe I'll look at this over the weekend myself but I can't > promise anything... :) So if it is just two ioctl's to cover: Andrew, do your applications still work when those ioctl's return ENOSYS or an error (whatever is more sensible in this case)? If yes, I would not complain if those ioctl's would return ENOSYS (and do some sensible rate limited logging explaining the issue) in the linux32 on amd64 case but work on i386 (in case nobody has the time to make them work correctly in linux32 on amd64). One question still remains, why is the bitswap required? Is it really that linux uses a different order than FreeBSD and all the other code does it somehow implicitely (and I didn't notice it), or is there something else going on? IMO this is an important question to answer before a commit. Bye, Alexander. -- A diplomat is a man who can convince his wife she'd look stout in a fur coat. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-multimedia@FreeBSD.ORG Wed Jan 12 13:36:03 2011 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 78E881065674; Wed, 12 Jan 2011 13:36:03 +0000 (UTC) (envelope-from gallatin@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 18E418FC12; Wed, 12 Jan 2011 13:36:02 +0000 (UTC) Received: by ywp6 with SMTP id 6so213752ywp.13 for ; Wed, 12 Jan 2011 05:36:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=9pkRt2d9hMOk4WeOnhDJlL85jHK2cwuxHAFgBQCBMTs=; b=BEa3KkjNq6ifOMLMccwrZ0Fz2brHVTa8cDzpdDSKs9X2DatM7/PPc8117DUslMWhzJ 5DVMbNgmKYM7wRSzzMgS1GXgRXepV2NTyisVNwIgG3oCUH/NPmBWfq4pxyUmA/qWycg3 WFdJ5iSBJ56+QjHnQ4pNcADR9DcNv1FAmmeS4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=J/MpbHFC+z6+/ptTNvfzzgB2fZdWDg9iF2L2n10drYNjKQ7JY3/N39GDgEeNhF/9Fk 4EoVRtnzEdIN2tOd8H8/6dZ2IebQsDdyU8ePgqjFRNhf1BXQ4Gwob/TN8QvTTBsWr8Pb jGmEfJUZmmkoouDjLMpE/4M9c1npyI87c4P30= MIME-Version: 1.0 Received: by 10.100.173.18 with SMTP id v18mr616760ane.58.1294839362013; Wed, 12 Jan 2011 05:36:02 -0800 (PST) Received: by 10.100.248.15 with HTTP; Wed, 12 Jan 2011 05:36:01 -0800 (PST) In-Reply-To: <20110112110840.157527pfroeph9xc@webmail.leidinger.net> References: <20091204223126.00005392@unknown> <201001081650.14189.hselasky@c2i.net> <20100108114130.1cfe88c5@shibato.opal.com> <201101110947.46399.hselasky@c2i.net> <20110111092609.7bf82016@shibato.opal.com> <20110111183937.GA36761@triton8.kn-bremen.de> <20110111160907.454c74d7@shibato.opal.com> <20110111222055.GA44727@triton8.kn-bremen.de> <20110112110840.157527pfroeph9xc@webmail.leidinger.net> Date: Wed, 12 Jan 2011 08:36:01 -0500 Message-ID: From: Andrew Gallatin To: Alexander Leidinger Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-multimedia@freebsd.org, emulation@freebsd.org, Juergen Lock , "J.R. Oldroyd" Subject: Re: FYI: v4l-linuxulator support in FreeBSD-current now 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: Wed, 12 Jan 2011 13:36:03 -0000 On Wed, Jan 12, 2011 at 5:08 AM, Alexander Leidinger wrote: > Quoting Juergen Lock (from Tue, 11 Jan 2011 > 23:20:55 +0100): > >> =A0But anyway if you want to merge this version as it is now you want >> it at least to return errors for the ioctls it doesn't translate, >> or only do that on amd64. >> >> =A0(Or maybe I'll look at this over the weekend myself but I can't >> promise anything... :) > > So if it is just two ioctl's to cover: Andrew, do your applications still > work =A0when those ioctl's return ENOSYS or an error (whatever is more > sensible in this case)? If yes, I would not complain if those ioctl's wou= ld > return ENOSYS (and do some sensible rate limited logging explaining the > issue) in the linux32 on amd64 case but work on i386 (in case nobody has = the > time to make them work correctly in linux32 on amd64). You guys are too fast for me. I haven't had time to actually install the intended application (SageTV) and its pre-reqs yet. > One question still remains, why is the bitswap required? Is it really tha= t > linux uses a different order than FreeBSD and all the other code does it > somehow implicitely (and I didn't notice it), or is there something else > going on? IMO this is an important question to answer before a commit. This confused me too, so I wrote a toy program & compiled it on linux (program appended). The output it gives is on linux is: IOC_DIRSHIFT=3D30, IOW=3D40040000 IOR=3D80040000 Looking at the FreeBSD ioctl defines in sys/ioccom.h #define IOC_OUT 0x40000000 /* copy out parameters */ #define IOC_IN 0x80000000 /* copy in parameters */ #define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t)) #define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t)) So it does seem that IOR / IOW are reversed in FreeBSD & Linux. Not sure why this has never been an issue before. Drew #include #include main() { printf("IOC_DIRSHIFT=3D%d, IOW=3D%lx IOR=3D%lx\n", _IOC_DIRSHIFT, _IOW(0, 0, int), _IOR(0, 0, int)); } From owner-freebsd-multimedia@FreeBSD.ORG Thu Jan 13 10:03:34 2011 Return-Path: Delivered-To: freebsd-multimedia@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68D1F106567A; Thu, 13 Jan 2011 10:03:34 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 016408FC13; Thu, 13 Jan 2011 10:03:34 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p0DA3XkZ097694; Thu, 13 Jan 2011 10:03:33 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0DA3X8M097690; Thu, 13 Jan 2011 10:03:33 GMT (envelope-from linimon) Date: Thu, 13 Jan 2011 10:03:33 GMT Message-Id: <201101131003.p0DA3X8M097690@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-multimedia@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/153901: [sound] [patch] Replace the GPL'd emu10k1-alsa.h with emuxkireg.h from NetBSD 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, 13 Jan 2011 10:03:34 -0000 Synopsis: [sound] [patch] Replace the GPL'd emu10k1-alsa.h with emuxkireg.h from NetBSD Responsible-Changed-From-To: freebsd-bugs->freebsd-multimedia Responsible-Changed-By: linimon Responsible-Changed-When: Thu Jan 13 10:03:21 UTC 2011 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=153901 From owner-freebsd-multimedia@FreeBSD.ORG Thu Jan 13 10:03:54 2011 Return-Path: Delivered-To: freebsd-multimedia@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FB771065675; Thu, 13 Jan 2011 10:03:54 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 261B78FC13; Thu, 13 Jan 2011 10:03:54 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p0DA3sdj097783; Thu, 13 Jan 2011 10:03:54 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0DA3s2B097779; Thu, 13 Jan 2011 10:03:54 GMT (envelope-from linimon) Date: Thu, 13 Jan 2011 10:03:54 GMT Message-Id: <201101131003.p0DA3s2B097779@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-multimedia@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/153920: [sound] [patch] Replace the GPL'd sound/maestro3 headers with BSD versions from OSS 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, 13 Jan 2011 10:03:54 -0000 Synopsis: [sound] [patch] Replace the GPL'd sound/maestro3 headers with BSD versions from OSS Responsible-Changed-From-To: freebsd-bugs->freebsd-multimedia Responsible-Changed-By: linimon Responsible-Changed-When: Thu Jan 13 10:03:40 UTC 2011 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=153920 From owner-freebsd-multimedia@FreeBSD.ORG Thu Jan 13 22:38:31 2011 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 7967E106566B for ; Thu, 13 Jan 2011 22:38:31 +0000 (UTC) (envelope-from voidchicken@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 2D6E88FC12 for ; Thu, 13 Jan 2011 22:38:31 +0000 (UTC) Received: by qyk8 with SMTP id 8so5179684qyk.13 for ; Thu, 13 Jan 2011 14:38:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=RDLrR/uCjgOneegqREi7Fqlz395DOHJdjqxZxPoHCs0=; b=xG+hg4xqdBkXl+zOWBz8j/7Vtqa3CrkxFBOWsoHS0z7SExOy4Uop9FzL8Q3Lr3i4e+ tTmlogS2e6cFXSdHr7ffC1ai9FWeLs0EpxCYu38ZznReT+nu2F3uIOVeNhVf2/GD9SOD KD4pUrzdlRgRji/QPbZGaXun945cUevfUNHAM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=LDf7jBJecPx2mfoSvebDIIolFRzoJcOtVwdVZ6HAiJGN5/deT6ExoSdSlbd6J0laYM c8l0+Cj6mxFKcMxNX/LYAvc1oAQzWlGTyfWoVWxoQQyKza6C15WmmbavZiTphin6YL+I ehpVpmt18NK/XIdZBAv8yjNOpruyaViwtVR9Y= MIME-Version: 1.0 Received: by 10.229.247.212 with SMTP id md20mr2361262qcb.272.1294956948507; Thu, 13 Jan 2011 14:15:48 -0800 (PST) Received: by 10.220.202.130 with HTTP; Thu, 13 Jan 2011 14:15:48 -0800 (PST) Date: Thu, 13 Jan 2011 14:15:48 -0800 Message-ID: From: Kevin Baxter To: freebsd-multimedia@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Webcamd and the au0828 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, 13 Jan 2011 22:38:31 -0000 Hi, I've been trying to get my au0828-based stick (a Hauppauge 950Q to be specific) to work in webcamd. Here's the list of problems and solutions I've hit so far. The first thing I discovered (that took embarrassingly long to realize) what that the au0828 drivers weren't in the Makefile. No wonder it didn't detect the stick. The full list of stuff to add to make it all link: SRCS+= au0828-cards.c SRCS+= au0828-core.c SRCS+= au0828-dvb.c SRCS+= au0828-i2c.c SRCS+= au0828-vbi.c SRCS+= au0828-video.c SRCS+= au8522_dig.c #strange that it needs this one Funnily enough, au8522_decoder.c isn't needed. Which is good because that file depends on two functions which webcamd doesn't implement: i2c_register_driver and i2c_del_driver. Sorry au8522 fans. Once those were in, it wanted the header i2c-algo-bit.h. From what I can tell it doesn't actually USE it, but the easy solution was just to grab a copy out of the Linux source and drop it into headers/linux/ Third was a linker error looking for a function called irqs_disabled(). It took me a few hours of source digging before I realized that all this stuff would be running in userspace and irqs_disabled() would always be 0. Then I noticed that it's in the svn already. But an upstream driver change broke the svn, so I'm working with the copy in ports. So now it builds and links. It loads the driver, detects the stick, attaches it to cuse, and then segfaults. #0 0x000000000040a233 in v4l2_device_register (dev=0x8012d0f70, v4l2_dev=0x8012ffae0) at /usr/ports/multimedia/webcamd/work/webcamd-0.1.18/v4l-dvb/linux/drivers/media/video/v4l2-device.c:47 #1 0x00000000004d87f1 in au0828_usb_probe (interface=0x8012d0f70, id=0x6fc840) at /usr/ports/multimedia/webcamd/work/webcamd-0.1.18/v4l-dvb/linux/drivers/media/video/au0828/au0828-core.c:215 #2 0x0000000000407c4e in usb_linux_probe_p (p_bus=0x736ab0, p_addr=0x736ab4, p_index=0x736ab8) at /usr/ports/multimedia/webcamd/work/webcamd-0.1.18/kernel/linux_usb.c:415 #3 0x00000000004dd90f in main (argc=-5952, argv=0x7fffffffe9e0) at webcamd.c:482 For reference, v4l2-device.c:47 snprintf(v4l2_dev->name, sizeof(v4l2_dev->name), "%s %s", dev->driver->name, dev_name(dev)); dev (struct usb_device.device) is allocated as part of the usb_device structure way over in linux_usb.c:usb_linux_create_usb_device. The usb_device structure is zeroed out when it's allocated, and the device member is never populated. So v4l2-device.c goes and dereferences a null pointer when it does dev->driver. At this point I've hit the limits of my abilities. I'm better at reading code than writing it :) I suppose the way to do it would be to allocate a little extra more in usb_linux_create_usb_device for p_ud->dev.driver and set p_ud->dev.driver->name = "". The icing on the cake is that webcamd doesn't link compiled with -O0. Makes gdb more interesting. From owner-freebsd-multimedia@FreeBSD.ORG Thu Jan 13 23:29:12 2011 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 716111065674 for ; Thu, 13 Jan 2011 23:29:12 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 383278FC16 for ; Thu, 13 Jan 2011 23:29:11 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id D338B73098; Fri, 14 Jan 2011 00:43:39 +0100 (CET) Date: Fri, 14 Jan 2011 00:43:39 +0100 From: Luigi Rizzo To: Kevin Baxter , hselasky@c2i.net Message-ID: <20110113234339.GA52146@onelab2.iet.unipi.it> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-multimedia@freebsd.org Subject: Re: Webcamd and the au0828 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, 13 Jan 2011 23:29:12 -0000 On Thu, Jan 13, 2011 at 02:15:48PM -0800, Kevin Baxter wrote: > Hi, > > I've been trying to get my au0828-based stick (a Hauppauge 950Q to be > specific) to work in webcamd. Here's the list of problems and solutions I've > hit so far. ... ... > So now it builds and links. It loads the driver, detects the stick, attaches > it to cuse, and then segfaults. > > #0 0x000000000040a233 in v4l2_device_register (dev=0x8012d0f70, > v4l2_dev=0x8012ffae0) you prompted me to try the same for em28xx, so i followed a similar route: include the necessary files (one was omitted), write small stubs for the few functions that are not there so that webcamd links. Then the program does a core dump when connecting an em28xx device, on the same function as yours. There is a chance that the files that do work have been slightly modified so that dev->driver is initialized properly. But I don't know for sure, maybe Hans can answer this. (the other possibility is that maybe some names are resolved at runtime so even if webcamd links it is not guaranteed to work unless you put in all the required sources ?) cheers luigi From owner-freebsd-multimedia@FreeBSD.ORG Fri Jan 14 02:49:20 2011 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 D7315106566B for ; Fri, 14 Jan 2011 02:49:20 +0000 (UTC) (envelope-from gallatin@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 923D88FC14 for ; Fri, 14 Jan 2011 02:49:20 +0000 (UTC) Received: by yxh35 with SMTP id 35so987943yxh.13 for ; Thu, 13 Jan 2011 18:49:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=5TXUPDysRWJyc3Qtuam/KN4thZLxKGExkasYJLNR/Gw=; b=FGzBdcYI/1DO/sNls8OfJWaF7t8Oh7P6CilUObELV+7hyD1aj+4UqFSd9eLJTdc8ZD DmBooXrAFhIaFRfjVKg9imhFvS1VT7874+/vleGIyPLuYYrUz/PQAWjbfbrVPKR0YLok LtpHC1njtiYacA/UYRrq7hiyhED/fam60mcho= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=R0W0pJjAu17jRoqlQQP4nocdw3kZxE94LcmZc8pwJxvkJxY3lgR0kHoCbk//Hjjima Q/jP2ZRKwhaDrTFu1aXUM0E61N4VdxNTHgUkhhPGK835yslDM713UbWewx5SIg6G6qnD gFpqNEq3uP0OQRbRqVkhk44mQcqTEEUK8CS+A= MIME-Version: 1.0 Received: by 10.100.57.2 with SMTP id f2mr207270ana.160.1294973359751; Thu, 13 Jan 2011 18:49:19 -0800 (PST) Received: by 10.100.248.15 with HTTP; Thu, 13 Jan 2011 18:49:19 -0800 (PST) In-Reply-To: <20110113234339.GA52146@onelab2.iet.unipi.it> References: <20110113234339.GA52146@onelab2.iet.unipi.it> Date: Thu, 13 Jan 2011 21:49:19 -0500 Message-ID: From: Andrew Gallatin To: Luigi Rizzo Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-multimedia@freebsd.org, Kevin Baxter Subject: Re: Webcamd and the au0828 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: Fri, 14 Jan 2011 02:49:20 -0000 On Thu, Jan 13, 2011 at 6:43 PM, Luigi Rizzo wrote: > you prompted me to try the same for em28xx, so i followed a similar route: Try using webcamd from the Hans' SVN, not from ports. Hans & I got em28xx working earlier this week. I tripped over a SEGV like the OP describes, and Hans fixed it. For at least my em28xx stick, it is working well. Drew From owner-freebsd-multimedia@FreeBSD.ORG Fri Jan 14 21:12:42 2011 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 70EFA1065672 for ; Fri, 14 Jan 2011 21:12:42 +0000 (UTC) (envelope-from voidchicken@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 27DC08FC1C for ; Fri, 14 Jan 2011 21:12:41 +0000 (UTC) Received: by qyk8 with SMTP id 8so6304393qyk.13 for ; Fri, 14 Jan 2011 13:12:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=nLrI57/qbzcH6NSo5ZCCMXAz7eyomhJOySsBMkdBobI=; b=HE065SKWb04LZzJRhLz623gjpTmcDs5sLi9Pq9hdd5Gmf1g8Xs4KDXjTlRe6VJdpyX n4EeJaNuzyWmMgcegsoIcFImw/AXahw78RVRgPBTRxTA7dydtm3XQjw7LyriT7DOf+9f whxcgBT0Oa9d9mVH4ojz9+uniOQ8NVFdw6Wws= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=WbV77nmlQYwhPPRwHc7xMF1XySuKjH8EcI8ulYsuZRQ1wX4enjnSBrK4ZFEfelxACg HJqzJsDU3R7ogydieK7nIGmpgORW8USn/3R8AJtaDGZNgsD3eQmZZOZTVbfQx2E7bciD 0oSRyizi7FNR5qyLS7/Gz01+fUf1byrrXlvA0= MIME-Version: 1.0 Received: by 10.224.80.203 with SMTP id u11mr1086797qak.221.1295039561574; Fri, 14 Jan 2011 13:12:41 -0800 (PST) Received: by 10.220.202.130 with HTTP; Fri, 14 Jan 2011 13:12:41 -0800 (PST) In-Reply-To: References: <20110113234339.GA52146@onelab2.iet.unipi.it> Date: Fri, 14 Jan 2011 13:12:41 -0800 Message-ID: From: Kevin Baxter To: Andrew Gallatin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-multimedia@freebsd.org, Luigi Rizzo Subject: Re: Webcamd and the au0828 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: Fri, 14 Jan 2011 21:12:42 -0000 On Thu, Jan 13, 2011 at 6:49 PM, Andrew Gallatin wrote: > On Thu, Jan 13, 2011 at 6:43 PM, Luigi Rizzo wrote: > > > you prompted me to try the same for em28xx, so i followed a similar > route: > > Try using webcamd from the Hans' SVN, not from ports. Hans & I got > em28xx working earlier this week. I tripped over a SEGV like the OP > describes, and Hans fixed it. For at least my em28xx stick, it is > working well. > > Drew > Like I accidentally replied to only Andrew, yes the svn fixed the dev->driver issue already. An upstream driver change broke the dw2102.c compilation, so I commented it out. Now it detects the stick and populates /dev, so far so good. But it still doesn't want to work. pwcview gives me: Webcam set to: 320x240 (sif) at 5 fps libv4l2: error queuing buf 0: Invalid argument libv4l2: error queuing buf 1: Invalid argument libv4l2: error queuing buf 2: Invalid argument libv4l2: error queuing buf 3: Invalid argument libv4l2: error reading: Device busy Error reading from webcam: Device busy and xawtv can't use directvideo. It probably doesn't like my radeon. Leaving only the behemoth that is MythTV to diagnose. It sees the input source, but a channel scan fails to find anything. The webcamd debug log: Linux video capture interface: v2.00 -snip a whole lot of registrations- Attached ugen5.2[0] to cuse unit 0 au0828: i2c bus registered tveeprom 129-0050: Hauppauge model 72001, rev B3F0, serial# 7982575 tveeprom 129-0050: MAC address is 0x7fffffffe855M tveeprom 129-0050: tuner model is Xceive XC5000 (idx 150, type 76) tveeprom 129-0050: TV standards NTSC(M) ATSC/DVB Digital (eeprom 0x88) tveeprom 129-0050: audio processor is AU8522 (idx 44) tveeprom 129-0050: decoder processor is AU8522 (idx 42) tveeprom 129-0050: has no radio, has IR receiver, has no IR transmitter hauppauge_eeprom: hauppauge eeprom: model=72001 analog subdev registration failed tuner subdev registration fail au8522 129-0047: creating new instance xc5000 129-0061: creating new instance xc5000: Successfully identified at address 0x61 xc5000: Firmware has not been loaded previously DVB: registering new adapter (au0828) DVB: registering adapter 0 frontend 0 (Auvitek AU8522 QAM/8VSB Frontend)... Registered device AU0828 [Hauppauge HVR950Q] Creating /dev/video0 Creating /dev/video1 Creating /dev/dvb/adapter0/demux0 Creating /dev/dvb/adapter0/dvr0 Creating /dev/dvb/adapter0/frontend0 and upon channel scanning: xc5000: waiting for firmware upload (dvb-fe-xc5000-1.6.114.fw)... Loading firmware at '/boot/modules/dvb-fe-xc5000-1.6.114.fw', f=7 xc5000: firmware read Zu bytes. xc5000: firmware uploading... xc5000: firmware upload complete... I'm not sure what's with the Zu bytes thing. That translates into 0x5a75=21357, or 0x755a=30042 (for endianness), but the actual size of the firmware file is 12401 bytes. Compression? More importantly, there are references to the au8522, which according to the v4l wiki, is the 950Q's A/V decoder. It looks like au8522_decoder.c is needed after all. And the linker wants an implementation of i2c_register_driver and i2c_del_driver. Kevin From owner-freebsd-multimedia@FreeBSD.ORG Fri Jan 14 21:33:32 2011 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 DE9191065670 for ; Fri, 14 Jan 2011 21:33:31 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.c2i.net [212.247.154.2]) by mx1.freebsd.org (Postfix) with ESMTP id 5347B8FC16 for ; Fri, 14 Jan 2011 21:33:30 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=A4HDTGXxjEDC1UuJ6rl8GMp0zaXu4XgXPL1dbujgs48= c=1 sm=1 a=Q9fys5e9bTEA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=pGLkceISAAAA:8 a=ko-eBE1-jrdF_FMb_18A:9 a=hvbCEpgkQiE6-QogE_4A:7 a=bw09krdhWosN3VoHsahJZUN_w0gA:4 a=PUjeQqilurYA:10 a=MSl-tDqOz04A:10 a=_EDSFsDbAKuznG1k:21 a=zlb_2VThr5p0njQQ:21 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 75092134; Fri, 14 Jan 2011 22:33:29 +0100 From: Hans Petter Selasky To: Kevin Baxter Date: Fri, 14 Jan 2011 22:33:30 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-PRERELEASE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201101142233.30435.hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org, Luigi Rizzo Subject: Re: Webcamd and the au0828 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: Fri, 14 Jan 2011 21:33:32 -0000 On Friday 14 January 2011 22:12:41 Kevin Baxter wrote: > On Thu, Jan 13, 2011 at 6:49 PM, Andrew Gallatin wrote: > > On Thu, Jan 13, 2011 at 6:43 PM, Luigi Rizzo wrote: > > > you prompted me to try the same for em28xx, so i followed a similar > > > > route: > > > > Try using webcamd from the Hans' SVN, not from ports. Hans & I got > > em28xx working earlier this week. I tripped over a SEGV like the OP > > describes, and Hans fixed it. For at least my em28xx stick, it is > > working well. > > > > Drew > > Like I accidentally replied to only Andrew, yes the svn fixed the > dev->driver issue already. An upstream driver change broke the dw2102.c > compilation, so I commented it out. > Now it detects the stick and populates /dev, so far so good. But it still > doesn't want to work. pwcview gives me: > Webcam set to: 320x240 (sif) at 5 fps > libv4l2: error queuing buf 0: Invalid argument > libv4l2: error queuing buf 1: Invalid argument > libv4l2: error queuing buf 2: Invalid argument > libv4l2: error queuing buf 3: Invalid argument > libv4l2: error reading: Device busy > Error reading from webcam: Device busy > > and xawtv can't use directvideo. It probably doesn't like my radeon. > Leaving only the behemoth that is MythTV to diagnose. It sees the input > source, but a channel scan fails to find anything. > > The webcamd debug log: > Linux video capture interface: v2.00 > > -snip a whole lot of registrations- > > Attached ugen5.2[0] to cuse unit 0 > au0828: i2c bus registered > tveeprom 129-0050: Hauppauge model 72001, rev B3F0, serial# 7982575 > tveeprom 129-0050: MAC address is 0x7fffffffe855M > tveeprom 129-0050: tuner model is Xceive XC5000 (idx 150, type 76) > tveeprom 129-0050: TV standards NTSC(M) ATSC/DVB Digital (eeprom 0x88) > tveeprom 129-0050: audio processor is AU8522 (idx 44) > tveeprom 129-0050: decoder processor is AU8522 (idx 42) > tveeprom 129-0050: has no radio, has IR receiver, has no IR transmitter > hauppauge_eeprom: hauppauge eeprom: model=72001 > analog subdev registration failed > tuner subdev registration fail > au8522 129-0047: creating new instance > xc5000 129-0061: creating new instance > xc5000: Successfully identified at address 0x61 > xc5000: Firmware has not been loaded previously > DVB: registering new adapter (au0828) > DVB: registering adapter 0 frontend 0 (Auvitek AU8522 QAM/8VSB Frontend)... > Registered device AU0828 [Hauppauge HVR950Q] > Creating /dev/video0 > Creating /dev/video1 > Creating /dev/dvb/adapter0/demux0 > Creating /dev/dvb/adapter0/dvr0 > Creating /dev/dvb/adapter0/frontend0 > > and upon channel scanning: > > xc5000: waiting for firmware upload (dvb-fe-xc5000-1.6.114.fw)... > Loading firmware at '/boot/modules/dvb-fe-xc5000-1.6.114.fw', f=7 > xc5000: firmware read Zu bytes. > xc5000: firmware uploading... > xc5000: firmware upload complete... > > I'm not sure what's with the Zu bytes thing. That translates into > 0x5a75=21357, or 0x755a=30042 (for endianness), but the actual size of the > firmware file is 12401 bytes. Compression? > More importantly, there are references to the au8522, which according to > the v4l wiki, is the 950Q's A/V decoder. It looks like au8522_decoder.c is > needed after all. And the linker wants an implementation of > i2c_register_driver and i2c_del_driver. You need to use vlc with this device. vlc --dvb-adapter=0 dvb:// --HPS From owner-freebsd-multimedia@FreeBSD.ORG Sat Jan 15 13:49:33 2011 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 67C5F1065674; Sat, 15 Jan 2011 13:49:33 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id 2ACDE8FC17; Sat, 15 Jan 2011 13:49:32 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 4544E1E006EB; Sat, 15 Jan 2011 14:49:32 +0100 (CET) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.4/8.14.3) with ESMTP id p0FDlCQg094336; Sat, 15 Jan 2011 14:47:12 +0100 (CET) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.4/8.14.3/Submit) id p0FDlCC2094335; Sat, 15 Jan 2011 14:47:12 +0100 (CET) (envelope-from nox) From: Juergen Lock Date: Sat, 15 Jan 2011 14:47:12 +0100 To: freebsd-multimedia@FreeBSD.org, freebsd-ports@FreeBSD.org Message-ID: <20110115134712.GA93954@triton8.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: I think now vdr (and xine) should be able to use vdpau if... 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, 15 Jan 2011 13:49:33 -0000 ...you apply this patch to the multimedia/libxine port (at least until it has been committed), http://people.freebsd.org/~nox/dvb/libxine-vdpau2.patch or the xz(1) compressed version: http://people.freebsd.org/~nox/dvb/libxine-vdpau2.patch.xz and then make sure libxine is rebuilt with the VDPAU knob on. (You can manually invoke the config dialog with `make config' in the port dir.) And if you already build vdr and its plugins you may need to rebuild at least the multimedia/vdr-plugin-xineliboutput port too. And in case anyone is wondering, vdpau is a feature of newer nvidia graphics cards that can offload major parts of mpeg/h264/vc1 video decoding onto the gpu so those can be played with less cpu load. (Or even at all like often with hd video on `smaller' cpus.) The vdr 1.7.16 Call for testing post is here: http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-January/011554.html And more links are here: http://people.freebsd.org/~nox/dvb/