Unverified Commit 926f192f authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: codecs: Add aw88399 amplifier driver

Merge series from wangweidong.a@awinic.com:

Add the awinic,aw88399 property to the awinic,aw88395.yaml file.

Add i2c and amplifier registration for
aw88399 and their associated operation functions.
parents b97f4dac 8ade6cc7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ properties:
    enum:
      - awinic,aw88395
      - awinic,aw88261
      - awinic,aw88399

  reg:
    maxItems: 1
+14 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ config SND_SOC_ALL_CODECS
	imply SND_SOC_AW87390
	imply SND_SOC_AW88395
	imply SND_SOC_AW88261
	imply SND_SOC_AW88399
	imply SND_SOC_BT_SCO
	imply SND_SOC_BD28623
	imply SND_SOC_CHV3_CODEC
@@ -680,6 +681,19 @@ config SND_SOC_AW87390
	  sound quality, which is a new high efficiency, low
	  noise, constant large volume, 6th Smart K audio amplifier.

config SND_SOC_AW88399
	tristate "Soc Audio for awinic aw88399"
	depends on I2C
	select CRC8
	select REGMAP_I2C
	select GPIOLIB
	select SND_SOC_AW88399_LIB
	help
	  This option enables support for aw88399 Smart PA.
	  The awinic AW88399 is an I2S/TDM input, high efficiency
	  digital Smart K audio amplifier and SKTune speaker
	  protection algorithms.

config SND_SOC_BD28623
	tristate "ROHM BD28623 CODEC"
	help
+2 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ snd-soc-aw88395-lib-objs := aw88395/aw88395_lib.o
snd-soc-aw88395-objs := aw88395/aw88395.o \
			aw88395/aw88395_device.o
snd-soc-aw88261-objs := aw88261.o
snd-soc-aw88399-objs := aw88399.o
snd-soc-bd28623-objs := bd28623.o
snd-soc-bt-sco-objs := bt-sco.o
snd-soc-chv3-codec-objs := chv3-codec.o
@@ -440,6 +441,7 @@ obj-$(CONFIG_SND_SOC_AW87390) += snd-soc-aw87390.o
obj-$(CONFIG_SND_SOC_AW88395_LIB) += snd-soc-aw88395-lib.o
obj-$(CONFIG_SND_SOC_AW88395)	+=snd-soc-aw88395.o
obj-$(CONFIG_SND_SOC_AW88261)	+=snd-soc-aw88261.o
obj-$(CONFIG_SND_SOC_AW88399)	+= snd-soc-aw88399.o
obj-$(CONFIG_SND_SOC_BD28623)	+= snd-soc-bd28623.o
obj-$(CONFIG_SND_SOC_BT_SCO)	+= snd-soc-bt-sco.o
obj-$(CONFIG_SND_SOC_CHV3_CODEC) += snd-soc-chv3-codec.o
+3 −0
Original line number Diff line number Diff line
@@ -705,6 +705,7 @@ static int aw_dev_load_cfg_by_hdr(struct aw_device *aw_dev,

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

	switch (aw_dev->chip_id) {
	case AW88395_CHIP_ID:
	case AW88399_CHIP_ID:
		for (i = 0; i < cfg_hdr->ddt_num; ++i) {
			if ((cfg_dde[i].data_type == ACF_SEC_TYPE_MULTIPLE_BIN) &&
			    (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,

	switch (aw_dev->chip_id) {
	case AW88395_CHIP_ID:
	case AW88399_CHIP_ID:
		for (i = 0; i < cfg_hdr->ddt_num; ++i) {
			if ((cfg_dde[i].data_type == ACF_SEC_TYPE_MULTIPLE_BIN) &&
			    (aw_dev->chip_id == cfg_dde[i].chip_id) &&
+1 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@
#define AW88395_TM_REG			(0x7C)

enum aw88395_id {
	AW88399_CHIP_ID = 0x2183,
	AW88395_CHIP_ID = 0x2049,
	AW88261_CHIP_ID = 0x2113,
	AW87390_CHIP_ID = 0x76,
Loading