Skip to content

Commit 926f192

Browse files
committed
ASoC: codecs: Add aw88399 amplifier driver
Merge series from [email protected]: Add the awinic,aw88399 property to the awinic,aw88395.yaml file. Add i2c and amplifier registration for aw88399 and their associated operation functions.
2 parents b97f4da + 8ade6cc commit 926f192

File tree

7 files changed

+2531
-0
lines changed

7 files changed

+2531
-0
lines changed

Documentation/devicetree/bindings/sound/awinic,aw88395.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ properties:
1919
enum:
2020
- awinic,aw88395
2121
- awinic,aw88261
22+
- awinic,aw88399
2223

2324
reg:
2425
maxItems: 1

sound/soc/codecs/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ config SND_SOC_ALL_CODECS
5757
imply SND_SOC_AW87390
5858
imply SND_SOC_AW88395
5959
imply SND_SOC_AW88261
60+
imply SND_SOC_AW88399
6061
imply SND_SOC_BT_SCO
6162
imply SND_SOC_BD28623
6263
imply SND_SOC_CHV3_CODEC
@@ -680,6 +681,19 @@ config SND_SOC_AW87390
680681
sound quality, which is a new high efficiency, low
681682
noise, constant large volume, 6th Smart K audio amplifier.
682683

684+
config SND_SOC_AW88399
685+
tristate "Soc Audio for awinic aw88399"
686+
depends on I2C
687+
select CRC8
688+
select REGMAP_I2C
689+
select GPIOLIB
690+
select SND_SOC_AW88399_LIB
691+
help
692+
This option enables support for aw88399 Smart PA.
693+
The awinic AW88399 is an I2S/TDM input, high efficiency
694+
digital Smart K audio amplifier and SKTune speaker
695+
protection algorithms.
696+
683697
config SND_SOC_BD28623
684698
tristate "ROHM BD28623 CODEC"
685699
help

sound/soc/codecs/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ snd-soc-aw88395-lib-objs := aw88395/aw88395_lib.o
5252
snd-soc-aw88395-objs := aw88395/aw88395.o \
5353
aw88395/aw88395_device.o
5454
snd-soc-aw88261-objs := aw88261.o
55+
snd-soc-aw88399-objs := aw88399.o
5556
snd-soc-bd28623-objs := bd28623.o
5657
snd-soc-bt-sco-objs := bt-sco.o
5758
snd-soc-chv3-codec-objs := chv3-codec.o
@@ -440,6 +441,7 @@ obj-$(CONFIG_SND_SOC_AW87390) += snd-soc-aw87390.o
440441
obj-$(CONFIG_SND_SOC_AW88395_LIB) += snd-soc-aw88395-lib.o
441442
obj-$(CONFIG_SND_SOC_AW88395) +=snd-soc-aw88395.o
442443
obj-$(CONFIG_SND_SOC_AW88261) +=snd-soc-aw88261.o
444+
obj-$(CONFIG_SND_SOC_AW88399) += snd-soc-aw88399.o
443445
obj-$(CONFIG_SND_SOC_BD28623) += snd-soc-bd28623.o
444446
obj-$(CONFIG_SND_SOC_BT_SCO) += snd-soc-bt-sco.o
445447
obj-$(CONFIG_SND_SOC_CHV3_CODEC) += snd-soc-chv3-codec.o

sound/soc/codecs/aw88395/aw88395_lib.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,7 @@ static int aw_dev_load_cfg_by_hdr(struct aw_device *aw_dev,
705705

706706
switch (aw_dev->chip_id) {
707707
case AW88395_CHIP_ID:
708+
case AW88399_CHIP_ID:
708709
ret = aw88395_dev_cfg_get_valid_prof(aw_dev, all_prof_info);
709710
if (ret < 0)
710711
goto exit;
@@ -794,6 +795,7 @@ static int aw_get_dev_scene_count_v1(struct aw_device *aw_dev, struct aw_contain
794795

795796
switch (aw_dev->chip_id) {
796797
case AW88395_CHIP_ID:
798+
case AW88399_CHIP_ID:
797799
for (i = 0; i < cfg_hdr->ddt_num; ++i) {
798800
if ((cfg_dde[i].data_type == ACF_SEC_TYPE_MULTIPLE_BIN) &&
799801
(aw_dev->chip_id == cfg_dde[i].chip_id) &&
@@ -836,6 +838,7 @@ static int aw_get_default_scene_count_v1(struct aw_device *aw_dev,
836838

837839
switch (aw_dev->chip_id) {
838840
case AW88395_CHIP_ID:
841+
case AW88399_CHIP_ID:
839842
for (i = 0; i < cfg_hdr->ddt_num; ++i) {
840843
if ((cfg_dde[i].data_type == ACF_SEC_TYPE_MULTIPLE_BIN) &&
841844
(aw_dev->chip_id == cfg_dde[i].chip_id) &&

sound/soc/codecs/aw88395/aw88395_reg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
#define AW88395_TM_REG (0x7C)
9696

9797
enum aw88395_id {
98+
AW88399_CHIP_ID = 0x2183,
9899
AW88395_CHIP_ID = 0x2049,
99100
AW88261_CHIP_ID = 0x2113,
100101
AW87390_CHIP_ID = 0x76,

0 commit comments

Comments
 (0)