Skip to contentSkip to conversation

ASoC: audio-graph-card: Add audio mixer for Motorola mdm6600

PATCH In review Pavel Machek 2 participants 2 messages Jan 28, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ASoC: audio-graph-card: Add audio mixer for Motorola mdm6600

motmdm.c handles audio configuration on "gsmtty2"; it needs to know whether we are in call or not; that part is in motmdm-state.c and listens on "gsmtty1".

To configure Alsamixer for voice calls do for example:

Speaker Right -> Voice
Call Noise Cancellation -> Unmute
Call Output -> Speakerphone
Call -> 100
Mic2 -> 40
Left -> Mic 2
Voice -> 55
Mic2 -> 40
Left -> Mic 2

Tony wrote original version using custom interface to n_gsm, Pavel switched it to plain serdev and split it to two drivers to be easier to debug and understand. Credit is Tony's, bugs are probably Pavel's.

---

v2: fix compile error.

sound/soc/codecs/Kconfig +8 -0
index ba4eb54aafcb..94000ab3cf3e 100644
@@ -932,6 +932,14 @@ config SND_SOC_MAX9860
 	depends on I2C
 	select REGMAP_I2C
 
+config SND_SOC_MOTMDM
+	tristate "Motorola Modem TS 27.010 Voice Call Codec"
+	depends on SERIAL_DEV_BUS
+	help
+	  Enable support for Motorola TS 27.010 serdev voice
+	  call codec driver for Motorola Mapphone series of
+	  devices such as Droid 4.
+
 config SND_SOC_MSM8916_WCD_ANALOG
 	tristate "Qualcomm MSM8916 WCD Analog Codec"
 	depends on SPMI || COMPILE_TEST
sound/soc/codecs/Makefile +4 -0
index d277f0366e09..f63022e0a292 100644
@@ -128,6 +128,8 @@ snd-soc-max9850-objs := max9850.o
 snd-soc-max9860-objs := max9860.o
 snd-soc-mc13783-objs := mc13783.o
 snd-soc-ml26124-objs := ml26124.o
+snd-soc-motmdm-objs := motmdm.o
+snd-soc-motmdm-state-objs := motmdm-state.o
 snd-soc-msm8916-analog-objs := msm8916-wcd-analog.o
 snd-soc-msm8916-digital-objs := msm8916-wcd-digital.o
 snd-soc-mt6351-objs := mt6351.o
@@ -443,6 +445,8 @@ obj-$(CONFIG_SND_SOC_MAX9850)	+= snd-soc-max9850.o
 obj-$(CONFIG_SND_SOC_MAX9860)	+= snd-soc-max9860.o
 obj-$(CONFIG_SND_SOC_MC13783)	+= snd-soc-mc13783.o
 obj-$(CONFIG_SND_SOC_ML26124)	+= snd-soc-ml26124.o
+obj-$(CONFIG_SND_SOC_MOTMDM)	+= snd-soc-motmdm.o
+obj-$(CONFIG_SND_SOC_MOTMDM)	+= snd-soc-motmdm-state.o
 obj-$(CONFIG_SND_SOC_MSM8916_WCD_ANALOG) +=snd-soc-msm8916-analog.o
 obj-$(CONFIG_SND_SOC_MSM8916_WCD_DIGITAL) +=snd-soc-msm8916-digital.o
 obj-$(CONFIG_SND_SOC_MT6351)	+= snd-soc-mt6351.o
sound/soc/codecs/motmdm-state.c new file +177 -0

177 lines not on this page · raw message

sound/soc/codecs/motmdm.c new file +688 -0

688 lines not on this page · raw message

#1 lore raw

Hi Pavel

Quoted 16 lines

motmdm.c handles audio configuration on "gsmtty2"; it needs to know whether we are in call or not; that part is in motmdm-state.c and listens on "gsmtty1".

To configure Alsamixer for voice calls do for example:

Speaker Right -> Voice
Call Noise Cancellation -> Unmute
Call Output -> Speakerphone
Call -> 100
Mic2 -> 40
Left -> Mic 2
Voice -> 55
Mic2 -> 40
Left -> Mic 2

Quoted 7 lines

Tony wrote original version using custom interface to n_gsm, Pavel switched it to plain serdev and split it to two drivers to be easier to debug and understand. Credit is Tony's, bugs are probably Pavel's.

---

This is not a big deal, but the this patch is not
directly related to audio-graph-card.
Including it on Subject is confusable.

Thank you for your help !!

Best regards
---
Kuninori Morimoto