aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/utf/utf_tools.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/utf/utf_tools.php')
0 files changed, 0 insertions, 0 deletions
?h=16.32&id=12e2b5c87a379eec81c5e2d80b67493689691082'>treecommitdiffstats
path: root/perl-install/harddrake/sound.pm
blob: 48e8ffbff89d6fdc608d964c1b620d2a9ee60954 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
package harddrake::sound;
# lists filled with Danny Tholen help, enhanced by Thierry Vignaud
#
# No ALSA for OSS's 
#    o tv cards: btaudio,
#    o isa cards: msnd_pinnacle, pas2, 
# No OSS for ALSA's
#    o pci cards: snd-ali5451, snd-als4000, snd-es968, snd-fm801,
#      snd-hdsp, snd-via8233
#    o isa cards: snd-als100, snd-azt2320, snd-cmi8330, snd-cs4231,
#      snd-cs4236, snd-dt0197h, snd-es18xx,snd-es1688, snd-ice1712,
#      snd-korg1212, snd-rme32, snd-rme96
#    o usb cards: snd-usb-audio

# TODO: 
#    o ensure sound isn't user (either dsp/midi/sequencer/mixer)
#    o fix sound/alsa services

use strict;
use common;
use interactive;
use run_program;
use modules;
use standalone;
use list_modules;

my %alsa2oss = 
    (
     "snd-ad1816a" => [ "ad1816" ], # isa
     "snd-ad1848"  => [ "ad1848" ], # isa
     "snd-ali5451" => [ "unknown" ],
     "snd-als100"  => [ "unknown" ], # isa
     "snd-als4000" => [ "unknown" ],
     "snd-azt2320" => [ "unknown" ], # isa
     "snd-azt3328" => [ "unknown" ], # isa
     "snd-cmi8330" => [ "unknown" ], # isa
     "snd-cmipci"  => [ "cmpci" ],
     "snd-cs4231"  => [ "unknown" ], # isa
     "snd-cs4232"  => [ "cs4232" ],  # isa
     "snd-cs4236"  => [ "unknown" ], # isa
     "snd-cs4281"  => [ "cs4281" ],
     "snd-cs46xx"  => [ "cs46xx" ],
     "snd-dt0197h" => [ "unknown" ], # isa
     "snd-emu10k1" => [ "audigy", "emu10k1" ],
     "snd-ens1370" => [ "es1370" ],
     "snd-ens1371" => [ "es1371" ],
     "snd-es1688"  => [ "unknown" ], # isa
     "snd-es18xx"  => [ "unknown" ], # isa
     "snd-es1938"  => [ "esssolo1" ],
     "snd-es1968"  => [ "maestro" ], # isa
     "snd-es968"   => [ "unknown" ],
     "snd-fm801"   => [ "unknown"],
     "snd-gusclassic" => [ "gus" ], # isa
     "snd-gusextreme" => [ "gus" ], # isa
     "snd-gusmax"  => [ "gus" ],    # isa
     "snd-hdsp" => [ "unknown" ],
     "snd-ice1712" => [ "unknown" ], # isa
     "snd-intel8x0" => [ "i810_audio", "nvaudio" ],
     "snd-interwave" => [ "gus" ],  # isa
     "snd-korg1212" => [ "unknown" ], # isa
     "snd-maestro3" => [ "maestro3" ],
     "snd-mpu401"  => [ "mpu401" ],
     "snd-nm256"   => [ "nm256_audio" ],
     "snd-opl3sa2" => [ "opl3", "opl3sa", "opl3sa2" ], # isa
     "snd-opti93x" => [ "mad16" ],
     "snd-rme32"   => [ "unknown" ], # isa
     "snd-rme96"   => [ "unknown" ], # isa
     "snd-rme9652g" => [ "rme96xx" ],
     "snd-sb16"    => ["sscape", "sb"],
     "snd-sb8"     => [ "sb" ],
     "snd-sbawe"   => [ "awe_wave" ],
     "snd-sgalaxy" => [ "sgalaxy" ], # isa
     "snd-sonicvibes" => [ "sonicvibes" ],
     "snd-sscape" => [ "unknown" ], # isa
     "snd-trident" => [ "trident" ],
     "snd-usb-audio" => [ "unknown" ], # usb
     "snd-via686"  => [ "via82cxxx_audio" ],
     "snd-via8233" => [ "unknown" ],
     "snd-wavefront" => [ "wavefront" ], # isa
     "snd-ymfpci"  => [ "ymfpci" ]
     );


my %oss2alsa = 
    (
     "ad1816"  => [ "snd-ad1816a" ],
     "ad1848"  => [ "snd-ad1848" ],
     "audigy"  => [ "snd-emu10k1" ],
     "awe_wave" => [ "snd-sbawe" ],
     "btaudio" => [ "unknown" ],
     "cmpci"   => [ "snd-cmipci" ],
     "cs4232"  => [ "snd-cs4232" ],
     "cs4281"  => [ "snd-cs4281" ],
     "cs46xx"  => [ "snd-cs46xx" ],
     "emu10k1" => [ "snd-emu10k1" ],
     "es1370"  => [ "snd-ens1370" ],
     "es1371"  => [ "snd-ens1371" ],
     "esssolo1" => [ "snd-es1938" ],
     "gus"     => ["snd-interwave", "snd-gusclassic", "snd-gusmax", "snd-gusextreme"],
     "i810_audio" => [ "snd-intel8x0"],
     "mad16"   => [ "snd-opti93x" ],
     "maestro" => [ "snd-es1968" ],
     "maestro3" => [ "snd-maestro3" ],
     "mpu401"  => [ "snd-mpu401" ],
     "msnd_pinnacle" => [ "unknown" ],
     "msnd_pinnacle" =>  [ "unknown" ],
     "nm256_audio" => [ "snd-nm256" ],
     "nvaudio" => [ "snd-intel8x0"],
     "opl3"    => [ "snd-opl3sa2" ],
     "opl3sa"  => [ "snd-opl3sa2" ],
     "opl3sa2" => [ "snd-opl3sa2" ],
     "pas2"    => [ "unknown" ],
     "rme96xx" => [ "snd-rme9652.o.g" ],
     "sb"      => ["snd-sb8", "snd-sb16"],
     "sgalaxy" => [ "snd-sgalaxy" ],
     "sonicvibes" => [ "snd-sonicvibes" ],
     "sscape"  => [ "snd-sb16" ],
     "trident" => [ "snd-trident" ],
     "via82cxxx_audio" => [ "snd-via686" ],
     "wavefront" => [ "snd-wavefront" ],
     "ymfpci"  => [ "snd-ymfpci" ]
     );

my @blacklist = (qw(cs46xx cs4281));
my $blacklisted = 0;

sub rooted { run_program::rooted($::prefix, @_) }

sub unload { modules::unload(@_) if $::isStandalone || $blacklisted }

sub load { modules::load(@_) if $::isStandalone || $blacklisted }

sub get_alternative {
    my ($driver) = @_;
    $alsa2oss{$driver} || $oss2alsa{$driver};
}


sub do_switch {
    my ($old_driver, $new_driver) = @_;
    standalone::explanations("removing old $old_driver\n");
    rooted("service sound stop") unless $blacklisted;
    rooted("service alsa stop") if $old_driver =~ /^snd-/ && !$blacklisted;
    unload($old_driver); #    run_program("/sbin/modprobe -r $driver"); # just in case ...
    modules::remove_module($old_driver); # completed by the next add_alias()