ASoC: audio-graph-card: Add audio mixer for Motorola mdm6600
PATCH 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 + sound/soc/codecs/Makefile | 4 + sound/soc/codecs/motmdm-state.c | 177 ++++++++ sound/soc/codecs/motmdm.c | 688 ++++++++++++++++++++++++++++++++ 4 files changed, 877 insertions(+) create mode 100644 sound/soc/codecs/motmdm-state.c create mode 100644 sound/soc/codecs/motmdm.c
sound/soc/codecs/Kconfig +8 -0
@@ -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
@@ -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
Signature · 6 lines
2.20.1 -- http://www.livejournal.com/~pavelmachek
Hi Pavel
Quoted 3 lines
motmdm.chandles audio configuration on "gsmtty2"; it needs to know whether we are in call or not; that part is inmotmdm-state.cand listens on "gsmtty1".
Subject is very confusable.
I think this patch is not related to audio-graph-card ? I think it can be
- ASoC: audio-graph-card: Add audio mixer for Motorola mdm6600 : ASoC: motmdm: Add audio mixer for Motorola mdm6600
Thank you for your help !!
Best regards
---
Kuninori Morimoto
kernel test robot
build botI love your patch! Yet something to improve:
Hi Pavel,
I love your patch! Yet something to improve:
[auto build test ERROR on asoc/for-next]
[also build test ERROR on linux/master linus/master v5.12-rc4 next-20210326] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Pavel-Machek/ASoC-audio-graph-card-Add-audio-mixer-for-Motorola-mdm6600/20210328-191104 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next config: x86_64-allyesconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/654466aa66c5062f6ca787461a9606313fa7026e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Pavel-Machek/ASoC-audio-graph-card-Add-audio-mixer-for-Motorola-mdm6600/20210328-191104 git checkout 654466aa66c5062f6ca787461a9606313fa7026e # save the attached .config to linux build tree make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
>> sound/soc/codecs/motmdm.c:23:10: fatal error: motmdm-state.h: No such file or directory
23 | #include "motmdm-state.h"
| ^~~~~~~~~~~~~~~~ compilation terminated.
--
sound/soc/codecs/motmdm-state.c:35:5: warning: no previous prototype for 'register_modem_state_notifier' [-Wmissing-prototypes]
35 | int register_modem_state_notifier(struct notifier_block *nb)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/motmdm-state.c:41:5: warning: no previous prototype for 'unregister_modem_state_notifier' [-Wmissing-prototypes]
41 | int unregister_modem_state_notifier(struct notifier_block *nb)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/motmdm-state.c: In function 'modem_state_notifier_call_chain':
>> sound/soc/codecs/motmdm-state.c:50:8: error: implicit declaration of function '__blocking_notifier_call_chain'; did you mean 'blocking_notifier_call_chain'? [-Werror=implicit-function-declaration]
50 | ret = __blocking_notifier_call_chain(&modem_state_chain_head, val, NULL,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| blocking_notifier_call_chaincc1: some warnings being treated as errors
vim +23 sound/soc/codecs/motmdm.c
22
> 23 #include "motmdm-state.h"
24 ---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org