From sacadmin Mon Jan  8 10:33:17 2007
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id l08IXHkE006861;
	Mon, 8 Jan 2007 10:33:17 -0800 (PST)
Received: (from alanc@localhost)
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6/Submit) id l08IXHss006857;
	Mon, 8 Jan 2007 10:33:17 -0800 (PST)
Date: Mon, 8 Jan 2007 10:33:17 -0800 (PST)
From: Alan Coopersmith <alanc@sac.sfbay.sun.com>
Message-Id: <200701081833.l08IXHss006857@sac.sfbay.sun.com>
To: PSARC@sac.sfbay.sun.com
Cc: David.Marx@sun.com
Subject: KIOCMKTONE (keyboard make tone) ioctl [PSARC/2007/019 Timeout:  01/15/2007]
Status: RO
Content-Length: 9879

I am sponsoring this case for David Marx, with a timeout of January 15, 2007.
It requests a Patch release binding.

        -Alan Coopersmith-           alan.coopersmith@sun.com
         Sun Microsystems, Inc. - X Window System Engineering

Template Version: @(#)onepager.txt 1.29 04/11/15 SMI

This information is Copyright 2007 Sun Microsystems, Inc.  All rights reserved.

1. Introduction
   1.1. Project/Component Working Name:

        Implement KIOCMKTONE (keyboard make tone) ioctl 

   1.2. Name of Document Author/Supplier:

        David Marx 

   1.3. Date of This Document:

	12/07/06

   1.4. Name of Major Document Customer(s)/Consumer(s):
	1.4.1. The PAC or CPT you expect to review your project:

                Solaris PAC 

	1.4.2. The ARC(s) you expect to review your project:

                PSARC 

	1.4.3. The Director/VP who is "Sponsoring" this project:

                Diann.Olden@Sun.COM 

	1.4.4. The name of your business unit:

                Sustaining Engineering 

   1.5. Email Aliases:
	1.5.1. Responsible Manager: Lisa.Chatham@Sun.COM
	1.5.2. Responsible Engineer: David.Marx@Sun.COM
    	1.5.3. Marketing Manager:
	1.5.4. Interest List: Mac.McPherson@Sun.COM

2. Project Summary
   2.1. Project Description:

        Add support for KIOCMKTONE ioctl to the keyboard drivers 
        in order to be able to generate tones on the speaker, 
        without the application (especially the X servers Xsun 
        and Xorg) needing to wait to turn off the tone.  

   2.2. Risks and Assumptions:

	There are many different keyboard drivers affected,
	the will need to have this functionality added, and tested.
	Will need to change the X servers after this functionality
	is added to the kernel.

3. Business Summary
   3.1. Problem Area:

        We have an escalation from a customer that when the bell 
	rings in the X server, no other processing in the X server
        can continue as long as the bell is sounding.  This is 
        especially a problem when multiple bells sound.  Not only 
	does the processing stop, but it is difficult to
        do anything in the X server, like attempt to close the 
	offending client.

        For a bell, the X servers are written to turn on the 
	tone, sleep an appropriate amount of time, then turn off
	the tone.  While the X server is sleeping, no other
        processing occurs in the X server.  In particular the 
        mouse will not be responded to (although some servers 
        have a hardware mouse cursor, so the mouse may move but 
        will not respond to buttons).  

        The proposal is to add the KIOCMKTONE ioctl to the 
        keyboard drivers same as the old KDMKTONE ioctl.  This 
        ioctl allows specifying the pitch, as well as the 
        duration of the tone.  When the kernel receives the ioctl 
        request, if the tone generator is not busy, the tone 
        begins to sound.  The kernel then schedules a timeout to 
        be processed when the tone should be turned off.  If the 
        tone generator is busy, the request is put into a fixed 
        length queue.  If the queue is full, an error is 
        returned.  

        The ioctl name was changed from KDMKTONE to KIOCMKTONE as 
        the KD ioctls are not available on sparc.  Also, the 
        value of the ioctl will change from the old Solaris 7 x86 
        value.  

   3.2. Market/Requestor:

	[Customer names removed for external ARC case publication]

   3.3. Business Justification:

        Makes the X server more robust.  May help keep business 
	from some customers.  Many requests to fix the bug, and to have
	Xbell pitch support.

   3.4. Competitive Analysis:

        Linux and FreeBSD both have KDMKTONE ioctl.  Solaris 7 
        x86 had KDMKTONE as well, but it was removed when the 
        console redesign was completed.  Adding the KIOCMKTONE 
        ioctl brings us up to the functionality in Linux and 
        FreeBSD.  

   3.5. Opportunity Window/Exposure:

	None.

   3.6. How will you know when you are done?:

        When kernel and X server code have been added to Solaris, 
        and are available in the product.  


4. Technical Description:
    4.1. Details:
        Proposed is adding a KIOCMKTONE ioctl to the keyboard 
        drivers.  Its usage is similar to the KDMKTONE ioctl of 
	Solaris 7, as well as the KDMKTONE ioctl of FreeBSD and
        linux.  The KIOCMKTONE ioctl is available in keyboard 
        drivers.  It has one integer argument.  This integer 
        argument is composed of a lower 16 bits which is the 
        pitch in hertz, and the upper 16 bits which is the 
	duration in milli-seconds.

        The following happens when the KIOCMKTONE ioctl is sent 
        to the kernel.  If no beeper routines are enrolled, ENXIO 
        is returned.  If one has turned the beeper on with the 
        ioctl KIOCCMD KBD_CMD_BELL, then EBUSY is returned.  If 
        the beeper is not currently sounding a tone from a 
        previous KIOCMKTONE, then the tone begins to sound, and a 
        kernel timeout is set up to be called when duration 
        expires.  Success is returned to the user.  If the beeper 
        is sounding a tone, then if there is a room in the beeper 
        queue, this tone is added and success if returned to the 
        user.  If there is not room, EAGAIN is returned.  

        My changes move sun4/os/beep.c to common/io/beep.c, and 
        and changes the x86 kb8042 and usbkbm modules to enroll 
        the intel beep routines at open time, and unenroll them 
	at close time.  The sparc beep routines continue
	to be enrolled in bbc_beep or grbeep.  Hence all beep
	processing is with the beep_on, beep_off and beep_freq
	routines in common/io/beep.c.

	When beep_init is called, a fixed size queue is set
        up to store the tones requested while the beeper is 
	busy.  Unlike Solaris 7 which had an unlimited queue,
	EAGAIN is returned if the queue is full.

    4.2. Bug/RFE Number(s):

	Esc 1-16874010: Xsun is blocked when a program rings keyboard
	    or audio-bell

	Esc 1-18049443: Transfer | Provide fix for 6436536

        Bug 6425775: Xsun is blocked when a program rings 
	    keyboard- or audio-bell

        Bug 6436536: conskbd should provide interface to sound 
	    bell for specified duration

	Bug 4421990: allow changing keyboard bell frequency

	Bug 4355782: Xbell pitch & volume cannot be changed

	Bug 5035581: RFE: Customizable Beep Frequency/Sound

    
    4.3. In Scope:

	Added is an ability to change the Xbell pitch with this ioctl.

    4.4. Out of Scope:

	There is no ability to change the Xbell volume with this ioctl.

    4.5. Interfaces:

	Adding the following ioctl to keyboard drivers:

	ioctl (keyboard, KIOCMKTONE, (duration << 16) | pitch);

	returns:
	    0: success
	    ENXIO: no tone generator
	    EAGAIN: queue full
	    EBUSY: tone generator is sounding

	kbio.h:
	    #define       KIOCMKTONE      (KIOC|27)

	pit.h:
	    #define       PIT_C2          0x80            /* select counter 2

	I suggest Public Uncommitted as the stability level.

    4.6. Doc Impact:

	Could be documented in:
	    kb.7m
	    usbkbm.7m
	    kb.4m
	    bbc_beep.7d
	    grbeep.7d

    4.7. Admin/Config Impact:

	No changes to administration of the product.
    
    4.8. HA Impact:

	No Changes to High Availability.
    
    4.9. I18N/L10N Impact:

	No changes to internationization or localization.

    4.10. Packaging & Delivery:

	The following binaries and packages are affected:

	X86:

	    SUNWcakr.i:
		platform/i86pc/kernel/drv/kb8042
		platform/i86pc/kernel/drv/amd64/kb8042
		platform/i86pc/kernel/unix
		platform/i86pc/kernel/amd64/unix

	    SUNWckr:
		kernel/drv/genunix
		kernel/drv/amd64/genunix
		kernel/drv/conskbd
		kernel/drv/amd64/conskbd

	    SUNWhea:
		usr/include/sys/pit.h
		usr/include/sys/kbio.h

	    SUNWusb:
		kernel/strmod/strmod/usbkbm
		kernel/strmoc/strmod/amd64/usbkbm

	    SUNWxsun-server:
		usr/openwin/server/modules/ddxSUNWkbd.so.1

	    SUNWxorg-server:
		usr/bin/X11/Xorg

	Sparc:

	    SUWNckr:
		platform/sun4u/kernel/strmod/sparcv9/kb
		platform/SUNW,Sun-Fire-15000/kernel/sparcv9/unix
		platform/SUNW,Sun-Fire/kernel/sparcv9/unix
		platform/sun4u/kernel/sparcv9/genunix
		platform/sun4u/kernel/sparcv9/unix
		platform/SUNW,Ultra-Enterprise-10000/kernel/sparcv9/unix
		platform/SUNW,SPARC-Enterprise/kernel/sparcv9/unix

	    SUNWckr:
		kernel/drv/sparcv9/conskbd

	    SUNWhea:
		usr/include/sys/kbio.h

	    SUNWusb:
		kernel/strmod/sparcv9/usbkbm

	    SUNWxwplt:
		usr/openwin/server/modules/ddxSUNWkbd.so.1

    4.11. Security Impact:

	None.
    
    4.12. Dependencies:

        The proposed changes are affected by the following ARC 
        case.  However either change can be done independently.  

	PSARC 2006/624 Beeper Frequencies Enhancement
	4421990 Allow changing keyboard bell frequency

5. Reference Documents:

	None.

6. Resources and Schedule:
   6.1. Projected Availability:

	Spring 2007

   6.2. Cost of Effort:

	Couple of man months for ARC negotiation, code inspection,
	reimplementing, testing, doc, merging, and putback.

   6.3. Cost of Capital Resources:

	Small or none.

   6.4. Product Approval Committee requested information:
   	6.4.1. Consolidation or Component Name:

		KIOCMKTONE

	6.4.3. Type of CPT Review and Approval expected:

		FastTrack

        6.4.4. Project Boundary Conditions:

		None.

	6.4.5. Is this a necessary project for OEM agreements:

		No.

	6.4.6. Notes:

		None.

	6.4.7. Target RTI Date/Release:

		Solaris 11

		Possibly Solaris 10 U5.

	6.4.8. Target Code Design Review Date:

		Winter 2007


	6.4.9. Update approval addition:

		No PAC approval.

   6.5. ARC review type:

		FastTrack

7. Prototype Availability:
   7.1. Prototype Availability:

	Prototype is available for Solaris 8, 10, 11.

   7.2. Prototype Cost:



From sacadmin Mon Jan  8 10:42:59 2007
Received: from phorcys.east.sun.com (phorcys.East.Sun.COM [129.148.174.143])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id l08IgxHB007098;
	Mon, 8 Jan 2007 10:42:59 -0800 (PST)
Received: from phorcys.east.sun.com (localhost [127.0.0.1])
	by phorcys.east.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l08IgwAw029941;
	Mon, 8 Jan 2007 13:42:58 -0500 (EST)
Received: (from carlsonj@localhost)
	by phorcys.east.sun.com (8.13.8+Sun/8.13.8/Submit) id l08IgwCV029938;
	Mon, 8 Jan 2007 13:42:58 -0500 (EST)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <17826.37042.294566.821610@gargle.gargle.HOWL>
Date: Mon, 8 Jan 2007 13:42:58 -0500
From: James Carlson <james.d.carlson@sun.com>
To: Alan Coopersmith <alanc@sac.sfbay.sun.com>
Cc: PSARC@sac.sfbay.sun.com, David.Marx@sun.com
Subject: Re: KIOCMKTONE (keyboard make tone) ioctl [PSARC/2007/019 Timeout:
 01/15/2007]
In-Reply-To: <200701081833.l08IXHss006857@sac.sfbay.sun.com>
References: <200701081833.l08IXHss006857@sac.sfbay.sun.com>
X-Mailer: VM 7.01 under Emacs 21.3.1
Status: RO
Content-Length: 1092

Alan Coopersmith writes:
>         The proposal is to add the KIOCMKTONE ioctl to the 
>         keyboard drivers same as the old KDMKTONE ioctl.

Yay!

>         Linux and FreeBSD both have KDMKTONE ioctl.  Solaris 7 
>         x86 had KDMKTONE as well, but it was removed when the 
>         console redesign was completed.  Adding the KIOCMKTONE 
>         ioctl brings us up to the functionality in Linux and 
>         FreeBSD.  

I'm confused by this part.  If everyone else uses KDMKTONE, do we have
a benefit from being different?  If so, what is it?

> 	I suggest Public Uncommitted as the stability level.

Why Uncommitted?  Do you anticipate this needing to change again?  Or
is the concern just that some future hardware might not be able to
implement the ioctl the same way?  (I.e., ioctl remains, but observed
-- or heard -- functionality is different.)

-- 
James Carlson, Solaris Networking              <james.d.carlson@sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

From sacadmin Mon Jan  8 17:16:58 2007
Received: from sfbaymail1sca.SFBay.Sun.COM (sfbaymail1sca.SFBay.Sun.COM [129.145.154.35])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id l091GwDX020783;
	Mon, 8 Jan 2007 17:16:58 -0800 (PST)
Received: from nwk-ea-fw-1.sun.com (nwkes-gis-mail-1.SFBay.Sun.COM [10.4.134.5])
	by sfbaymail1sca.SFBay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l091GwMl002169;
	Mon, 8 Jan 2007 17:16:58 -0800 (PST)
Received: from d1-sfbay-09.sun.com ([192.18.39.119])
	by nwk-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l091GrTJ010395;
	Mon, 8 Jan 2007 17:16:53 -0800 (PST)
Received: from conversion-daemon.d1-sfbay-09.sun.com by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JBK00H01U62W200@d1-sfbay-09.sun.com>
 (original mail from David.Marx@Sun.COM); Mon, 08 Jan 2007 17:16:52 -0800 (PST)
Received: from [129.153.3.63] by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JBK00MERU84BK5E@d1-sfbay-09.sun.com>; Mon,
 08 Jan 2007 17:16:52 -0800 (PST)
Date: Mon, 08 Jan 2007 17:18:09 -0800
From: David Marx <David.Marx@Sun.COM>
Subject: Re: KIOCMKTONE (keyboard make tone) ioctl [PSARC/2007/019 Timeout:
 01/15/2007]
In-reply-to: <17826.37042.294566.821610@gargle.gargle.HOWL>
Sender: David.Marx@Sun.COM
To: James Carlson <James.D.Carlson@Sun.COM>
Cc: Alan Coopersmith <alanc@sac.sfbay.sun.com>, PSARC@sac.sfbay.sun.com
Reply-to: David.Marx@Sun.COM
Message-id: <45A2ED51.7060100@Sun.COM>
Organization: Sun Microsystems
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en-us, en
References: <200701081833.l08IXHss006857@sac.sfbay.sun.com>
 <17826.37042.294566.821610@gargle.gargle.HOWL>
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7) Gecko/20041221
Status: RO
Content-Length: 886

