From 1bf80f77f7a8bb4ffdd203c60662421e3f8f589b Mon Sep 17 00:00:00 2001 From: David P Date: Sun, 1 Oct 2017 17:19:40 -0300 Subject: Added configs/mate-openrc Other changes: - Updated talkingparabola-X11 packages.both (xorg pkgs) - Updated pacman-init service for profile-openrc --- .../root-image/etc/conf.d/hostname | 2 - .../talking-parabola-openrc/root-image/etc/fstab | 0 .../talking-parabola-openrc/root-image/etc/inittab | 41 ----- .../root-image/etc/locale.conf | 1 - .../talking-parabola-openrc/root-image/etc/motd | 14 -- .../root-image/etc/pam.d/su | 6 - .../root-image/etc/sudoers.d/g_wheel | 1 - .../root-image/etc/udev/rules.d/81-dhcpcd.rules | 1 - .../root-image/root/customize_root_image.sh | 22 --- .../root-image/root/network.html | 191 -------------------- .../root-image/usr/bin/livecd-alsa-unmuter | 8 - .../root-image/usr/bin/pick-a-card | 54 ------ .../root-image/usr/bin/talk-to-me | 10 -- .../usr/share/livecd-sound/asound.conf.in | 12 -- .../root-image/usr/share/livecd-sound/functions | 199 --------------------- 15 files changed, 562 deletions(-) delete mode 100644 configs/talking-parabola-openrc/root-image/etc/conf.d/hostname delete mode 100644 configs/talking-parabola-openrc/root-image/etc/fstab delete mode 100644 configs/talking-parabola-openrc/root-image/etc/inittab delete mode 100644 configs/talking-parabola-openrc/root-image/etc/locale.conf delete mode 100644 configs/talking-parabola-openrc/root-image/etc/motd delete mode 100644 configs/talking-parabola-openrc/root-image/etc/pam.d/su delete mode 100644 configs/talking-parabola-openrc/root-image/etc/sudoers.d/g_wheel delete mode 100644 configs/talking-parabola-openrc/root-image/etc/udev/rules.d/81-dhcpcd.rules delete mode 100755 configs/talking-parabola-openrc/root-image/root/customize_root_image.sh delete mode 100644 configs/talking-parabola-openrc/root-image/root/network.html delete mode 100755 configs/talking-parabola-openrc/root-image/usr/bin/livecd-alsa-unmuter delete mode 100755 configs/talking-parabola-openrc/root-image/usr/bin/pick-a-card delete mode 100755 configs/talking-parabola-openrc/root-image/usr/bin/talk-to-me delete mode 100644 configs/talking-parabola-openrc/root-image/usr/share/livecd-sound/asound.conf.in delete mode 100644 configs/talking-parabola-openrc/root-image/usr/share/livecd-sound/functions (limited to 'configs/talking-parabola-openrc/root-image') diff --git a/configs/talking-parabola-openrc/root-image/etc/conf.d/hostname b/configs/talking-parabola-openrc/root-image/etc/conf.d/hostname deleted file mode 100644 index a701f0c..0000000 --- a/configs/talking-parabola-openrc/root-image/etc/conf.d/hostname +++ /dev/null @@ -1,2 +0,0 @@ -# Set to the hostname of this machine -hostname="parabolaiso" diff --git a/configs/talking-parabola-openrc/root-image/etc/fstab b/configs/talking-parabola-openrc/root-image/etc/fstab deleted file mode 100644 index e69de29..0000000 diff --git a/configs/talking-parabola-openrc/root-image/etc/inittab b/configs/talking-parabola-openrc/root-image/etc/inittab deleted file mode 100644 index 787b731..0000000 --- a/configs/talking-parabola-openrc/root-image/etc/inittab +++ /dev/null @@ -1,41 +0,0 @@ -# /etc/inittab: This file describes how the INIT process should set up -# the system in a certain run-level. - -# Default runlevel. -id:3:initdefault: - -# System initialization, mount local filesystems, etc. -si::sysinit:/usr/bin/openrc sysinit - -# Further system initialization, brings up the boot runlevel. -rc::bootwait:/usr/bin/openrc boot - -l0:0:wait:/usr/bin/openrc shutdown -l0s:0:wait:/usr/bin/halt -dhip -l1:S1:wait:/usr/bin/openrc single -l2:2:wait:/usr/bin/openrc nonetwork -l3:3:wait:/usr/bin/openrc default -l4:4:wait:/usr/bin/openrc default -l5:5:wait:/usr/bin/openrc default -l6:6:wait:/usr/bin/openrc reboot -l6r:6:wait:/usr/bin/reboot -d -#z6:6:respawn:/usr/bin/sulogin - -# new-style single-user -su0:S:wait:/usr/bin/openrc single -su1:S:wait:/usr/bin/sulogin - -# TERMINALS -c1:12345:respawn:/usr/bin/agetty -a root --noclear 38400 tty1 linux -c2:2345:respawn:/usr/bin/agetty 38400 tty2 linux -c3:2345:respawn:/usr/bin/agetty 38400 tty3 linux -c4:2345:respawn:/usr/bin/agetty 38400 tty4 linux -c5:2345:respawn:/usr/bin/agetty 38400 tty5 linux -c6:2345:respawn:/usr/bin/agetty 38400 tty6 linux - -# SERIAL CONSOLES -#s0:12345:respawn:/usr/bin/agetty 9600 ttyS0 vt100 -#s1:12345:respawn:/usr/bin/agetty 9600 ttyS1 vt100 - -# What to do at the "Three Finger Salute". -ca:12345:ctrlaltdel:/usr/bin/shutdown -r now diff --git a/configs/talking-parabola-openrc/root-image/etc/locale.conf b/configs/talking-parabola-openrc/root-image/etc/locale.conf deleted file mode 100644 index 01ec548..0000000 --- a/configs/talking-parabola-openrc/root-image/etc/locale.conf +++ /dev/null @@ -1 +0,0 @@ -LANG=en_US.UTF-8 diff --git a/configs/talking-parabola-openrc/root-image/etc/motd b/configs/talking-parabola-openrc/root-image/etc/motd deleted file mode 100644 index 05ab207..0000000 --- a/configs/talking-parabola-openrc/root-image/etc/motd +++ /dev/null @@ -1,14 +0,0 @@ - -=============================================================================== - - Parabola live media _DATE_ - - To install Parabola, the system must be connected to the internet. - For instructions, enter this command: - lynx network.html - - Press the number keys while holding Alt to switch virtual terminals. - This allows entering commands without closing lynx. - -=============================================================================== - diff --git a/configs/talking-parabola-openrc/root-image/etc/pam.d/su b/configs/talking-parabola-openrc/root-image/etc/pam.d/su deleted file mode 100644 index a291042..0000000 --- a/configs/talking-parabola-openrc/root-image/etc/pam.d/su +++ /dev/null @@ -1,6 +0,0 @@ -#%PAM-1.0 -auth sufficient pam_rootok.so -auth sufficient pam_wheel.so trust use_uid -auth required pam_unix.so -account required pam_unix.so -session required pam_unix.so diff --git a/configs/talking-parabola-openrc/root-image/etc/sudoers.d/g_wheel b/configs/talking-parabola-openrc/root-image/etc/sudoers.d/g_wheel deleted file mode 100644 index 8c45359..0000000 --- a/configs/talking-parabola-openrc/root-image/etc/sudoers.d/g_wheel +++ /dev/null @@ -1 +0,0 @@ -%wheel ALL=(ALL) NOPASSWD: ALL diff --git a/configs/talking-parabola-openrc/root-image/etc/udev/rules.d/81-dhcpcd.rules b/configs/talking-parabola-openrc/root-image/etc/udev/rules.d/81-dhcpcd.rules deleted file mode 100644 index 970da69..0000000 --- a/configs/talking-parabola-openrc/root-image/etc/udev/rules.d/81-dhcpcd.rules +++ /dev/null @@ -1 +0,0 @@ -ACTION=="add", SUBSYSTEM=="net", ENV{SYSTEMD_WANTS}="dhcpcd@$name.service" diff --git a/configs/talking-parabola-openrc/root-image/root/customize_root_image.sh b/configs/talking-parabola-openrc/root-image/root/customize_root_image.sh deleted file mode 100755 index 4ff8528..0000000 --- a/configs/talking-parabola-openrc/root-image/root/customize_root_image.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -e -u - -sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen -locale-gen - -ln -sf /usr/share/zoneinfo/UTC /etc/localtime - -usermod -s /usr/bin/zsh root -cp -aT /etc/skel/ /root/ - -useradd -m -p "" -g users -G "adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel" -s /usr/bin/zsh parabola - -chmod 750 /etc/sudoers.d -chmod 440 /etc/sudoers.d/g_wheel - -sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist - -systemctl enable multi-user.target pacman-init.service choose-mirror.service livecd-alsa-unmuter.service brltty.service - -sed -i "s/_DATE_/${iso_version}/" /etc/motd diff --git a/configs/talking-parabola-openrc/root-image/root/network.html b/configs/talking-parabola-openrc/root-image/root/network.html deleted file mode 100644 index 057e680..0000000 --- a/configs/talking-parabola-openrc/root-image/root/network.html +++ /dev/null @@ -1,191 +0,0 @@ -Online version: https://wiki.parabolagnulinux.org/Start_installing -

