Sound data
List of Global Functions
Changed - Status of configuration
CollectOptions - this function converts options for modules from 'modules_conf' data structure to another - it is needed for writing options to /etc/modules conf. eg. we have these configured cards: [ $["model": "sblive", "module":"snd-emu10k1", "options" :$["opt1": "a", "opt2": "b"]], $["model": "sblive", "module":"snd-emu10k1", "options": $["opt2": "c"]], $["model": "other", "module":"mod2", "options": $["opt1": "a", "opt2": "b"]] ] CollectOptions ("snd-emu10k1") returns $["opt1":"a,", "opt2":"b,c"]
CreateModprobeCommands - creates list of command that will be used for sound system start (emulates 'rcalsasound start' somehow)
DetectHardware - do hardware detection
DetectOldCards - Detect old ISA cards (which hwinfo doesn't know) using alsaconf
Export - Dump the sound settings to a single map. self explaining (For use by autoinstallation.)
ForceReset - reset settings. used at installation time when user invokes 'reset to original proposal'
GetJoystickSettings - Get joystick settings from sound database
GetModified - Functions which returns if the settings were modified
GetSoundCardList - returns list of configured/proposed sound cards.
GetSoundCardListWithJoy - Return list of configured/proposed sound cards which support joystick
HasJoystick - Test whether sound card supports joystick
Import - Get all sound settings from the first parameter (For autoinstallation use.)
InitMixer - initialises volume after adding a new card. unmutes and sets volume for some channels
LoadDatabase - opens alsa sound cards database
LoadPackageDatabase - opens alsa sound cards database
ProbeOldChip - Probe one card with alsaconf call
Propose - create a proposal
Read - Read all sound settings from the SCR
ReadModulesConf - searches for sound alias in /etc/modules.conf
RequiredKernelModules - Get list of all kernel modules which are requied by the configured cards
RestoreSettings - restore settings from backup variables
Set - Just Set module data
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
SetVolume - sets the channel volume to value [0..100]
Sound - sound module constructor
StoreMixer - store mixer settings
StoreSettings - copy settings to backup variables
StoreUniqueKeys - stores unique keys. this function is not part of sound_write module because it should not be called during autoinstallation
Summary - returns html formated configuration summary
UpdateUnconfiguredCards - update list of unconfigured cards (necessary when deleting configured card)
Write - Update the SCR according to sound settings
getConfigurableCards - returns list of autodetected sound cards that haven't been already configured
List of Global Variables
STRINGS - text constants for sound module
card_id - id of current card
configure_detected - When true: During autoinstallation, detected cards will be added automaticaly even if they are not defined in control file
curr_driver - currently used card driver (pointer to table)
curr_model - currently used card model (pointer to table)
curr_vendor - currently used card vendor (pointer to table)
db_modules - module details
db_vendors - map of card vendors
default_volume - default value of volume for new card
detected_cards - list for storing detected cards
installation - flag for letting the module know, that it's launched from then hardware installation screen
modules_conf - settings to save to /etc/modules.conf (only those concerning to sound)
modules_conf_b - backup structures for sound settings
proposal_created - was the proposal already generated?
rc_vars - rc settings
removed_info - list for storing information about removed cards
save_entry - configuration map of current card
skip_detection - Do not detect sounc cards, skip hardware probing
unconfigured_cards - list of detected and unconfigured cards
use_alsa - what sound system we're using (true=alsa, false=oss)
use_ui - flag for showing/not showing ui stuff (eg when loading alsa database)
used_modprobe_conf - This is true, if sound data were read from /etc/modprobe.conf On write, they shoud be removed and written only to /etc/modprobe.d/sound
volume_settings - settings to save using .audio.alsa ... mixer
write_only - write only mode? (-> do not restart services during writing)
this function converts options for modules from 'modules_conf' data structure to another - it is needed for writing options to /etc/modules conf. eg. we have these configured cards: [ $["model": "sblive", "module":"snd-emu10k1", "options" :$["opt1": "a", "opt2": "b"]], $["model": "sblive", "module":"snd-emu10k1", "options": $["opt2": "c"]], $["model": "other", "module":"mod2", "options": $["opt1": "a", "opt2": "b"]] ] CollectOptions ("snd-emu10k1") returns $["opt1":"a,", "opt2":"b,c"]
Function parameters
string modname
Return value
map - Map with collected options
creates list of command that will be used for sound system start (emulates 'rcalsasound start' somehow)
Return value
list - of shell commands
Detect old ISA cards (which hwinfo doesn't know) using alsaconf
Return value
boolean - success
Dump the sound settings to a single map. self explaining (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import())
reset settings. used at installation time when user invokes 'reset to original proposal'
Return value
void
Get joystick settings from sound database
Function parameters
string modname
Return value
map - map with options
Functions which returns if the settings were modified
Return value
boolean - settings were modified
returns list of configured/proposed sound cards.
Return value
list - of maps: [$["name": "ASDASD", "card_no": 0]...]
Return list of configured/proposed sound cards which support joystick
Return value
list - list of maps: [$["card_no":0, "name":"Sound Blaster Live!"]]
Test whether sound card supports joystick
Function parameters
integer c_id
Return value
boolean - True if sound card c_id supports joystick
Get all sound settings from the first parameter (For autoinstallation use.)
Function parameters
map settings
Return value
boolean - True on success
initialises volume after adding a new card. unmutes and sets volume for some channels
Function parameters
integer c_id
string modname
Return value
void
opens alsa sound cards database
Function parameters
boolean use_ui
Return value
void
Probe one card with alsaconf call
Function parameters
string chip
Return value
string - non-empty string with card options when card is present
Read all sound settings from the SCR
Function parameters
boolean interactive
Return value
boolean - True on success
Get list of all kernel modules which are requied by the configured cards
Return value
list<string> - Unique list of modules
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
sets the channel volume to value [0..100]
Function parameters
integer c_id
string channel
integer value
Return value
boolean - success
stores unique keys. this function is not part of sound_write module because it should not be called during autoinstallation
Return value
void
update list of unconfigured cards (necessary when deleting configured card)
Return value
void
When true: During autoinstallation, detected cards will be added automaticaly even if they are not defined in control file
flag for letting the module know, that it's launched from then hardware installation screen
This is true, if sound data were read from /etc/modprobe.conf On write, they shoud be removed and written only to /etc/modprobe.d/sound