>>        Linux and FreeBSD both have KDMKTONE ioctl.  Solaris 7 
>>        x86 had KDMKTONE as well, but it was removed when the 
>>        console redesign was completed.  Adding the KIOCMKTONE 
>>        ioctl brings us up to the functionality in Linux and 
>>        FreeBSD.  
> 
> 
> I'm confused by this part.  If everyone else uses KDMKTONE, do we have
> a benefit from being different?  If so, what is it?

I did it for consistency as all the other ioctls in kbio.h are KIOC*.

>>	I suggest Public Uncommitted as the stability level.
> 
> 
> Why Uncommitted?  Do you anticipate this needing to change again?  Or
> is the concern just that some future hardware might not be able to
> implement the ioctl the same way?  (I.e., ioctl remains, but observed
> -- or heard -- functionality is different.)

I don't anticipate changes, but never know when an errno needs to be added.


From sacadmin Tue Jan  9 02:06:26 2007
Received: from sfbaymail1sca.SFBay.Sun.COM (sfbaymail1sca.SFBay.Sun.COM [129.145.154.35])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id l09A6Q1i029227;
	Tue, 9 Jan 2007 02:06:26 -0800 (PST)
Received: from gmp-ea-fw-1.sun.com (gmpes-gis-mail-2.UK.Sun.COM [129.156.42.6])
	by sfbaymail1sca.SFBay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l09A6PAj013755;
	Tue, 9 Jan 2007 02:06:26 -0800 (PST)
