Mailinglist Archive: yast-commit (216 mails)

< Previous Next >
[yast-commit] r62778 - in /branches/tmp/lslezak/sound: ./ data/ data/doc/
  • From: lslezak@xxxxxxxxxxxxxxxxx
  • Date: Tue, 09 Nov 2010 13:49:02 -0000
  • Message-id: <20101109134902.E39483241A@xxxxxxxxxxxxxxxxx>
Author: lslezak
Date: Tue Nov 9 14:49:01 2010
New Revision: 62778

URL: http://svn.opensuse.org/viewcvs/yast?rev=62778&view=rev
Log:
include USB and PPC cards in the sound card DB

Added:
branches/tmp/lslezak/sound/data/data_extra_ids.rb
Modified:
branches/tmp/lslezak/sound/VERSION
branches/tmp/lslezak/sound/data/Makefile.am
branches/tmp/lslezak/sound/data/alsa_drivers.rb
branches/tmp/lslezak/sound/data/data_cards.rb
branches/tmp/lslezak/sound/data/doc/README
branches/tmp/lslezak/sound/data/generate_soundcard_db.rb
branches/tmp/lslezak/sound/data/sound_db_generator.rb
branches/tmp/lslezak/sound/data/ycp_format.rb

Modified: branches/tmp/lslezak/sound/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/sound/VERSION?rev=62778&r1=62777&r2=62778&view=diff
==============================================================================
--- branches/tmp/lslezak/sound/VERSION (original)
+++ branches/tmp/lslezak/sound/VERSION Tue Nov 9 14:49:01 2010
@@ -1 +1 @@
-2.19.2
+2.20.0

Modified: branches/tmp/lslezak/sound/data/Makefile.am
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/sound/data/Makefile.am?rev=62778&r1=62777&r2=62778&view=diff
==============================================================================
--- branches/tmp/lslezak/sound/data/Makefile.am (original)
+++ branches/tmp/lslezak/sound/data/Makefile.am Tue Nov 9 14:49:01 2010
@@ -8,7 +8,7 @@

ydata_DATA = alsa_packages.ycp sndcards.ycp

-sound_db_generator = alsa_drivers.rb data_cards.rb data_joystick.rb
data_mixer.rb generate_soundcard_db.rb sound_db_generator.rb ycp_format.rb
+sound_db_generator = alsa_drivers.rb data_cards.rb data_joystick.rb
data_mixer.rb data_extra_ids.rb generate_soundcard_db.rb sound_db_generator.rb
ycp_format.rb

sndcards.ycp: $(sound_db_generator)
./generate_soundcard_db.rb > sndcards.ycp

Modified: branches/tmp/lslezak/sound/data/alsa_drivers.rb
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/sound/data/alsa_drivers.rb?rev=62778&r1=62777&r2=62778&view=diff
==============================================================================
--- branches/tmp/lslezak/sound/data/alsa_drivers.rb (original)
+++ branches/tmp/lslezak/sound/data/alsa_drivers.rb Tue Nov 9 14:49:01 2010
@@ -43,7 +43,7 @@
end

# class for handling kernel driver info
-# (description, device alliases,...)
+# (description, device aliases,...)
class AlsaModule
attr_reader :mod_path

@@ -72,6 +72,11 @@
ret << ModAlias.new(a) if a.match /^pci:/
end

+ extra_ids = eval(File.read(File.join(File.dirname(__FILE__),
'data_extra_ids.rb')))
+ extra_ids.each do |id|
+ ret << ModAlias.new("pci:v#{id[1]}d#{id[2]}sv*sd*") if id[0] == name
+ end
+
ret
end

@@ -100,10 +105,12 @@
ret
end

- # find all snound drivers below the given path
+ # find all sound drivers below the given path
def self.find_all(path)
ret = []
- lst = `find #{path} -type f -name 'snd-*.ko'`.split("\n")
+ lst = `find #{path} -type f -name 'snd-*.ko'`.split("\n").sort{|p1, p2|
+ p1.split('/').last <=> p2.split('/').last
+ }

