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.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
stdio.hstdlib.hunistd.hfcntl.hsys/types.hsys/stat.hsys/ioctl.hsys/soundcard.hstring.herrno.hasm/types.hsys/io.h
Detected Declarations
function mainfunction msnd_write_cfgfunction msnd_read_cfgfunction msnd_write_cfg_io0function msnd_read_cfg_io0function msnd_write_cfg_io1function msnd_read_cfg_io1function msnd_write_cfg_irqfunction msnd_read_cfg_irqfunction msnd_write_cfg_memfunction msnd_read_cfg_memfunction msnd_activate_logicalfunction msnd_write_cfg_logicalfunction msnd_read_cfg_logicalfunction usagefunction cfg_resetfunction cfg_showfunction cfg_dspfunction cfg_mpufunction cfg_idefunction cfg_joystickfunction mainfunction yywrapfunction mainfunction main
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
- Immediate include surface: `stdio.h`, `stdlib.h`, `unistd.h`, `fcntl.h`, `sys/types.h`, `sys/stat.h`, `sys/ioctl.h`, `sys/soundcard.h`.
- Detected declarations: `function main`, `function msnd_write_cfg`, `function msnd_read_cfg`, `function msnd_write_cfg_io0`, `function msnd_read_cfg_io0`, `function msnd_write_cfg_io1`, `function msnd_read_cfg_io1`, `function msnd_write_cfg_irq`, `function msnd_read_cfg_irq`, `function msnd_write_cfg_mem`.
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.