Received: from d1-emea-10.sun.com ([192.18.2.120])
	by gmp-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l09A6Jep005351;
	Tue, 9 Jan 2007 10:06:20 GMT
Received: from conversion-daemon.d1-emea-10.sun.com by d1-emea-10.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JBL00901IPK4800@d1-emea-10.sun.com>
 (original mail from Darren.Moffat@Sun.COM); Tue,
 09 Jan 2007 10:06:19 +0000 (GMT)
Received: from [129.156.173.21] by d1-emea-10.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JBL009A2IQJ6V00@d1-emea-10.sun.com>; Tue,
 09 Jan 2007 10:06:19 +0000 (GMT)
Date: Tue, 09 Jan 2007 10:06:19 +0000
From: Darren J Moffat <Darren.Moffat@Sun.COM>
Subject: Re: KIOCMKTONE (keyboard make tone) ioctl [PSARC/2007/019 Timeout:
 01/15/2007]
In-reply-to: <45A2ED51.7060100@Sun.COM>
Sender: Darren.Moffat@Sun.COM
To: David.Marx@Sun.COM
Cc: James Carlson <James.D.Carlson@Sun.COM>,
        Alan Coopersmith <alanc@sac.sfbay.sun.com>, PSARC@sac.sfbay.sun.com
Message-id: <45A3691B.8090208@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
References: <200701081833.l08IXHss006857@sac.sfbay.sun.com>
 <17826.37042.294566.821610@gargle.gargle.HOWL> <45A2ED51.7060100@Sun.COM>
