Documentation/sound/cards/multisound.sh

Source file repositories/reference/linux-study-clean/Documentation/sound/cards/multisound.sh

File Facts

System
Linux kernel
Corpus path
Documentation/sound/cards/multisound.sh
Extension
.sh
Size
37084 bytes
Lines
1140
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: Documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

X	if (argc != 2) {
X		fprintf(stderr, "usage: setdigital <mixer device>\n");
X		exit(1);
X	}
X
X	if ((fd = open(argv[1], O_RDWR)) < 0) {
X		perror(argv[1]);
X		exit(1);
X	}
X
X	if (ioctl(fd, SOUND_MIXER_READ_RECMASK, &recmask) < 0) {
X		fprintf(stderr, "error: ioctl read recording mask failed\n");
X		perror("ioctl");
X		close(fd);
X		exit(1);
X	}
X
X	if (!(recmask & SOUND_MASK_DIGITAL1)) {
X		fprintf(stderr, "error: cannot find DIGITAL1 device in mixer\n");
X		close(fd);
X		exit(1);
X	}
X
X	if (ioctl(fd, SOUND_MIXER_READ_RECSRC, &recsrc) < 0) {
X		fprintf(stderr, "error: ioctl read recording source failed\n");
X		perror("ioctl");
X		close(fd);
X		exit(1);
X	}
X
X	recsrc |= SOUND_MASK_DIGITAL1;
X
X	if (ioctl(fd, SOUND_MIXER_WRITE_RECSRC, &recsrc) < 0) {
X		fprintf(stderr, "error: ioctl write recording source failed\n");
X		perror("ioctl");
X		close(fd);
X		exit(1);
X	}
X
X	close(fd);
X
X	return 0;
}
SHAR_EOF
  $shar_touch -am 1204092598 'MultiSound.d/setdigital.c' &&
  chmod 0664 'MultiSound.d/setdigital.c' ||
  $echo 'restore of' 'MultiSound.d/setdigital.c' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'MultiSound.d/setdigital.c:' 'MD5 check failed'
e87217fc3e71288102ba41fd81f71ec4  MultiSound.d/setdigital.c
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/setdigital.c'`"
    test 2064 -eq "$shar_count" ||
    $echo 'MultiSound.d/setdigital.c:' 'original size' '2064,' 'current size' "$shar_count!"
  fi
fi
# ============= MultiSound.d/pinnaclecfg.c ==============
if test -f 'MultiSound.d/pinnaclecfg.c' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'MultiSound.d/pinnaclecfg.c' '(file already exists)'
else
  $echo 'x -' extracting 'MultiSound.d/pinnaclecfg.c' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/pinnaclecfg.c' &&
/*********************************************************************
X *
X * pinnaclecfg.c - Pinnacle/Fiji Device Configuration Program
X *
X * This is for NON-PnP mode only.  For PnP mode, use isapnptools.

Annotation

Implementation Notes