Contents

- -
-

Start installing

-

You are now presented with a shell prompt, automatically logged in as root. -

-

Change the language

-
Tip: These are optional for the majority of users. Useful only if you plan on writing in your own language in any of the configuration files, if you use diacritical marks in the Wi-Fi password, or if you would like to receive system messages (e.g. possible errors) in your own language.
-

By default, the keyboard layout is set to us. If you have a non-US keyboard layout, run: -

-
# loadkeys layout
-
-

...where layout can be fr, uk, dvorak, be-latin1, etc. See here for a comprehensive list. -

The font should also be changed, because most languages use more glyphs than the 26 letter English alphabet. Otherwise some foreign characters may show up as white squares or as other symbols. Note that the name is case-sensitive, so please type it exactly as you see it: -

-
# setfont Lat2-Terminus16
-
-

By default, the language is set to English (US). If you would like to change the language for the install process (German, in this example), remove the # in front of the locale you want from /etc/locale.gen, along with English (US). Please choose the UTF-8 entry. -

Use Ctrl+X to exit, and when prompted to save changes, press Y and Enter to use the same filename. -

-
# nano /etc/locale.gen
-
-en_US.UTF-8 UTF-8
-de_DE.UTF-8 UTF-8
-
# locale-gen
-# export LANG=de_DE.UTF-8
-
-