User-Agent: Thunderbird 1.5.0.8 (X11/20061128)
Status: RO
Content-Length: 1279

David Marx wrote:
>>>        Linux and FreeBSD both have KDMKTONE ioctl.  Solaris 7        
>>> x86 had KDMKTONE as well, but it was removed when the        console 
>>> redesign was completed.  Adding the KIOCMKTONE        ioctl brings us 
>>> up to the functionality in Linux and        FreeBSD.  
>>
>>
>> I'm confused by this part.  If everyone else uses KDMKTONE, do we have
>> a benefit from being different?  If so, what is it?
> 
> I did it for consistency as all the other ioctls in kbio.h are KIOC*.

Would an alias be useful here, ie
#define KDMKTONE KIOCMKTONE

or would having just this one one be sufficient for compatibility ?

>>>     I suggest Public Uncommitted as the stability level.
>>
>>
>> Why Uncommitted?  Do you anticipate this needing to change again?  Or
>> is the concern just that some future hardware might not be able to
>> implement the ioctl the same way?  (I.e., ioctl remains, but observed
>> -- or heard -- functionality is different.)
> 
> I don't anticipate changes, but never know when an errno needs to be added.

Compatible addition doesn't mean you need to be Uncommitted.  A 
Committed interface can be added to as long as it is done in a 
compatible way.  I suspect adding a new error value would be compatible.


