Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI This information is Copyright 2009 Sun Microsystems 1. Introduction 1.1. Project/Component Working Name: /etc/audio_numbers 1.2. Name of Document Author/Supplier: Author: Garrett D'Amore 1.3 Date of This Document: 23 November, 2009 4. Technical Description
Summary: This case introduces a new project-private statefile for the Boomer (PSARC 2008/318) audio subsystem. The file will be shared between the kernel and userland. This will replace the system/device/audio:default SMF service, so that no other startup service will be necessary. These changes are necessary to properly address CR 6902551 (audio service timeout not sufficient for service to start). Binding: This case seeks Minor binding. Problem: Due to the way the Open Sound System API was originally specified (designed for Linux), we have to know the "number" of an audio device (e.g. /dev/dsp1 would be "1") in the kernel, because these numbers are reported back from the kernel to userland via ioctls. The problem is that the enumeration of these numbers is done entirely in user space by devfsadm. Currently, we regenerate this information and send it down at each boot by performing a devfsadm operation during boot using an SMF service. However, it turns out that devfsadm on some systems is quite expensive, and this can lead to timeouts in the audio SMF service Solution: We propose to move from regenerating this state (and autoconfiguring each device driver) at boot, and instead use a persistent state file to track this information. The state file will be called "/etc/audio_numbers", and will be written by devfsadm when it creates an audio link. The contents will be lines that have the form number<ws>driver<ws>instance<newline> <ws> is a sequence of one or more tabs or space characters. <newline> is an ASCII newline character. "number" will be the enumerated audio device number in decimal, i.e. the suffix of the /dev/dspXX or /dev/audioXX link. (Also /dev/sound/XX, etc.) The "driver" is the name of the audio driver, e.g. "audiohd". The "instance" is the audio instance number. This will normally be the same as the device instance (i.e. as from ddi_get_instance()), but for some devices it could be a different value. (E.g. for a multiport device there could be multiple logical audio device instances per dev_info_t. The actual value is the 2nd argument to audio_dev_alloc(9F) specified in Boomer, unless that value is zero, in which case the ddi_get_instance() value is assumed.) Lines beginning with a hash mark (#) are treated as comments. Here is an example file: # Sample file - this is a comment 0 audiohd 0 1 usb_ac 0 2 audiosolo 0 3 audiosolo 1 4 usb_ac 1 The /etc/audio_number file and its contents shall be deemed Project Private. The devfsadm audio link module will cease its traversal of the /dev tree, and instead rely on the statefile to determine suitable targets for symbolic links. Finally, we will be able remove the SMF facility sys/devices/audio, which is currently used to regenerate the state information on each boot. This project will need to import the kobj interfaces for reading a file from kernel space. While there is no case work behind these interfaces, we believe they are Consolidation Private based on existing contracts for their use from the Sun Cluster products. Imported Interfaces kobj_open_file() Consolidation Private kobj_close_file() " " kobj_getc() " " Exported Interfaces svc:/system/device/audio:default EOF /etc/audio_numbers Project Private 6. Resources and Schedule 6.4. Steering Committee requested information 6.4.1. Consolidation C-team Name: ON 6.5. ARC review type: FastTrack 6.6. ARC Exposure: open