Remember, LAlt+LShift activates and deactivates the keymap. -

-

Establish an internet connection

-
Warning: As of v197, udev no longer assigns network interface names according to the wlanX and ethX naming scheme. If you are coming from a different distribution or are reinstalling Parabola and not aware of the new interface naming style, please do not assume that your wireless interface is named wlan0, or that your wired interface is named eth0. You can use the command ip link to discover the names of your interfaces.
-

The dhcpcd network daemon starts automatically during boot and it will attempt to start a wired connection. Try to ping a server to see if a connection was established. For example, gnu.org: -

-
# ping -c 3 gnu.org
-
PING gnu.org (208.118.235.148) 56(84) bytes of data.
-64 bytes from wildebeest.gnu.org (208.118.235.148): icmp_seq=1 ttl=47 time=183 ms
-64 bytes from wildebeest.gnu.org (208.118.235.148): icmp_seq=2 ttl=47 time=168 ms
-64 bytes from wildebeest.gnu.org (208.118.235.148): icmp_seq=3 ttl=47 time=183 ms
-
---- gnu.org ping statistics ---
-3 packets transmitted, 3 received, 0% packet loss, time 2002ms
-rtt min/avg/max/mdev = 168.131/178.357/183.914/7.248 ms
-

If you get a ping: unknown host error, first check if there is an issue with your cable or wireless signal strength. If not, you will need to set up the network manually, as explained below. Once a connection is established move on to Installation Guide. -

