From owner-svn-src-head@FreeBSD.ORG Sun May 31 19:35:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFB571065673; Sun, 31 May 2009 19:35:41 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADA978FC23; Sun, 31 May 2009 19:35:41 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4VJZfhZ053027; Sun, 31 May 2009 19:35:41 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4VJZfhl053022; Sun, 31 May 2009 19:35:41 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200905311935.n4VJZfhl053022@svn.freebsd.org> From: Ed Schouten Date: Sun, 31 May 2009 19:35:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193184 - in head/sys/dev/syscons: . teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2009 19:35:42 -0000 Author: ed Date: Sun May 31 19:35:41 2009 New Revision: 193184 URL: http://svn.freebsd.org/changeset/base/193184 Log: Restore support for bell pitch/duration. Because we only support a single argument to tf_param, use 16 bits for the pitch and 16 bits for the duration. While there, make the argument unsigned. There isn't a single param call that needs a signed integer. Submitted by: danfe (modified) Modified: head/sys/dev/syscons/scterm-teken.c head/sys/dev/syscons/teken/sequences head/sys/dev/syscons/teken/teken.c head/sys/dev/syscons/teken/teken.h head/sys/dev/syscons/teken/teken_subr_compat.h Modified: head/sys/dev/syscons/scterm-teken.c ============================================================================== --- head/sys/dev/syscons/scterm-teken.c Sun May 31 18:14:40 2009 (r193183) +++ head/sys/dev/syscons/scterm-teken.c Sun May 31 19:35:41 2009 (r193184) @@ -491,7 +491,7 @@ scteken_copy(void *arg, const teken_rect } static void -scteken_param(void *arg, int cmd, int value) +scteken_param(void *arg, int cmd, unsigned int value) { scr_stat *scp = arg; @@ -508,6 +508,10 @@ scteken_param(void *arg, int cmd, int va case TP_SWITCHVT: sc_switch_scr(scp->sc, value); break; + case TP_SETBELLPD: + scp->bell_pitch = TP_SETBELLPD_PITCH(value); + scp->bell_duration = TP_SETBELLPD_DURATION(value); + break; } } Modified: head/sys/dev/syscons/teken/sequences ============================================================================== --- head/sys/dev/syscons/teken/sequences Sun May 31 18:14:40 2009 (r193183) +++ head/sys/dev/syscons/teken/sequences Sun May 31 19:35:41 2009 (r193184) @@ -102,6 +102,7 @@ VPA Vertical Position Absolute ^[ [ d # Cons25 compatibility sequences C25ADBG Cons25 set adapter background ^[ [ = G r C25ADFG Cons25 set adapter foreground ^[ [ = F r +C25BLPD Cons25 set bell pitch duration ^[ [ = B r r C25CURS Cons25 set cursor type ^[ [ = S r C25VTSW Cons25 switch virtual terminal ^[ [ z r Modified: head/sys/dev/syscons/teken/teken.c ============================================================================== --- head/sys/dev/syscons/teken/teken.c Sun May 31 18:14:40 2009 (r193183) +++ head/sys/dev/syscons/teken/teken.c Sun May 31 19:35:41 2009 (r193184) @@ -167,7 +167,7 @@ teken_funcs_copy(teken_t *t, const teken } static inline void -teken_funcs_param(teken_t *t, int cmd, int value) +teken_funcs_param(teken_t *t, int cmd, unsigned int value) { t->t_funcs->tf_param(t->t_softc, cmd, value); Modified: head/sys/dev/syscons/teken/teken.h ============================================================================== --- head/sys/dev/syscons/teken/teken.h Sun May 31 18:14:40 2009 (r193183) +++ head/sys/dev/syscons/teken/teken.h Sun May 31 19:35:41 2009 (r193184) @@ -98,13 +98,16 @@ typedef void tf_putchar_t(void *, const typedef void tf_fill_t(void *, const teken_rect_t *, teken_char_t, const teken_attr_t *); typedef void tf_copy_t(void *, const teken_rect_t *, const teken_pos_t *); -typedef void tf_param_t(void *, int, int); +typedef void tf_param_t(void *, int, unsigned int); #define TP_SHOWCURSOR 0 #define TP_CURSORKEYS 1 #define TP_KEYPADAPP 2 #define TP_AUTOREPEAT 3 #define TP_SWITCHVT 4 #define TP_132COLS 5 +#define TP_SETBELLPD 6 +#define TP_SETBELLPD_PITCH(pd) ((pd) >> 16) +#define TP_SETBELLPD_DURATION(pd) ((pd) & 0xffff) typedef void tf_respond_t(void *, const void *, size_t); typedef struct { Modified: head/sys/dev/syscons/teken/teken_subr_compat.h ============================================================================== --- head/sys/dev/syscons/teken/teken_subr_compat.h Sun May 31 18:14:40 2009 (r193183) +++ head/sys/dev/syscons/teken/teken_subr_compat.h Sun May 31 19:35:41 2009 (r193184) @@ -66,6 +66,15 @@ teken_subr_cons25_switch_virtual_termina teken_funcs_param(t, TP_SWITCHVT, vt); } +static void +teken_subr_cons25_set_bell_pitch_duration(teken_t *t, unsigned int pitch, + unsigned int duration) +{ + + teken_funcs_param(t, TP_SETBELLPD, (pitch << 16) | + (duration & 0xffff)); +} + #if 0 static void teken_subr_vt52_decid(teken_t *t)