-- 
Darren J Moffat

From sacadmin Tue Jan  9 05:20:10 2007
Received: from sineb-mail-1.sun.com ([192.18.19.6])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id l09DK8qg001696;
	Tue, 9 Jan 2007 05:20:09 -0800 (PST)
Received: from fe-apac-05.sun.com (fe-apac-05.sun.com [192.18.19.176] (may be forged))
	by sineb-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l09DK3p9021702;
	Tue, 9 Jan 2007 21:20:03 +0800 (SGT)
Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JBL00801RK16000@mail-apac.sun.com>
 (original mail from Alan.Hargreaves@Sun.COM); Tue,
 09 Jan 2007 21:20:03 +0800 (SGT)
Received: from [192.168.10.101] ([129.150.152.15])
 by mail-apac.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr  3
 2006)) with ESMTPSA id <0JBL00IURRPCTUW0@mail-apac.sun.com>; Tue,
 09 Jan 2007 21:20:03 +0800 (SGT)
Date: Wed, 10 Jan 2007 00:19:01 +1100
From: Alan Hargreaves <Alan.Hargreaves@Sun.COM>
Subject: Re: KIOCMKTONE (keyboard make tone) ioctl [PSARC/2007/019 Timeout:
 01/15/2007]
In-reply-to: <200701081833.l08IXHss006857@sac.sfbay.sun.com>
Sender: Alan.Hargreaves@Sun.COM
To: Alan Coopersmith <alanc@sac.sfbay.sun.com>
Cc: PSARC@sac.sfbay.sun.com, David.Marx@Sun.COM
Message-id: <45A39645.6080907@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
References: <200701081833.l08IXHss006857@sac.sfbay.sun.com>
User-Agent: Thunderbird 1.5.0.5 (X11/20060926)
Status: RO
Content-Length: 1028

Alan Coopersmith wrote:
> I am sponsoring this case for David Marx, with a timeout of January 15, 2007.
> It requests a Patch release binding.
  ...
> 4. Technical Description:
>     4.1. Details:
>         Proposed is adding a KIOCMKTONE ioctl to the keyboard 
>         drivers.  Its usage is similar to the KDMKTONE ioctl of 
> 	Solaris 7, as well as the KDMKTONE ioctl of FreeBSD and
>         linux.  The KIOCMKTONE ioctl is available in keyboard 
>         drivers.  It has one integer argument.  This integer 
>         argument is composed of a lower 16 bits which is the 
>         pitch in hertz, and the upper 16 bits which is the 
> 	duration in milli-seconds.

Is ths compatible with PSARC/2006/624 Beeper Frequencies Enhancement
which uses KIOCSETFREQ to set the frequency?

This looks to add another method of changing the frequency. How do these 
two interact?


alan.
-- 
Alan Hargreaves - http://blogs.sun.com/tpenta
Staff Engineer (Kernel/VOSJEC/Performance)
Systems Technical Service Center
Sun Microsystems

From sacadmin Tue Jan  9 12:55:30 2007
Received: from sfbaymail2sca.sfbay.sun.com (sfbaymail2sca.SFBay.Sun.COM [129.145.155.42])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id l09KtU5B014635;
	Tue, 9 Jan 2007 12:55:30 -0800 (PST)
Received: from nwk-ea-fw-1.sun.com (nwkes-gis-mail-1.SFBay.Sun.COM [10.4.134.5])
	by sfbaymail2sca.sfbay.sun.com (8.13.6+Sun/8.12.10/ENSMAIL,v2.2) with ESMTP id l09KtUNq029556;
	Tue, 9 Jan 2007 12:55:30 -0800 (PST)
Received: from d1-sfbay-09.sun.com ([192.18.39.119])
	by nwk-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l09KtPCp014340;
	Tue, 9 Jan 2007 12:55:25 -0800 (PST)
Received: from conversion-daemon.d1-sfbay-09.sun.com by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JBM00J01COX3A00@d1-sfbay-09.sun.com>
 (original mail from David.Marx@Sun.COM); Tue, 09 Jan 2007 12:55:25 -0800 (PST)
Received: from [129.153.3.63] by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JBM00M3WCSBBKMH@d1-sfbay-09.sun.com>; Tue,
 09 Jan 2007 12:55:24 -0800 (PST)
Date: Tue, 09 Jan 2007 12:56:38 -0800
From: David Marx <David.Marx@Sun.COM>
Subject: Re: KIOCMKTONE (keyboard make tone) ioctl [PSARC/2007/019 Timeout:
 01/15/2007]