-

Wired

-

Follow this procedure if you need to set up a wired connection via a static IP address. -

First, disable the dhcpcd service which was started automatically at boot: -

-
# systemctl stop dhcpcd.service
-
-

Identify the name of your Ethernet interface. -

-
# ip link
-
-1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
-    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
-2: enp2s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
-    link/ether 00:11:25:31:69:20 brd ff:ff:ff:ff:ff:ff
-3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000
-    link/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff
-

In this example, the Ethernet interface is enp2s0f0. If you are unsure, your Ethernet interface is likely to start with the letter "e", and unlikely to be "lo" or start with the letter "w". You can also use iwconfig and see which interfaces are not wireless: -

-
# iwconfig
-
enp2s0f0  no wireless extensions.
-wlp3s0    IEEE 802.11bgn  ESSID:"NETGEAR97"
-          Mode:Managed  Frequency:2.427 GHz  Access Point: 2C:B0:5D:9C:72:BF
-          Bit Rate=65 Mb/s   Tx-Power=16 dBm
-          Retry  long limit:7   RTS thr:off   Fragment thr:off
-          Power Management:on
-          Link Quality=61/70  Signal level=-49 dBm
-          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
-          Tx excessive retries:0  Invalid misc:430   Missed beacon:0
-lo        no wireless extensions.
-

In this example, neither enp2s0f0 nor the loopback device have wireless extensions, meaning enp2s0f0 is our Ethernet interface. -

You also need to know these settings: -

- -

Activate the connected Ethernet interface (e.g. enp2s0f0): -

-
# ip link set enp2s0f0 up
-
-

Add the address: -

-
# ip addr add ip_address/subnetmask dev interface_name
-
-

For example: -

-
# ip addr add 192.168.1.2/24 dev enp2s0f0
-
-

For more options, run man ip. -

Add your gateway like this, substituting your own gateway's IP address: -

-
# ip route add default via ip_address
-
-

For example: -

-
# ip route add default via 192.168.1.1
-
-

Edit resolv.conf, substituting your name servers' IP addresses and your local domain name: -

-
# nano /etc/resolv.conf
-
-nameserver 61.23.173.5
-nameserver 61.95.849.8
-search example.com
-
Note: Currently, you may include a maximum of three nameserver lines. In order to overcome this limitation, you can use a locally caching nameserver like Dnsmasq.
-

You should now have a working network connection. If you do not, check the detailed Network Configuration page. -

-

Wireless

-

Follow this procedure if you need wireless connectivity (Wi-Fi) during the installation process. -

First, identify the name of your wireless interface. -

-
# iw dev
-
phy#0
-        Interface wlp3s0
-                ifindex 3
-                wdev 0x1
-                addr 00:21:6a:5e:52:bc
-                type managed
-

In this example, wlp3s0 is the available wireless interface. If you are unsure, your wireless interface is likely to start with the letter "w", and unlikely to be "lo" or start with the letter "e". -

-
Note: If you do not see output similar to this, then your wireless driver has not been loaded. Please see Wireless Setup for more detailed information.
-

Bring the interface up with: -

-
# ip link set wlp3s0 up
-
-

If you get this error message: SIOCSIFFLAGS: No such file or directory, your wireless chipset could need a non-free firmware to function. This is not supported on Parabola. Please see Wireless Setup if you are unsure if this is the true for your particular chipset. -

