MythTV and PVR500 (was: Possible FreeBSD port?)

usleepless at gmail.com usleepless at gmail.com
Thu Dec 21 04:39:52 PST 2006


Greg, List,

On 12/20/06, Greg 'groggy' Lehey <grog at freebsd.org> wrote:
> On Wednesday, 20 December 2006 at  0:09:18 +0100, usleepless at gmail.com
> >> Why didn't you make a port of it?
> >
> > i still might. but it is based off 18-fixes, ported to postgresql, and
> > heavily modified to remove all busy-wait-loops.
>
> OK, this looks like a side branch.
>
> > i made a port of the pvr500 driver which i based of the pvr250 port
> > in the process.
>
> I'm also in the process of committing the pvr250 port to the kernel
> tree.  I'd be interested in seeing your driver.

the driver is in multimedia/pvrxxx. currently i am running a newer
version which differs in 2 points: it tries to support pvr250/350 as
well ( untested) and it uses kernel-taskqueues and a fast interrupt.

i have send in http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/104882,
which is the iicbb-kernel patch which pvr250 and pvrxxx needs. it
would be of great help if this patch was included in the kernel for
the adoption of both drivers. you are a committer if i am not
mistaken. right?

> >>> so if you have specific issues, please let me know. i might be able
> >>> to help.
> >>
> >> It seems to run, but the installation process is painful, not helped
> >> by the MythTV code.  Currently if you try to run MythTV before setting
> >> my MySQL, it gets stuck in an endless loop trying to connect, vomiting
> >> over the screen.  I'd like to fix that, but I suppose I can commit the
> >> current version.
> >
> > what do you mean exactly with "setting my MySQL" ?
>
> Sorry, "setting up MySQL", i.e. installing the database.
>
> > since i ported it to support postgresql, i had a different proces to
> > get it running ( running altered DDL over and over again to fight
> > the nightmare of different mysql-datatypes ).
>
> Sounds like that's an issue with your knowledge of the database rather
> than with the software itself.  Still, a PostgreSQL version is a good
> thing to have too.

yes, i have tried to make it as generic as possible so mysql might
still work as well.

> > i did not make a port, but i am willing to help. but if people are
> > interested in a 0.18-fixes-postgresql-heavily-modified port of
> > mythtv, let me know. if there is enough interest we might pull it
> > off.
>
> I've now committed the base MythTV port.  You might like to take a
> look and see how to fit your patches.
> > but i got the impression of the list that only the most recent
> > version of mythtv is worth aiming for
>
> I've ported 0.20, of course.
>
> > ( i have no need to go to .19 or .20 )
>
> Because it's such a pain to upgrade? :-)  That's what I've heard from
> many people.

that's my impression too ( never did it ). most of these problems seem
to arise from the db-schema though. which is easy to understand when
one analyzes the mythtv-schema.

> One of the things I want for this port is for it to Just
> Work.  And given the code base, that's a tall order.

it is indeed.

what i am curious about is: am i the only one who has a mythfrontend
and backend running on freebsd? or are there other people who have
done the same? if so, what versions and what did they do to make it
work?

regarding my postgresql-patches: i am not going to patch up another
version of mythtv if those patches are not incorporated into mythtv
itself ( to make it truly cross-db-compatible ).

regarding my ipc-patches: i am wondering if this 0.20-port will
actually work on freebsd. let me exlain:

because i am still running on a 4.11 server, the mythbackend needed to
run on 4.11. i soon discovered that mythtv had strange ipc, so i
compiled it against linux-threads ( had to rebuild QT with
linux-threads as well ). i remember it helped a little, but not
enough.

i stumbled upon all the busy-wait-loops:

"
  while(!condition)
        usleep(50);
"

this is probably the reason why i needed linux-threads. but there is a
catch: linux-usleep guarantees a context-switch, while freebsd doesn't
( didn't ? ).

my first solution was to redefine usleep in mythcontext.h, to force a
context-switch. this produced a working mythtv-install. later on, i
removed all busy-wait-loops because they are just plain stupid.

hope this helps ( someone! )

and i hope that people try the port you have submitted, and people let
fbsd-mm know, and we work out the problems. so we end up with a port
that "just works" ( for pcbsd as well ), as soon as possible.

Greg: thank you for your time.

regards,

usleep


More information about the freebsd-multimedia mailing list