Skip to content

Commit

Permalink
- merged yast2 sound packages: yast2-agent-audio,
Browse files Browse the repository at this point in the history
  yast2-config-sound, yast2-db-sound
- renamed to yast2-sound

svn path=/trunk/sound/; revision=3113
  • Loading branch information
lslezak committed Jul 1, 2002
1 parent d2c5cd8 commit a2fae2b
Show file tree
Hide file tree
Showing 44 changed files with 4,594 additions and 506 deletions.
1 change: 1 addition & 0 deletions .cvsignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ ltmain.sh
missing
mkinstalldirs
stamp-h*
*.pot
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions RPMNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yast2-sound
File renamed without changes.
19 changes: 0 additions & 19 deletions agent-audio/.cvsignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,2 @@
Makefile
Makefile.in
configure
configure.in
config.h
config.h.in
config.cache
config.status
stamp-h*
libtool
config.log
aclocal.m4
Makefile.am
config.guess
config.sub
depcomp
install-sh
ltmain.sh
missing
mkinstalldirs
autom4te.cache
3 changes: 3 additions & 0 deletions agent-audio/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#
# Makefile.am for sound/agent-audio
SUBDIRS = src conf doc testsuite
19 changes: 0 additions & 19 deletions agent-audio/Makefile.cvs

This file was deleted.

1 change: 0 additions & 1 deletion agent-audio/RPMNAME

This file was deleted.

1 change: 0 additions & 1 deletion agent-audio/SUBDIRS

This file was deleted.

1 change: 0 additions & 1 deletion agent-audio/VERSION

This file was deleted.

2 changes: 1 addition & 1 deletion agent-audio/testsuite/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ AUTOMAKE_OPTIONS = dejagnu
clean-local:
rm -f tmp.err.* tmp.out.* site.exp site.bak

EXTRA_DIST = README
EXTRA_DIST =
1 change: 0 additions & 1 deletion agent-audio/testsuite/README

This file was deleted.

39 changes: 0 additions & 39 deletions agent-audio/yast2-agent-audio.spec.in

This file was deleted.

4 changes: 3 additions & 1 deletion agent-audio/configure.in.in → configure.in.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
## SCR agent configure.in.in
## YCP module configure.in.in

## Initialize
@YAST2-INIT-COMMON@
@YAST2-INIT-YCP@
@YAST2-INIT-PROGRAM@

## some common checks
@YAST2-CHECKS-COMMON@
@YAST2-CHECKS-YCP@
@YAST2-CHECKS-PROGRAM@

## special stuff
Expand Down
2 changes: 2 additions & 0 deletions data/.cvsignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ idlist.ycp.in
modlist.ycp
modlist.ycp.in
sndcards.ycp.in
Makefile.in
Makefile
11 changes: 11 additions & 0 deletions data/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# Makefile.am for sound/data
#
# $Id$
#

SUBDIRS = addons doc include map_indent src

ydata_DATA = sndcards.ycp

EXTRA_DIST = $(ydata_DATA) Makefile.generate
8 changes: 4 additions & 4 deletions data/Makefile → data/Makefile.generate
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
sndcards.ycp: map_indent/map_indent sndcards.ycp.in
echo "/* this file is automatically generated for kernel version `uname -r` */" > sndcards.ycp ; \
echo "/* this file is automatically generated for kernel version `uname -r`" > sndcards.ycp
echo " Textdomain \"sound_db\";" >> sndcards.ycp
echo "*/" >> sndcards.ycp
map_indent/map_indent sndcards.ycp.in >> sndcards.ycp

sndcards.ycp.in: cardlist.ycp modlist.ycp idlist.ycp
Expand Down Expand Up @@ -27,7 +29,7 @@ modlist.ycp.in:
/sbin/yast2 src/gen_opt_list.ycp

map_indent/map_indent:
(cd map_indent; make)
(cd map_indent; make -f Makefile.map_indent)

clean:
rm cardlist.ycp \
Expand All @@ -39,5 +41,3 @@ clean:
sndcards.ycp.in \
sndcards.ycp

install:
cp sndcards.ycp ../sound_db.ycp.generated
2 changes: 2 additions & 0 deletions data/addons/.cvsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Makefile
Makefile.in
8 changes: 8 additions & 0 deletions data/addons/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# Makefile.am for sound/data
#
# $Id$
#

EXTRA_DIST = $(wildcard *.ycp)

2 changes: 2 additions & 0 deletions data/doc/.cvsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Makefile
Makefile.in
10 changes: 10 additions & 0 deletions data/doc/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Makefile.am for sound/data
#
# $Id$
#

doc_DATA = README joystick-db.txt sound_db.txt

EXTRA_DIST = $(doc_DATA)

167 changes: 167 additions & 0 deletions data/doc/sound_db.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# $Id$
# module: po/y2d_snd
# author: dan meszaros <dmeszar@suse.cz>
#

Sound card database design
==========================

1. Overview
===========

database is used for storing data for every piece of
supported hardware. it contains autogenerated data
(like device and vendor ids, paramerer description etc)
plus some manually added data (volume for nonstandard
mixer channel needed for proper card initialization etc).

