|
Packit |
427e91 |
Profiles management as part of alsa
|
|
Packit |
427e91 |
2004-05-16 Dirk Kalis <dirk.kalis@t-online.de>
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
General
|
|
Packit |
427e91 |
=======
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
Profiles management can be used from all applications like mixers or hardware control programs.
|
|
Packit |
427e91 |
It uses always alsactl and if directorys for the profiles file doesn't exists - mkdir.
|
|
Packit |
427e91 |
profiles file means the file in which the profiles will be stored.
|
|
Packit |
427e91 |
For other application the following files are needed:
|
|
Packit |
427e91 |
profiles.h - header file with the exported functions
|
|
Packit |
427e91 |
profiles.c - profiles implementation
|
|
Packit |
427e91 |
new_process.c - used to start external programs (alsactl and mkdir)
|
|
Packit |
427e91 |
strstr_icase_blank.c - string search function with ignoring case sensitivity, number of blanks, empty and
|
|
Packit |
427e91 |
comment lines (first non blank character '#')
|
|
Packit |
427e91 |
Profile numbers beginning with number 1 not 0 !
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
Introduction
|
|
Packit |
427e91 |
============
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
Profiles management stores and restores alsactl settings in a profiles file.
|
|
Packit |
427e91 |
Every card is stored in the profiles and every card profile can have a profile name.
|
|
Packit |
427e91 |
The profiles file has the following structure:
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
[ profile <profile number> ]
|
|
Packit |
427e91 |
< Card <card number> >
|
|
Packit |
427e91 |
{ /
|
|
Packit |
427e91 |
***************************
|
|
Packit |
427e91 |
*** alsactl settings ***
|
|
Packit |
427e91 |
***************************
|
|
Packit |
427e91 |
< /CARD <card number> >
|
|
Packit |
427e91 |
-----next card or next profile or end of file-----
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
The header for profile name and card footer are optional.
|
|
Packit |
427e91 |
The functions in profile.c write always a card footer.
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
DO NOT EDIT THIS FILE MANUALLY BECAUSE EVERY WRITE ACCESS MAKE A REORGANIZATION AND COMMENTS NOT WRITTEN IN
|
|
Packit |
427e91 |
THE ALSACTL SECTION WILL BE REMOVED! ALSO THE STRUCTURE OF THE FILE WILL BE MODIFIED!
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
With the environment variables ALACTL_PROG and MKDIR_PROG can the compiled defaults for this
|
|
Packit |
427e91 |
programs be overwritten.
|
|
Packit |
427e91 |
e.g.:
|
|
Packit |
427e91 |
export ALSACTL_PROG=<path and name from alsactl>;export MKDIR_PROG=<path and name from mkdir>;<mixer program with profiles management>
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
This pathes must not be a link !
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
The profiles file name and path can explicit given.
|
|
Packit |
427e91 |
If is not given (by value NULL) two defined defaults will be used.
|
|
Packit |
427e91 |
Two variables can be set in the profiles header file for the default profiles file and for the system profiles file.
|
|
Packit |
427e91 |
The default for DEFAULT_PROFILERC is ~/<program name>/profiles.conf.
|
|
Packit |
427e91 |
The default for SYS_PROFILERC is /etc/<program name>/profiles.conf
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
The profiles management search for profiles file if no profiles file name is given.
|
|
Packit |
427e91 |
Search order for restore:
|
|
Packit |
427e91 |
<given profiles file> if not -> <DEFAULT_PROFILERC> if doesn't exists -> <SYS_PROFILERC>
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
Search order for save:
|
|
Packit |
427e91 |
<given profiles file> if not -> <DEFAULT_PROFILERC>
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
The SYS_PROFILERC can only be written as root by explicit given profiles file name or
|
|
Packit |
427e91 |
you make a copy as root from one of the DEFAULT_PROFILERC.
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
This files must not be a link!
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
The delete_card function can be used to remove card profiles from profiles file if a card is removed from your pc.
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
Miscellaneous cards can have same profile names - thats no problem.
|
|
Packit |
427e91 |
One card with equal profile names is also no problem if you use profile number for searching.
|
|
Packit |
427e91 |
If you use profile name for searching you will allways get the least profile number with this profile name.
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
Profiles management in envy24control
|
|
Packit |
427e91 |
====================================
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
In envy24control you can find a new map named "Profiles".
|
|
Packit |
427e91 |
In this map you can store 8 profiles for every envy24 card.
|
|
Packit |
427e91 |
You can change/give name by activating this profile and then click in the name entry.
|
|
Packit |
427e91 |
You can only change the name for the active profile.
|
|
Packit |
427e91 |
If all settings in the active profile are done you can save settings by clicking button "Save active profile".
|
|
Packit |
427e91 |
Error messages will only displayed on stderr in the text window if you start envy24control from xterm.
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
To activate a profile click only the profile button.
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
You can start envy24control with given profiles file and a default profile. if a default profile is given
|
|
Packit |
427e91 |
after initialisation of envy24control this profile will be activated.
|
|
Packit |
427e91 |
Default profile can be given by profile number or profile name.
|
|
Packit |
427e91 |
The accuracy of discrimination works in the following way:
|
|
Packit |
427e91 |
- if the given default profile contains a letter -> profile name
|
|
Packit |
427e91 |
- if the given default profile has a number outside the range [1 ... MAX_PROFILES] -> profile name
|
|
Packit |
427e91 |
- the given default profile is interpreted as profile number.
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
Profile names should have at least one letter.
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
For "Delete card from profiles" and equal profile names read above.
|
|
Packit |
427e91 |
One card with equal names is only a problem if you start envy24control with default profile name. You activate
|
|
Packit |
427e91 |
allways the profile with the least profile number with this profile name.
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
Copyright
|
|
Packit |
427e91 |
=========
|
|
Packit |
427e91 |
|
|
Packit |
427e91 |
Copyright Dirk Kalis<dirk.kalis@t-online.de>
|
|
Packit |
427e91 |
This is free and can be distributed under GPL.
|