lst.each do |m|
ret << AlsaModule.new(m)

Modified: branches/tmp/lslezak/sound/data/data_cards.rb
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/sound/data/data_cards.rb?rev=62778&r1=62777&r2=62778&view=diff
==============================================================================
--- branches/tmp/lslezak/sound/data/data_cards.rb (original)
+++ branches/tmp/lslezak/sound/data/data_cards.rb Tue Nov 9 14:49:01 2010
@@ -28,7 +28,7 @@
["snd-als4000", "XWave4000, Labway"],
["snd-als4000", "ALS4000, Avance Logic"],
["snd-atiixp", "IXP150/200/250/300/400, ATI"],
- ["snd-atiixp-modem", "IXP150/200/250/400 (modem), ATI"],
+ ["snd-atiixp-modem", "IXP150/200/250/400 (modem), ATI"],
["snd-au8810", "Aureal Vortex AU8810, Aureal Semiconductor Inc."],
["snd-au8820", "Aureal Vortex AU8820, Aureal Semiconductor Inc."],
["snd-au8830", "Aureal Vortex AU8830, Aureal Semiconductor Inc."],
@@ -338,6 +338,10 @@
["snd-trident", "True Sound 4Dwave, CHIC"],
["snd-usb-audio", "USB Audio, Generic"],
["snd-usb-usx2y", "US122/224/428, Tascam"],
+ ["snd-usb-caiaq", "USB audio, caiaq"],
+ ["snd-ua101", "UA-101, Edirol"],
+ ["snd-ua101", "UA-1000, Edirol"],
+ ["snd-usb-us122l", "US-122L, Tascam"],
["snd-via82xx", "VT8233A/C, VIA"],
["snd-via82xx", "VT8235, VIA"],
["snd-via82xx", "VT8237, VIA"],

Added: branches/tmp/lslezak/sound/data/data_extra_ids.rb
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/sound/data/data_extra_ids.rb?rev=62778&view=auto
==============================================================================
--- branches/tmp/lslezak/sound/data/data_extra_ids.rb (added)
+++ branches/tmp/lslezak/sound/data/data_extra_ids.rb Tue Nov 9 14:49:01 2010
@@ -0,0 +1,7 @@
+[
+ # extra id's for powermacs:
+ ["snd-powermac", "030401", "030010"],
+ ["snd-powermac", "030401", "030011"],
+ ["snd-powermac", "030401", "030012"],
+ ["snd-powermac", "030401", "030013"]
+]

Modified: branches/tmp/lslezak/sound/data/doc/README
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/sound/data/doc/README?rev=62778&r1=62777&r2=62778&view=diff
==============================================================================
--- branches/tmp/lslezak/sound/data/doc/README (original)
+++ branches/tmp/lslezak/sound/data/doc/README Tue Nov 9 14:49:01 2010
@@ -1,22 +1,17 @@
-you need to have alsa 0.9 or newer installed.
-don't forget to set 'export Y2DIR=.' when generating database
+The sound card databe is generated automatically during
+package build using drivers from kernel-default package.

file description:

-README this file
-idlist.ycp autogenerated file from
/lib/modules/ver#/modules.generic_string
- contains map with vendor_id and device_id keys for searching
- for the appropriate kernel module. leaves are indices to
- module_index map that is contained in modules_index.ycp
-gen_card_list.ycp script that generates the cardlist.ycp database
-gen_id_list.ycp script that generates the idlist.ycp database
-gen_opt_list.ycp script that generates the modlist.ycp databse
-idlist.ycp autogenerated map: for each module index contains list of
- card labels (used for manual card addition)
-include/gen_routines.ycp common routines for generating database

