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

Commit 6c7b115e authored by Sudheer Papothi's avatar Sudheer Papothi Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm8996: Send speaker configuration to codec



Speaker configuration varies based on aux codec variant, but
the configuration will be controlled by wcd9335 codec. So, send
speaker configuration of aux codec to wcd9335 from 8996 machine
driver based on aux codec variant.

Change-Id: Iee7f4e68582793e6f5c4daea29c0c2f2f36f3f25
Signed-off-by: default avatarSudheer Papothi <spapothi@codeaurora.org>
parent b01195a6
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -57,6 +57,12 @@
#define ADSP_STATE_READY_TIMEOUT_MS    3000
#define DEV_NAME_STR_LEN            32

enum {
	AUX_DEV_NONE = 0,
	WSA8810,
	WSA8815,
};

static int slim0_rx_sample_rate = SAMPLING_RATE_48KHZ;
static int slim0_tx_sample_rate = SAMPLING_RATE_48KHZ;
static int slim0_rx_bit_format = SNDRV_PCM_FORMAT_S16_LE;
@@ -80,6 +86,8 @@ static int msm_proxy_rx_ch = 2;
static int hdmi_rx_sample_rate = SAMPLING_RATE_48KHZ;
static int msm_tert_mi2s_tx_ch = 2;

static int aux_dev_type;

static bool codec_reg_done;

static const char *const hifi_function[] = {"Off", "On"};
@@ -1744,6 +1752,8 @@ static int msm_audrx_init(struct snd_soc_pcm_runtime *rtd)
	} else {
		tasha_event_register(msm8996_tasha_codec_event_cb, rtd->codec);
		tasha_enable_efuse_sensing(rtd->codec);
		if (aux_dev_type == WSA8810)
			tasha_set_spkr_mode(rtd->codec, SPKR_MODE_1);
	}

	codec_reg_done = true;