In-reply-to: <45A39645.6080907@Sun.COM>
Sender: David.Marx@Sun.COM
To: Alan Hargreaves <Alan.Hargreaves@Sun.COM>
Cc: Alan Coopersmith <alanc@sac.sfbay.sun.com>, PSARC@sac.sfbay.sun.com
Reply-to: David.Marx@Sun.COM
Message-id: <45A40186.3060202@Sun.COM>
Organization: Sun Microsystems
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en-us, en
References: <200701081833.l08IXHss006857@sac.sfbay.sun.com>
 <45A39645.6080907@Sun.COM>
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7) Gecko/20041221
Status: RO
Content-Length: 531

Alan Hargreaves wrote:

> Is ths compatible with PSARC/2006/624 Beeper Frequencies Enhancement
> which uses KIOCSETFREQ to set the frequency?

I have incorporated the KIOCSETFREQ changes with mine.

> This looks to add another method of changing the frequency. How do these 
> two interact?

The KIOCSETFREQ changes the frequency that is used by the system
for the bell and KIOCSOUND ioctl.  KIOCMKTONE defines the frequency
just for the one tone that the KIOCMKTONE ioctl generates, and
does not use the value set by KIOCSETFREQ.

From sacadmin Tue Jan  9 13:10:34 2007
Received: from sineb-mail-1.sun.com ([192.18.19.6])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id l09LAWoL014822;
	Tue, 9 Jan 2007 13:10:33 -0800 (PST)
Received: from fe-apac-06.sun.com (fe-apac-06.sun.com [192.18.19.177] (may be forged))
	by sineb-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l09LARu1027716;
	Wed, 10 Jan 2007 05:10:27 +0800 (SGT)
Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JBM00201D87V600@mail-apac.sun.com>
 (original mail from Alan.Hargreaves@Sun.COM); Wed,
 10 Jan 2007 05:10:27 +0800 (SGT)
Received: from [192.168.10.101] ([129.150.152.15])
 by mail-apac.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr  3
 2006)) with ESMTPSA id <0JBM00ETFDHB18ZD@mail-apac.sun.com>; Wed,
 10 Jan 2007 05:10:27 +0800 (SGT)
Date: Wed, 10 Jan 2007 08:09:24 +1100
From: Alan Hargreaves <Alan.Hargreaves@Sun.COM>
Subject: Re: KIOCMKTONE (keyboard make tone) ioctl [PSARC/2007/019 Timeout:
 01/15/2007]
In-reply-to: <45A40186.3060202@Sun.COM>
Sender: Alan.Hargreaves@Sun.COM
To: David.Marx@Sun.COM
Cc: Alan Coopersmith <alanc@sac.sfbay.sun.com>, PSARC@sac.sfbay.sun.com
Message-id: <45A40484.2020809@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
References: <200701081833.l08IXHss006857@sac.sfbay.sun.com>
 <45A39645.6080907@Sun.COM> <45A40186.3060202@Sun.COM>
User-Agent: Thunderbird 1.5.0.5 (X11/20060926)
Status: RO
Content-Length: 907

David Marx wrote:
> Alan Hargreaves wrote:
> 
>> Is ths compatible with PSARC/2006/624 Beeper Frequencies Enhancement
>> which uses KIOCSETFREQ to set the frequency?
> 
> I have incorporated the KIOCSETFREQ changes with mine.
> 
>> This looks to add another method of changing the frequency. How do 
>> these two interact?
> 
> The KIOCSETFREQ changes the frequency that is used by the system
> for the bell and KIOCSOUND ioctl.  KIOCMKTONE defines the frequency
> just for the one tone that the KIOCMKTONE ioctl generates, and
> does not use the value set by KIOCSETFREQ.

Thanks David, just wanted to make sure the everything works together, 
seeing stuff about beeps and tones rang a bell with me for that previous 
case (ouch sorry for the horrid pun).

alan.
-- 
Alan Hargreaves - http://blogs.sun.com/tpenta
Staff Engineer (Kernel/VOSJEC/Performance)
Systems Technical Service Center
Sun Microsystems

From sacadmin Thu Jan 11 12:35:49 2007
Received: from sfbaymail2sca.sfbay.sun.com (sfbaymail2sca.SFBay.Sun.COM [129.145.155.42])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id l0BKZnaf017159;
	Thu, 11 Jan 2007 12:35:49 -0800 (PST)
Received: from nwk-ea-fw-1.sun.com (nwkes-gis-mail-1.SFBay.Sun.COM [10.4.134.5])
	by sfbaymail2sca.sfbay.sun.com (8.13.6+Sun/8.12.10/ENSMAIL,v2.2) with ESMTP id l0BKZn1P007688;
	Thu, 11 Jan 2007 12:35:49 -0800 (PST)
Received: from d1-sfbay-09.sun.com ([192.18.39.119])
	by nwk-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l0BKZh3B015991;
	Thu, 11 Jan 2007 12:35:43 -0800 (PST)
Received: from conversion-daemon.d1-sfbay-09.sun.com by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JBQ00701156AH00@d1-sfbay-09.sun.com>
 (original mail from David.Marx@Sun.COM); Thu, 11 Jan 2007 12:35:43 -0800 (PST)
Received: from [129.153.3.63] by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JBQ00MG517CBKQO@d1-sfbay-09.sun.com>; Thu,
 11 Jan 2007 12:35:36 -0800 (PST)
Date: Thu, 11 Jan 2007 12:36:50 -0800
From: David Marx <David.Marx@Sun.COM>
Subject: Re: KIOCMKTONE (keyboard make tone) ioctl [PSARC/2007/019 Timeout:
 01/15/2007]
In-reply-to: <45A3691B.8090208@Sun.COM>
Sender: David.Marx@Sun.COM
To: Darren J Moffat <Darren.Moffat@Sun.COM>
Cc: James Carlson <James.D.Carlson@Sun.COM>,
        Alan Coopersmith <alanc@sac.sfbay.sun.com>, PSARC@sac.sfbay.sun.com
Reply-to: David.Marx@Sun.COM
Message-id: <45A69FE2.7050908@Sun.COM>
Organization: Sun Microsystems
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en-us, en
References: <200701081833.l08IXHss006857@sac.sfbay.sun.com>
 <17826.37042.294566.821610@gargle.gargle.HOWL> <45A2ED51.7060100@Sun.COM>
 <45A3691B.8090208@Sun.COM>
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7) Gecko/20041221
Status: RO
Content-Length: 598

Darren J Moffat wrote:

> Would an alias be useful here, ie
> #define KDMKTONE KIOCMKTONE

Currently KIOCMKTONE and KDMKTONE are not compatible.
I defined the lower half of the argument to the KIOCMKTONE
to be the pitch in hertz, like KIOCSETFREQ.  However, the
old KDSETMODE defined the lower half of the argument to be
clockcycles.  [clockcycles = PIT_HZ / pitch].

PIT_HZ is defined in <sys/pit.h> which is x86 device specific
for the i8254.  Perhaps another definition of PIT_HZ should
be added to kbio.h if we change to clockcycles.

We can make KIOCMKTONE and KDMKTONE compatible if desired.

From sacadmin Thu Jan 11 13:09:18 2007
Received: from sfbaymail1sca.SFBay.Sun.COM (sfbaymail1sca.SFBay.Sun.COM [129.145.154.35])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id l0BL9Iam018469;
	Thu, 11 Jan 2007 13:09:18 -0800 (PST)
Received: from nwk-ea-fw-1.sun.com (nwkes-gis-mail-2.SFBay.Sun.COM [10.4.134.6])
	by sfbaymail1sca.SFBay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l0BL9Ijw006250;
	Thu, 11 Jan 2007 13:09:18 -0800 (PST)
Received: from d1-sfbay-09.sun.com ([192.18.39.119])
	by nwk-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l0BL9CNC013215;
	Thu, 11 Jan 2007 13:09:12 -0800 (PST)
Received: from conversion-daemon.d1-sfbay-09.sun.com by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JBQ00D012R70W00@d1-sfbay-09.sun.com>
 (original mail from Ed.Gould@Sun.COM); Thu, 11 Jan 2007 13:09:12 -0800 (PST)
Received: from [129.146.106.203] by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JBQ00MJ62RCBLR2@d1-sfbay-09.sun.com>; Thu,
 11 Jan 2007 13:09:12 -0800 (PST)
Date: Thu, 11 Jan 2007 13:09:19 -0800
From: Ed Gould <Ed.Gould@Sun.COM>
Subject: Re: KIOCMKTONE (keyboard make tone) ioctl [PSARC/2007/019 Timeout:
 01/15/2007]
In-reply-to: <45A69FE2.7050908@Sun.COM>
Sender: Ed.Gould@Sun.COM
To: David.Marx@Sun.COM
Cc: Darren J Moffat <Darren.Moffat@Sun.COM>,
        James Carlson <James.D.Carlson@Sun.COM>,
        Alan Coopersmith <alanc@sac.sfbay.sun.com>, PSARC@sac.sfbay.sun.com
Message-id: <45A6A77F.5080008@sun.com>
Organization: Sun Cluster Engineering - GDD
MIME-version: 1.0
Content-type: multipart/mixed; boundary="Boundary_(ID_esTwD0Ot2Xpf2Omh4mcVQw)"
References: <200701081833.l08IXHss006857@sac.sfbay.sun.com>
 <17826.37042.294566.821610@gargle.gargle.HOWL> <45A2ED51.7060100@Sun.COM>
 <45A3691B.8090208@Sun.COM> <45A69FE2.7050908@Sun.COM>
User-Agent: Thunderbird 1.5 (X11/20060113)
Status: RO
Content-Length: 929

This is a multi-part message in MIME format.

