Skip site navigation (1)Skip section navigation (2)
Date:      11 Mar 2003 14:03:30 -0000
From:      Oliver Lehmann <lehmann@ans-netz.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Oliver Lehmann <lehmann@ans-netz.de>
Subject:   ports/49112: update-port: graphics/xawtv
Message-ID:  <20030311140330.67946.qmail@dill.salatschuessel.net>

next in thread | raw e-mail | index | archive | help

>Number:         49112
>Category:       ports
>Synopsis:       update-port: graphics/xawtv
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 11 06:10:07 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Lehmann
>Release:        FreeBSD 4.8-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD kartoffel.salatschuessel.net 4.8-PRERELEASE FreeBSD 4.8-PRERELEASE #0: Tue Mar 11 13:50:34 CET 2003 olivleh1@kartoffel.salatschuessel.net:/usr/obj/usr/src/sys/KARTOFFEL i386


>Description:
	cards like
bktr0: <BrookTree 878> mem 0xef002000-0xef002fff irq 5 at device 11.0 on pci0
bktr0: Hauppauge Model 61344 D421
bktr0: Detected a MSP3415D-B3 at 0x80
bktr0: Hauppauge WinCast/TV, Philips FR1216 PAL FM tuner, msp3400c stereo, remote control.
	only playing sound if audio input was set to "internal"

	cards like
bktr0: <BrookTree 878> mem 0xd9002000-0xd9002fff irq 10 at device 9.0 on pci0
bktr0: Hauppauge Model 61344 D221
bktr0: Detected a MSP3415D-A2 at 0x80
bktr0: Hauppauge WinCast/TV, Philips FR1216 PAL FM tuner, msp3400c stereo, remote control.
	playing in the "tuner" or in the "internal" setting.

	Implement a selectbox where the user can select "audio internal","audio external"
	or "tuner" to give sound to users with the 1st card.

	cribed from: graphics/fxtv

	actually you have to set the input source every startup manually (if you
	have the 1st card - default is tuner). Actually i'm discussing with the
	xawtv author about a config-file option.

	new files:	files/patch-libng::grab-ng.h
			files/patch-libng::plugins::drv0-bsd.c

>How-To-Repeat:
>Fix:


--- xawtv.patch begins here ---
diff -ruN xawtv.old/Makefile xawtv/Makefile
--- xawtv.old/Makefile	Tue Mar 11 14:49:22 2003
+++ xawtv/Makefile	Tue Mar 11 14:49:43 2003
@@ -7,6 +7,7 @@
 
 PORTNAME=	xawtv
 PORTVERSION=	3.85
+PORTREVISION=	1
 CATEGORIES=	graphics
 MASTER_SITES=	http://bytesex.org/xawtv/
 DISTNAME=	${PORTNAME}_${PORTVERSION}
diff -ruN xawtv.old/files/patch-libng::grab-ng.h xawtv/files/patch-libng::grab-ng.h
--- xawtv.old/files/patch-libng::grab-ng.h	Thu Jan  1 01:00:00 1970
+++ xawtv/files/patch-libng::grab-ng.h	Mon Mar 10 20:49:39 2003
@@ -0,0 +1,10 @@
+--- libng/grab-ng.h.orig	Mon Mar 10 20:49:19 2003
++++ libng/grab-ng.h	Mon Mar 10 20:17:01 2003
+@@ -95,6 +95,7 @@
+ #define ATTR_ID_HUE          8
+ #define ATTR_ID_CONTRAST     9
+ #define ATTR_ID_COUNT       10
++#define ATTR_ID_AUDIO       11
+ 
+ #define CAN_OVERLAY          1
+ #define CAN_CAPTURE          2
diff -ruN xawtv.old/files/patch-libng::plugins::drv0-bsd.c xawtv/files/patch-libng::plugins::drv0-bsd.c
--- xawtv.old/files/patch-libng::plugins::drv0-bsd.c	Thu Jan  1 01:00:00 1970
+++ xawtv/files/patch-libng::plugins::drv0-bsd.c	Mon Mar 10 20:37:18 2003
@@ -0,0 +1,53 @@
+--- libng/plugins/drv0-bsd.c.orig	Mon Mar 10 20:36:37 2003
++++ libng/plugins/drv0-bsd.c	Mon Mar 10 20:33:55 2003
+@@ -154,8 +154,27 @@
+     BT848_IFORM_F_RSVD,
+ };
+ 
++static struct STRTAB audio[] = {
++    {  0, "Tuner"   },
++    {  1, "Extern"   },
++    {  2, "Intern"      },
++    { -1, NULL }
++};
++static int audio_map[] = {
++    AUDIO_TUNER,
++    AUDIO_EXTERN,
++    AUDIO_INTERN,
++};
++
+ static struct ng_attribute bsd_attr[] = {
+     {
++	id:       ATTR_ID_AUDIO,
++	name:     "audio",
++	type:     ATTR_TYPE_CHOICE,
++	choices:  audio,
++	read:     bsd_read_attr,
++	write:    bsd_write_attr,
++    },{
+ 	id:       ATTR_ID_NORM,
+ 	name:     "norm",
+ 	type:     ATTR_TYPE_CHOICE,
+@@ -511,6 +530,12 @@
+ 	if (-1 != xioctl(h->tfd,get,&arg))
+ 	    value = arg;
+ 	break;
++    case ATTR_ID_AUDIO:
++	if (-1 != xioctl(h->tfd, BT848_GAUDIO, &arg))
++	    for (i = 0; i < sizeof(audio_map)/sizeof(int); i++)
++		if (arg == audio_map[i])
++		    value = i;
++	break;
+     default:
+ 	break;
+     }
+@@ -541,6 +566,9 @@
+ 	bsd_get_range(attr->id,&get,&set);
+ 	arg = value;
+ 	xioctl(h->tfd,set,&arg);
++	break;
++    case ATTR_ID_AUDIO:
++	xioctl(h->tfd, BT848_SAUDIO,&audio_map[value]);
+ 	break;
+     default:
+ 	break;
--- xawtv.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030311140330.67946.qmail>