Next, use netctl's wifi-menu to connect to a network: -

-
# wifi-menu wlp3s0
-
-

You should now have a working network connection. If you do not, check the detailed Wireless Setup page. -

Alternatively, use iw dev wlp3s0 scan | grep SSID to scan for available networks, then connect to a network with: -

-
# wpa_supplicant -B -i wlp3s0 -c <(wpa_passphrase "ssid" "psk")
-
-

You need to replace ssid with the name of your network (e.g. "Linksys etc...") and psk with your wireless password, leaving the quotes around the network name and password. -

Finally, you have to give your interface an IP address. This can be set manually or using the dhcp: -

-
# dhcpcd wlp3s0
-
-

If that does not work, issue the following commands: -

-
# echo 'ctrl_interface=DIR=/run/wpa_supplicant' > /etc/wpa_supplicant.conf
-# wpa_passphrase <ssid> <passphrase> >> /etc/wpa_supplicant.conf
-# ip link set <interface> up # May not be needed as dhcpcd should bring it up but may be needed for wpa_supplicant.
-# wpa_supplicant -B -D nl80211 -c /foobar.conf -i <interface name>
-# dhcpcd -A <interface name>
-
-

Analog modem, ISDN or PPPoE DSL

-

For xDSL, dial-up and ISDN connections, see Direct Modem Connection. -

-

Behind a proxy server

-

If you are behind a proxy server, you will need to export the http_proxy and ftp_proxy environment variables. See Proxy settings for more information. -

-
-

This page was retrieved from: https://wiki.parabolagnulinux.org/index.php?title=Start_installing&oldid=5138 -

-

Content is available under GNU Free Documentation License 1.3 (or at your option, any later version). -

- - - diff --git a/configs/talking-parabola-openrc/root-image/usr/bin/livecd-alsa-unmuter b/configs/talking-parabola-openrc/root-image/usr/bin/livecd-alsa-unmuter deleted file mode 100755 index 6de05a0..0000000 --- a/configs/talking-parabola-openrc/root-image/usr/bin/livecd-alsa-unmuter +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# Properly initialize the sound card so that we have audio at boot. -# This script is released under the GNU General Public License. -source /usr/share/livecd-sound/functions - -preinit_levels all -sanify_levels all diff --git a/configs/talking-parabola-openrc/root-image/usr/bin/pick-a-card b/configs/talking-parabola-openrc/root-image/usr/bin/pick-a-card deleted file mode 100755 index 7f469e8..0000000 --- a/configs/talking-parabola-openrc/root-image/usr/bin/pick-a-card +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -# If there are multiple usable sound cards, prompt the user to choose one, -# using auditory feedback. -# This script is released under the GNU General Public License. - -source /usr/share/livecd-sound/functions - -nwords() { - echo $# -} - -is_numeric() { - local str=$1 - expr match "$str" '[[:digit:]]\+$' > /dev/null 2>&1 -} - -set_default_card() { - local card=$1 - sed -e "s/%card%/$card/g" < /usr/share/livecd-sound/asound.conf.in \ - > /etc/asound.conf -} - -play_on_card() { - local card=$1 file=$2 - aplay "-Dplughw:$card,0" "$file" -} - -set -f -usable_cards="$(list_non_pcsp_cards)" -num_usable_cards=$(nwords $usable_cards) - -if [ "$num_usable_cards" -eq 1 ]; then - exit 0 -fi - -for card in $usable_cards; do - if ! is_numeric "$card"; then - continue - fi - play_on_card "$card" /usr/share/livecd-sound/sounds/pick-a-card.wav& -done -wait -sleep 1 -for card in $usable_cards; do - if ! is_numeric "$card"; then - continue - fi - play_on_card "$card" /usr/share/livecd-sound/sounds/beep.wav - if read -t 10; then - set_default_card "$card" - break - fi -done diff --git a/configs/talking-parabola-openrc/root-image/usr/bin/talk-to-me b/configs/talking-parabola-openrc/root-image/usr/bin/talk-to-me deleted file mode 100755 index 73998d8..0000000 --- a/configs/talking-parabola-openrc/root-image/usr/bin/talk-to-me +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -started_flag=/run/speech-is-running -if [ -f $started_flag ]; then - exit 0 -fi -systemctl stop espeakup -sleep 5 -pick-a-card -systemctl start espeakup -touch $started_flag diff --git a/configs/talking-parabola-openrc/root-image/usr/share/livecd-sound/asound.conf.in b/configs/talking-parabola-openrc/root-image/usr/share/livecd-sound/asound.conf.in deleted file mode 100644 index 851f829..0000000 --- a/configs/talking-parabola-openrc/root-image/usr/share/livecd-sound/asound.conf.in +++ /dev/null @@ -1,12 +0,0 @@ -pcm.!default { - type plug - slave.pcm { - type hw - card %card% - } -} - -ctl.!default { - type hw - card %card% -} diff --git a/configs/talking-parabola-openrc/root-image/usr/share/livecd-sound/functions b/configs/talking-parabola-openrc/root-image/usr/share/livecd-sound/functions deleted file mode 100644 index e517795..0000000 --- a/configs/talking-parabola-openrc/root-image/usr/share/livecd-sound/functions +++ /dev/null @@ -1,199 +0,0 @@ -# Functions for setting up sound on the live CD. -# This library is released under the GNU General Public License, -# and it incorporates code from the /etc/init.d/alsa-utils included with -# Ubuntu 8.04. Proper credit also goes to Debian. - -# Start code copied from Debian / Ubuntu: - -bugout () { - printf "/etc/rc.d/livecdsound: programming error" - stat_fail -} - -echo_card_indices() -{ - if [ -f /proc/asound/cards ] ; then - sed -n -e's/^[[:space:]]*\([0-7]\)[[:space:]].*/\1/p' /proc/asound/cards - fi -} - -filter_amixer_output() -{ - sed \ - -e '/Unable to find simple control/d' \ - -e '/Unknown playback setup/d' \ - -e '/^$/d' -} - -# The following functions try to set many controls. -# No card has all the controls and so some of the attempts are bound to fail. -# Because of this, the functions can't return useful status values. - -# $1 -# $2 -# $CARDOPT -unmute_and_set_level() -{ - { [ "$2" ] && [ "$CARDOPT" ] ; } || bugout - amixer $CARDOPT -q set "$1" "$2" unmute 2>&1 | filter_amixer_output || : - return 0 -} - -# $1 -# $CARDOPT -mute_and_zero_level() -{ - { [ "$1" ] && [ "$CARDOPT" ] ; } || bugout - amixer $CARDOPT -q set "$1" "0%" mute 2>&1 | filter_amixer_output || : - return 0 -} - -# $1 -# $2 "on" | "off" -# $CARDOPT -switch_control() -{ - { [ "$2" ] && [ "$CARDOPT" ] ; } || bugout - amixer $CARDOPT -q set "$1" "$2" 2>&1 | filter_amixer_output || : - return 0 -} - -# $1 -sanify_levels_on_card() -{ - CARDOPT="-c $1" - - unmute_and_set_level "Front" "80%" - unmute_and_set_level "Master" "80%" - unmute_and_set_level "Master Mono" "80%" - unmute_and_set_level "Master Digital" "80%" # E.g., cs4237B - unmute_and_set_level "Playback" "80%" - unmute_and_set_level "Headphone" "100%" - unmute_and_set_level "PCM" "80%" - unmute_and_set_level "PCM,1" "80%" # E.g., ess1969 - unmute_and_set_level "DAC" "80%" # E.g., envy24, cs46xx - unmute_and_set_level "DAC,0" "80%" # E.g., envy24 - unmute_and_set_level "DAC,1" "80%" # E.g., envy24 - unmute_and_set_level "Synth" "80%" - unmute_and_set_level "CD" "80%" - unmute_and_set_level "PC Speaker" "100%" - - mute_and_zero_level "Mic" - mute_and_zero_level "IEC958" # Ubuntu #19648 - - # Intel P4P800-MX - switch_control "Master Playback Switch" on - switch_control "Master Surround" on - - # Trident/YMFPCI/emu10k1: - unmute_and_set_level "Wave" "80%" - unmute_and_set_level "Music" "80%" - unmute_and_set_level "AC97" "80%" - - # DRC: - unmute_and_set_level "Dynamic Range Compression" "80%" - - # Required for HDA Intel (hda-intel): - unmute_and_set_level "Front" "80%" - - # Required for SB Live 7.1/24-bit (ca0106): - unmute_and_set_level "Analog Front" "80%" - - # Required at least for Via 823x hardware on DFI K8M800-MLVF Motherboard - switch_control "IEC958 Capture Monitor" off - - # Required for hardware allowing toggles for AC97 through IEC958, - # valid values are 0, 1, 2, 3. Needs to be set to 0 for PCM1. - unmute_and_set_level "IEC958 Playback AC97-SPSA" "0" - - # Required for newer Via hardware - unmute_and_set_level "VIA DXS,0" "80%" - unmute_and_set_level "VIA DXS,1" "80%" - unmute_and_set_level "VIA DXS,2" "80%" - unmute_and_set_level "VIA DXS,3" "80%" - - # Required on some notebooks with ICH4: - switch_control "Headphone Jack Sense" off - switch_control "Line Jack Sense" off - - # Some machines need one or more of these to be on; - # others need one or more of these to be off: - # - # switch_control "External Amplifier" on - switch_control "Audigy Analog/Digital Output Jack" on - switch_control "SB Live Analog/Digital Output Jack" on - - # D1984 -- Thinkpad T61/X61 - switch_control "Speaker" on - switch_control "Headphone" on - - # HDA-Intel w/ "Digital" capture mixer (See Ubuntu #193823) - unmute_and_set_level "Digital" "80%" - - return 0 -} - -# $1 | "all" -sanify_levels() -{ - TTSDML_RETURNSTATUS=0 - case "$1" in - all) - for CARD in $(echo_card_indices) ; do - sanify_levels_on_card "$CARD" || TTSDML_RETURNSTATUS=1 - done - ;; - *) - sanify_levels_on_card "$1" || TTSDML_RETURNSTATUS=1 - ;; - esac - return $TTSDML_RETURNSTATUS -} - -# $1 -preinit_levels_on_card() -{ - CARDOPT="-c $1" - - # Silly dance to activate internal speakers by default on PowerMac - # Snapper and Tumbler - id=`cat /proc/asound/card$1/id 2>/dev/null` - if [ "$id" = "Snapper" -o "$id" = "Tumbler" ]; then - switch_control "Auto Mute" off - switch_control "PC Speaker" off - switch_control "Auto Mute" on - fi -} - -# $1 | "all" -preinit_levels() -{ - TTSDML_RETURNSTATUS=0 - case "$1" in - all) - for CARD in $(echo_card_indices) ; do - preinit_levels_on_card "$CARD" || TTSDML_RETURNSTATUS=1 - done - ;; - *) - preinit_levels_on_card "$1" || TTSDML_RETURNSTATUS=1 - ;; - esac - return $TTSDML_RETURNSTATUS -} - -# End copied code. - -# List all cards that *should* be usable for PCM audio. In my experience, -# the console speaker (handled by the pcsp driver) isn't a suitable playback -# device, so we'll exclude it. -list_non_pcsp_cards() -{ - for card in $(echo_card_indices); do - local cardfile="/proc/asound/card${card}/id" - if [ -r "$cardfile" -a -f "$cardfile" ] && \ - [ "$(cat "$cardfile")" != pcsp ]; then - echo "$card" - fi - done -} -- cgit v1.2.2