--Boundary_(ID_esTwD0Ot2Xpf2Omh4mcVQw)
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT

David Marx wrote:
> We can make KIOCMKTONE and KDMKTONE compatible if desired.

Unless there is a convincing argument otherwise, we should be 
compatible.  In many (most?) cases, "it's different" is equivalent to 
"it's wrong."
-- 
	--Ed

--Boundary_(ID_esTwD0Ot2Xpf2Omh4mcVQw)
Content-type: text/x-vcard; name=ed.gould.vcf; charset=utf-8
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=ed.gould.vcf

begin:vcard
fn:Ed Gould
n:Gould;Ed
org:Sun Microsystems, Inc.;Solaris Cluster
adr;dom:M/S UMPK17-201;;17 Network Circle;Menlo Park;CA;94025
email;internet:ed.gould@sun.com
title:File System Architect, PSARC Chair
tel;work:+1.650.786.4937
x-mozilla-html:FALSE
version:2.1
end:vcard


--Boundary_(ID_esTwD0Ot2Xpf2Omh4mcVQw)--

From sacadmin Tue Jan 16 19:41:36 2007
Received: from sfbaymail1sca.SFBay.Sun.COM (sfbaymail1sca.SFBay.Sun.COM [129.145.154.35])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id l0H3fa1k024838;
	Tue, 16 Jan 2007 19:41:36 -0800 (PST)
Received: from [129.146.108.211] (almas.SFBay.Sun.COM [129.146.108.211])
	by sfbaymail1sca.SFBay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l0H3fYaL004979;
	Tue, 16 Jan 2007 19:41:34 -0800 (PST)
Message-ID: <45AD9AEE.3010101@sun.com>
Date: Tue, 16 Jan 2007 19:41:34 -0800
From: Alan Coopersmith <alan.coopersmith@sun.com>
User-Agent: Thunderbird 1.5.0.8 (X11/20061113)
MIME-Version: 1.0
To: Ed Gould <Ed.Gould@sun.com>
CC: David.Marx@sun.com, Darren J Moffat <Darren.Moffat@sun.com>,
        James Carlson <James.D.Carlson@sun.com>,
        Alan Coopersmith <alanc@sac.sfbay.sun.com>, PSARC@sac.sfbay.sun.com
Subject: Re: KIOCMKTONE (keyboard make tone) ioctl [PSARC/2007/019 Timeout:
 01/15/2007]
References: <200701081833.l08IXHss006857@sac.sfbay.sun.com> <17826.37042.294566.821610@gargle.gargle.HOWL> <45A2ED51.7060100@Sun.COM> <45A3691B.8090208@Sun.COM> <45A69FE2.7050908@Sun.COM> <45A6A77F.5080008@sun.com>
In-Reply-To: <45A6A77F.5080008@sun.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 665

Ed Gould wrote:
> David Marx wrote:
>> We can make KIOCMKTONE and KDMKTONE compatible if desired.
> 
> Unless there is a convincing argument otherwise, we should be 
> compatible.  In many (most?) cases, "it's different" is equivalent to 
> "it's wrong."

David responded offline that he'll change to be compatible, which
will require adding to <sys/kbio.h> the #define of:
#define  PIT_HZ          1193182    /* 8254's cycles per second */

I'll let the timer continue running until tomorrow's PSARC meeting
for any further comments before closing.

-- 
	-Alan Coopersmith-           alan.coopersmith@sun.com
	 Sun Microsystems, Inc. - X Window System Engineering

From sacadmin Wed Jan 17 16:28:15 2007
Received: from sfbaymail1sca.SFBay.Sun.COM (sfbaymail1sca.SFBay.Sun.COM [129.145.154.35])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id l0I0SFr4027559
	for <PSARC@sac.sfbay.sun.com>; Wed, 17 Jan 2007 16:28:15 -0800 (PST)
Received: from [129.146.108.211] (almas.SFBay.Sun.COM [129.146.108.211])
	by sfbaymail1sca.SFBay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l0I0SEOJ015651;
	Wed, 17 Jan 2007 16:28:14 -0800 (PST)
Message-ID: <45AEBF1E.1070700@sun.com>
Date: Wed, 17 Jan 2007 16:28:14 -0800
From: Alan Coopersmith <alan.coopersmith@sun.com>
User-Agent: Thunderbird 1.5.0.8 (X11/20061113)
MIME-Version: 1.0
To: David.Marx@sun.com
CC: PSARC@sac.sfbay.sun.com
Subject: Re: KIOCMKTONE (keyboard make tone) ioctl [PSARC/2007/019 Timeout:
 01/15/2007]
References: <200701081833.l08IXHss006857@sac.sfbay.sun.com>
In-Reply-To: <200701081833.l08IXHss006857@sac.sfbay.sun.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 165

This case was approved during ARC business today.

-- 
	-Alan Coopersmith-           alan.coopersmith@sun.com
	 Sun Microsystems, Inc. - X Window System Engineering

