You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
ASoC: add support for TAS5720 digital amplifier
The Texas Instruments TAS5720L/M device is a high-efficiency mono Class-D audio power amplifier optimized for high transient power capability to use the dynamic power headroom of small loudspeakers. Its digital time division multiplexed (TDM) interface enables up to 16 devices to share the same bus. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
4e2f17be8f
commit
bd023ada36
@@ -124,6 +124,7 @@ config SND_SOC_ALL_CODECS
|
||||
select SND_SOC_TAS2552 if I2C
|
||||
select SND_SOC_TAS5086 if I2C
|
||||
select SND_SOC_TAS571X if I2C
|
||||
select SND_SOC_TAS5720 if I2C
|
||||
select SND_SOC_TFA9879 if I2C
|
||||
select SND_SOC_TLV320AIC23_I2C if I2C
|
||||
select SND_SOC_TLV320AIC23_SPI if SPI_MASTER
|
||||
@@ -740,6 +741,13 @@ config SND_SOC_TAS571X
|
||||
tristate "Texas Instruments TAS5711/TAS5717/TAS5719/TAS5721 power amplifiers"
|
||||
depends on I2C
|
||||
|
||||
config SND_SOC_TAS5720
|
||||
tristate "Texas Instruments TAS5720 Mono Audio amplifier"
|
||||
depends on I2C
|
||||
help
|
||||
Enable support for Texas Instruments TAS5720L/M high-efficiency mono
|
||||
Class-D audio power amplifiers.
|
||||
|
||||
config SND_SOC_TFA9879
|
||||
tristate "NXP Semiconductors TFA9879 amplifier"
|
||||
depends on I2C
|
||||
|
||||
@@ -129,6 +129,7 @@ snd-soc-stac9766-objs := stac9766.o
|
||||
snd-soc-sti-sas-objs := sti-sas.o
|
||||
snd-soc-tas5086-objs := tas5086.o
|
||||
snd-soc-tas571x-objs := tas571x.o
|
||||
snd-soc-tas5720-objs := tas5720.o
|
||||
snd-soc-tfa9879-objs := tfa9879.o
|
||||
snd-soc-tlv320aic23-objs := tlv320aic23.o
|
||||
snd-soc-tlv320aic23-i2c-objs := tlv320aic23-i2c.o
|
||||
@@ -335,6 +336,7 @@ obj-$(CONFIG_SND_SOC_STI_SAS) += snd-soc-sti-sas.o
|
||||
obj-$(CONFIG_SND_SOC_TAS2552) += snd-soc-tas2552.o
|
||||
obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o
|
||||
obj-$(CONFIG_SND_SOC_TAS571X) += snd-soc-tas571x.o
|
||||
obj-$(CONFIG_SND_SOC_TAS5720) += snd-soc-tas5720.o
|
||||
obj-$(CONFIG_SND_SOC_TFA9879) += snd-soc-tfa9879.o
|
||||
obj-$(CONFIG_SND_SOC_TLV320AIC23) += snd-soc-tlv320aic23.o
|
||||
obj-$(CONFIG_SND_SOC_TLV320AIC23_I2C) += snd-soc-tlv320aic23-i2c.o
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* tas5720.h - ALSA SoC Texas Instruments TAS5720 Mono Audio Amplifier
|
||||
*
|
||||
* Copyright (C)2015-2016 Texas Instruments Incorporated - http://www.ti.com
|
||||
*
|
||||
* Author: Andreas Dannenberg <dannenberg@ti.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __TAS5720_H__
|
||||
#define __TAS5720_H__
|
||||
|
||||
/* Register Address Map */
|
||||
#define TAS5720_DEVICE_ID_REG 0x00
|
||||
#define TAS5720_POWER_CTRL_REG 0x01
|
||||
#define TAS5720_DIGITAL_CTRL1_REG 0x02
|
||||
#define TAS5720_DIGITAL_CTRL2_REG 0x03
|
||||
#define TAS5720_VOLUME_CTRL_REG 0x04
|
||||
#define TAS5720_ANALOG_CTRL_REG 0x06
|
||||
#define TAS5720_FAULT_REG 0x08
|
||||
#define TAS5720_DIGITAL_CLIP2_REG 0x10
|
||||
#define TAS5720_DIGITAL_CLIP1_REG 0x11
|
||||
#define TAS5720_MAX_REG TAS5720_DIGITAL_CLIP1_REG
|
||||
|
||||
/* TAS5720_DEVICE_ID_REG */
|
||||
#define TAS5720_DEVICE_ID 0x01
|
||||
|
||||
/* TAS5720_POWER_CTRL_REG */
|
||||
#define TAS5720_DIG_CLIP_MASK GENMASK(7, 2)
|
||||
#define TAS5720_SLEEP BIT(1)
|
||||
#define TAS5720_SDZ BIT(0)
|
||||
|
||||
/* TAS5720_DIGITAL_CTRL1_REG */
|
||||
#define TAS5720_HPF_BYPASS BIT(7)
|
||||
#define TAS5720_TDM_CFG_SRC BIT(6)
|
||||
#define TAS5720_SSZ_DS BIT(3)
|
||||
#define TAS5720_SAIF_RIGHTJ_24BIT (0x0)
|
||||
#define TAS5720_SAIF_RIGHTJ_20BIT (0x1)
|
||||
#define TAS5720_SAIF_RIGHTJ_18BIT (0x2)
|
||||
#define TAS5720_SAIF_RIGHTJ_16BIT (0x3)
|
||||
#define TAS5720_SAIF_I2S (0x4)
|
||||
#define TAS5720_SAIF_LEFTJ (0x5)
|
||||
#define TAS5720_SAIF_FORMAT_MASK GENMASK(2, 0)
|
||||
|
||||
/* TAS5720_DIGITAL_CTRL2_REG */
|
||||
#define TAS5720_MUTE BIT(4)
|
||||
#define TAS5720_TDM_SLOT_SEL_MASK GENMASK(2, 0)
|
||||
|
||||
/* TAS5720_ANALOG_CTRL_REG */
|
||||
#define TAS5720_PWM_RATE_6_3_FSYNC (0x0 << 4)
|
||||
#define TAS5720_PWM_RATE_8_4_FSYNC (0x1 << 4)
|
||||
#define TAS5720_PWM_RATE_10_5_FSYNC (0x2 << 4)
|
||||
#define TAS5720_PWM_RATE_12_6_FSYNC (0x3 << 4)
|
||||
#define TAS5720_PWM_RATE_14_7_FSYNC (0x4 << 4)
|
||||
#define TAS5720_PWM_RATE_16_8_FSYNC (0x5 << 4)
|
||||
#define TAS5720_PWM_RATE_20_10_FSYNC (0x6 << 4)
|
||||
#define TAS5720_PWM_RATE_24_12_FSYNC (0x7 << 4)
|
||||
#define TAS5720_PWM_RATE_MASK GENMASK(6, 4)
|
||||
#define TAS5720_ANALOG_GAIN_19_2DBV (0x0 << 2)
|
||||
#define TAS5720_ANALOG_GAIN_20_7DBV (0x1 << 2)
|
||||
#define TAS5720_ANALOG_GAIN_23_5DBV (0x2 << 2)
|
||||
#define TAS5720_ANALOG_GAIN_26_3DBV (0x3 << 2)
|
||||
#define TAS5720_ANALOG_GAIN_MASK GENMASK(3, 2)
|
||||
#define TAS5720_ANALOG_GAIN_SHIFT (0x2)
|
||||
|
||||
/* TAS5720_FAULT_REG */
|
||||
#define TAS5720_OC_THRESH_100PCT (0x0 << 4)
|
||||
#define TAS5720_OC_THRESH_75PCT (0x1 << 4)
|
||||
#define TAS5720_OC_THRESH_50PCT (0x2 << 4)
|
||||
#define TAS5720_OC_THRESH_25PCT (0x3 << 4)
|
||||
#define TAS5720_OC_THRESH_MASK GENMASK(5, 4)
|
||||
#define TAS5720_CLKE BIT(3)
|
||||
#define TAS5720_OCE BIT(2)
|
||||
#define TAS5720_DCE BIT(1)
|
||||
#define TAS5720_OTE BIT(0)
|
||||
#define TAS5720_FAULT_MASK GENMASK(3, 0)
|
||||
|
||||
/* TAS5720_DIGITAL_CLIP1_REG */
|
||||
#define TAS5720_CLIP1_MASK GENMASK(7, 2)
|
||||
#define TAS5720_CLIP1_SHIFT (0x2)
|
||||
|
||||
#endif /* __TAS5720_H__ */
|
||||
Reference in New Issue
Block a user