~ubuntu-branches/ubuntu/lucid/alsa-utils/lucid

« back to all changes in this revision

Viewing changes to debian/README.init.cs4236

  • Committer: Bazaar Package Importer
  • Date: 2009-02-01 16:12:42 UTC
  • Revision ID: james.westby@ubuntu.com-20090201161242-arxntyykg7ki3z3x
Tags: 1.0.18-1ubuntu8
Import packaging changes for version 1.0.18-1ubuntu8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/bash
 
2
 
 
3
## Provided by Mkarcher at http://www.thinkwiki.org/wiki/Script_for_configuring_the_CS4239_sound_chip_in_PnP_mode
 
4
## Modified by Daniel T Chen for Debian/Ubuntu, redistributable
 
5
## under GPLv2 or later
 
6
 
 
7
for dev in /sys/bus/pnp/devices/*
 
8
do
 
9
  grep CSC0100 $dev/id > /dev/null && WSSDEV=$dev
 
10
  grep CSC0110 $dev/id > /dev/null && CTLDEV=$dev
 
11
done
 
12
 
 
13
echo activate > $WSSDEV/resources
 
14
echo activate > $CTLDEV/resources
 
15
 
 
16
{ read
 
17
 read bla port1
 
18
 read bla port2
 
19
 read bla port3
 
20
 read bla irq
 
21
 read bla dma1
 
22
 read bla dma2
 
23
 # Hack: with PnPBIOS: ports are: port1: WSS, port2: OPL, port3: sb (unneeded)
 
24
 #       with ACPI-PnP:ports are: port1: OPL, port2: sb, port3: WSS
 
25
 # (ACPI bios seems to be wrong here, the PnP-card-code in snd-cs4236.c uses the
 
26
 #  PnPBIOS port order)
 
27
 # Detect port order using the fixed OPL port as reference
 
28
 if [ ${port2%%-*} = 0x388 ]
 
29
 then
 
30
   # PnPBIOS: usual order
 
31
   port=${port1%%-*}
 
32
   oplport=${port2%%-*}
 
33
 else
 
34
   # ACPI: mixed-up order
 
35
   port=${port3%%-*}
 
36
   oplport=${port1%%-*}
 
37
 fi
 
38
 } < $WSSDEV/resources
 
39
 
 
40
{ read
 
41
 read bla port1
 
42
 cport=${port1%%-*}
 
43
} < $CTLDEV/resources
 
44
 
 
45
modprobe snd-cs4236 port=$port cport=$cport fm_port=$oplport irq=$irq dma1=$dma1 dma2=$dma2 isapnp=0