Sound
|
routines.ycp
|
Routines for sound card configuration
|
|
|
Imports
- Directory
- Mode
- Popup
- Sound
Local Functions
- FontsInstalled ()
- HasFonts (map save_entry)
- InstallFonts (string symlink, boolean dontask)
- SaveUniqueKeys (list configured, list unconfigured)
- Thinkpad600E_cs4236_hack (integer card_id)
- add_alias (map entry, integer card_id)
- add_common_options (map entry, integer card_id)
- alsa_oss (integer number)
- check_module (map save_entry, integer card_id)
- filter_configured (list<map> save_info, list<map> cards)
- get_card_label (map card)
- get_card_names (string key, string keys)
- get_module (map card)
- get_module_names ()
- get_module_params (string modname)
- get_running_cards ()
- get_vol_settings ()
- hardware_name (map hardware_entry)
- is_snd_alias (string alias)
- isa_uniq ()
- itemize_list (list l, integer default)
- need_nm256_opl3sa2_warn (list sound_cards)
- nm256_opl3sa2_warn (list sound_cards)
- nm256hack (string modname)
- read_rc_vars ()
- recalc_save_entries (list<map> save_info)
- restore_mod_params (map params, map values)
- search_card_id (string name)
- set_vol_settings (list vol_settings)
- unmute (list devices, integer card_id)
|
|
|
local get_card_names (string key, string keys) -> list<string>
|
|
returns cards manufactured by given vendor (ALSA only) or driver
- Parameters:
key |
vendor or driver; if "all" returns all models |
keys |
in which set is the key: "vendors" or "modules" |
- Return value:
local get_running_cards () -> list
|
|
Returns list of already running cards
(oss is nasty hacked, because it's not trivial to check this)
local get_module_params (string modname) -> map
|
|
returns the 'params' section from sndcards.ycp of the given module
- Parameters:
- Return value:
|
with params and their descriptions |
local add_alias (map entry, integer card_id) -> map
|
|
adds alias to save_info entry
- Parameters:
entry |
card config |
card_id |
card id |
- Return value:
|
modified card entry with filled alias value |
local add_common_options (map entry, integer card_id) -> map
|
|
adds common options for module. for alsa it is 'snd_index=${card_id}'
- Parameters:
entry |
card config |
card_id |
card id |
- Return value:
local alsa_oss (integer number) -> list
|
|
Simply returns list with ALSA OSS/Free emulation modules
- Parameters:
number |
number of sound cards |
- Return value:
local get_module_names () -> list
|
|
returns list of all available sound modules (OSS only)
- Return value:
local get_vol_settings () -> list
|
|
get_vol_settings
creates a list of stored values of volume and mute for each channel
of each card.
example: [
[ ["PCM", 32, false], ["Master", 100, true]],
[ [....], ..... ]
]
- Return value:
local set_vol_settings (list vol_settings) -> boolean
|
|
stores values generated by get_vol_settings
- Parameters:
vol_settings |
volume settings |
- Return value:
local hardware_name (map hardware_entry) -> string
|
|
common function to extract 'name' of hardware
- Parameters:
- Return value:
|
readable name of the card |
local filter_configured (list<map> save_info, list<map> cards) -> list<map>
|
|
filters out already configured cards
- Parameters:
save_info |
info from modules.conf |
cards |
autodetected cards |
- Return value:
|
of entries of not configured cards |
local get_card_label (map card) -> string
|
|
for a given card detected by libhd this function creates a label
- Parameters:
card |
map entry from .probe.audio |
- Return value:
local is_snd_alias (string alias) -> boolean
|
|
returns true if given string is valid sound alias
(snd-card-1 .. snd-card-16)
- Parameters:
- Return value:
local isa_uniq () -> string
|
|
unique key for non-pci/pnp cards or virtual cards
- Return value:
local read_rc_vars () -> map
|
|
reads variables listed in 'vars' from rc.config
- Return value:
local SaveUniqueKeys (list configured, list unconfigured) -> boolean
|
|
saves uniq keys to .probe.status
- Parameters:
configured |
list of strings of configured cards uniq keys |
unconfigured |
list of string of unconfigured cards uniq keys |
- Return value:
local search_card_id (string name) -> integer
|
|
Used for searching. returns index of the card in the database
identified by name (more exactly: returns index of first name matching
the given substring)
- Parameters:
name |
card name (or its substring) |
- Return value:
local itemize_list (list l, integer default) -> list
|
|
Itemize list for selection box
- Parameters:
l |
list with values |
default |
value to select as default |
- Return value:
|
items to be shown in list widget |
local nm256hack (string modname) -> boolean
|
|
show a warning popup for nm256 snd cards if needed
- Parameters:
modname |
string module name |
- Return value:
local get_module (map card) -> map
|
|
Looks up in the database for the module
- Parameters:
card |
map read from .probe.sound |
- Return value:
|
relevant card info found in db |
local unmute (list devices, integer card_id) -> void
|
|
umnute channel 'devide' of the 'card_id'-th sound card. alsa only
- Parameters:
devices |
list of channels to be unmuted |
card_id |
of the card |
local check_module (map save_entry, integer card_id) -> string
|
|
Checks whether the module has been successfully loaded
- Parameters:
save_entry |
card config map |
card_id |
card id |
- Return value:
|
empty on success/ error message on failure |
local restore_mod_params (map params, map values) -> map
|
|
inserts values to already set options
- Parameters:
params |
list with available options for module |
values |
values that have been already set |
- Return value:
local FontsInstalled () -> boolean
|
|
checks whether sound fonts have already been installed
- Return value:
|
already installed/not installed
|
local HasFonts (map save_entry) -> boolean
|
|
return true if the sound card supports sound fonts
- Parameters:
- Return value:
|
card supports fonts/it doesn't |
local InstallFonts (string symlink, boolean dontask) -> void
|
|
this small wizard will install sound fonts for soundblaster live/awe
- Parameters:
symlink |
is path to default.sf2 that is to be created |
dontask |
if true, skip the first messagebox |
local need_nm256_opl3sa2_warn (list sound_cards) -> boolean
|
|
does this machine need a nm256/opl3sa warning?
- Parameters:
- Return value:
local nm256_opl3sa2_warn (list sound_cards) -> void
|
|
shows warning message when both nm265 and opl3sa2 cards are present
- Parameters:
sound_cards |
list of sound cards |
local Thinkpad600E_cs4236_hack (integer card_id) -> void
|
|
Hack for Thinkpad 600E notebook - it need cs4236 module instead of cs4610
- Parameters:
local recalc_save_entries (list<map> save_info) -> list<map>
|
|
removes entries from save_info listed by indices in id_list
- Parameters:
- Return value:
|