database is placed in /usr/lib/YaST2/sndcards.ycp on
installed system.

2. Database structure
=====================

the whole database is ycp map, you just need to call
SCR::Read(.target.ycp, "sndcards.ycp")

the topmost map contains keys:

1) cards
2) indices
3) mod_idx
4) modules

2.1 cards
=========

value is map. for each alsa kernel module (as key) it
contains list of names of cards supported by this module.
this list is needed for manual sound card config in y2c_snd
(legacy isa cards etc.)
the module name is substituted by the module index (just
to save space, this policy is used in mode places in db).
see 2.3 for details.

2.2 indices
===========

value is nested map. this part is used for searching the
appropriate module for device_id/vendor_id pair. when looking
up for module for a card, first check out the map indexed by vendor_id.
you'll get map whose indices are device_ids and the value
is index to 'mod_idx' where you obtain the module name (string).

2.3 mod_idx
===========

leaves of 'indices' data structure are very redundant, i've
decided to substitute the (string) module names by their indices.
value of mod_idx is map with numerical index as a key and the module
name as a value. this database is stored in src/module_index.ycp file

2.4 modules
===========

this structure contains map with module name as key and map of data
as value.

keys:
description (string): used in 'manual card selection' dialog
name (string): !optional. used in very special cases. see appendix A
usually the module name is used as a default.
joystick (map): sound-driver-sensitive joystick settings
see ./joystick_db.txt
mixer (map): some cards have special channels that needs to be
unmuted/set when initialized.
key is channel name, value means volume for this channel.
main_volume (string) name of the 'Master' volume element. this channel is
used in 'volume' dialog. this is always 'Master' (default)
except some PPC where the name is ... (huh i forgot..
probably 'Master Digital' or similar)
params (map): parameters for module. module name is key in this map,
value is map with other data:
allows (string) possible values for option (if known). this string
has special syntax, see appendix B for details
default (string) default value fot this option
descr (locale/list) human readable desrciption for the option.
if descr is list, it is sformated.
dialog (string) widget to be used for setting this option (not used
currently)
base (string) ? (not used currently)

3. database autogeneration
==========================

generator sources are in po/y2d_snd/po/generator/
to rebuild the database, just do:

cd po/y2d_snd/po/generator/
export Y2DIR=.
make clean #optionally
make
make install

this will generate db and copy it to ../sound_db.ycp.generated

NOTE: no changes should be done to po/y2d_snd/po/sound_db.ycp.generated
they will be overwriten by the next generation!! see chapter 4. for details
about how to add stuff manually to the database.

NOTE: use i386 arch for building database

3.1 files used for db generation
================================

/lib/modules/`uname -r`/isapnpmap:
/lib/modules/`uname -r`/modules.pcimap: used for building the 'indices' structure

/lib/modules/`uname -r`/modules.generic_string: used for building
the 'cards' list and 'modules' data

for parameters' description modinfo on module is used.
after /lib/modules/`uname -r`/modules.generic_string, be very carefull when
updating the db- this file may contain syntactical error. in this case ask
tiwai@suse.de for fix.

4. supplying data manually
==========================

these 4 files are stored in addons/ dir.

card_addons.ycp: additional sound cards (not listed in modules.genertic_string file)
id_addons.ycp: additional vendor/device ids. the problem was, that modules that
are used on other architectures are not in /lib/modules/.../ on i386
(and vice versa- the db MUST be generated on i386) so we know nothing
them.
joy_mods.ycp: for module name as key the value with joystick config is stored.
these data will be merged to 'modules' part of db.
mixer.ycp: strightforward
mod_addons.ycp: module entries that will be appended to the 'modules' map. typically
these are modules from other architectures + some exceptions.
see appendix A


Appendix A
==========

see bug 6798. the thing is, that there is a card that is autodetected, but need
some params to be passed to the module. we cannot just add 'default=blabla' to each
option in 'modules->params' database, because this will break other cards that use that
module. this is fixed by adding the vendor/device id of this card to id_addons that will
tell us 'fake' module name (eg. 'snd-cs4236-modified). then we create a new module in
module_index.ycp and module_addons, where we can seafely supply all parameters this card
needs without breaking other cards.

Appendix B
==========

'allows' module options syntax

atoms:
{0} stands for 0
{0,Disabled} is same as {0} (i don't know why this one was invented...)
{1,Enabled} same as {1} (ditto)
{0,5} stands for range 0,1,2,3,4,5
{0,6,2} stands for range with step 2: 0,2,4,6
{atom1,atom2} union of atom1 & atom2 is allowed

2 changes: 2 additions & 0 deletions data/include/.cvsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Makefile
Makefile.in
8 changes: 8 additions & 0 deletions data/include/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# Makefile.am for sound/data
#
# $Id$
#

EXTRA_DIST = gen_routines.ycp

2 changes: 2 additions & 0 deletions data/map_indent/.cvsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Makefile
Makefile.in
8 changes: 8 additions & 0 deletions data/map_indent/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# Makefile.am for sound/data
#
# $Id$
#

EXTRA_DIST = Makefile.map_indent map_indent.yy

File renamed without changes.
Loading

0 comments on commit a2fae2b

Please sign in to comment.