-modlist.ycp autogenerated map: for each module as a key contains
- a map as value, where important info about the module
- is stored.
-module_index.ycp manually generated database: used for saveing space in
- idlist.ycp database.
+README this file
+alsa_drivers.rb collects data from drivers
+alsa_packages.ycp static data - extra packages for drivers
+data_cards.rb static data - sound card names
+data_extra_ids.rb static data - extra PCI ids for drivers
+data_joystick.rb static data - joystick data
+data_mixer.rb static data - mixer settings for specific
drivers
+generate_soundcard_db.rb creates the database
+sndcards.ycp generated sound card database
+sound_db_generator.rb collects all data for database
+ycp_format.rb helper - Ruby to YCP conversion


Modified: branches/tmp/lslezak/sound/data/generate_soundcard_db.rb
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/sound/data/generate_soundcard_db.rb?rev=62778&r1=62777&r2=62778&view=diff
==============================================================================
--- branches/tmp/lslezak/sound/data/generate_soundcard_db.rb (original)
+++ branches/tmp/lslezak/sound/data/generate_soundcard_db.rb Tue Nov 9
14:49:01 2010
@@ -1,6 +1,6 @@
#!/usr/bin/ruby

-# read all statis predefined databases
+# read all static predefined databases
require File.join(File.dirname(__FILE__), "alsa_drivers.rb")
require File.join(File.dirname(__FILE__), "sound_db_generator.rb")
require File.join(File.dirname(__FILE__), "ycp_format.rb")

Modified: branches/tmp/lslezak/sound/data/sound_db_generator.rb
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/sound/data/sound_db_generator.rb?rev=62778&r1=62777&r2=62778&view=diff
==============================================================================
--- branches/tmp/lslezak/sound/data/sound_db_generator.rb (original)
+++ branches/tmp/lslezak/sound/data/sound_db_generator.rb Tue Nov 9 14:49:01
2010
@@ -1,4 +1,4 @@
-# class for generating the sound card databased
+# class for generating the sound card database

class SoucardDBGenerator
private
@@ -133,10 +133,16 @@

# generate the complete sound card database
# read the static databases,
- # create the subparts and puth them all together
+ # create the subparts and put them all together
def self.generate_sound_card_db(path)
amodules = AlsaModule.find_all path
- amodules.reject!{|m| m.modaliases.size.zero? && m.name != 'snd-dummy' &&
m.name != 'snd-virmidi'}
+
+ # add these drivers although they don't contain any PCI aliases
+ # (dummy drivers, USB drivers, PPC drivers)
+ xtra_drivers = ['snd-dummy', 'snd-virmidi', 'snd-aoa', 'snd-usb-audio',
+ 'snd-usb-caiaq', 'snd-ua101', 'snd-usb-us122l', 'snd-usb-usx2y']
+
+ amodules.reject!{|m| m.modaliases.size.zero? &&
!xtra_drivers.include?(m.name)}

card_addons = eval(File.read(File.join(File.dirname(__FILE__),
'data_cards.rb')))
joy_modules = eval(File.read(File.join(File.dirname(__FILE__),
'data_joystick.rb')))
@@ -154,7 +160,7 @@
"kernel" => kernel_ver
}

- # add a header with kernel version string nad YCP wrapping
+ # add a header with kernel version string and YCP wrapping
header = "/* This file was automatically generated for kernel version
#{$1} */\n"
header +=<<EOF


Modified: branches/tmp/lslezak/sound/data/ycp_format.rb
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/sound/data/ycp_format.rb?rev=62778&r1=62777&r2=62778&view=diff
==============================================================================
--- branches/tmp/lslezak/sound/data/ycp_format.rb (original)
+++ branches/tmp/lslezak/sound/data/ycp_format.rb Tue Nov 9 14:49:01 2010
@@ -29,6 +29,12 @@
end
end

+class Bignum
+ def to_ycp(indent = 0)
+ self.to_s
+ end
+end
+
class Hash
def to_ycp(indent = 0)
ret = ''

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages