Blame envy24control/README.profiles

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