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

Commit b41cd771 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoc: Fix for dtmf tone play issue"

parents fd038455 29a4c3c9
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@

#define DRV_NAME "msm-pcm-dtmf-v2"

#define DTMF_MAX_DURATION 65535

enum {
	DTMF_IN_RX,
	DTMF_IN_TX,
@@ -94,8 +96,12 @@ static int msm_dtmf_rx_generate_put(struct snd_kcontrol *kcontrol,
	int64_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",
	pr_debug("%s: low_freq=%d high_freq=%d duration=%lld gain=%d\n",
		 __func__, low_freq, high_freq, (int)duration, gain);

	if (duration == DTMF_MAX_DURATION)
		duration = -1;

	afe_dtmf_generate_rx(duration, high_freq, low_freq, gain);
	return 0;
}