Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a10d34a5 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge f277ee31 on remote branch

Change-Id: I87db6bea0bd86aa26d235893fbd1897efa0d4d10
parents ea9d2805 f277ee31
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ include $(MY_LOCAL_PATH)/asoc/codecs/aqt1000/Android.mk
endif
endif

ifeq ($(call is-board-platform-in-list,$(MSMSTEPPE) $(TRINKET)),true)
ifeq ($(call is-board-platform-in-list,$(MSMSTEPPE) $(TRINKET) bengal),true)
ifneq ($(TARGET_BOARD_AUTO),true)
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/bolero/Module.symvers)
include $(MY_LOCAL_PATH)/asoc/codecs/bolero/Android.mk
@@ -47,7 +47,7 @@ include $(MY_LOCAL_PATH)/asoc/codecs/wcd937x/Android.mk
endif
endif

ifeq ($(call is-board-platform-in-list, kona lito bengal),true)
ifeq ($(call is-board-platform-in-list, kona lito),true)
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/bolero/Module.symvers)
include $(MY_LOCAL_PATH)/asoc/codecs/bolero/Android.mk
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/wcd938x/Module.symvers)
+5 −0
Original line number Diff line number Diff line
@@ -36,6 +36,11 @@ TARGET := lito
AUDIO_SELECT  := CONFIG_SND_SOC_LITO=m
endif

ifeq ($(call is-board-platform,bengal),true)
TARGET := bengal
AUDIO_SELECT  := CONFIG_SND_SOC_BENGAL=m
endif

AUDIO_CHIPSET := audio
# Build/Package only in case of supported target
ifeq ($(call is-board-platform-in-list,msmnile $(MSMSTEPPE) $(TRINKET) kona lito bengal sdmshrike),true)
+10 −2
Original line number Diff line number Diff line
@@ -51,9 +51,9 @@ ifeq ($(KERNEL_BUILD), 0)
		INCS    +=  -include $(AUDIO_ROOT)/config/litoautoconf.h
	endif
	ifeq ($(CONFIG_ARCH_BENGAL), y)
		include $(AUDIO_ROOT)/config/litoauto.conf
		include $(AUDIO_ROOT)/config/bengalauto.conf
		export
		INCS    +=  -include $(AUDIO_ROOT)/config/litoautoconf.h
		INCS    +=  -include $(AUDIO_ROOT)/config/bengalautoconf.h
	endif
	ifeq ($(CONFIG_ARCH_SDMSHRIKE), y)
		ifdef CONFIG_SND_SOC_SA8155
@@ -135,6 +135,11 @@ ifdef CONFIG_SND_SOC_LITO
	MACHINE_OBJS += kona.o
endif

# for BENGAL sound card driver
ifdef CONFIG_SND_SOC_BENGAL
	MACHINE_OBJS += bengal.o
endif

# for sa8155 sound card driver
ifdef CONFIG_SND_SOC_SA8155
	MACHINE_OBJS += sa8155.o
@@ -244,6 +249,9 @@ machine_dlkm-y := $(MACHINE_OBJS)
obj-$(CONFIG_SND_SOC_LITO) += machine_dlkm.o
machine_dlkm-y := $(MACHINE_OBJS)

obj-$(CONFIG_SND_SOC_BENGAL) += machine_dlkm.o
machine_dlkm-y := $(MACHINE_OBJS)

obj-$(CONFIG_SND_SOC_SA8155) += machine_dlkm.o
machine_dlkm-y := $(MACHINE_OBJS)

+45 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 */

#ifndef _BENGAL_PORT_CONFIG
#define _BENGAL_PORT_CONFIG

#include <soc/swr-common.h>

/*
 * Add port configuration in the format
 *{ si, off1, off2, hstart, hstop, wd_len, bp_mode, bgp_ctrl, lane_ctrl}
 */

static struct port_params rx_frame_params_default[SWR_MSTR_PORT_LEN] = {
	{3,  0,  0,  0xFF, 0xFF, 1,    0xFF, 0xFF, 1},
	{31, 0,  0,  3,    6,    7,    0,    0xFF, 0},
	{31, 11, 11, 0xFF, 0xFF, 4,    1,    0xFF, 0},
	{7,  1,  0,  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0},
	{0,  0,  0,  0xFF, 0xFF, 0xFF, 0xFF, 0,    0},
};

static struct port_params rx_frame_params_dsd[SWR_MSTR_PORT_LEN] = {
	{3,  0,  0,  0xFF, 0xFF, 1,    0xFF, 0xFF, 1},
	{31, 0,  0,  3,    6,    7,    0,    0xFF, 0},
	{31, 11, 11, 0xFF, 0xFF, 4,    1,    0xFF, 0},
	{7,  9,  0,  0xFF, 0xFF, 0xFF, 0xFF, 1,    0},
	{3,  1,  0,  0xFF, 0xFF, 0xFF, 0xFF, 3,    0},
};

/* TX UC1: TX1: 1ch, TX2: 2chs, TX3: 1ch(MBHC) */
static struct port_params tx_frame_params_default[SWR_MSTR_PORT_LEN] = {
	{1,  1,  0,  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0},  /* TX1 */
	{1,  0,  0,  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1},  /* TX2 */
	{3,  2,  0,  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0},  /* TX3 */
};

static struct swr_mstr_port_map sm_port_map[] = {
	{TX_MACRO, SWR_UC0, tx_frame_params_default},
	{RX_MACRO, SWR_UC0, rx_frame_params_default},
	{RX_MACRO, SWR_UC1, rx_frame_params_dsd},
};

#endif /* _BENGAL_PORT_CONFIG */

asoc/bengal.c

0 → 100644
+6607 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading