Linux kernel driver for Texas Instruments TAS audio amplifier chips (TAS5805, TAS5822, TAS6424, TAS6584, TAS5825).
- ASoC (ALSA System on Chip) integration
- Support for multiple devices on the same I2C bus
- Firmware-based configuration loading
- Device Tree and ACPI support
- Sysfs interface for debugging and configuration
- IRQ handling for device status monitoring
- TAS5805M - Stereo digital input Class-D amplifier
- TAS5822M - High efficiency digital input Class-D amplifier
- TAS6424-Q1 - Four-channel digital input Class-D amplifier
- TAS6584 - Multi-channel amplifier
- TAS5825M - Stereo high-performance closed-loop Class-D amplifier
- Linux kernel headers matching your running kernel
- GCC compiler
- Make
cd tasdevice
make -C /lib/modules/$(uname -r)/build M=$(pwd) CONFIG_SND_SOC_TASDEVICE=m modulesThe compiled module will be snd-soc-tasdevice.ko.
See compile-scripts/BBB-compile-tool/ for BeagleBone Black cross-compilation scripts.
# Copy module to kernel modules directory
sudo cp snd-soc-tasdevice.ko /lib/modules/$(uname -r)/extra/
# Update module dependencies
sudo depmod -a
# Load the module
sudo modprobe snd-soc-tasdeviceExample device tree entry:
i2c {
tasdevice: tasdevice@6a {
compatible = "ti,tas6424";
reg = <0x6a>, <0x6b>; /* primary and secondary devices */
#sound-dai-cells = <0>;
reset-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
interrupt-parent = <&gpio1>;
interrupts = <15>;
};
};
See ti,tasdevice.yaml for complete device tree binding documentation.
This repository includes a git pre-commit hook that performs linting checks:
- Kernel coding style checks using
checkpatch.pl - Basic syntax validation
- Trailing whitespace detection
- Line ending checks
Run the setup script to install the git hooks:
./scripts/setup-git-hooks.shThis will install the pre-commit hook to .git/hooks/pre-commit.
The hook runs automatically on git commit. It will check all staged .c and .h files.
To bypass the hook (not recommended):
git commit --no-verifyYou can test the hook manually:
.git/hooks/pre-commitThis driver follows the Linux kernel coding style. Key points:
- Use tabs (not spaces) for indentation
- Line length: 80 characters preferred, 100 maximum
- Function documentation in kernel-doc format
- Follow kernel naming conventions
Firmware binary files should be placed in /lib/firmware/ with the naming pattern:
tas5805-{N}amp-reg.bin(where N is the number of devices)tas5822-{N}amp-reg.bintas6424-{N}amp-reg.bin
Example: tas5805-2amp-reg.bin for a 2-device TAS5805 configuration.
The driver provides several sysfs interfaces for debugging:
/sys/bus/i2c/devices/*/reg- Read/write registers/sys/bus/i2c/devices/*/regdump- Dump register page/sys/bus/i2c/devices/*/regbininfo_list- List firmware configurations/sys/bus/i2c/devices/*/regcfg_list- View configuration details/sys/bus/i2c/devices/*/devinfo- Device information
Copyright (C) 2022 - 2023, Texas Instruments Incorporated
See individual source files for license details.
- Eliam Liu eliam-liu@ti.com
- Shenghao Ding shenghao-ding@ti.com