From 6e3516ef4c923b100fef80014deed3847de15c03 Mon Sep 17 00:00:00 2001 From: Timothy Sham Date: Thu, 3 May 2018 11:45:54 -0400 Subject: [PATCH] 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: Timothy Sham --- sound/soc/msm/qdsp6v2/msm-pcm-dtmf-v2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-dtmf-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-dtmf-v2.c index ea7989cb5a96..abbcfed39152 100644 --- a/sound/soc/msm/qdsp6v2/msm-pcm-dtmf-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-pcm-dtmf-v2.c @@ -1,4 +1,4 @@ -/* 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,