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

Commit 6e3516ef authored by Timothy Sham's avatar Timothy Sham Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm: qdsp6v2: increase max Rx DTMF duration



Increase the maximum value of the DTMF Rx Generate
mixer command and change the read to int16 to allow
for clients to be able to set '-1', infinite tone.

Change-Id: I44eed4712bb05a70b4464d9db38c348c131a3f61
Signed-off-by: default avatarTimothy Sham <tsham@codeaurora.org>
parent 46b4f445
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2014, 2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -97,12 +97,12 @@ static int msm_dtmf_rx_generate_put(struct snd_kcontrol *kcontrol,
{
	uint16_t low_freq = ucontrol->value.integer.value[0];
	uint16_t high_freq = ucontrol->value.integer.value[1];
	int64_t duration = ucontrol->value.integer.value[2];
	int16_t duration = ucontrol->value.integer.value[2];
	uint16_t gain = ucontrol->value.integer.value[3];

	pr_debug("%s: low_freq=%d high_freq=%d duration=%d gain=%d\n",
		 __func__, low_freq, high_freq, (int)duration, gain);
	afe_dtmf_generate_rx(duration, high_freq, low_freq, gain);
	afe_dtmf_generate_rx((int64_t) duration, high_freq, low_freq, gain);
	return 0;
}

@@ -154,7 +154,7 @@ static int msm_dtmf_detect_volte_rx_get(struct snd_kcontrol *kcontrol,

static struct snd_kcontrol_new msm_dtmf_controls[] = {
	SOC_SINGLE_MULTI_EXT("DTMF_Generate Rx Low High Duration Gain",
			     SND_SOC_NOPM, 0, 5000, 0, 4,
			     SND_SOC_NOPM, 0, 65535, 0, 4,
			     msm_dtmf_rx_generate_get,
			     msm_dtmf_rx_generate_put),
	SOC_SINGLE_EXT("DTMF_Detect Rx Voice enable", SND_SOC_NOPM, 0, 1, 0,