This file is indexed.

/usr/share/tcos/scripts/tcos-bottom/40initsound is in initramfs-tools-tcos 0.89.93ubuntu2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  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
#!/bin/sh
# 
if [ "$1" = "prereqs" ]; then
  exit 0
fi

quiet=n


. /scripts/functions
. /conf/tcos.conf
. /conf/tcos-run-functions

. /bin/set-limits

# if break=initsound STOP here
maybe_break initsound

TCOS_DISABLE_SOUND=$(read_cmdline_var "nosound" "0")

if [ "${TCOS_SOUND}" = "0" -o "${TCOS_DISABLE_SOUND}" = "1" ]; then
  log_begin_msg "Sound disabled"
  log_end_msg 1
  exit 0
fi


# check if soundcard is avalaible
if [ ! -e /proc/asound  ] && [ ! -e /dev/dsp ] ; then
  _log "INITSOUND /proc/asound and /dev/dsp don't exists, need other kernel modules!!!"
  log_failure_msg "No soundcard found"
  log_end_msg 1
  exit 0
fi

# DOCUMENTME volume=XX% | set master and pcm volume levels to value passed (0%-100% or integer from 1 to 31)
TCOS_VOLUME=$(read_cmdline_var "volume" "${TCOS_VOLUME}")

if [ -e /dev/dsp ] && [ ! -e /proc/asound ]; then
   export TCOS_SOUND_OSS=1
   echo "TCOS_SOUND_OSS=1" >> /conf/tcos.conf

  log_begin_msg "OSS detected, try to search another sound device with ALSA support"
  log_end_msg 1
  exit 0
fi

if [ -n "$TCOS_PULSEAUDIO" ]; then
  log_begin_msg "Init sound server (PulseAudio)"
    _log "INITSOUND starting pulseaudio"
    startpulseaudio 2> /var/log/pulseaudio.log &
  log_end_msg $?
fi

TCOS_VOLUME_MIC=75

# setting volumes, set after sound server initialization
log_begin_msg "Setting audio levels to ${TCOS_VOLUME}%"
  _log "INITSOUND Setting volume to ${TCOS_VOLUME}"
  tmixer -c 0 sset 'Front' ${TCOS_VOLUME}                >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Front' on                            >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'PCM' ${TCOS_VOLUME}                  >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'PCM' on                              >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Master' ${TCOS_VOLUME}               >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Master' on                           >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Master Mono' ${TCOS_VOLUME}          >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Master Mono' on                      >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Master Front' ${TCOS_VOLUME}         >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Master Front' on                     >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Master Digital' ${TCOS_VOLUME}       >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Master Digital' on                   >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Mic' ${TCOS_VOLUME_MIC}              >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Front Mic' ${TCOS_VOLUME_MIC}        >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Rear Mic' ${TCOS_VOLUME_MIC}         >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Mic' off                             >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Front Mic' off                       >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Rear Mic' off                        >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Mic Boost (+20dB)' off               >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Mic Boost' off                       >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Rear Mic Boost' off                  >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Front Mic Boost' off                 >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Mic Boost (+20dB)' 0%                >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Mic Boost' 0%                        >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Rear Mic Boost' 0%                   >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Front Mic Boost' 0%                  >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Headphone' ${TCOS_VOLUME}            >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Headphone' on                        >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Speaker' on                          >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Capture' cap                         >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Capture,0' cap                       >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Capture,1' cap                       >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Capture,2' cap                       >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Capture,3' cap                       >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Capture' 90%                         >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Capture,0' 90%                       >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Capture,1' 90%                       >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Capture,2' 90%                       >> /tmp/initramfs.debug 2>&1
  tmixer -c 0 sset 'Capture,3' 90%                       >> /tmp/initramfs.debug 2>&1
log_end_msg 0

exit 0